/// <summary> /// 去格式化字符串 /// </summary> /// <param name="fomart"></param> /// <param name="cssConfig"></param> /// <returns></returns> public override string GetFomartString(string fomart, ChartCssConfigInfo cssConfig = null) { var html = GetFomartHtml(fomart, cssConfig); //var attr = ""; //if (this._itemConfig.DrawLine) //{ // attr = " lgroup=\"" + this._itemConfig.Id + "\" lcolor=\"" + html.Item4 + "\""; //} var sp = new StringBuilder((html.Item1.Length + 40) * this._itemConfig.ItemCount); for (int i = 0; i < this._itemConfig.ItemCount; i++) { if (_itemValue == "") { sp.Append(GetHtml(false, html.Item1, GetlgroupAndColor(false, html.Item4), _localMiss[i].ToString(), i)); } else { sp.Append(this._itemIndex == i ? GetHtml(true, html.Item1, GetlgroupAndColor(true, html.Item4), _itemValue, i) : GetHtml(false, html.Item1, GetlgroupAndColor(false, html.Item4), _localMiss[i].ToString(), i)); } } return(sp.ToString()); }
/// <summary> /// 去格式化字符串 /// </summary> /// <param name="fomart"></param> /// <param name="cssConfig"></param> /// <returns></returns> public override string GetFomartString(string fomart, ChartCssConfigInfo cssConfig = null) { var html = GetFomartHtml(fomart, cssConfig); var sp = new StringBuilder((html.Item1.Length + 40) * this._itemConfig.ItemCount); for (int i = 0; i < this._itemConfig.ItemCount; i++) { sp.Append(0 < this._itemIndex[i] ? GetHtml(true, html.Item1, GetlgroupAndColor(true, html.Item4), this._itemConfig.ItemString[i], i) : GetHtml(false, html.Item1, GetlgroupAndColor(false, html.Item4), _localMiss[i].ToString(), i)); } return(sp.ToString()); }
/// <summary> /// 去格式化字符串 /// </summary> /// <param name="fomart"></param> /// <param name="cssConfig"></param> /// <returns></returns> public override string GetFomartString(string fomart, ChartCssConfigInfo cssConfig = null) { var html = GetFomartHtml(fomart, cssConfig); var sp = new StringBuilder((html.Item1.Length + 40) * this._itemConfig.ItemCount); switch (this._itemConfig.FuntionType) { case ChartItemType.SpecialValue_FCSSQ_ChuHaoPL: sp.Append(CssValueFunction.SpecialValue_FCSSQ_ChuHaoPL(this._LocalEntity, this._itemConfig, this._cssConfig, this._ItemIndex, html.Item1)); break; case ChartItemType.SpecialValue_TCDLT_ChuHaoPL: sp.Append(CssValueFunction.SpecialValue_TCDLT_ChuHaoPL(this._LocalEntity, this._itemConfig, this._cssConfig, this._ItemIndex, html.Item1)); break; default: for (int i = 0; i < this._itemConfig.ItemCount; i++) { sp.Append(GetHtml(true, html.Item1, "", this._ItemIndex[i].ToString(), i)); } break; } return(sp.ToString()); }
/// <summary> /// 初始化 /// </summary> /// <param name="cssConfig"></param> /// <param name="itemConfig"></param> public override void Init(ChartCssConfigInfo cssConfig, TrendChartItemInfo itemConfig) { DefaultInit(cssConfig, itemConfig); }