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