using MuchInfo.Chart.Data.EnumTypes;
using MuchInfo.Chart.Data.Interfaces;
using MuchInfo.Chart.Utilities.Enums;
using System.Collections;
using System.Collections.Generic;
using System.Windows;
using System.Windows.Media;
namespace MuchInfo.Chart.Data.Models
{
///
/// 定义图表相关参数
///
public class IndicatorModel
{
private const string _cond = "COND";
private const string _upLineName = "PRICE2";
///
/// 填充区域在Subdata中的键值
///
public string FillRNGKey
{
get { return _upLineName; }
}
///
/// FillRNG绘图条件
///
public string CondKey
{
get { return _cond; }
}
///
/// 图表类型
///
public LinePlotType LinePlotType { get; set; } //todo:编辑器中比较多类型未实现
///
/// 数据格式,如2f
///
public string DataFormat { get; set; }
///
/// Alpha值用于调整图表透明度
///
public byte Alpha { get; set; }
///
/// 点类型
///
public PointDotType PointDotType { get; set; }
///
/// 填充区域颜色
///
public Color AreaBrush { get; set; }
///
/// 点样式
///
public DashStyleType DashStyleType { get; set; }
///
/// 上升时颜色,如未使用两种颜色的图表,默认作为为图表颜色。
///
public Color UpBrush { get; set; }
///
/// 下降时颜色
///
public Color DownBrush { get; set; }
///
/// 坐标轴最大值多出百分比
///
public double HighPercent;
///
/// 文本对齐方式
///
public TextAlignment TextAlignment { get; set; }
///
/// 父公式
///
public FormulaModel ParentFormula { get; set; }
///
/// 是否和上一个公式画一样的颜色
///
public bool SameColor { get; set; }
///
/// 字体类型(与WinForm的Font还需设置样式等)
///
public FontFamily FontFamily { get; set; }
///
/// 经过公式计算的图表数据
///
public List CalculateDataPoints { get; set; }
///
/// 图表中存在多个数据进行绘图的数据
///
public Hashtable SubData
{
get { return _subData; }
}
private Hashtable _subData = new Hashtable();
///
/// 线条大小
///
public double LineWidth { get; set; }
///
/// 线名称
///
public string LineName { get; set; }
///
/// 是否为显示阴阳柱,区分大于0 与小于0;
///
public bool PlotNegValsDiffColor { get; set; }
///
/// 成交量柱
///
public bool VolBar { get; set; }
///
/// 是否为主图指标
///
public bool IsMainIndicator { get; set; }
///
///
///
/// 父公式
public IndicatorModel(FormulaModel parentFormula)
{
this.ParentFormula = parentFormula;
}
///
/// 是否显昨收线
///
private bool _isShowYestodayLines = true;
public bool IsShowYestodayLines
{
get { return _isShowYestodayLines; }
set { _isShowYestodayLines = value; }
}
}
}