hqchart 1.1.14746 → 1.1.14750

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12925,7 +12925,11 @@ if(e.preventDefault)e.preventDefault();else e.returnValue=false;};this.UIOnMouse
12925
12925
  {if(clickData.Redraw==true)this.Draw();}};this.UIOnDblClick=function(e){var pixelTatio=GetDevicePixelRatio();var x=(e.clientX-this.UIElement.getBoundingClientRect().left)*pixelTatio;var y=(e.clientY-this.UIElement.getBoundingClientRect().top)*pixelTatio;var chart=this.ChartPaint[0];if(chart)chart.OnDblClick(x,y,e);};this.UIOnContextMenu=function(e){e.preventDefault();};this.GotoNextPage=function(){if(!this.Data||!IFrameSplitOperator.IsNonEmptyArray(this.Data.Data))return false;var chart=this.ChartPaint[0];if(!chart)return false;var pageSize=chart.GetPageSize();if(pageSize>this.Data.Data.length)return false;var offset=this.Data.DataOffset+pageSize;if(offset+pageSize==this.Data.Data.length-1)return false;if(offset+pageSize>this.Data.Data.length)//最后一页不够一屏调整到满屏
12926
12926
  {this.Data.DataOffset=this.Data.Data.length-pageSize;}else{this.Data.DataOffset=offset;}return true;};this.GotoPreviousPage=function(){if(!this.Data||!IFrameSplitOperator.IsNonEmptyArray(this.Data.Data))return false;var chart=this.ChartPaint[0];if(!chart)return false;if(this.Data.DataOffset<=0)return false;var pageSize=chart.GetPageSize();var offset=this.Data.DataOffset;offset-=pageSize;if(offset<0)offset=0;this.Data.DataOffset=offset;return true;};this.GotoLastPage=function(){var chart=this.ChartPaint[0];if(!chart)return;//显示最后一屏
12927
12927
  var pageSize=chart.GetPageSize(true);var offset=this.Data.Data.length-pageSize;if(offset<0)offset=0;this.Data.DataOffset=offset;};this.SetColumn=function(aryColunm,option){var chart=this.ChartPaint[0];if(chart){chart.SetColumn(aryColunm);chart.SizeChange=true;if(option&&option.Redraw)this.Draw();}};this.ReloadResource=function(option){this.Frame.ReloadResource(option);for(var i=0;i<this.ChartPaint.length;++i){var item=this.ChartPaint[i];if(item.ReloadResource)item.ReloadResource(option);}if(option&&option.Redraw){this.SetSizeChange(true);this.Draw();}};}JSDealChartContainer.JsonDataToDealData=function(data){var symbol=data.symbol;var result=[];if(!IFrameSplitOperator.IsNonEmptyArray(data.detail))return result;//0=时间 1=价格 2=成交量 3=成交金额 4=BS 5=字符串时间 6=ID
12928
- for(var i=0;i<data.detail.length;++i){var item=data.detail[i];var dealItem={Time:item[0],Price:item[1],Vol:item[2],BS:item[4],Amount:item[3],Guid:Guid()};dealItem.Source=item;if(item[5])dealItem.StrTime=item[5];if(item[6])dealItem.ID=item[6];result.push(dealItem);}return result;};function JSDealFrame(){this.ChartBorder;this.Canvas;//画布
12928
+ for(var i=0;i<data.detail.length;++i){var item=data.detail[i];var dealItem={Time:item[0],Price:item[1],Vol:item[2],BS:item[4],Amount:item[3],Guid:Guid()};dealItem.Source=item;if(item[5])dealItem.StrTime=item[5];if(item[6])dealItem.ID=item[6];if(item[11])dealItem.Symbol=item[11];//股票代码
12929
+ if(item[12])dealItem.Name=item[12];//股票名称
12930
+ //10个数值型 101-199
12931
+ if(IFrameSplitOperator.IsNumber(item[101]))dealItem.ReserveNumber1=item[101];if(IFrameSplitOperator.IsNumber(item[102]))dealItem.ReserveNumber2=item[102];if(IFrameSplitOperator.IsNumber(item[103]))dealItem.ReserveNumber3=item[103];if(IFrameSplitOperator.IsNumber(item[104]))dealItem.ReserveNumber4=item[104];if(IFrameSplitOperator.IsNumber(item[105]))dealItem.ReserveNumber5=item[105];if(IFrameSplitOperator.IsNumber(item[106]))dealItem.ReserveNumber6=item[106];if(IFrameSplitOperator.IsNumber(item[107]))dealItem.ReserveNumber7=item[107];if(IFrameSplitOperator.IsNumber(item[108]))dealItem.ReserveNumber8=item[108];if(IFrameSplitOperator.IsNumber(item[109]))dealItem.ReserveNumber9=item[109];if(IFrameSplitOperator.IsNumber(item[110]))dealItem.ReserveNumber10=item[110];//10个字符型 201-299
12932
+ if(IFrameSplitOperator.IsString(item[201])||IFrameSplitOperator.IsObject(item[201]))dealItem.ReserveString1=item[201];if(IFrameSplitOperator.IsString(item[202])||IFrameSplitOperator.IsObject(item[202]))dealItem.ReserveString2=item[202];if(IFrameSplitOperator.IsString(item[203])||IFrameSplitOperator.IsObject(item[203]))dealItem.ReserveString3=item[203];if(IFrameSplitOperator.IsString(item[204])||IFrameSplitOperator.IsObject(item[204]))dealItem.ReserveString4=item[204];if(IFrameSplitOperator.IsString(item[205])||IFrameSplitOperator.IsObject(item[205]))dealItem.ReserveString5=item[205];if(IFrameSplitOperator.IsString(item[206])||IFrameSplitOperator.IsObject(item[206]))dealItem.ReserveString6=item[206];if(IFrameSplitOperator.IsString(item[207])||IFrameSplitOperator.IsObject(item[207]))dealItem.ReserveString7=item[207];if(IFrameSplitOperator.IsString(item[208])||IFrameSplitOperator.IsObject(item[208]))dealItem.ReserveString8=item[208];if(IFrameSplitOperator.IsString(item[209])||IFrameSplitOperator.IsObject(item[209]))dealItem.ReserveString9=item[209];if(IFrameSplitOperator.IsString(item[210])||IFrameSplitOperator.IsObject(item[210]))dealItem.ReserveString10=item[210];result.push(dealItem);}return result;};function JSDealFrame(){this.ChartBorder;this.Canvas;//画布
12929
12933
  this.BorderColor=g_JSChartResource.DealList.BorderColor;//边框线
12930
12934
  this.LogoTextColor=g_JSChartResource.FrameLogo.TextColor;this.LogoTextFont=g_JSChartResource.FrameLogo.Font;this.ReloadResource=function(resource){this.BorderColor=g_JSChartResource.DealList.BorderColor;//边框线
12931
12935
  this.LogoTextColor=g_JSChartResource.FrameLogo.TextColor;this.LogoTextFont=g_JSChartResource.FrameLogo.Font;};this.Draw=function(option){var left=ToFixedPoint(this.ChartBorder.GetLeft());var top=ToFixedPoint(this.ChartBorder.GetTop());var right=ToFixedPoint(this.ChartBorder.GetRight());var bottom=ToFixedPoint(this.ChartBorder.GetBottom());var width=right-left;var height=bottom-top;if(!IFrameSplitOperator.IsNumber(this.BorderLine)){this.Canvas.strokeStyle=this.BorderColor;this.Canvas.strokeRect(left,top,width,height);}else{this.Canvas.strokeStyle=this.BorderColor;this.Canvas.beginPath();if((this.BorderLine&1)>0)//上
@@ -12941,8 +12945,14 @@ STRING_TIME_ID:6,//字符串时间
12941
12945
  INDEX_ID:7,//序号 从1开始
12942
12946
  MULTI_BAR_ID:8,//多颜色柱子
12943
12947
  CENTER_BAR_ID:9,//中心柱子
12944
- CUSTOM_TEXT_ID:10//自定义文本
12945
- };function ChartDealList(){this.Canvas;//画布
12948
+ CUSTOM_TEXT_ID:10,//自定义文本
12949
+ SYMBOL_ID:11,//股票代码
12950
+ NAME_ID:12,//股票名称
12951
+ //预留数值类型 10个
12952
+ RESERVE_NUMBER1_ID:201,//ReserveNumber1:
12953
+ RESERVE_NUMBER2_ID:202,RESERVE_NUMBER3_ID:203,RESERVE_NUMBER4_ID:204,RESERVE_NUMBER5_ID:205,RESERVE_NUMBER6_ID:206,RESERVE_NUMBER7_ID:207,RESERVE_NUMBER8_ID:208,RESERVE_NUMBER9_ID:209,RESERVE_NUMBER10_ID:210,//预留字符串类型 10个 301-399
12954
+ RESERVE_STRING1_ID:301,//ReserveString1:
12955
+ RESERVE_STRING2_ID:302,RESERVE_STRING3_ID:303,RESERVE_STRING4_ID:304,RESERVE_STRING5_ID:305,RESERVE_STRING6_ID:306,RESERVE_STRING7_ID:307,RESERVE_STRING8_ID:308,RESERVE_STRING9_ID:309,RESERVE_STRING10_ID:310};var MAP_DEAL_COLUMN_FIELD=new _map2.default([[DEAL_COLUMN_ID.SYMBOL_ID,"Symbol"],[DEAL_COLUMN_ID.NAME_ID,"Name"],[DEAL_COLUMN_ID.PRICE_ID,"Price"],[DEAL_COLUMN_ID.RESERVE_NUMBER1_ID,"ReserveNumber1"],[DEAL_COLUMN_ID.RESERVE_NUMBER2_ID,"ReserveNumber2"],[DEAL_COLUMN_ID.RESERVE_NUMBER3_ID,"ReserveNumber3"],[DEAL_COLUMN_ID.RESERVE_NUMBER4_ID,"ReserveNumber4"],[DEAL_COLUMN_ID.RESERVE_NUMBER5_ID,"ReserveNumber5"],[DEAL_COLUMN_ID.RESERVE_NUMBER6_ID,"ReserveNumber6"],[DEAL_COLUMN_ID.RESERVE_NUMBER7_ID,"ReserveNumber7"],[DEAL_COLUMN_ID.RESERVE_NUMBER8_ID,"ReserveNumber8"],[DEAL_COLUMN_ID.RESERVE_NUMBER9_ID,"ReserveNumber9"],[DEAL_COLUMN_ID.RESERVE_NUMBER10_ID,"ReserveNumber10"],[DEAL_COLUMN_ID.RESERVE_STRING1_ID,"ReserveString1"],[DEAL_COLUMN_ID.RESERVE_STRING2_ID,"ReserveString2"],[DEAL_COLUMN_ID.RESERVE_STRING3_ID,"ReserveString3"],[DEAL_COLUMN_ID.RESERVE_STRING4_ID,"ReserveString4"],[DEAL_COLUMN_ID.RESERVE_STRING5_ID,"ReserveString5"],[DEAL_COLUMN_ID.RESERVE_STRING6_ID,"ReserveString6"],[DEAL_COLUMN_ID.RESERVE_STRING7_ID,"ReserveString7"],[DEAL_COLUMN_ID.RESERVE_STRING8_ID,"ReserveString8"],[DEAL_COLUMN_ID.RESERVE_STRING9_ID,"ReserveString9"],[DEAL_COLUMN_ID.RESERVE_STRING10_ID,"ReserveString10"]]);function ChartDealList(){this.Canvas;//画布
12946
12956
  this.ChartBorder;//边框信息
12947
12957
  this.ChartFrame;//框架画法
12948
12958
  this.Name;//名称
@@ -12957,26 +12967,30 @@ this.IsShowHeader=true;//是否显示表头
12957
12967
  this.ShowOrder=1;//0=顺序 1=倒序
12958
12968
  this.SelectedData={Index:null,Guid:null,Enable:false};//{ Index:序号, Guid, Enable:是否启动 }
12959
12969
  this.SizeChange=true;//涨跌颜色
12960
- this.UpColor=g_JSChartResource.DealList.UpTextColor;this.DownColor=g_JSChartResource.DealList.DownTextColor;this.UnchagneColor=g_JSChartResource.DealList.UnchagneTextColor;this.BorderColor=g_JSChartResource.DealList.BorderColor;//边框线
12970
+ this.UpColor=g_JSChartResource.DealList.UpTextColor;this.DownColor=g_JSChartResource.DealList.DownTextColor;this.UnchangeColor=g_JSChartResource.DealList.UnchagneTextColor;this.BorderColor=g_JSChartResource.DealList.BorderColor;//边框线
12961
12971
  this.SelectedConfig={BGColor:g_JSChartResource.DealList.Selected.BGColor};//表头配置
12962
12972
  this.HeaderFontConfig={Size:g_JSChartResource.DealList.Header.Font.Size,Name:g_JSChartResource.DealList.Header.Font.Name};this.HeaderColor=g_JSChartResource.DealList.Header.Color;this.HeaderMergin={Left:g_JSChartResource.DealList.Header.Mergin.Left,Right:g_JSChartResource.DealList.Header.Mergin.Right,Top:g_JSChartResource.DealList.Header.Mergin.Top,Bottom:g_JSChartResource.DealList.Header.Mergin.Bottom};//表格内容配置
12963
12973
  this.ItemFontConfig={Size:g_JSChartResource.DealList.Row.Font.Size,Name:g_JSChartResource.DealList.Row.Font.Name};this.RowMergin={Top:g_JSChartResource.DealList.Row.Mergin.Top,Bottom:g_JSChartResource.DealList.Row.Mergin.Bottom};this.BarMergin={Top:g_JSChartResource.DealList.Row.BarMergin.Top,Left:g_JSChartResource.DealList.Row.BarMergin.Left,Right:g_JSChartResource.DealList.Row.BarMergin.Right,Bottom:g_JSChartResource.DealList.Row.BarMergin.Bottom};//缓存
12964
12974
  this.HeaderFont=12*GetDevicePixelRatio()+"px 微软雅黑";this.ItemFont=15*GetDevicePixelRatio()+"px 微软雅黑";this.RowCount=0;this.TableWidth=0;this.TableCount=0;this.HeaderHeight=0;this.Column=[{Type:DEAL_COLUMN_ID.TIME_ID,Title:"时间",TextAlign:"center",Width:null,TextColor:g_JSChartResource.DealList.FieldColor.Time,MaxText:"88:88:88",Foramt:"HH:MM:SS"},{Type:DEAL_COLUMN_ID.PRICE_ID,Title:"价格",TextAlign:"center",Width:null,MaxText:"888888.88"},{Type:DEAL_COLUMN_ID.VOL_ID,Title:"成交",TextAlign:"right",Width:null,TextColor:g_JSChartResource.DealList.FieldColor.Vol,MaxText:"888888"},{Type:DEAL_COLUMN_ID.BS_ID,Title:"",TextAlign:"right",Width:null,MaxText:"擎"}];this.RectClient={};this.AryCellRect=[];//{ Rect:, Type: 1=单行 }
12965
- this.ReloadResource=function(resource){this.UpColor=g_JSChartResource.DealList.UpTextColor;this.DownColor=g_JSChartResource.DealList.DownTextColor;this.UnchagneColor=g_JSChartResource.DealList.UnchagneTextColor;this.BorderColor=g_JSChartResource.DealList.BorderColor;//边框线
12975
+ this.ReloadResource=function(resource){this.UpColor=g_JSChartResource.DealList.UpTextColor;this.DownColor=g_JSChartResource.DealList.DownTextColor;this.UnchangeColor=g_JSChartResource.DealList.UnchagneTextColor;this.BorderColor=g_JSChartResource.DealList.BorderColor;//边框线
12966
12976
  //表头配置
12967
12977
  this.HeaderFontConfig={Size:g_JSChartResource.DealList.Header.Font.Size,Name:g_JSChartResource.DealList.Header.Font.Name};this.HeaderColor=g_JSChartResource.DealList.Header.Color;this.HeaderMergin={Left:g_JSChartResource.DealList.Header.Mergin.Left,Right:g_JSChartResource.DealList.Header.Mergin.Right,Top:g_JSChartResource.DealList.Header.Mergin.Top,Bottom:g_JSChartResource.DealList.Header.Mergin.Bottom};//表格内容配置
12968
12978
  this.ItemFontConfig={Size:g_JSChartResource.DealList.Row.Font.Size,Name:g_JSChartResource.DealList.Row.Font.Name};this.RowMergin={Top:g_JSChartResource.DealList.Row.Mergin.Top,Bottom:g_JSChartResource.DealList.Row.Mergin.Bottom};for(var i=0;i<this.Column.length;++i){var item=this.Column[i];if(item.Type==DEAL_COLUMN_ID.TIME_ID||item.Type==DEAL_COLUMN_ID.STRING_TIME_ID)item.TextColor=g_JSChartResource.DealList.FieldColor.Time;else if(item.Type==DEAL_COLUMN_ID.VOL_ID)item.TextColor=g_JSChartResource.DealList.FieldColor.Vol;else if(item.Type==DEAL_COLUMN_ID.DEAL_ID)item.TextColor=g_JSChartResource.DealList.FieldColor.Deal;else if(item.Type==DEAL_COLUMN_ID.INDEX_ID)item.TextColor=g_JSChartResource.DealList.FieldColor.Index;}};this.SetColumn=function(aryColumn){if(!IFrameSplitOperator.IsNonEmptyArray(aryColumn))return;this.Column=[];for(var i=0;i<aryColumn.length;++i){var item=aryColumn[i];var colItem=this.GetDefaultColunm(item.Type);if(!colItem)continue;if(item.Title)colItem.Title=item.Title;if(item.TextAlign)colItem.TextAlign=item.TextAlign;if(item.TextColor)colItem.TextColor=item.TextColor;if(item.MaxText)colItem.MaxText=item.MaxText;if(item.Type==DEAL_COLUMN_ID.MULTI_BAR_ID||item.Type==DEAL_COLUMN_ID.CENTER_BAR_ID){if(!IFrameSplitOperator.IsNumber(item.DataIndex))continue;colItem.DataIndex=item.DataIndex;//柱子数据所在原始数据索引列
12969
12979
  }else if(item.Type==DEAL_COLUMN_ID.TIME_ID){if(IFrameSplitOperator.IsString(item.Foramt))colItem.Foramt=item.Foramt;//设置时间格式
12970
- }this.Column.push(colItem);}};this.GetDefaultColunm=function(id){var DEFAULT_COLUMN=[{Type:DEAL_COLUMN_ID.TIME_ID,Title:"时间",TextAlign:"center",Width:null,TextColor:g_JSChartResource.DealList.FieldColor.Time,MaxText:"88:88:88",Foramt:"HH:MM:SS"},{Type:DEAL_COLUMN_ID.PRICE_ID,Title:"价格",TextAlign:"center",Width:null,MaxText:"888888.88"},{Type:DEAL_COLUMN_ID.VOL_ID,Title:"成交",TextAlign:"right",Width:null,TextColor:g_JSChartResource.DealList.FieldColor.Vol,MaxText:"888888"},{Type:DEAL_COLUMN_ID.BS_ID,Title:"",TextAlign:"right",Width:null,MaxText:"擎"},{Type:DEAL_COLUMN_ID.DEAL_ID,Title:"笔数",TextAlign:"right",Width:null,TextColor:g_JSChartResource.DealList.FieldColor.Deal,MaxText:"8888"},{Type:DEAL_COLUMN_ID.UPDOWN_ID,Title:"涨跌",TextAlign:"right",Width:null,MaxText:"-8888.88"},{Type:DEAL_COLUMN_ID.STRING_TIME_ID,Title:"时间",TextAlign:"center",Width:null,TextColor:g_JSChartResource.DealList.FieldColor.Time,MaxText:"88:88:88"},{Type:DEAL_COLUMN_ID.INDEX_ID,Title:"序号",TextAlign:"center",Width:null,TextColor:g_JSChartResource.DealList.FieldColor.Index,MaxText:"88888"},{Type:DEAL_COLUMN_ID.MULTI_BAR_ID,Title:"柱子",TextAlign:"center",Width:null,TextColor:g_JSChartResource.DealList.FieldColor.BarTitle,MaxText:"888888"},{Type:DEAL_COLUMN_ID.CENTER_BAR_ID,Title:"柱子2",TextAlign:"center",Width:null,TextColor:g_JSChartResource.DealList.FieldColor.BarTitle,MaxText:"888888"},{Type:DEAL_COLUMN_ID.CUSTOM_TEXT_ID,Title:"自定义",TextAlign:"center",Width:null,TextColor:g_JSChartResource.DealList.FieldColor.Text,MaxText:"擎擎擎擎擎"}];for(var i=0;i<DEFAULT_COLUMN.length;++i){var item=DEFAULT_COLUMN[i];if(item.Type==id)return item;}return null;};this.Draw=function(){this.AryCellRect=[];if(this.SizeChange)this.CalculateSize();else this.UpdateCacheData();this.DrawBorder();this.DrawHeader();this.DrawBody();this.SizeChange=false;};//更新缓存变量
12980
+ }else if(this.IsReserveNumber(item.Type)){if(item.Format)colItem.Format=item.Format;//数据格式化设置{ Type:1=原始 2=千分位分割 3=万亿转换, ExFloatPrecision:万亿转换以后的小数位数 }
12981
+ if(IFrameSplitOperator.IsNumber(item.ColorType))colItem.ColorType=item.ColorType;//0=默认 1=(>0, =0, <0) 2=(>=0, <0)
12982
+ }this.Column.push(colItem);}};this.GetDefaultColunm=function(id){var DEFAULT_COLUMN=[{Type:DEAL_COLUMN_ID.TIME_ID,Title:"时间",TextAlign:"center",Width:null,TextColor:g_JSChartResource.DealList.FieldColor.Time,MaxText:"88:88:88",Foramt:"HH:MM:SS"},{Type:DEAL_COLUMN_ID.PRICE_ID,Title:"价格",TextAlign:"center",Width:null,MaxText:"888888.88"},{Type:DEAL_COLUMN_ID.VOL_ID,Title:"成交",TextAlign:"right",Width:null,TextColor:g_JSChartResource.DealList.FieldColor.Vol,MaxText:"888888"},{Type:DEAL_COLUMN_ID.BS_ID,Title:"",TextAlign:"right",Width:null,MaxText:"擎"},{Type:DEAL_COLUMN_ID.DEAL_ID,Title:"笔数",TextAlign:"right",Width:null,TextColor:g_JSChartResource.DealList.FieldColor.Deal,MaxText:"8888"},{Type:DEAL_COLUMN_ID.UPDOWN_ID,Title:"涨跌",TextAlign:"right",Width:null,MaxText:"-8888.88"},{Type:DEAL_COLUMN_ID.STRING_TIME_ID,Title:"时间",TextAlign:"center",Width:null,TextColor:g_JSChartResource.DealList.FieldColor.Time,MaxText:"88:88:88"},{Type:DEAL_COLUMN_ID.INDEX_ID,Title:"序号",TextAlign:"center",Width:null,TextColor:g_JSChartResource.DealList.FieldColor.Index,MaxText:"88888"},{Type:DEAL_COLUMN_ID.MULTI_BAR_ID,Title:"柱子",TextAlign:"center",Width:null,TextColor:g_JSChartResource.DealList.FieldColor.BarTitle,MaxText:"888888"},{Type:DEAL_COLUMN_ID.CENTER_BAR_ID,Title:"柱子2",TextAlign:"center",Width:null,TextColor:g_JSChartResource.DealList.FieldColor.BarTitle,MaxText:"888888"},{Type:DEAL_COLUMN_ID.CUSTOM_TEXT_ID,Title:"自定义",TextAlign:"center",Width:null,TextColor:g_JSChartResource.DealList.FieldColor.Text,MaxText:"擎擎擎擎擎"},{Type:DEAL_COLUMN_ID.NAME_ID,Title:"股票名称",TextAlign:"center",Width:null,TextColor:g_JSChartResource.DealList.FieldColor.Text,MaxText:"擎擎擎擎*"},{Type:DEAL_COLUMN_ID.RESERVE_NUMBER1_ID,Title:"数值1",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"9999.99",FloatPrecision:2},{Type:DEAL_COLUMN_ID.RESERVE_NUMBER2_ID,Title:"数值2",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"9999.99",FloatPrecision:2},{Type:DEAL_COLUMN_ID.RESERVE_NUMBER3_ID,Title:"数值3",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"9999.99",FloatPrecision:2},{Type:DEAL_COLUMN_ID.RESERVE_NUMBER4_ID,Title:"数值4",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"9999.99",FloatPrecision:2},{Type:DEAL_COLUMN_ID.RESERVE_NUMBER5_ID,Title:"数值5",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"9999.99",FloatPrecision:2},{Type:DEAL_COLUMN_ID.RESERVE_NUMBER6_ID,Title:"数值6",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"9999.99",FloatPrecision:2},{Type:DEAL_COLUMN_ID.RESERVE_NUMBER7_ID,Title:"数值7",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"9999.99",FloatPrecision:2},{Type:DEAL_COLUMN_ID.RESERVE_NUMBER8_ID,Title:"数值8",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"9999.99",FloatPrecision:2},{Type:DEAL_COLUMN_ID.RESERVE_NUMBER9_ID,Title:"数值9",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"9999.99",FloatPrecision:2},{Type:DEAL_COLUMN_ID.RESERVE_NUMBER10_ID,Title:"数值10",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"9999.99",FloatPrecision:2},{Type:DEAL_COLUMN_ID.RESERVE_STRING1_ID,Title:"文字1",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"擎擎擎擎擎擎"},{Type:DEAL_COLUMN_ID.RESERVE_STRING2_ID,Title:"文字2",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"擎擎擎擎擎擎"},{Type:DEAL_COLUMN_ID.RESERVE_STRING3_ID,Title:"文字3",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"擎擎擎擎擎擎"},{Type:DEAL_COLUMN_ID.RESERVE_STRING4_ID,Title:"文字4",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"擎擎擎擎擎擎"},{Type:DEAL_COLUMN_ID.RESERVE_STRING5_ID,Title:"文字5",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"擎擎擎擎擎擎"},{Type:DEAL_COLUMN_ID.RESERVE_STRING6_ID,Title:"文字6",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"擎擎擎擎擎擎"},{Type:DEAL_COLUMN_ID.RESERVE_STRING7_ID,Title:"文字7",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"擎擎擎擎擎擎"},{Type:DEAL_COLUMN_ID.RESERVE_STRING8_ID,Title:"文字8",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"擎擎擎擎擎擎"},{Type:DEAL_COLUMN_ID.RESERVE_STRING9_ID,Title:"文字9",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"擎擎擎擎擎擎"},{Type:DEAL_COLUMN_ID.RESERVE_STRING10_ID,Title:"文字10",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"擎擎擎擎擎擎"}];for(var i=0;i<DEFAULT_COLUMN.length;++i){var item=DEFAULT_COLUMN[i];if(item.Type==id)return item;}return null;};this.Draw=function(){this.AryCellRect=[];if(this.SizeChange)this.CalculateSize();else this.UpdateCacheData();this.DrawBorder();this.DrawHeader();this.DrawBody();this.SizeChange=false;};//更新缓存变量
12971
12983
  this.UpdateCacheData=function(){this.RectClient.Left=this.ChartBorder.GetLeft();this.RectClient.Right=this.ChartBorder.GetRight();this.RectClient.Top=this.ChartBorder.GetTop();this.RectClient.Bottom=this.ChartBorder.GetBottom();this.Decimal=GetfloatPrecision(this.Symbol);};this.GetPageSize=function(recalculate)//recalculate 是否重新计算
12972
12984
  {if(recalculate)this.CalculateSize();var size=this.TableCount*this.RowCount;return size;};this.CalculateSize=function()//计算大小
12973
- {this.UpdateCacheData();var pixelRatio=GetDevicePixelRatio();this.HeaderFont=this.HeaderFontConfig.Size*pixelRatio+'px '+this.HeaderFontConfig.Name;this.ItemFont=this.ItemFontConfig.Size*pixelRatio+'px '+this.ItemFontConfig.Name;this.Canvas.font=this.ItemFont;var sumWidth=0,itemWidth=0;for(var i=0;i<this.Column.length;++i){var item=this.Column[i];itemWidth=this.Canvas.measureText(item.MaxText).width;item.Width=itemWidth+4;sumWidth+=item.Width;}var clientWidth=this.RectClient.Right-this.RectClient.Left;this.TableCount=parseInt(clientWidth/sumWidth);if(this.IsSingleTable)this.TableCount=1;this.TableWidth=clientWidth/this.TableCount;this.HeaderHeight=this.GetFontHeight(this.HeaderFont,"擎")+this.HeaderMergin.Top+this.HeaderMergin.Bottom;if(!this.IsShowHeader)this.HeaderHeight=0;this.RowHeight=this.GetFontHeight(this.ItemFont,"擎")+this.HeaderMergin.Top+this.HeaderMergin.Bottom;this.RowCount=parseInt((this.RectClient.Bottom-this.RectClient.Top-this.HeaderHeight)/this.RowHeight);};this.DrawHeader=function(){if(!this.IsShowHeader)return;var left=this.RectClient.Left+this.HeaderMergin.Left;var top=this.RectClient.Top;var y=top+this.HeaderMergin.Top+(this.HeaderHeight-this.HeaderMergin.Top-this.HeaderMergin.Bottom)/2;this.Canvas.font=this.HeaderFont;this.Canvas.fillStyle=this.HeaderColor;for(var i=0,j=0;i<this.TableCount;++i){var tableLeft=left+this.TableWidth*i;var textLeft=tableLeft;for(j=0;j<this.Column.length;++j){var item=this.Column[j];var itemWidth=item.Width;if(j==this.Column.length-1)itemWidth=this.TableWidth-(textLeft-tableLeft)-this.HeaderMergin.Right-this.HeaderMergin.Left;var x=textLeft;if(item.TextAlign=='center'){x=textLeft+itemWidth/2;this.Canvas.textAlign="center";}else if(item.TextAlign=='right'){x=textLeft+itemWidth;this.Canvas.textAlign="right";}else{this.Canvas.textAlign="left";}this.Canvas.textBaseline="middle";this.Canvas.fillText(item.Title,x,y);textLeft+=item.Width;}}};this.DrawBorder=function(){var left=ToFixedPoint(this.RectClient.Left);var right=ToFixedPoint(this.RectClient.Right);var top=ToFixedPoint(this.RectClient.Top);var bottom=ToFixedPoint(this.RectClient.Bottom);this.Canvas.strokeStyle=this.BorderColor;this.Canvas.beginPath();if(this.IsShowHeader){this.Canvas.moveTo(left,top+this.HeaderHeight);this.Canvas.lineTo(right,top+this.HeaderHeight);}var tableLeft=ToFixedPoint(left+this.TableWidth);for(var i=1;i<this.TableCount;++i){this.Canvas.moveTo(tableLeft,top);this.Canvas.lineTo(tableLeft,bottom);tableLeft=ToFixedPoint(tableLeft+this.TableWidth);}this.Canvas.stroke();};this.DrawBody=function(){if(!this.Data)return;if(!IFrameSplitOperator.IsNonEmptyArray(this.Data.Data))return;this.Canvas.font=this.ItemFont;var top=this.RectClient.Top+this.HeaderHeight;var left=this.RectClient.Left+this.HeaderMergin.Left;var dataCount=this.Data.Data.length;var index=this.Data.DataOffset;if(this.ShowOrder==1){var index=this.Data.DataOffset+this.TableCount*this.RowCount;if(index>=dataCount)index=dataCount-1;for(var i=0,j=0;i<this.TableCount;++i){var tableLeft=left+this.TableWidth*i;var textLeft=tableLeft;var textTop=top;for(j=0;j<this.RowCount&&index>=0;++j,--index){var dataItem=this.Data.Data[index];this.DrawSelectedRow(dataItem,index,rtRow);this.DrawRow(dataItem,textLeft,textTop,index);textTop+=this.RowHeight;}}}else{for(var i=0,j=0;i<this.TableCount;++i){var tableLeft=left+this.TableWidth*i;var textLeft=tableLeft;var textTop=top;for(j=0;j<this.RowCount&&index<dataCount;++j,++index){var dataItem=this.Data.Data[index];var rtRow={Left:textLeft-this.HeaderMergin.Left,Top:textTop,Height:this.RowHeight,Width:this.TableWidth};rtRow.Right=rtRow.Left+rtRow.Width;rtRow.Bottom=rtRow.Top+rtRow.Height;this.DrawSelectedRow(dataItem,index,rtRow);this.DrawRow(dataItem,textLeft,textTop,index);this.AryCellRect.push({Rect:rtRow,Type:1,DataIndex:index});textTop+=this.RowHeight;}}}};this.DrawRow=function(data,left,top,dataIndex,colIndex){var tableLeft=left;var tableRight=left+this.TableWidth;for(var i=0;i<this.Column.length;++i){var item=this.Column[i];var textColor=item.TextColor;var text=null;var itemWidth=item.Width;var textAlign=item.TextAlign;if(left+itemWidth>tableRight)break;if(i==this.Column.length-1)itemWidth=this.TableWidth-(left-tableLeft)-this.HeaderMergin.Right-this.HeaderMergin.Left;if(item.Type==DEAL_COLUMN_ID.TIME_ID){text=IFrameSplitOperator.FormatTimeString(data.Time,item.Foramt);}else if(item.Type==DEAL_COLUMN_ID.STRING_TIME_ID){text=data.StrTime;}else if(item.Type==DEAL_COLUMN_ID.PRICE_ID){if(data.Price>this.YClose)textColor=this.UpColor;else if(data.Price<this.YClose)textColor=this.DownColor;else textColor=this.UnchagneColor;text=data.Price.toFixed(this.Decimal);}else if(item.Type==DEAL_COLUMN_ID.VOL_ID){text=IFrameSplitOperator.FormatValueString(data.Vol,0);textColor=this.GetVolColor(item,data);}else if(item.Type==DEAL_COLUMN_ID.DEAL_ID){text=IFrameSplitOperator.FormatValueString(data.Deal,0);}else if(item.Type==DEAL_COLUMN_ID.BS_ID){if(data.BS==1){text="B";textColor=this.UpColor;}else if(data.BS==2){text="S";textColor=this.DownColor;}}else if(item.Type==DEAL_COLUMN_ID.UPDOWN_ID){if(IFrameSplitOperator.IsNumber(this.YClose)){var value=data.Price-this.YClose;text=value.toFixed(2);if(value>0)textColor=this.UpColor;else if(value<0)textColor=this.DownColor;else textColor=this.UnchagneColor;}}else if(item.Type==DEAL_COLUMN_ID.INDEX_ID){text=(dataIndex+1).toString();}else if(item.Type==DEAL_COLUMN_ID.MULTI_BAR_ID){var rtItem={Left:left,Top:top,Width:itemWidth,Height:this.RowHeight};this.DrawMultiBar(item,data,rtItem);}else if(item.Type==DEAL_COLUMN_ID.CENTER_BAR_ID){var rtItem={Left:left,Top:top,Width:itemWidth,Height:this.RowHeight};this.DrawCenterBar(item,data,rtItem);}else if(item.Type==DEAL_COLUMN_ID.CUSTOM_TEXT_ID){var out={Text:null,TextColor:null,TextAlign:null};//输出
12974
- var rtItem={Left:left,Top:top,Width:itemWidth,Height:this.RowHeight};if(this.DrawCustomText(item,data,rtItem,dataIndex,i,out)){if(out.Text)text=out.Text;if(out.TextColor)textColor=out.TextColor;if(out.TextAlign)textAlign=out.TextAlign;}}this.DrawItemText(text,textColor,textAlign,left,top,itemWidth);left+=item.Width;}};this.DrawSelectedRow=function(data,index,rtRow){if(!this.SelectedData)return;if(!this.SelectedData.Enable)return;if(!this.SelectedData.Guid||this.SelectedData.Guid!=data.Guid)return;this.Canvas.fillStyle=this.SelectedConfig.BGColor;this.Canvas.fillRect(rtRow.Left,rtRow.Top,rtRow.Width,rtRow.Height);};this.DrawItemText=function(text,textColor,textAlign,left,top,width){var x=left;if(textAlign=='center'){x=left+width/2;this.Canvas.textAlign="center";}else if(textAlign=='right'){x=left+width;this.Canvas.textAlign="right";}else{this.Canvas.textAlign="left";}this.Canvas.textBaseline="middle";this.Canvas.fillStyle=textColor;if(text)this.Canvas.fillText(text,x,top+this.RowHeight/2);};this.DrawMultiBar=function(colunmInfo,data,rtItem){if(!data.Source||!IFrameSplitOperator.IsNonEmptyArray(data.Source))return false;var barData=data.Source[colunmInfo.DataIndex];//{ Value:[0.4,0,2], Color:[0,1] };
12985
+ {this.UpdateCacheData();var pixelRatio=GetDevicePixelRatio();this.HeaderFont=this.HeaderFontConfig.Size*pixelRatio+'px '+this.HeaderFontConfig.Name;this.ItemFont=this.ItemFontConfig.Size*pixelRatio+'px '+this.ItemFontConfig.Name;this.Canvas.font=this.ItemFont;var sumWidth=0,itemWidth=0;for(var i=0;i<this.Column.length;++i){var item=this.Column[i];itemWidth=this.Canvas.measureText(item.MaxText).width;item.Width=itemWidth+4;sumWidth+=item.Width;}var clientWidth=this.RectClient.Right-this.RectClient.Left;this.TableCount=parseInt(clientWidth/sumWidth);if(this.IsSingleTable)this.TableCount=1;this.TableWidth=clientWidth/this.TableCount;this.HeaderHeight=this.GetFontHeight(this.HeaderFont,"擎")+this.HeaderMergin.Top+this.HeaderMergin.Bottom;if(!this.IsShowHeader)this.HeaderHeight=0;this.RowHeight=this.GetFontHeight(this.ItemFont,"擎")+this.HeaderMergin.Top+this.HeaderMergin.Bottom;this.RowCount=parseInt((this.RectClient.Bottom-this.RectClient.Top-this.HeaderHeight)/this.RowHeight);};this.DrawHeader=function(){if(!this.IsShowHeader)return;var left=this.RectClient.Left+this.HeaderMergin.Left;var top=this.RectClient.Top;var y=top+this.HeaderMergin.Top+(this.HeaderHeight-this.HeaderMergin.Top-this.HeaderMergin.Bottom)/2;this.Canvas.font=this.HeaderFont;this.Canvas.fillStyle=this.HeaderColor;for(var i=0,j=0;i<this.TableCount;++i){var tableLeft=left+this.TableWidth*i;var textLeft=tableLeft;for(j=0;j<this.Column.length;++j){var item=this.Column[j];var itemWidth=item.Width;if(j==this.Column.length-1)itemWidth=this.TableWidth-(textLeft-tableLeft)-this.HeaderMergin.Right-this.HeaderMergin.Left;var x=textLeft;if(item.TextAlign=='center'){x=textLeft+itemWidth/2;this.Canvas.textAlign="center";}else if(item.TextAlign=='right'){x=textLeft+itemWidth;this.Canvas.textAlign="right";}else{this.Canvas.textAlign="left";}this.Canvas.textBaseline="middle";this.Canvas.fillText(item.Title,x,y);textLeft+=item.Width;}}};this.DrawBorder=function(){var left=ToFixedPoint(this.RectClient.Left);var right=ToFixedPoint(this.RectClient.Right);var top=ToFixedPoint(this.RectClient.Top);var bottom=ToFixedPoint(this.RectClient.Bottom);this.Canvas.strokeStyle=this.BorderColor;this.Canvas.beginPath();if(this.IsShowHeader){this.Canvas.moveTo(left,top+this.HeaderHeight);this.Canvas.lineTo(right,top+this.HeaderHeight);}var tableLeft=ToFixedPoint(left+this.TableWidth);for(var i=1;i<this.TableCount;++i){this.Canvas.moveTo(tableLeft,top);this.Canvas.lineTo(tableLeft,bottom);tableLeft=ToFixedPoint(tableLeft+this.TableWidth);}this.Canvas.stroke();};this.DrawBody=function(){if(!this.Data)return;if(!IFrameSplitOperator.IsNonEmptyArray(this.Data.Data))return;this.Canvas.font=this.ItemFont;var top=this.RectClient.Top+this.HeaderHeight;var left=this.RectClient.Left+this.HeaderMergin.Left;var dataCount=this.Data.Data.length;var index=this.Data.DataOffset;if(this.ShowOrder==1){var index=this.Data.DataOffset+this.TableCount*this.RowCount;if(index>=dataCount)index=dataCount-1;for(var i=0,j=0;i<this.TableCount;++i){var tableLeft=left+this.TableWidth*i;var textLeft=tableLeft;var textTop=top;for(j=0;j<this.RowCount&&index>=0;++j,--index){var dataItem=this.Data.Data[index];this.DrawSelectedRow(dataItem,index,rtRow);this.DrawRow(dataItem,textLeft,textTop,index);textTop+=this.RowHeight;}}}else{for(var i=0,j=0;i<this.TableCount;++i){var tableLeft=left+this.TableWidth*i;var textLeft=tableLeft;var textTop=top;for(j=0;j<this.RowCount&&index<dataCount;++j,++index){var dataItem=this.Data.Data[index];var rtRow={Left:textLeft-this.HeaderMergin.Left,Top:textTop,Height:this.RowHeight,Width:this.TableWidth};rtRow.Right=rtRow.Left+rtRow.Width;rtRow.Bottom=rtRow.Top+rtRow.Height;this.DrawSelectedRow(dataItem,index,rtRow);this.DrawRow(dataItem,textLeft,textTop,index);this.AryCellRect.push({Rect:rtRow,Type:1,DataIndex:index});textTop+=this.RowHeight;}}}};this.DrawRow=function(data,left,top,dataIndex,colIndex){var tableLeft=left;var tableRight=left+this.TableWidth;for(var i=0;i<this.Column.length;++i){var item=this.Column[i];var textColor=item.TextColor;var text=null;var itemWidth=item.Width;var textAlign=item.TextAlign;if(left+itemWidth>tableRight)break;if(i==this.Column.length-1)itemWidth=this.TableWidth-(left-tableLeft)-this.HeaderMergin.Right-this.HeaderMergin.Left;var drawInfo={Text:null,TextColor:item.TextColor,TextAlign:item.TextAlign,Tooltip:null,Index:dataIndex,ColumnIndex:i};var rtItem={Left:left,Top:top,Width:itemWidth,Height:this.RowHeight};rtItem.Right=rtItem.Left+rtItem.Width;rtItem.Bottom=rtItem.Top+rtItem.Height;drawInfo.Rect=rtItem;var bDrawV2=false;if(item.Type==DEAL_COLUMN_ID.TIME_ID){text=IFrameSplitOperator.FormatTimeString(data.Time,item.Foramt);}else if(item.Type==DEAL_COLUMN_ID.STRING_TIME_ID){text=data.StrTime;}else if(item.Type==DEAL_COLUMN_ID.PRICE_ID){if(data.Price>this.YClose)textColor=this.UpColor;else if(data.Price<this.YClose)textColor=this.DownColor;else textColor=this.UnchangeColor;text=data.Price.toFixed(this.Decimal);}else if(item.Type==DEAL_COLUMN_ID.VOL_ID){text=IFrameSplitOperator.FormatValueString(data.Vol,0);textColor=this.GetVolColor(item,data);}else if(item.Type==DEAL_COLUMN_ID.DEAL_ID){text=IFrameSplitOperator.FormatValueString(data.Deal,0);}else if(item.Type==DEAL_COLUMN_ID.BS_ID){if(data.BS==1){text="B";textColor=this.UpColor;}else if(data.BS==2){text="S";textColor=this.DownColor;}}else if(item.Type==DEAL_COLUMN_ID.UPDOWN_ID){if(IFrameSplitOperator.IsNumber(this.YClose)){var value=data.Price-this.YClose;text=value.toFixed(2);if(value>0)textColor=this.UpColor;else if(value<0)textColor=this.DownColor;else textColor=this.UnchangeColor;}}else if(item.Type==DEAL_COLUMN_ID.INDEX_ID){text=(dataIndex+1).toString();}else if(item.Type==DEAL_COLUMN_ID.MULTI_BAR_ID){var rtItem={Left:left,Top:top,Width:itemWidth,Height:this.RowHeight};this.DrawMultiBar(item,data,rtItem);}else if(item.Type==DEAL_COLUMN_ID.CENTER_BAR_ID){var rtItem={Left:left,Top:top,Width:itemWidth,Height:this.RowHeight};this.DrawCenterBar(item,data,rtItem);}else if(item.Type==DEAL_COLUMN_ID.CUSTOM_TEXT_ID){var out={Text:null,TextColor:null,TextAlign:null};//输出
12986
+ var rtItem={Left:left,Top:top,Width:itemWidth,Height:this.RowHeight};if(this.DrawCustomText(item,data,rtItem,dataIndex,i,out)){if(out.Text)text=out.Text;if(out.TextColor)textColor=out.TextColor;if(out.TextAlign)textAlign=out.TextAlign;}}else if(this.IsReserveString(item.Type)){this.FormatReserveString(item,data,drawInfo);bDrawV2=true;}else if(this.IsReserveNumber(item.Type)){this.FormatReserveNumber(item,data,drawInfo);bDrawV2=true;}if(bDrawV2){this.DrawItemText(drawInfo.Text,drawInfo.TextColor,drawInfo.TextAlign,rtItem.Left,rtItem.Top,rtItem.Width,drawInfo.BGColor);}else{this.DrawItemText(text,textColor,textAlign,left,top,itemWidth);}left+=item.Width;}};this.FormatReserveNumber=function(column,data,drawInfo){if(column.DefaultText)drawInfo.Text=column.DefaultText;var fieldName=MAP_DEAL_COLUMN_FIELD.get(column.Type);if(!data||!fieldName)return;var value=data[fieldName];if(!IFrameSplitOperator.IsNumber(value))return;if(IFrameSplitOperator.IsNumber(column.ColorType)){if(column.ColorType==1){drawInfo.TextColor=this.GetUpDownColor(value,0);}else if(column.ColorType==2){drawInfo.TextColor=this.GetUpDownColorV2(value,0);}}var text=value.toFixed(column.FloatPrecision);if(column.Format&&IFrameSplitOperator.IsNumber(column.Format.Type)){var format=column.Format;switch(format.Type){case 1://原始数据
12987
+ text=value.toFixed(column.FloatPrecision);break;case 2://千分位分割
12988
+ text=IFrameSplitOperator.FormatValueThousandsString(value,column.FloatPrecision);break;case 3:var exfloatPrecision=1;if(IFrameSplitOperator.IsNumber(format.ExFloatPrecision))exfloatPrecision=format.ExFloatPrecision;text=IFrameSplitOperator.FormatValueStringV2(value,column.FloatPrecision,exfloatPrecision);break;}}drawInfo.Text=text;};this.FormatReserveString=function(column,data,drawInfo){if(column.DefaultText)drawInfo.Text=column.DefaultText;var fieldName=MAP_DEAL_COLUMN_FIELD.get(column.Type);if(!data||!fieldName)return;var item=data[fieldName];if(IFrameSplitOperator.IsObject(item)){if(item.Text)drawInfo.Text=item.Text;if(item.TextColor)drawInfo.TextColor=item.TextColor;if(item.BGColor)drawInfo.BGColor=item.BGColor;}else if(IFrameSplitOperator.IsString(item)){drawInfo.Text=item;}};this.GetUpDownColor=function(price,price2){if(price>price2)return this.UpColor;else if(price<price2)return this.DownColor;else return this.UnchangeColor;};this.GetUpDownColorV2=function(price,price2){if(price>=price2)return this.UpColor;else return this.DownColor;};this.DrawSelectedRow=function(data,index,rtRow){if(!this.SelectedData)return;if(!this.SelectedData.Enable)return;if(!this.SelectedData.Guid||this.SelectedData.Guid!=data.Guid)return;this.Canvas.fillStyle=this.SelectedConfig.BGColor;this.Canvas.fillRect(rtRow.Left,rtRow.Top,rtRow.Width,rtRow.Height);};this.DrawItemText=function(text,textColor,textAlign,left,top,width){var x=left;if(textAlign=='center'){x=left+width/2;this.Canvas.textAlign="center";}else if(textAlign=='right'){x=left+width;this.Canvas.textAlign="right";}else{this.Canvas.textAlign="left";}this.Canvas.textBaseline="middle";this.Canvas.fillStyle=textColor;if(text)this.Canvas.fillText(text,x,top+this.RowHeight/2);};this.DrawMultiBar=function(colunmInfo,data,rtItem){if(!data.Source||!IFrameSplitOperator.IsNonEmptyArray(data.Source))return false;var barData=data.Source[colunmInfo.DataIndex];//{ Value:[0.4,0,2], Color:[0,1] };
12975
12989
  if(!barData)return false;if(!IFrameSplitOperator.IsNonEmptyArray(barData.Value))return false;var width=rtItem.Width-this.BarMergin.Left-this.BarMergin.Right;var left=rtItem.Left+this.BarMergin.Left;var top=rtItem.Top+this.RowMergin.Top+this.BarMergin.Top;var height=rtItem.Height-this.RowMergin.Top-this.RowMergin.Bottom-this.BarMergin.Top-this.BarMergin.Bottom;var right=left+width;for(var i=0;i<barData.Value.length;++i){var value=barData.Value[i];if(value<=0)continue;if(left>=right)break;var barWidth=width*value;if(barWidth<1)barWidth=1;if(left+barWidth>right)barWidth=right-left;var colorIndex=i;if(IFrameSplitOperator.IsNonEmptyArray(barData.Color)&&i<barData.Color.length)colorIndex=barData.Color[i];this.Canvas.fillStyle=g_JSChartResource.DealList.FieldColor.Bar[colorIndex];this.Canvas.fillRect(left,top,barWidth,height);left+=barWidth;}return true;};this.DrawCenterBar=function(colunmInfo,data,rtItem){if(!data.Source||!IFrameSplitOperator.IsNonEmptyArray(data.Source))return false;var barData=data.Source[colunmInfo.DataIndex];//{ Value:[0.4,0,2], Color:[0,1] };
12976
12990
  if(!barData)return false;if(!IFrameSplitOperator.IsNonEmptyArray(barData.Value))return false;var width=(rtItem.Width-this.BarMergin.Left-this.BarMergin.Right)/2;var left=rtItem.Left+this.BarMergin.Left;var center=left+width;var top=rtItem.Top+this.RowMergin.Top+this.BarMergin.Top;var height=rtItem.Height-this.RowMergin.Top-this.RowMergin.Bottom-this.BarMergin.Top-this.BarMergin.Bottom;var right=left+width;for(var i=0;i<barData.Value.length&&i<2;++i){var value=barData.Value[i];if(value<=0)continue;if(value>1)value=1;var barWidth=width*value;if(barWidth<1)barWidth=1;var colorIndex=i;if(IFrameSplitOperator.IsNonEmptyArray(barData.Color)&&i<barData.Color.length)colorIndex=barData.Color[i];this.Canvas.fillStyle=g_JSChartResource.DealList.FieldColor.Bar[colorIndex];if(i==0)//左边
12977
12991
  {this.Canvas.fillRect(center,top,-barWidth,height);}else//右边
12978
12992
  {this.Canvas.fillRect(center,top,barWidth,height);}}};this.DrawCustomText=function(columnInfo,data,rtItem,dataIndex,colid,out){var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_DRAW_DEAL_TEXT);if(!event||!event.Callback)return false;var sendData={Data:data,DataIndex:dataIndex,ColumnIndex:colid,ColumnInfo:columnInfo,Out:{Text:null,TextColor:null,TextAlign:null}};event.Callback(event,sendData,this);if(!sendData.Out.Text)return false;out.Text=sendData.Out.Text;if(sendData.Out.TextColor)out.TextColor=sendData.Out.TextColor;if(sendData.Out.TextAlign)out.TextAlign=sendData.Out.TextAlign;return true;};this.GetVolColor=function(colunmInfo,data){var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_DRAW_DEAL_VOL_COLOR);if(event&&event.Callback){var sendData={Data:data,TextColor:null};event.Callback(event,sendData,this);if(sendData.TextColor)return sendData.TextColor;}return colunmInfo.TextColor;};this.GetFontHeight=function(font,word){return GetFontHeight(this.Canvas,font,word);};this.OnMouseDown=function(x,y,e)//Type: 1=行
12979
- {if(!this.Data)return null;var pixelTatio=GetDevicePixelRatio();var insidePoint={X:x/pixelTatio,Y:y/pixelTatio};var uiElement;if(this.UIElement)uiElement={Left:this.UIElement.getBoundingClientRect().left,Top:this.UIElement.getBoundingClientRect().top};else uiElement={Left:null,Top:null};var row=this.PtInBody(x,y);if(row){var bRedraw=true;var index=row.DataIndex;var id=row.Item.Guid;if(this.SelectedData.Index==index&&this.SelectedData.Guid==id)bRedraw=false;this.SelectedData.Index=index;this.SelectedData.Guid=id;var eventID=JSCHART_EVENT_ID.ON_CLICK_DEAL_ROW;if(e.button==2)eventID=JSCHART_EVENT_ID.ON_RCLICK_DEAL_ROW;this.SendClickEvent(eventID,{Data:row,X:x,Y:y,e:e,Inside:insidePoint,UIElement:uiElement});return{Type:row.Type,Redraw:bRedraw,Row:row};}return null;};this.OnDblClick=function(x,y,e){if(!this.Data)return false;var row=this.PtInBody(x,y);if(row){this.SendClickEvent(JSCHART_EVENT_ID.ON_DBCLICK_DEAL_ROW,{Data:row,X:x,Y:y});return true;}return false;};this.PtInBody=function(x,y){if(!this.Data)return null;if(!IFrameSplitOperator.IsNonEmptyArray(this.Data.Data))return null;if(!IFrameSplitOperator.IsNonEmptyArray(this.AryCellRect))return null;for(var i=0;i<this.AryCellRect.length;++i){var item=this.AryCellRect[i];var rtRow=item.Rect;if(x>=rtRow.Left&&x<=rtRow.Right&&y>=rtRow.Top&&y<=rtRow.Bottom){var data={Rect:rtRow,DataIndex:item.DataIndex,Item:this.Data.Data[item.DataIndex],Type:item.Type};return data;}}return null;};this.SendClickEvent=function(id,data){var event=this.GetEventCallback(id);if(event&&event.Callback){event.Callback(event,data,this);}};}/*
12993
+ {if(!this.Data)return null;var pixelTatio=GetDevicePixelRatio();var insidePoint={X:x/pixelTatio,Y:y/pixelTatio};var uiElement;if(this.UIElement)uiElement={Left:this.UIElement.getBoundingClientRect().left,Top:this.UIElement.getBoundingClientRect().top};else uiElement={Left:null,Top:null};var row=this.PtInBody(x,y);if(row){var bRedraw=true;var index=row.DataIndex;var id=row.Item.Guid;if(this.SelectedData.Index==index&&this.SelectedData.Guid==id)bRedraw=false;this.SelectedData.Index=index;this.SelectedData.Guid=id;var eventID=JSCHART_EVENT_ID.ON_CLICK_DEAL_ROW;if(e.button==2)eventID=JSCHART_EVENT_ID.ON_RCLICK_DEAL_ROW;this.SendClickEvent(eventID,{Data:row,X:x,Y:y,e:e,Inside:insidePoint,UIElement:uiElement});return{Type:row.Type,Redraw:bRedraw,Row:row};}return null;};this.OnDblClick=function(x,y,e){if(!this.Data)return false;var row=this.PtInBody(x,y);if(row){this.SendClickEvent(JSCHART_EVENT_ID.ON_DBCLICK_DEAL_ROW,{Data:row,X:x,Y:y});return true;}return false;};this.PtInBody=function(x,y){if(!this.Data)return null;if(!IFrameSplitOperator.IsNonEmptyArray(this.Data.Data))return null;if(!IFrameSplitOperator.IsNonEmptyArray(this.AryCellRect))return null;for(var i=0;i<this.AryCellRect.length;++i){var item=this.AryCellRect[i];var rtRow=item.Rect;if(x>=rtRow.Left&&x<=rtRow.Right&&y>=rtRow.Top&&y<=rtRow.Bottom){var data={Rect:rtRow,DataIndex:item.DataIndex,Item:this.Data.Data[item.DataIndex],Type:item.Type};return data;}}return null;};this.SendClickEvent=function(id,data){var event=this.GetEventCallback(id);if(event&&event.Callback){event.Callback(event,data,this);}};this.IsReserveString=function(value){var ARARY_TYPE=[DEAL_COLUMN_ID.RESERVE_STRING1_ID,DEAL_COLUMN_ID.RESERVE_STRING2_ID,DEAL_COLUMN_ID.RESERVE_STRING3_ID,DEAL_COLUMN_ID.RESERVE_STRING4_ID,DEAL_COLUMN_ID.RESERVE_STRING5_ID,DEAL_COLUMN_ID.RESERVE_STRING6_ID,DEAL_COLUMN_ID.RESERVE_STRING7_ID,DEAL_COLUMN_ID.RESERVE_STRING8_ID,DEAL_COLUMN_ID.RESERVE_STRING9_ID,DEAL_COLUMN_ID.RESERVE_STRING10_ID];return ARARY_TYPE.includes(value);};this.IsReserveNumber=function(value){var ARARY_TYPE=[DEAL_COLUMN_ID.RESERVE_NUMBER1_ID,DEAL_COLUMN_ID.RESERVE_NUMBER2_ID,DEAL_COLUMN_ID.RESERVE_NUMBER3_ID,DEAL_COLUMN_ID.RESERVE_NUMBER4_ID,DEAL_COLUMN_ID.RESERVE_NUMBER5_ID,DEAL_COLUMN_ID.RESERVE_NUMBER6_ID,DEAL_COLUMN_ID.RESERVE_NUMBER7_ID,DEAL_COLUMN_ID.RESERVE_NUMBER8_ID,DEAL_COLUMN_ID.RESERVE_NUMBER9_ID,DEAL_COLUMN_ID.RESERVE_NUMBER10_ID];return ARARY_TYPE.includes(value);};}/*
12980
12994
  Copyright (c) 2018 jones
12981
12995
 
12982
12996
  http://www.apache.org/licenses/LICENSE-2.0
@@ -14915,7 +14929,7 @@ hisData.Symbol=message.symbol;}var stockObj={HQDataType:HQ_DATA_TYPE.KLINE_ID,St
14915
14929
  this.ExecuteScript(item,data);}this.Status=0;}};this.OnExecuteFinish=function(data,indexInfo,jsExectute,jobInfo){var message={Data:data,IndexInfo:indexInfo,ID:JSCHART_WORKER_MESSAGE_ID.FINISH_EXECUTE_SCRIPT,JobInfo:jobInfo};postMessage(message);};this.OnExecuteError=function(error,indexInfo,jobData){var message={IndexInfo:indexInfo,ID:JSCHART_WORKER_MESSAGE_ID.ERROR_EXECUTE_SCRIPT,Error:error};postMessage(message);};}/********************************************************************************
14916
14930
  * 版本信息输出
14917
14931
  *
14918
- */var HQCHART_VERSION="1.1.14745";function PrintHQChartVersion(){var logo='\n\n*************************************************************************************************************************************************************************** \n* \n* :%@@- \n* :@@@@- \n* =@@@@ :#@@@ .:+#@@@#=: :=*@@@@@@#+-. *@@@@. \n* :@@@@@ .@@@@@ .#@@@@@@@@@@@- +@@@@@@@@@@@@@+ @@@@@ -%@@* \n* +@@@@% #@@@@# *@@@@@@@@@@@@@@%. =@@@@@@@@@@@@@@@- @@@@@ -@@@@+ \n* %@@@@* @@@@@+ .%@@@@@@@@@@@@@@@@%: #@@@@@@@@@@@@@@@% @@@@# *@@@@= \n* @@@@@= @@@@@- .%@@@@@@@*++*%@@@@@@% .%@@@@@@@%*+==+**= -@@@@+ #@@@@- \n* @@@@@. @@@@@. #@@@@@%= =@@@@@@* %@@@@@@#: *@@@@- :::. .-+*###+: ::: .+##+: -%%@@@@@%%%% \n* .@@@@@ .@@@@@. +@@@@@% .@@@@@@ *@@@@@@: %@@@@: +@@@@@%. :%@@@@@@@@@@: *@@@ :@@@@@* @@@@@@@@@@@@ \n* :@@@@@ :@@@@@ @@@@@% :@@@@@+ @@@@@@: %@@@@-@@@@@@@@@. @@@@@@@@@@@@@. :@@@%-@@@@@@.:@@@@@@@@@@@# \n* -@@@@% -@@@@@ =@@@@@. %@@@@% %@@@@@- %@@@@@@@@@@@@@@* %@@@@@@@@@@@@+ -@@@@@@@@@@# -@@@@@@@@@@@. \n* +@@@@%=========#@@@@% @@@@@# :@@@@@ .@@@@@% @@@@@@@@%@@@@@@@ -%+:. .#@@@@* +@@@@@@@%%@. .::+@@@@#:: \n* #@@@@@@@@@@@@@@@@@@@# .@@@@@ .@@@@@ :@@@@@. @@@@@@#. #@@@@@. -@@@@* #@@@@@@: *@@@@+ \n* %@@@@@@@@@@@@@@@@@@@+ :@@@@@ .@@@@@ -@@@@@ @@@@@+ @@@@@. :@@@@* @@@@@% #@@@@- \n* @@@@@@@@@@@@@@@@@@@@: :@@@@% :@@@@@ +@@@@% -@@@@+ @@@@@ -@@@@+ @@@@@. @@@@@. \n* .@@@@@@@@@@@@@@@@@@@@ :@@@@% -@@@@% *@@@@% #@@@@. @@@@@ .=*#%%%@@@@@= :@@@@# @@@@@. \n* -@@@@@:::::::::=@@@@@ :@@@@@ @@@@@* +@@@@% @@@@@ @@@@% -#@@@@@@@@@@@@: -@@@@* @@@@@ \n* =@@@@% =@@@@% .@@@@@ :@@@@@. -@@@@% @@@@@ .@@@@* +@@@@@@@@@@@@@@. =@@@@+ .@@@@@ \n* +@@@@# +@@@@# @@@@@# %@@@@% :@@@@@ .@@@@% =@@@@= -@@@@@*-:..%@@@@ +@@@@= :@@@@# \n* *@@@@* *@@@@* +@@@@@: #@@@@@+ .@@@@@@ :@@@@% *@@@@- @@@@@. @@@@% #@@@@: =@@@@+ \n* %@@@@= %@@@@+ @@@@@@- .%@@@@@# #@@@@@# :@@@@% #@@@@: @@@@% @@@@* %@@@@. #@@@@- \n* @@@@@- @@@@@= =@@@@@@#=...-*@@@@@@@: @@@@@@%=. :+**. :@@@@* %@@@@. .@@@@* *@@@@= @@@@@ %@@@@+ \n* .@@@@@: .@@@@@: *@@@@@@@@@@@@@@@@@@@# =@@@@@@@@%%%@@@@@@ +@@@@- @@@@@ .@@@@@: :%@@@@@- .@@@@% %@@@@@*+- \n* :@@@@@ :@@@@@ +@@@@@@@@@@@@@@@@@@@# =@@@@@@@@@@@@@@@@% %@@@@ @@@@@ @@@@@@@@@@@@@@@: -@@@@* *@@@@@@@@- \n* =@@@@@ -@@@@@ :@@@@@@@@@@@@@@@@@@@# :@@@@@@@@@@@@@@@% @@@@@ %@@@% #@@@@@@@@@#@@@@. +@@@@- .@@@@@@@@# \n* *@@@@# =@@@@% :#@@@@@@@#: :@@@@@= =@@@@@@@@@@@+. @@@@@ :@@@+ *@@@@@@@- %@@@ *@@@= =@@@@@@@* \n* =++++- -++++= .:::. .=*+: :-=+++=:. ****= .=+. .-++=: :+++ -+=: .-=+=:. \n* \n* \n* HQChart \n* Ver: '+HQCHART_VERSION+' \n* License: Apache License 2.0 \n* Source: https://github.com/jones2000/HQChart\n*\n************************************************************************************************************************************************************************** \n ';console.log(logo);}PrintHQChartVersion();//把给外界调用的方法暴露出来
14932
+ */var HQCHART_VERSION="1.1.14749";function PrintHQChartVersion(){var logo='\n\n*************************************************************************************************************************************************************************** \n* \n* :%@@- \n* :@@@@- \n* =@@@@ :#@@@ .:+#@@@#=: :=*@@@@@@#+-. *@@@@. \n* :@@@@@ .@@@@@ .#@@@@@@@@@@@- +@@@@@@@@@@@@@+ @@@@@ -%@@* \n* +@@@@% #@@@@# *@@@@@@@@@@@@@@%. =@@@@@@@@@@@@@@@- @@@@@ -@@@@+ \n* %@@@@* @@@@@+ .%@@@@@@@@@@@@@@@@%: #@@@@@@@@@@@@@@@% @@@@# *@@@@= \n* @@@@@= @@@@@- .%@@@@@@@*++*%@@@@@@% .%@@@@@@@%*+==+**= -@@@@+ #@@@@- \n* @@@@@. @@@@@. #@@@@@%= =@@@@@@* %@@@@@@#: *@@@@- :::. .-+*###+: ::: .+##+: -%%@@@@@%%%% \n* .@@@@@ .@@@@@. +@@@@@% .@@@@@@ *@@@@@@: %@@@@: +@@@@@%. :%@@@@@@@@@@: *@@@ :@@@@@* @@@@@@@@@@@@ \n* :@@@@@ :@@@@@ @@@@@% :@@@@@+ @@@@@@: %@@@@-@@@@@@@@@. @@@@@@@@@@@@@. :@@@%-@@@@@@.:@@@@@@@@@@@# \n* -@@@@% -@@@@@ =@@@@@. %@@@@% %@@@@@- %@@@@@@@@@@@@@@* %@@@@@@@@@@@@+ -@@@@@@@@@@# -@@@@@@@@@@@. \n* +@@@@%=========#@@@@% @@@@@# :@@@@@ .@@@@@% @@@@@@@@%@@@@@@@ -%+:. .#@@@@* +@@@@@@@%%@. .::+@@@@#:: \n* #@@@@@@@@@@@@@@@@@@@# .@@@@@ .@@@@@ :@@@@@. @@@@@@#. #@@@@@. -@@@@* #@@@@@@: *@@@@+ \n* %@@@@@@@@@@@@@@@@@@@+ :@@@@@ .@@@@@ -@@@@@ @@@@@+ @@@@@. :@@@@* @@@@@% #@@@@- \n* @@@@@@@@@@@@@@@@@@@@: :@@@@% :@@@@@ +@@@@% -@@@@+ @@@@@ -@@@@+ @@@@@. @@@@@. \n* .@@@@@@@@@@@@@@@@@@@@ :@@@@% -@@@@% *@@@@% #@@@@. @@@@@ .=*#%%%@@@@@= :@@@@# @@@@@. \n* -@@@@@:::::::::=@@@@@ :@@@@@ @@@@@* +@@@@% @@@@@ @@@@% -#@@@@@@@@@@@@: -@@@@* @@@@@ \n* =@@@@% =@@@@% .@@@@@ :@@@@@. -@@@@% @@@@@ .@@@@* +@@@@@@@@@@@@@@. =@@@@+ .@@@@@ \n* +@@@@# +@@@@# @@@@@# %@@@@% :@@@@@ .@@@@% =@@@@= -@@@@@*-:..%@@@@ +@@@@= :@@@@# \n* *@@@@* *@@@@* +@@@@@: #@@@@@+ .@@@@@@ :@@@@% *@@@@- @@@@@. @@@@% #@@@@: =@@@@+ \n* %@@@@= %@@@@+ @@@@@@- .%@@@@@# #@@@@@# :@@@@% #@@@@: @@@@% @@@@* %@@@@. #@@@@- \n* @@@@@- @@@@@= =@@@@@@#=...-*@@@@@@@: @@@@@@%=. :+**. :@@@@* %@@@@. .@@@@* *@@@@= @@@@@ %@@@@+ \n* .@@@@@: .@@@@@: *@@@@@@@@@@@@@@@@@@@# =@@@@@@@@%%%@@@@@@ +@@@@- @@@@@ .@@@@@: :%@@@@@- .@@@@% %@@@@@*+- \n* :@@@@@ :@@@@@ +@@@@@@@@@@@@@@@@@@@# =@@@@@@@@@@@@@@@@% %@@@@ @@@@@ @@@@@@@@@@@@@@@: -@@@@* *@@@@@@@@- \n* =@@@@@ -@@@@@ :@@@@@@@@@@@@@@@@@@@# :@@@@@@@@@@@@@@@% @@@@@ %@@@% #@@@@@@@@@#@@@@. +@@@@- .@@@@@@@@# \n* *@@@@# =@@@@% :#@@@@@@@#: :@@@@@= =@@@@@@@@@@@+. @@@@@ :@@@+ *@@@@@@@- %@@@ *@@@= =@@@@@@@* \n* =++++- -++++= .:::. .=*+: :-=+++=:. ****= .=+. .-++=: :+++ -+=: .-=+=:. \n* \n* \n* HQChart \n* Ver: '+HQCHART_VERSION+' \n* License: Apache License 2.0 \n* Source: https://github.com/jones2000/HQChart\n*\n************************************************************************************************************************************************************************** \n ';console.log(logo);}PrintHQChartVersion();//把给外界调用的方法暴露出来
14919
14933
  exports.default=(_jsChartInit$jsChartS={jsChartInit:JSChart.Init,jsChartStyle:JSChart.SetStyle,// IsIndexSymbol:IsIndexSymbol,
14920
14934
  // BaseIndex:BaseIndex,
14921
14935
  // ChartLine:ChartLine,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hqchart",
3
- "version": "1.1.14746",
3
+ "version": "1.1.14750",
4
4
  "description": "HQChart - H5, 微信小程序 沪深/港股/数字货币/期货/美股 K线图(kline),走势图,缩放,拖拽,十字光标,画图工具,截图,筹码图. 分析家语法,通达信语法,(麦语法),第3方数据对接",
5
5
  "main": "lib/main.js",
6
6
  "scripts": {
@@ -839,6 +839,33 @@ JSDealChartContainer.JsonDataToDealData=function(data)
839
839
  if (item[5]) dealItem.StrTime=item[5];
840
840
  if (item[6]) dealItem.ID=item[6];
841
841
 
842
+ if (item[11]) dealItem.Symbol=item[11]; //股票代码
843
+ if (item[12]) dealItem.Name=item[12]; //股票名称
844
+
845
+ //10个数值型 101-199
846
+ if (IFrameSplitOperator.IsNumber(item[101])) dealItem.ReserveNumber1=item[101];
847
+ if (IFrameSplitOperator.IsNumber(item[102])) dealItem.ReserveNumber2=item[102];
848
+ if (IFrameSplitOperator.IsNumber(item[103])) dealItem.ReserveNumber3=item[103];
849
+ if (IFrameSplitOperator.IsNumber(item[104])) dealItem.ReserveNumber4=item[104];
850
+ if (IFrameSplitOperator.IsNumber(item[105])) dealItem.ReserveNumber5=item[105];
851
+ if (IFrameSplitOperator.IsNumber(item[106])) dealItem.ReserveNumber6=item[106];
852
+ if (IFrameSplitOperator.IsNumber(item[107])) dealItem.ReserveNumber7=item[107];
853
+ if (IFrameSplitOperator.IsNumber(item[108])) dealItem.ReserveNumber8=item[108];
854
+ if (IFrameSplitOperator.IsNumber(item[109])) dealItem.ReserveNumber9=item[109];
855
+ if (IFrameSplitOperator.IsNumber(item[110])) dealItem.ReserveNumber10=item[110];
856
+
857
+ //10个字符型 201-299
858
+ if (IFrameSplitOperator.IsString(item[201]) || IFrameSplitOperator.IsObject(item[201])) dealItem.ReserveString1=item[201];
859
+ if (IFrameSplitOperator.IsString(item[202]) || IFrameSplitOperator.IsObject(item[202])) dealItem.ReserveString2=item[202];
860
+ if (IFrameSplitOperator.IsString(item[203]) || IFrameSplitOperator.IsObject(item[203])) dealItem.ReserveString3=item[203];
861
+ if (IFrameSplitOperator.IsString(item[204]) || IFrameSplitOperator.IsObject(item[204])) dealItem.ReserveString4=item[204];
862
+ if (IFrameSplitOperator.IsString(item[205]) || IFrameSplitOperator.IsObject(item[205])) dealItem.ReserveString5=item[205];
863
+ if (IFrameSplitOperator.IsString(item[206]) || IFrameSplitOperator.IsObject(item[206])) dealItem.ReserveString6=item[206];
864
+ if (IFrameSplitOperator.IsString(item[207]) || IFrameSplitOperator.IsObject(item[207])) dealItem.ReserveString7=item[207];
865
+ if (IFrameSplitOperator.IsString(item[208]) || IFrameSplitOperator.IsObject(item[208])) dealItem.ReserveString8=item[208];
866
+ if (IFrameSplitOperator.IsString(item[209]) || IFrameSplitOperator.IsObject(item[209])) dealItem.ReserveString9=item[209];
867
+ if (IFrameSplitOperator.IsString(item[210]) || IFrameSplitOperator.IsObject(item[210])) dealItem.ReserveString10=item[210];
868
+
842
869
  result.push(dealItem);
843
870
  }
844
871
 
@@ -938,9 +965,66 @@ var DEAL_COLUMN_ID=
938
965
  INDEX_ID:7, //序号 从1开始
939
966
  MULTI_BAR_ID:8, //多颜色柱子
940
967
  CENTER_BAR_ID:9, //中心柱子
941
- CUSTOM_TEXT_ID:10 //自定义文本
968
+ CUSTOM_TEXT_ID:10, //自定义文本
969
+
970
+ SYMBOL_ID:11, //股票代码
971
+ NAME_ID:12, //股票名称
972
+
973
+
974
+ //预留数值类型 10个
975
+ RESERVE_NUMBER1_ID:201, //ReserveNumber1:
976
+ RESERVE_NUMBER2_ID:202,
977
+ RESERVE_NUMBER3_ID:203,
978
+ RESERVE_NUMBER4_ID:204,
979
+ RESERVE_NUMBER5_ID:205,
980
+ RESERVE_NUMBER6_ID:206,
981
+ RESERVE_NUMBER7_ID:207,
982
+ RESERVE_NUMBER8_ID:208,
983
+ RESERVE_NUMBER9_ID:209,
984
+ RESERVE_NUMBER10_ID:210,
985
+
986
+ //预留字符串类型 10个 301-399
987
+ RESERVE_STRING1_ID:301, //ReserveString1:
988
+ RESERVE_STRING2_ID:302,
989
+ RESERVE_STRING3_ID:303,
990
+ RESERVE_STRING4_ID:304,
991
+ RESERVE_STRING5_ID:305,
992
+ RESERVE_STRING6_ID:306,
993
+ RESERVE_STRING7_ID:307,
994
+ RESERVE_STRING8_ID:308,
995
+ RESERVE_STRING9_ID:309,
996
+ RESERVE_STRING10_ID:310,
942
997
  }
943
998
 
999
+ var MAP_DEAL_COLUMN_FIELD=new Map(
1000
+ [
1001
+ [DEAL_COLUMN_ID.SYMBOL_ID, "Symbol"],
1002
+ [DEAL_COLUMN_ID.NAME_ID, "Name"],
1003
+ [DEAL_COLUMN_ID.PRICE_ID, "Price"],
1004
+
1005
+ [DEAL_COLUMN_ID.RESERVE_NUMBER1_ID,"ReserveNumber1"],
1006
+ [DEAL_COLUMN_ID.RESERVE_NUMBER2_ID,"ReserveNumber2"],
1007
+ [DEAL_COLUMN_ID.RESERVE_NUMBER3_ID,"ReserveNumber3"],
1008
+ [DEAL_COLUMN_ID.RESERVE_NUMBER4_ID,"ReserveNumber4"],
1009
+ [DEAL_COLUMN_ID.RESERVE_NUMBER5_ID,"ReserveNumber5"],
1010
+ [DEAL_COLUMN_ID.RESERVE_NUMBER6_ID,"ReserveNumber6"],
1011
+ [DEAL_COLUMN_ID.RESERVE_NUMBER7_ID,"ReserveNumber7"],
1012
+ [DEAL_COLUMN_ID.RESERVE_NUMBER8_ID,"ReserveNumber8"],
1013
+ [DEAL_COLUMN_ID.RESERVE_NUMBER9_ID,"ReserveNumber9"],
1014
+ [DEAL_COLUMN_ID.RESERVE_NUMBER10_ID,"ReserveNumber10"],
1015
+
1016
+ [DEAL_COLUMN_ID.RESERVE_STRING1_ID,"ReserveString1"],
1017
+ [DEAL_COLUMN_ID.RESERVE_STRING2_ID,"ReserveString2"],
1018
+ [DEAL_COLUMN_ID.RESERVE_STRING3_ID,"ReserveString3"],
1019
+ [DEAL_COLUMN_ID.RESERVE_STRING4_ID,"ReserveString4"],
1020
+ [DEAL_COLUMN_ID.RESERVE_STRING5_ID,"ReserveString5"],
1021
+ [DEAL_COLUMN_ID.RESERVE_STRING6_ID,"ReserveString6"],
1022
+ [DEAL_COLUMN_ID.RESERVE_STRING7_ID,"ReserveString7"],
1023
+ [DEAL_COLUMN_ID.RESERVE_STRING8_ID,"ReserveString8"],
1024
+ [DEAL_COLUMN_ID.RESERVE_STRING9_ID,"ReserveString9"],
1025
+ [DEAL_COLUMN_ID.RESERVE_STRING10_ID,"ReserveString10"],
1026
+ ]);
1027
+
944
1028
  function ChartDealList()
945
1029
  {
946
1030
  this.Canvas; //画布
@@ -966,7 +1050,7 @@ function ChartDealList()
966
1050
  //涨跌颜色
967
1051
  this.UpColor=g_JSChartResource.DealList.UpTextColor;
968
1052
  this.DownColor=g_JSChartResource.DealList.DownTextColor;
969
- this.UnchagneColor=g_JSChartResource.DealList.UnchagneTextColor;
1053
+ this.UnchangeColor=g_JSChartResource.DealList.UnchagneTextColor;
970
1054
 
971
1055
  this.BorderColor=g_JSChartResource.DealList.BorderColor; //边框线
972
1056
 
@@ -1017,7 +1101,7 @@ function ChartDealList()
1017
1101
  {
1018
1102
  this.UpColor=g_JSChartResource.DealList.UpTextColor;
1019
1103
  this.DownColor=g_JSChartResource.DealList.DownTextColor;
1020
- this.UnchagneColor=g_JSChartResource.DealList.UnchagneTextColor;
1104
+ this.UnchangeColor=g_JSChartResource.DealList.UnchagneTextColor;
1021
1105
 
1022
1106
  this.BorderColor=g_JSChartResource.DealList.BorderColor; //边框线
1023
1107
 
@@ -1076,6 +1160,11 @@ function ChartDealList()
1076
1160
  {
1077
1161
  if (IFrameSplitOperator.IsString(item.Foramt)) colItem.Foramt=item.Foramt; //设置时间格式
1078
1162
  }
1163
+ else if (this.IsReserveNumber(item.Type))
1164
+ {
1165
+ if (item.Format) colItem.Format=item.Format; //数据格式化设置{ Type:1=原始 2=千分位分割 3=万亿转换, ExFloatPrecision:万亿转换以后的小数位数 }
1166
+ if (IFrameSplitOperator.IsNumber(item.ColorType)) colItem.ColorType=item.ColorType; //0=默认 1=(>0, =0, <0) 2=(>=0, <0)
1167
+ }
1079
1168
 
1080
1169
  this.Column.push(colItem);
1081
1170
  }
@@ -1097,6 +1186,31 @@ function ChartDealList()
1097
1186
  { Type:DEAL_COLUMN_ID.MULTI_BAR_ID, Title:"柱子", TextAlign:"center", Width:null, TextColor:g_JSChartResource.DealList.FieldColor.BarTitle, MaxText:"888888" },
1098
1187
  { Type:DEAL_COLUMN_ID.CENTER_BAR_ID, Title:"柱子2", TextAlign:"center", Width:null, TextColor:g_JSChartResource.DealList.FieldColor.BarTitle, MaxText:"888888" },
1099
1188
  { Type:DEAL_COLUMN_ID.CUSTOM_TEXT_ID, Title:"自定义", TextAlign:"center", Width:null, TextColor:g_JSChartResource.DealList.FieldColor.Text, MaxText:"擎擎擎擎擎" },
1189
+
1190
+ { Type:DEAL_COLUMN_ID.NAME_ID, Title:"股票名称", TextAlign:"center", Width:null, TextColor:g_JSChartResource.DealList.FieldColor.Text, MaxText:"擎擎擎擎*" },
1191
+
1192
+ { Type:DEAL_COLUMN_ID.RESERVE_NUMBER1_ID, Title:"数值1", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999.99", FloatPrecision:2 },
1193
+ { Type:DEAL_COLUMN_ID.RESERVE_NUMBER2_ID, Title:"数值2", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999.99", FloatPrecision:2 },
1194
+ { Type:DEAL_COLUMN_ID.RESERVE_NUMBER3_ID, Title:"数值3", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999.99", FloatPrecision:2 },
1195
+ { Type:DEAL_COLUMN_ID.RESERVE_NUMBER4_ID, Title:"数值4", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999.99", FloatPrecision:2 },
1196
+ { Type:DEAL_COLUMN_ID.RESERVE_NUMBER5_ID, Title:"数值5", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999.99", FloatPrecision:2 },
1197
+ { Type:DEAL_COLUMN_ID.RESERVE_NUMBER6_ID, Title:"数值6", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999.99", FloatPrecision:2 },
1198
+ { Type:DEAL_COLUMN_ID.RESERVE_NUMBER7_ID, Title:"数值7", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999.99", FloatPrecision:2 },
1199
+ { Type:DEAL_COLUMN_ID.RESERVE_NUMBER8_ID, Title:"数值8", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999.99", FloatPrecision:2 },
1200
+ { Type:DEAL_COLUMN_ID.RESERVE_NUMBER9_ID, Title:"数值9", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999.99", FloatPrecision:2 },
1201
+ { Type:DEAL_COLUMN_ID.RESERVE_NUMBER10_ID, Title:"数值10", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999.99", FloatPrecision:2 },
1202
+
1203
+
1204
+ { Type:DEAL_COLUMN_ID.RESERVE_STRING1_ID, Title:"文字1", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"擎擎擎擎擎擎" },
1205
+ { Type:DEAL_COLUMN_ID.RESERVE_STRING2_ID, Title:"文字2", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"擎擎擎擎擎擎" },
1206
+ { Type:DEAL_COLUMN_ID.RESERVE_STRING3_ID, Title:"文字3", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"擎擎擎擎擎擎" },
1207
+ { Type:DEAL_COLUMN_ID.RESERVE_STRING4_ID, Title:"文字4", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"擎擎擎擎擎擎" },
1208
+ { Type:DEAL_COLUMN_ID.RESERVE_STRING5_ID, Title:"文字5", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"擎擎擎擎擎擎" },
1209
+ { Type:DEAL_COLUMN_ID.RESERVE_STRING6_ID, Title:"文字6", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"擎擎擎擎擎擎" },
1210
+ { Type:DEAL_COLUMN_ID.RESERVE_STRING7_ID, Title:"文字7", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"擎擎擎擎擎擎" },
1211
+ { Type:DEAL_COLUMN_ID.RESERVE_STRING8_ID, Title:"文字8", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"擎擎擎擎擎擎" },
1212
+ { Type:DEAL_COLUMN_ID.RESERVE_STRING9_ID, Title:"文字9", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"擎擎擎擎擎擎" },
1213
+ { Type:DEAL_COLUMN_ID.RESERVE_STRING10_ID, Title:"文字10", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"擎擎擎擎擎擎" },
1100
1214
 
1101
1215
  ];
1102
1216
 
@@ -1318,6 +1432,19 @@ function ChartDealList()
1318
1432
 
1319
1433
  if (i==this.Column.length-1) itemWidth=this.TableWidth-(left-tableLeft)-this.HeaderMergin.Right-this.HeaderMergin.Left;
1320
1434
 
1435
+ var drawInfo=
1436
+ {
1437
+ Text:null, TextColor:item.TextColor , TextAlign:item.TextAlign, Tooltip:null,
1438
+ Index:dataIndex, ColumnIndex:i
1439
+ };
1440
+
1441
+ var rtItem={ Left:left, Top:top, Width:itemWidth, Height:this.RowHeight };
1442
+ rtItem.Right=rtItem.Left+rtItem.Width;
1443
+ rtItem.Bottom=rtItem.Top+rtItem.Height;
1444
+ drawInfo.Rect=rtItem;
1445
+
1446
+ var bDrawV2=false;
1447
+
1321
1448
  if (item.Type==DEAL_COLUMN_ID.TIME_ID)
1322
1449
  {
1323
1450
  text=IFrameSplitOperator.FormatTimeString(data.Time,item.Foramt);
@@ -1330,7 +1457,7 @@ function ChartDealList()
1330
1457
  {
1331
1458
  if (data.Price>this.YClose) textColor=this.UpColor;
1332
1459
  else if (data.Price<this.YClose) textColor=this.DownColor;
1333
- else textColor=this.UnchagneColor;
1460
+ else textColor=this.UnchangeColor;
1334
1461
 
1335
1462
  text=data.Price.toFixed(this.Decimal);
1336
1463
  }
@@ -1365,7 +1492,7 @@ function ChartDealList()
1365
1492
 
1366
1493
  if (value>0) textColor=this.UpColor;
1367
1494
  else if (value<0) textColor=this.DownColor;
1368
- else textColor=this.UnchagneColor;
1495
+ else textColor=this.UnchangeColor;
1369
1496
  }
1370
1497
  }
1371
1498
  else if (item.Type==DEAL_COLUMN_ID.INDEX_ID)
@@ -1393,13 +1520,110 @@ function ChartDealList()
1393
1520
  if (out.TextAlign) textAlign=out.TextAlign;
1394
1521
  }
1395
1522
  }
1396
-
1397
- this.DrawItemText(text, textColor, textAlign, left, top, itemWidth);
1523
+ else if (this.IsReserveString(item.Type))
1524
+ {
1525
+ this.FormatReserveString(item, data, drawInfo);
1526
+ bDrawV2=true;
1527
+ }
1528
+ else if (this.IsReserveNumber(item.Type))
1529
+ {
1530
+ this.FormatReserveNumber(item, data, drawInfo);
1531
+ bDrawV2=true;
1532
+ }
1533
+
1534
+
1535
+ if (bDrawV2)
1536
+ {
1537
+ this.DrawItemText(drawInfo.Text, drawInfo.TextColor, drawInfo.TextAlign, rtItem.Left, rtItem.Top, rtItem.Width, drawInfo.BGColor);
1538
+ }
1539
+ else
1540
+ {
1541
+ this.DrawItemText(text, textColor, textAlign, left, top, itemWidth);
1542
+ }
1543
+
1398
1544
 
1399
1545
  left+=item.Width;
1400
1546
  }
1401
1547
  }
1402
1548
 
1549
+ this.FormatReserveNumber=function(column, data, drawInfo)
1550
+ {
1551
+ if (column.DefaultText) drawInfo.Text=column.DefaultText;
1552
+
1553
+ var fieldName=MAP_DEAL_COLUMN_FIELD.get(column.Type);
1554
+ if (!data || !fieldName) return;
1555
+
1556
+ var value=data[fieldName];
1557
+ if (!IFrameSplitOperator.IsNumber(value)) return;
1558
+
1559
+ if (IFrameSplitOperator.IsNumber(column.ColorType))
1560
+ {
1561
+ if (column.ColorType==1)
1562
+ {
1563
+ drawInfo.TextColor=this.GetUpDownColor(value,0);
1564
+ }
1565
+ else if (column.ColorType==2)
1566
+ {
1567
+ drawInfo.TextColor=this.GetUpDownColorV2(value,0);
1568
+ }
1569
+ }
1570
+
1571
+ var text=value.toFixed(column.FloatPrecision);
1572
+ if (column.Format && IFrameSplitOperator.IsNumber(column.Format.Type))
1573
+ {
1574
+ var format=column.Format;
1575
+ switch(format.Type)
1576
+ {
1577
+ case 1: //原始数据
1578
+ text=value.toFixed(column.FloatPrecision);
1579
+ break;
1580
+ case 2: //千分位分割
1581
+ text=IFrameSplitOperator.FormatValueThousandsString(value, column.FloatPrecision);
1582
+ break;
1583
+ case 3:
1584
+ var exfloatPrecision=1;
1585
+ if (IFrameSplitOperator.IsNumber(format.ExFloatPrecision)) exfloatPrecision=format.ExFloatPrecision;
1586
+ text=IFrameSplitOperator.FormatValueStringV2(value, column.FloatPrecision,exfloatPrecision);
1587
+ break;
1588
+ }
1589
+ }
1590
+
1591
+ drawInfo.Text=text;
1592
+ }
1593
+
1594
+ this.FormatReserveString=function(column, data, drawInfo)
1595
+ {
1596
+ if (column.DefaultText) drawInfo.Text=column.DefaultText;
1597
+
1598
+ var fieldName=MAP_DEAL_COLUMN_FIELD.get(column.Type);
1599
+ if (!data || !fieldName) return;
1600
+
1601
+ var item=data[fieldName];
1602
+ if (IFrameSplitOperator.IsObject(item))
1603
+ {
1604
+ if (item.Text) drawInfo.Text=item.Text;
1605
+ if (item.TextColor) drawInfo.TextColor=item.TextColor;
1606
+ if (item.BGColor) drawInfo.BGColor=item.BGColor;
1607
+ }
1608
+ else if (IFrameSplitOperator.IsString(item))
1609
+ {
1610
+ drawInfo.Text=item;
1611
+ }
1612
+ }
1613
+
1614
+ this.GetUpDownColor=function(price, price2)
1615
+ {
1616
+ if (price>price2) return this.UpColor;
1617
+ else if (price<price2) return this.DownColor;
1618
+ else return this.UnchangeColor;
1619
+ }
1620
+
1621
+ this.GetUpDownColorV2=function(price, price2)
1622
+ {
1623
+ if (price>=price2) return this.UpColor;
1624
+ else return this.DownColor;
1625
+ }
1626
+
1403
1627
  this.DrawSelectedRow=function(data, index, rtRow)
1404
1628
  {
1405
1629
  if (!this.SelectedData) return;
@@ -1611,4 +1835,28 @@ function ChartDealList()
1611
1835
  event.Callback(event,data,this);
1612
1836
  }
1613
1837
  }
1838
+
1839
+ this.IsReserveString=function(value)
1840
+ {
1841
+ var ARARY_TYPE=
1842
+ [
1843
+ DEAL_COLUMN_ID.RESERVE_STRING1_ID,DEAL_COLUMN_ID.RESERVE_STRING2_ID,DEAL_COLUMN_ID.RESERVE_STRING3_ID,DEAL_COLUMN_ID.RESERVE_STRING4_ID,
1844
+ DEAL_COLUMN_ID.RESERVE_STRING5_ID,DEAL_COLUMN_ID.RESERVE_STRING6_ID,DEAL_COLUMN_ID.RESERVE_STRING7_ID,DEAL_COLUMN_ID.RESERVE_STRING8_ID,
1845
+ DEAL_COLUMN_ID.RESERVE_STRING9_ID,DEAL_COLUMN_ID.RESERVE_STRING10_ID
1846
+ ];
1847
+
1848
+ return ARARY_TYPE.includes(value);
1849
+ }
1850
+
1851
+ this.IsReserveNumber=function(value)
1852
+ {
1853
+ var ARARY_TYPE=
1854
+ [
1855
+ DEAL_COLUMN_ID.RESERVE_NUMBER1_ID,DEAL_COLUMN_ID.RESERVE_NUMBER2_ID,DEAL_COLUMN_ID.RESERVE_NUMBER3_ID,
1856
+ DEAL_COLUMN_ID.RESERVE_NUMBER4_ID,DEAL_COLUMN_ID.RESERVE_NUMBER5_ID,DEAL_COLUMN_ID.RESERVE_NUMBER6_ID,DEAL_COLUMN_ID.RESERVE_NUMBER7_ID,
1857
+ DEAL_COLUMN_ID.RESERVE_NUMBER8_ID,DEAL_COLUMN_ID.RESERVE_NUMBER9_ID,DEAL_COLUMN_ID.RESERVE_NUMBER10_ID
1858
+ ];
1859
+
1860
+ return ARARY_TYPE.includes(value);
1861
+ }
1614
1862
  }
@@ -134576,6 +134576,33 @@ JSDealChartContainer.JsonDataToDealData=function(data)
134576
134576
  if (item[5]) dealItem.StrTime=item[5];
134577
134577
  if (item[6]) dealItem.ID=item[6];
134578
134578
 
134579
+ if (item[11]) dealItem.Symbol=item[11]; //股票代码
134580
+ if (item[12]) dealItem.Name=item[12]; //股票名称
134581
+
134582
+ //10个数值型 101-199
134583
+ if (IFrameSplitOperator.IsNumber(item[101])) dealItem.ReserveNumber1=item[101];
134584
+ if (IFrameSplitOperator.IsNumber(item[102])) dealItem.ReserveNumber2=item[102];
134585
+ if (IFrameSplitOperator.IsNumber(item[103])) dealItem.ReserveNumber3=item[103];
134586
+ if (IFrameSplitOperator.IsNumber(item[104])) dealItem.ReserveNumber4=item[104];
134587
+ if (IFrameSplitOperator.IsNumber(item[105])) dealItem.ReserveNumber5=item[105];
134588
+ if (IFrameSplitOperator.IsNumber(item[106])) dealItem.ReserveNumber6=item[106];
134589
+ if (IFrameSplitOperator.IsNumber(item[107])) dealItem.ReserveNumber7=item[107];
134590
+ if (IFrameSplitOperator.IsNumber(item[108])) dealItem.ReserveNumber8=item[108];
134591
+ if (IFrameSplitOperator.IsNumber(item[109])) dealItem.ReserveNumber9=item[109];
134592
+ if (IFrameSplitOperator.IsNumber(item[110])) dealItem.ReserveNumber10=item[110];
134593
+
134594
+ //10个字符型 201-299
134595
+ if (IFrameSplitOperator.IsString(item[201]) || IFrameSplitOperator.IsObject(item[201])) dealItem.ReserveString1=item[201];
134596
+ if (IFrameSplitOperator.IsString(item[202]) || IFrameSplitOperator.IsObject(item[202])) dealItem.ReserveString2=item[202];
134597
+ if (IFrameSplitOperator.IsString(item[203]) || IFrameSplitOperator.IsObject(item[203])) dealItem.ReserveString3=item[203];
134598
+ if (IFrameSplitOperator.IsString(item[204]) || IFrameSplitOperator.IsObject(item[204])) dealItem.ReserveString4=item[204];
134599
+ if (IFrameSplitOperator.IsString(item[205]) || IFrameSplitOperator.IsObject(item[205])) dealItem.ReserveString5=item[205];
134600
+ if (IFrameSplitOperator.IsString(item[206]) || IFrameSplitOperator.IsObject(item[206])) dealItem.ReserveString6=item[206];
134601
+ if (IFrameSplitOperator.IsString(item[207]) || IFrameSplitOperator.IsObject(item[207])) dealItem.ReserveString7=item[207];
134602
+ if (IFrameSplitOperator.IsString(item[208]) || IFrameSplitOperator.IsObject(item[208])) dealItem.ReserveString8=item[208];
134603
+ if (IFrameSplitOperator.IsString(item[209]) || IFrameSplitOperator.IsObject(item[209])) dealItem.ReserveString9=item[209];
134604
+ if (IFrameSplitOperator.IsString(item[210]) || IFrameSplitOperator.IsObject(item[210])) dealItem.ReserveString10=item[210];
134605
+
134579
134606
  result.push(dealItem);
134580
134607
  }
134581
134608
 
@@ -134675,9 +134702,66 @@ var DEAL_COLUMN_ID=
134675
134702
  INDEX_ID:7, //序号 从1开始
134676
134703
  MULTI_BAR_ID:8, //多颜色柱子
134677
134704
  CENTER_BAR_ID:9, //中心柱子
134678
- CUSTOM_TEXT_ID:10 //自定义文本
134705
+ CUSTOM_TEXT_ID:10, //自定义文本
134706
+
134707
+ SYMBOL_ID:11, //股票代码
134708
+ NAME_ID:12, //股票名称
134709
+
134710
+
134711
+ //预留数值类型 10个
134712
+ RESERVE_NUMBER1_ID:201, //ReserveNumber1:
134713
+ RESERVE_NUMBER2_ID:202,
134714
+ RESERVE_NUMBER3_ID:203,
134715
+ RESERVE_NUMBER4_ID:204,
134716
+ RESERVE_NUMBER5_ID:205,
134717
+ RESERVE_NUMBER6_ID:206,
134718
+ RESERVE_NUMBER7_ID:207,
134719
+ RESERVE_NUMBER8_ID:208,
134720
+ RESERVE_NUMBER9_ID:209,
134721
+ RESERVE_NUMBER10_ID:210,
134722
+
134723
+ //预留字符串类型 10个 301-399
134724
+ RESERVE_STRING1_ID:301, //ReserveString1:
134725
+ RESERVE_STRING2_ID:302,
134726
+ RESERVE_STRING3_ID:303,
134727
+ RESERVE_STRING4_ID:304,
134728
+ RESERVE_STRING5_ID:305,
134729
+ RESERVE_STRING6_ID:306,
134730
+ RESERVE_STRING7_ID:307,
134731
+ RESERVE_STRING8_ID:308,
134732
+ RESERVE_STRING9_ID:309,
134733
+ RESERVE_STRING10_ID:310,
134679
134734
  }
134680
134735
 
134736
+ var MAP_DEAL_COLUMN_FIELD=new Map(
134737
+ [
134738
+ [DEAL_COLUMN_ID.SYMBOL_ID, "Symbol"],
134739
+ [DEAL_COLUMN_ID.NAME_ID, "Name"],
134740
+ [DEAL_COLUMN_ID.PRICE_ID, "Price"],
134741
+
134742
+ [DEAL_COLUMN_ID.RESERVE_NUMBER1_ID,"ReserveNumber1"],
134743
+ [DEAL_COLUMN_ID.RESERVE_NUMBER2_ID,"ReserveNumber2"],
134744
+ [DEAL_COLUMN_ID.RESERVE_NUMBER3_ID,"ReserveNumber3"],
134745
+ [DEAL_COLUMN_ID.RESERVE_NUMBER4_ID,"ReserveNumber4"],
134746
+ [DEAL_COLUMN_ID.RESERVE_NUMBER5_ID,"ReserveNumber5"],
134747
+ [DEAL_COLUMN_ID.RESERVE_NUMBER6_ID,"ReserveNumber6"],
134748
+ [DEAL_COLUMN_ID.RESERVE_NUMBER7_ID,"ReserveNumber7"],
134749
+ [DEAL_COLUMN_ID.RESERVE_NUMBER8_ID,"ReserveNumber8"],
134750
+ [DEAL_COLUMN_ID.RESERVE_NUMBER9_ID,"ReserveNumber9"],
134751
+ [DEAL_COLUMN_ID.RESERVE_NUMBER10_ID,"ReserveNumber10"],
134752
+
134753
+ [DEAL_COLUMN_ID.RESERVE_STRING1_ID,"ReserveString1"],
134754
+ [DEAL_COLUMN_ID.RESERVE_STRING2_ID,"ReserveString2"],
134755
+ [DEAL_COLUMN_ID.RESERVE_STRING3_ID,"ReserveString3"],
134756
+ [DEAL_COLUMN_ID.RESERVE_STRING4_ID,"ReserveString4"],
134757
+ [DEAL_COLUMN_ID.RESERVE_STRING5_ID,"ReserveString5"],
134758
+ [DEAL_COLUMN_ID.RESERVE_STRING6_ID,"ReserveString6"],
134759
+ [DEAL_COLUMN_ID.RESERVE_STRING7_ID,"ReserveString7"],
134760
+ [DEAL_COLUMN_ID.RESERVE_STRING8_ID,"ReserveString8"],
134761
+ [DEAL_COLUMN_ID.RESERVE_STRING9_ID,"ReserveString9"],
134762
+ [DEAL_COLUMN_ID.RESERVE_STRING10_ID,"ReserveString10"],
134763
+ ]);
134764
+
134681
134765
  function ChartDealList()
134682
134766
  {
134683
134767
  this.Canvas; //画布
@@ -134703,7 +134787,7 @@ function ChartDealList()
134703
134787
  //涨跌颜色
134704
134788
  this.UpColor=g_JSChartResource.DealList.UpTextColor;
134705
134789
  this.DownColor=g_JSChartResource.DealList.DownTextColor;
134706
- this.UnchagneColor=g_JSChartResource.DealList.UnchagneTextColor;
134790
+ this.UnchangeColor=g_JSChartResource.DealList.UnchagneTextColor;
134707
134791
 
134708
134792
  this.BorderColor=g_JSChartResource.DealList.BorderColor; //边框线
134709
134793
 
@@ -134754,7 +134838,7 @@ function ChartDealList()
134754
134838
  {
134755
134839
  this.UpColor=g_JSChartResource.DealList.UpTextColor;
134756
134840
  this.DownColor=g_JSChartResource.DealList.DownTextColor;
134757
- this.UnchagneColor=g_JSChartResource.DealList.UnchagneTextColor;
134841
+ this.UnchangeColor=g_JSChartResource.DealList.UnchagneTextColor;
134758
134842
 
134759
134843
  this.BorderColor=g_JSChartResource.DealList.BorderColor; //边框线
134760
134844
 
@@ -134813,6 +134897,11 @@ function ChartDealList()
134813
134897
  {
134814
134898
  if (IFrameSplitOperator.IsString(item.Foramt)) colItem.Foramt=item.Foramt; //设置时间格式
134815
134899
  }
134900
+ else if (this.IsReserveNumber(item.Type))
134901
+ {
134902
+ if (item.Format) colItem.Format=item.Format; //数据格式化设置{ Type:1=原始 2=千分位分割 3=万亿转换, ExFloatPrecision:万亿转换以后的小数位数 }
134903
+ if (IFrameSplitOperator.IsNumber(item.ColorType)) colItem.ColorType=item.ColorType; //0=默认 1=(>0, =0, <0) 2=(>=0, <0)
134904
+ }
134816
134905
 
134817
134906
  this.Column.push(colItem);
134818
134907
  }
@@ -134834,6 +134923,31 @@ function ChartDealList()
134834
134923
  { Type:DEAL_COLUMN_ID.MULTI_BAR_ID, Title:"柱子", TextAlign:"center", Width:null, TextColor:g_JSChartResource.DealList.FieldColor.BarTitle, MaxText:"888888" },
134835
134924
  { Type:DEAL_COLUMN_ID.CENTER_BAR_ID, Title:"柱子2", TextAlign:"center", Width:null, TextColor:g_JSChartResource.DealList.FieldColor.BarTitle, MaxText:"888888" },
134836
134925
  { Type:DEAL_COLUMN_ID.CUSTOM_TEXT_ID, Title:"自定义", TextAlign:"center", Width:null, TextColor:g_JSChartResource.DealList.FieldColor.Text, MaxText:"擎擎擎擎擎" },
134926
+
134927
+ { Type:DEAL_COLUMN_ID.NAME_ID, Title:"股票名称", TextAlign:"center", Width:null, TextColor:g_JSChartResource.DealList.FieldColor.Text, MaxText:"擎擎擎擎*" },
134928
+
134929
+ { Type:DEAL_COLUMN_ID.RESERVE_NUMBER1_ID, Title:"数值1", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999.99", FloatPrecision:2 },
134930
+ { Type:DEAL_COLUMN_ID.RESERVE_NUMBER2_ID, Title:"数值2", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999.99", FloatPrecision:2 },
134931
+ { Type:DEAL_COLUMN_ID.RESERVE_NUMBER3_ID, Title:"数值3", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999.99", FloatPrecision:2 },
134932
+ { Type:DEAL_COLUMN_ID.RESERVE_NUMBER4_ID, Title:"数值4", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999.99", FloatPrecision:2 },
134933
+ { Type:DEAL_COLUMN_ID.RESERVE_NUMBER5_ID, Title:"数值5", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999.99", FloatPrecision:2 },
134934
+ { Type:DEAL_COLUMN_ID.RESERVE_NUMBER6_ID, Title:"数值6", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999.99", FloatPrecision:2 },
134935
+ { Type:DEAL_COLUMN_ID.RESERVE_NUMBER7_ID, Title:"数值7", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999.99", FloatPrecision:2 },
134936
+ { Type:DEAL_COLUMN_ID.RESERVE_NUMBER8_ID, Title:"数值8", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999.99", FloatPrecision:2 },
134937
+ { Type:DEAL_COLUMN_ID.RESERVE_NUMBER9_ID, Title:"数值9", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999.99", FloatPrecision:2 },
134938
+ { Type:DEAL_COLUMN_ID.RESERVE_NUMBER10_ID, Title:"数值10", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999.99", FloatPrecision:2 },
134939
+
134940
+
134941
+ { Type:DEAL_COLUMN_ID.RESERVE_STRING1_ID, Title:"文字1", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"擎擎擎擎擎擎" },
134942
+ { Type:DEAL_COLUMN_ID.RESERVE_STRING2_ID, Title:"文字2", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"擎擎擎擎擎擎" },
134943
+ { Type:DEAL_COLUMN_ID.RESERVE_STRING3_ID, Title:"文字3", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"擎擎擎擎擎擎" },
134944
+ { Type:DEAL_COLUMN_ID.RESERVE_STRING4_ID, Title:"文字4", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"擎擎擎擎擎擎" },
134945
+ { Type:DEAL_COLUMN_ID.RESERVE_STRING5_ID, Title:"文字5", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"擎擎擎擎擎擎" },
134946
+ { Type:DEAL_COLUMN_ID.RESERVE_STRING6_ID, Title:"文字6", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"擎擎擎擎擎擎" },
134947
+ { Type:DEAL_COLUMN_ID.RESERVE_STRING7_ID, Title:"文字7", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"擎擎擎擎擎擎" },
134948
+ { Type:DEAL_COLUMN_ID.RESERVE_STRING8_ID, Title:"文字8", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"擎擎擎擎擎擎" },
134949
+ { Type:DEAL_COLUMN_ID.RESERVE_STRING9_ID, Title:"文字9", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"擎擎擎擎擎擎" },
134950
+ { Type:DEAL_COLUMN_ID.RESERVE_STRING10_ID, Title:"文字10", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"擎擎擎擎擎擎" },
134837
134951
 
134838
134952
  ];
134839
134953
 
@@ -135055,6 +135169,19 @@ function ChartDealList()
135055
135169
 
135056
135170
  if (i==this.Column.length-1) itemWidth=this.TableWidth-(left-tableLeft)-this.HeaderMergin.Right-this.HeaderMergin.Left;
135057
135171
 
135172
+ var drawInfo=
135173
+ {
135174
+ Text:null, TextColor:item.TextColor , TextAlign:item.TextAlign, Tooltip:null,
135175
+ Index:dataIndex, ColumnIndex:i
135176
+ };
135177
+
135178
+ var rtItem={ Left:left, Top:top, Width:itemWidth, Height:this.RowHeight };
135179
+ rtItem.Right=rtItem.Left+rtItem.Width;
135180
+ rtItem.Bottom=rtItem.Top+rtItem.Height;
135181
+ drawInfo.Rect=rtItem;
135182
+
135183
+ var bDrawV2=false;
135184
+
135058
135185
  if (item.Type==DEAL_COLUMN_ID.TIME_ID)
135059
135186
  {
135060
135187
  text=IFrameSplitOperator.FormatTimeString(data.Time,item.Foramt);
@@ -135067,7 +135194,7 @@ function ChartDealList()
135067
135194
  {
135068
135195
  if (data.Price>this.YClose) textColor=this.UpColor;
135069
135196
  else if (data.Price<this.YClose) textColor=this.DownColor;
135070
- else textColor=this.UnchagneColor;
135197
+ else textColor=this.UnchangeColor;
135071
135198
 
135072
135199
  text=data.Price.toFixed(this.Decimal);
135073
135200
  }
@@ -135102,7 +135229,7 @@ function ChartDealList()
135102
135229
 
135103
135230
  if (value>0) textColor=this.UpColor;
135104
135231
  else if (value<0) textColor=this.DownColor;
135105
- else textColor=this.UnchagneColor;
135232
+ else textColor=this.UnchangeColor;
135106
135233
  }
135107
135234
  }
135108
135235
  else if (item.Type==DEAL_COLUMN_ID.INDEX_ID)
@@ -135130,13 +135257,110 @@ function ChartDealList()
135130
135257
  if (out.TextAlign) textAlign=out.TextAlign;
135131
135258
  }
135132
135259
  }
135133
-
135134
- this.DrawItemText(text, textColor, textAlign, left, top, itemWidth);
135260
+ else if (this.IsReserveString(item.Type))
135261
+ {
135262
+ this.FormatReserveString(item, data, drawInfo);
135263
+ bDrawV2=true;
135264
+ }
135265
+ else if (this.IsReserveNumber(item.Type))
135266
+ {
135267
+ this.FormatReserveNumber(item, data, drawInfo);
135268
+ bDrawV2=true;
135269
+ }
135270
+
135271
+
135272
+ if (bDrawV2)
135273
+ {
135274
+ this.DrawItemText(drawInfo.Text, drawInfo.TextColor, drawInfo.TextAlign, rtItem.Left, rtItem.Top, rtItem.Width, drawInfo.BGColor);
135275
+ }
135276
+ else
135277
+ {
135278
+ this.DrawItemText(text, textColor, textAlign, left, top, itemWidth);
135279
+ }
135280
+
135135
135281
 
135136
135282
  left+=item.Width;
135137
135283
  }
135138
135284
  }
135139
135285
 
135286
+ this.FormatReserveNumber=function(column, data, drawInfo)
135287
+ {
135288
+ if (column.DefaultText) drawInfo.Text=column.DefaultText;
135289
+
135290
+ var fieldName=MAP_DEAL_COLUMN_FIELD.get(column.Type);
135291
+ if (!data || !fieldName) return;
135292
+
135293
+ var value=data[fieldName];
135294
+ if (!IFrameSplitOperator.IsNumber(value)) return;
135295
+
135296
+ if (IFrameSplitOperator.IsNumber(column.ColorType))
135297
+ {
135298
+ if (column.ColorType==1)
135299
+ {
135300
+ drawInfo.TextColor=this.GetUpDownColor(value,0);
135301
+ }
135302
+ else if (column.ColorType==2)
135303
+ {
135304
+ drawInfo.TextColor=this.GetUpDownColorV2(value,0);
135305
+ }
135306
+ }
135307
+
135308
+ var text=value.toFixed(column.FloatPrecision);
135309
+ if (column.Format && IFrameSplitOperator.IsNumber(column.Format.Type))
135310
+ {
135311
+ var format=column.Format;
135312
+ switch(format.Type)
135313
+ {
135314
+ case 1: //原始数据
135315
+ text=value.toFixed(column.FloatPrecision);
135316
+ break;
135317
+ case 2: //千分位分割
135318
+ text=IFrameSplitOperator.FormatValueThousandsString(value, column.FloatPrecision);
135319
+ break;
135320
+ case 3:
135321
+ var exfloatPrecision=1;
135322
+ if (IFrameSplitOperator.IsNumber(format.ExFloatPrecision)) exfloatPrecision=format.ExFloatPrecision;
135323
+ text=IFrameSplitOperator.FormatValueStringV2(value, column.FloatPrecision,exfloatPrecision);
135324
+ break;
135325
+ }
135326
+ }
135327
+
135328
+ drawInfo.Text=text;
135329
+ }
135330
+
135331
+ this.FormatReserveString=function(column, data, drawInfo)
135332
+ {
135333
+ if (column.DefaultText) drawInfo.Text=column.DefaultText;
135334
+
135335
+ var fieldName=MAP_DEAL_COLUMN_FIELD.get(column.Type);
135336
+ if (!data || !fieldName) return;
135337
+
135338
+ var item=data[fieldName];
135339
+ if (IFrameSplitOperator.IsObject(item))
135340
+ {
135341
+ if (item.Text) drawInfo.Text=item.Text;
135342
+ if (item.TextColor) drawInfo.TextColor=item.TextColor;
135343
+ if (item.BGColor) drawInfo.BGColor=item.BGColor;
135344
+ }
135345
+ else if (IFrameSplitOperator.IsString(item))
135346
+ {
135347
+ drawInfo.Text=item;
135348
+ }
135349
+ }
135350
+
135351
+ this.GetUpDownColor=function(price, price2)
135352
+ {
135353
+ if (price>price2) return this.UpColor;
135354
+ else if (price<price2) return this.DownColor;
135355
+ else return this.UnchangeColor;
135356
+ }
135357
+
135358
+ this.GetUpDownColorV2=function(price, price2)
135359
+ {
135360
+ if (price>=price2) return this.UpColor;
135361
+ else return this.DownColor;
135362
+ }
135363
+
135140
135364
  this.DrawSelectedRow=function(data, index, rtRow)
135141
135365
  {
135142
135366
  if (!this.SelectedData) return;
@@ -135348,6 +135572,30 @@ function ChartDealList()
135348
135572
  event.Callback(event,data,this);
135349
135573
  }
135350
135574
  }
135575
+
135576
+ this.IsReserveString=function(value)
135577
+ {
135578
+ var ARARY_TYPE=
135579
+ [
135580
+ DEAL_COLUMN_ID.RESERVE_STRING1_ID,DEAL_COLUMN_ID.RESERVE_STRING2_ID,DEAL_COLUMN_ID.RESERVE_STRING3_ID,DEAL_COLUMN_ID.RESERVE_STRING4_ID,
135581
+ DEAL_COLUMN_ID.RESERVE_STRING5_ID,DEAL_COLUMN_ID.RESERVE_STRING6_ID,DEAL_COLUMN_ID.RESERVE_STRING7_ID,DEAL_COLUMN_ID.RESERVE_STRING8_ID,
135582
+ DEAL_COLUMN_ID.RESERVE_STRING9_ID,DEAL_COLUMN_ID.RESERVE_STRING10_ID
135583
+ ];
135584
+
135585
+ return ARARY_TYPE.includes(value);
135586
+ }
135587
+
135588
+ this.IsReserveNumber=function(value)
135589
+ {
135590
+ var ARARY_TYPE=
135591
+ [
135592
+ DEAL_COLUMN_ID.RESERVE_NUMBER1_ID,DEAL_COLUMN_ID.RESERVE_NUMBER2_ID,DEAL_COLUMN_ID.RESERVE_NUMBER3_ID,
135593
+ DEAL_COLUMN_ID.RESERVE_NUMBER4_ID,DEAL_COLUMN_ID.RESERVE_NUMBER5_ID,DEAL_COLUMN_ID.RESERVE_NUMBER6_ID,DEAL_COLUMN_ID.RESERVE_NUMBER7_ID,
135594
+ DEAL_COLUMN_ID.RESERVE_NUMBER8_ID,DEAL_COLUMN_ID.RESERVE_NUMBER9_ID,DEAL_COLUMN_ID.RESERVE_NUMBER10_ID
135595
+ ];
135596
+
135597
+ return ARARY_TYPE.includes(value);
135598
+ }
135351
135599
  }
135352
135600
  /*
135353
135601
  Copyright (c) 2018 jones
@@ -148399,7 +148647,7 @@ function ScrollBarBGChart()
148399
148647
 
148400
148648
 
148401
148649
 
148402
- var HQCHART_VERSION="1.1.14745";
148650
+ var HQCHART_VERSION="1.1.14749";
148403
148651
 
148404
148652
  function PrintHQChartVersion()
148405
148653
  {
@@ -5,7 +5,7 @@
5
5
 
6
6
 
7
7
 
8
- var HQCHART_VERSION="1.1.14745";
8
+ var HQCHART_VERSION="1.1.14749";
9
9
 
10
10
  function PrintHQChartVersion()
11
11
  {
@@ -134620,6 +134620,33 @@ JSDealChartContainer.JsonDataToDealData=function(data)
134620
134620
  if (item[5]) dealItem.StrTime=item[5];
134621
134621
  if (item[6]) dealItem.ID=item[6];
134622
134622
 
134623
+ if (item[11]) dealItem.Symbol=item[11]; //股票代码
134624
+ if (item[12]) dealItem.Name=item[12]; //股票名称
134625
+
134626
+ //10个数值型 101-199
134627
+ if (IFrameSplitOperator.IsNumber(item[101])) dealItem.ReserveNumber1=item[101];
134628
+ if (IFrameSplitOperator.IsNumber(item[102])) dealItem.ReserveNumber2=item[102];
134629
+ if (IFrameSplitOperator.IsNumber(item[103])) dealItem.ReserveNumber3=item[103];
134630
+ if (IFrameSplitOperator.IsNumber(item[104])) dealItem.ReserveNumber4=item[104];
134631
+ if (IFrameSplitOperator.IsNumber(item[105])) dealItem.ReserveNumber5=item[105];
134632
+ if (IFrameSplitOperator.IsNumber(item[106])) dealItem.ReserveNumber6=item[106];
134633
+ if (IFrameSplitOperator.IsNumber(item[107])) dealItem.ReserveNumber7=item[107];
134634
+ if (IFrameSplitOperator.IsNumber(item[108])) dealItem.ReserveNumber8=item[108];
134635
+ if (IFrameSplitOperator.IsNumber(item[109])) dealItem.ReserveNumber9=item[109];
134636
+ if (IFrameSplitOperator.IsNumber(item[110])) dealItem.ReserveNumber10=item[110];
134637
+
134638
+ //10个字符型 201-299
134639
+ if (IFrameSplitOperator.IsString(item[201]) || IFrameSplitOperator.IsObject(item[201])) dealItem.ReserveString1=item[201];
134640
+ if (IFrameSplitOperator.IsString(item[202]) || IFrameSplitOperator.IsObject(item[202])) dealItem.ReserveString2=item[202];
134641
+ if (IFrameSplitOperator.IsString(item[203]) || IFrameSplitOperator.IsObject(item[203])) dealItem.ReserveString3=item[203];
134642
+ if (IFrameSplitOperator.IsString(item[204]) || IFrameSplitOperator.IsObject(item[204])) dealItem.ReserveString4=item[204];
134643
+ if (IFrameSplitOperator.IsString(item[205]) || IFrameSplitOperator.IsObject(item[205])) dealItem.ReserveString5=item[205];
134644
+ if (IFrameSplitOperator.IsString(item[206]) || IFrameSplitOperator.IsObject(item[206])) dealItem.ReserveString6=item[206];
134645
+ if (IFrameSplitOperator.IsString(item[207]) || IFrameSplitOperator.IsObject(item[207])) dealItem.ReserveString7=item[207];
134646
+ if (IFrameSplitOperator.IsString(item[208]) || IFrameSplitOperator.IsObject(item[208])) dealItem.ReserveString8=item[208];
134647
+ if (IFrameSplitOperator.IsString(item[209]) || IFrameSplitOperator.IsObject(item[209])) dealItem.ReserveString9=item[209];
134648
+ if (IFrameSplitOperator.IsString(item[210]) || IFrameSplitOperator.IsObject(item[210])) dealItem.ReserveString10=item[210];
134649
+
134623
134650
  result.push(dealItem);
134624
134651
  }
134625
134652
 
@@ -134719,9 +134746,66 @@ var DEAL_COLUMN_ID=
134719
134746
  INDEX_ID:7, //序号 从1开始
134720
134747
  MULTI_BAR_ID:8, //多颜色柱子
134721
134748
  CENTER_BAR_ID:9, //中心柱子
134722
- CUSTOM_TEXT_ID:10 //自定义文本
134749
+ CUSTOM_TEXT_ID:10, //自定义文本
134750
+
134751
+ SYMBOL_ID:11, //股票代码
134752
+ NAME_ID:12, //股票名称
134753
+
134754
+
134755
+ //预留数值类型 10个
134756
+ RESERVE_NUMBER1_ID:201, //ReserveNumber1:
134757
+ RESERVE_NUMBER2_ID:202,
134758
+ RESERVE_NUMBER3_ID:203,
134759
+ RESERVE_NUMBER4_ID:204,
134760
+ RESERVE_NUMBER5_ID:205,
134761
+ RESERVE_NUMBER6_ID:206,
134762
+ RESERVE_NUMBER7_ID:207,
134763
+ RESERVE_NUMBER8_ID:208,
134764
+ RESERVE_NUMBER9_ID:209,
134765
+ RESERVE_NUMBER10_ID:210,
134766
+
134767
+ //预留字符串类型 10个 301-399
134768
+ RESERVE_STRING1_ID:301, //ReserveString1:
134769
+ RESERVE_STRING2_ID:302,
134770
+ RESERVE_STRING3_ID:303,
134771
+ RESERVE_STRING4_ID:304,
134772
+ RESERVE_STRING5_ID:305,
134773
+ RESERVE_STRING6_ID:306,
134774
+ RESERVE_STRING7_ID:307,
134775
+ RESERVE_STRING8_ID:308,
134776
+ RESERVE_STRING9_ID:309,
134777
+ RESERVE_STRING10_ID:310,
134723
134778
  }
134724
134779
 
134780
+ var MAP_DEAL_COLUMN_FIELD=new Map(
134781
+ [
134782
+ [DEAL_COLUMN_ID.SYMBOL_ID, "Symbol"],
134783
+ [DEAL_COLUMN_ID.NAME_ID, "Name"],
134784
+ [DEAL_COLUMN_ID.PRICE_ID, "Price"],
134785
+
134786
+ [DEAL_COLUMN_ID.RESERVE_NUMBER1_ID,"ReserveNumber1"],
134787
+ [DEAL_COLUMN_ID.RESERVE_NUMBER2_ID,"ReserveNumber2"],
134788
+ [DEAL_COLUMN_ID.RESERVE_NUMBER3_ID,"ReserveNumber3"],
134789
+ [DEAL_COLUMN_ID.RESERVE_NUMBER4_ID,"ReserveNumber4"],
134790
+ [DEAL_COLUMN_ID.RESERVE_NUMBER5_ID,"ReserveNumber5"],
134791
+ [DEAL_COLUMN_ID.RESERVE_NUMBER6_ID,"ReserveNumber6"],
134792
+ [DEAL_COLUMN_ID.RESERVE_NUMBER7_ID,"ReserveNumber7"],
134793
+ [DEAL_COLUMN_ID.RESERVE_NUMBER8_ID,"ReserveNumber8"],
134794
+ [DEAL_COLUMN_ID.RESERVE_NUMBER9_ID,"ReserveNumber9"],
134795
+ [DEAL_COLUMN_ID.RESERVE_NUMBER10_ID,"ReserveNumber10"],
134796
+
134797
+ [DEAL_COLUMN_ID.RESERVE_STRING1_ID,"ReserveString1"],
134798
+ [DEAL_COLUMN_ID.RESERVE_STRING2_ID,"ReserveString2"],
134799
+ [DEAL_COLUMN_ID.RESERVE_STRING3_ID,"ReserveString3"],
134800
+ [DEAL_COLUMN_ID.RESERVE_STRING4_ID,"ReserveString4"],
134801
+ [DEAL_COLUMN_ID.RESERVE_STRING5_ID,"ReserveString5"],
134802
+ [DEAL_COLUMN_ID.RESERVE_STRING6_ID,"ReserveString6"],
134803
+ [DEAL_COLUMN_ID.RESERVE_STRING7_ID,"ReserveString7"],
134804
+ [DEAL_COLUMN_ID.RESERVE_STRING8_ID,"ReserveString8"],
134805
+ [DEAL_COLUMN_ID.RESERVE_STRING9_ID,"ReserveString9"],
134806
+ [DEAL_COLUMN_ID.RESERVE_STRING10_ID,"ReserveString10"],
134807
+ ]);
134808
+
134725
134809
  function ChartDealList()
134726
134810
  {
134727
134811
  this.Canvas; //画布
@@ -134747,7 +134831,7 @@ function ChartDealList()
134747
134831
  //涨跌颜色
134748
134832
  this.UpColor=g_JSChartResource.DealList.UpTextColor;
134749
134833
  this.DownColor=g_JSChartResource.DealList.DownTextColor;
134750
- this.UnchagneColor=g_JSChartResource.DealList.UnchagneTextColor;
134834
+ this.UnchangeColor=g_JSChartResource.DealList.UnchagneTextColor;
134751
134835
 
134752
134836
  this.BorderColor=g_JSChartResource.DealList.BorderColor; //边框线
134753
134837
 
@@ -134798,7 +134882,7 @@ function ChartDealList()
134798
134882
  {
134799
134883
  this.UpColor=g_JSChartResource.DealList.UpTextColor;
134800
134884
  this.DownColor=g_JSChartResource.DealList.DownTextColor;
134801
- this.UnchagneColor=g_JSChartResource.DealList.UnchagneTextColor;
134885
+ this.UnchangeColor=g_JSChartResource.DealList.UnchagneTextColor;
134802
134886
 
134803
134887
  this.BorderColor=g_JSChartResource.DealList.BorderColor; //边框线
134804
134888
 
@@ -134857,6 +134941,11 @@ function ChartDealList()
134857
134941
  {
134858
134942
  if (IFrameSplitOperator.IsString(item.Foramt)) colItem.Foramt=item.Foramt; //设置时间格式
134859
134943
  }
134944
+ else if (this.IsReserveNumber(item.Type))
134945
+ {
134946
+ if (item.Format) colItem.Format=item.Format; //数据格式化设置{ Type:1=原始 2=千分位分割 3=万亿转换, ExFloatPrecision:万亿转换以后的小数位数 }
134947
+ if (IFrameSplitOperator.IsNumber(item.ColorType)) colItem.ColorType=item.ColorType; //0=默认 1=(>0, =0, <0) 2=(>=0, <0)
134948
+ }
134860
134949
 
134861
134950
  this.Column.push(colItem);
134862
134951
  }
@@ -134878,6 +134967,31 @@ function ChartDealList()
134878
134967
  { Type:DEAL_COLUMN_ID.MULTI_BAR_ID, Title:"柱子", TextAlign:"center", Width:null, TextColor:g_JSChartResource.DealList.FieldColor.BarTitle, MaxText:"888888" },
134879
134968
  { Type:DEAL_COLUMN_ID.CENTER_BAR_ID, Title:"柱子2", TextAlign:"center", Width:null, TextColor:g_JSChartResource.DealList.FieldColor.BarTitle, MaxText:"888888" },
134880
134969
  { Type:DEAL_COLUMN_ID.CUSTOM_TEXT_ID, Title:"自定义", TextAlign:"center", Width:null, TextColor:g_JSChartResource.DealList.FieldColor.Text, MaxText:"擎擎擎擎擎" },
134970
+
134971
+ { Type:DEAL_COLUMN_ID.NAME_ID, Title:"股票名称", TextAlign:"center", Width:null, TextColor:g_JSChartResource.DealList.FieldColor.Text, MaxText:"擎擎擎擎*" },
134972
+
134973
+ { Type:DEAL_COLUMN_ID.RESERVE_NUMBER1_ID, Title:"数值1", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999.99", FloatPrecision:2 },
134974
+ { Type:DEAL_COLUMN_ID.RESERVE_NUMBER2_ID, Title:"数值2", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999.99", FloatPrecision:2 },
134975
+ { Type:DEAL_COLUMN_ID.RESERVE_NUMBER3_ID, Title:"数值3", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999.99", FloatPrecision:2 },
134976
+ { Type:DEAL_COLUMN_ID.RESERVE_NUMBER4_ID, Title:"数值4", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999.99", FloatPrecision:2 },
134977
+ { Type:DEAL_COLUMN_ID.RESERVE_NUMBER5_ID, Title:"数值5", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999.99", FloatPrecision:2 },
134978
+ { Type:DEAL_COLUMN_ID.RESERVE_NUMBER6_ID, Title:"数值6", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999.99", FloatPrecision:2 },
134979
+ { Type:DEAL_COLUMN_ID.RESERVE_NUMBER7_ID, Title:"数值7", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999.99", FloatPrecision:2 },
134980
+ { Type:DEAL_COLUMN_ID.RESERVE_NUMBER8_ID, Title:"数值8", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999.99", FloatPrecision:2 },
134981
+ { Type:DEAL_COLUMN_ID.RESERVE_NUMBER9_ID, Title:"数值9", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999.99", FloatPrecision:2 },
134982
+ { Type:DEAL_COLUMN_ID.RESERVE_NUMBER10_ID, Title:"数值10", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999.99", FloatPrecision:2 },
134983
+
134984
+
134985
+ { Type:DEAL_COLUMN_ID.RESERVE_STRING1_ID, Title:"文字1", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"擎擎擎擎擎擎" },
134986
+ { Type:DEAL_COLUMN_ID.RESERVE_STRING2_ID, Title:"文字2", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"擎擎擎擎擎擎" },
134987
+ { Type:DEAL_COLUMN_ID.RESERVE_STRING3_ID, Title:"文字3", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"擎擎擎擎擎擎" },
134988
+ { Type:DEAL_COLUMN_ID.RESERVE_STRING4_ID, Title:"文字4", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"擎擎擎擎擎擎" },
134989
+ { Type:DEAL_COLUMN_ID.RESERVE_STRING5_ID, Title:"文字5", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"擎擎擎擎擎擎" },
134990
+ { Type:DEAL_COLUMN_ID.RESERVE_STRING6_ID, Title:"文字6", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"擎擎擎擎擎擎" },
134991
+ { Type:DEAL_COLUMN_ID.RESERVE_STRING7_ID, Title:"文字7", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"擎擎擎擎擎擎" },
134992
+ { Type:DEAL_COLUMN_ID.RESERVE_STRING8_ID, Title:"文字8", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"擎擎擎擎擎擎" },
134993
+ { Type:DEAL_COLUMN_ID.RESERVE_STRING9_ID, Title:"文字9", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"擎擎擎擎擎擎" },
134994
+ { Type:DEAL_COLUMN_ID.RESERVE_STRING10_ID, Title:"文字10", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"擎擎擎擎擎擎" },
134881
134995
 
134882
134996
  ];
134883
134997
 
@@ -135099,6 +135213,19 @@ function ChartDealList()
135099
135213
 
135100
135214
  if (i==this.Column.length-1) itemWidth=this.TableWidth-(left-tableLeft)-this.HeaderMergin.Right-this.HeaderMergin.Left;
135101
135215
 
135216
+ var drawInfo=
135217
+ {
135218
+ Text:null, TextColor:item.TextColor , TextAlign:item.TextAlign, Tooltip:null,
135219
+ Index:dataIndex, ColumnIndex:i
135220
+ };
135221
+
135222
+ var rtItem={ Left:left, Top:top, Width:itemWidth, Height:this.RowHeight };
135223
+ rtItem.Right=rtItem.Left+rtItem.Width;
135224
+ rtItem.Bottom=rtItem.Top+rtItem.Height;
135225
+ drawInfo.Rect=rtItem;
135226
+
135227
+ var bDrawV2=false;
135228
+
135102
135229
  if (item.Type==DEAL_COLUMN_ID.TIME_ID)
135103
135230
  {
135104
135231
  text=IFrameSplitOperator.FormatTimeString(data.Time,item.Foramt);
@@ -135111,7 +135238,7 @@ function ChartDealList()
135111
135238
  {
135112
135239
  if (data.Price>this.YClose) textColor=this.UpColor;
135113
135240
  else if (data.Price<this.YClose) textColor=this.DownColor;
135114
- else textColor=this.UnchagneColor;
135241
+ else textColor=this.UnchangeColor;
135115
135242
 
135116
135243
  text=data.Price.toFixed(this.Decimal);
135117
135244
  }
@@ -135146,7 +135273,7 @@ function ChartDealList()
135146
135273
 
135147
135274
  if (value>0) textColor=this.UpColor;
135148
135275
  else if (value<0) textColor=this.DownColor;
135149
- else textColor=this.UnchagneColor;
135276
+ else textColor=this.UnchangeColor;
135150
135277
  }
135151
135278
  }
135152
135279
  else if (item.Type==DEAL_COLUMN_ID.INDEX_ID)
@@ -135174,13 +135301,110 @@ function ChartDealList()
135174
135301
  if (out.TextAlign) textAlign=out.TextAlign;
135175
135302
  }
135176
135303
  }
135177
-
135178
- this.DrawItemText(text, textColor, textAlign, left, top, itemWidth);
135304
+ else if (this.IsReserveString(item.Type))
135305
+ {
135306
+ this.FormatReserveString(item, data, drawInfo);
135307
+ bDrawV2=true;
135308
+ }
135309
+ else if (this.IsReserveNumber(item.Type))
135310
+ {
135311
+ this.FormatReserveNumber(item, data, drawInfo);
135312
+ bDrawV2=true;
135313
+ }
135314
+
135315
+
135316
+ if (bDrawV2)
135317
+ {
135318
+ this.DrawItemText(drawInfo.Text, drawInfo.TextColor, drawInfo.TextAlign, rtItem.Left, rtItem.Top, rtItem.Width, drawInfo.BGColor);
135319
+ }
135320
+ else
135321
+ {
135322
+ this.DrawItemText(text, textColor, textAlign, left, top, itemWidth);
135323
+ }
135324
+
135179
135325
 
135180
135326
  left+=item.Width;
135181
135327
  }
135182
135328
  }
135183
135329
 
135330
+ this.FormatReserveNumber=function(column, data, drawInfo)
135331
+ {
135332
+ if (column.DefaultText) drawInfo.Text=column.DefaultText;
135333
+
135334
+ var fieldName=MAP_DEAL_COLUMN_FIELD.get(column.Type);
135335
+ if (!data || !fieldName) return;
135336
+
135337
+ var value=data[fieldName];
135338
+ if (!IFrameSplitOperator.IsNumber(value)) return;
135339
+
135340
+ if (IFrameSplitOperator.IsNumber(column.ColorType))
135341
+ {
135342
+ if (column.ColorType==1)
135343
+ {
135344
+ drawInfo.TextColor=this.GetUpDownColor(value,0);
135345
+ }
135346
+ else if (column.ColorType==2)
135347
+ {
135348
+ drawInfo.TextColor=this.GetUpDownColorV2(value,0);
135349
+ }
135350
+ }
135351
+
135352
+ var text=value.toFixed(column.FloatPrecision);
135353
+ if (column.Format && IFrameSplitOperator.IsNumber(column.Format.Type))
135354
+ {
135355
+ var format=column.Format;
135356
+ switch(format.Type)
135357
+ {
135358
+ case 1: //原始数据
135359
+ text=value.toFixed(column.FloatPrecision);
135360
+ break;
135361
+ case 2: //千分位分割
135362
+ text=IFrameSplitOperator.FormatValueThousandsString(value, column.FloatPrecision);
135363
+ break;
135364
+ case 3:
135365
+ var exfloatPrecision=1;
135366
+ if (IFrameSplitOperator.IsNumber(format.ExFloatPrecision)) exfloatPrecision=format.ExFloatPrecision;
135367
+ text=IFrameSplitOperator.FormatValueStringV2(value, column.FloatPrecision,exfloatPrecision);
135368
+ break;
135369
+ }
135370
+ }
135371
+
135372
+ drawInfo.Text=text;
135373
+ }
135374
+
135375
+ this.FormatReserveString=function(column, data, drawInfo)
135376
+ {
135377
+ if (column.DefaultText) drawInfo.Text=column.DefaultText;
135378
+
135379
+ var fieldName=MAP_DEAL_COLUMN_FIELD.get(column.Type);
135380
+ if (!data || !fieldName) return;
135381
+
135382
+ var item=data[fieldName];
135383
+ if (IFrameSplitOperator.IsObject(item))
135384
+ {
135385
+ if (item.Text) drawInfo.Text=item.Text;
135386
+ if (item.TextColor) drawInfo.TextColor=item.TextColor;
135387
+ if (item.BGColor) drawInfo.BGColor=item.BGColor;
135388
+ }
135389
+ else if (IFrameSplitOperator.IsString(item))
135390
+ {
135391
+ drawInfo.Text=item;
135392
+ }
135393
+ }
135394
+
135395
+ this.GetUpDownColor=function(price, price2)
135396
+ {
135397
+ if (price>price2) return this.UpColor;
135398
+ else if (price<price2) return this.DownColor;
135399
+ else return this.UnchangeColor;
135400
+ }
135401
+
135402
+ this.GetUpDownColorV2=function(price, price2)
135403
+ {
135404
+ if (price>=price2) return this.UpColor;
135405
+ else return this.DownColor;
135406
+ }
135407
+
135184
135408
  this.DrawSelectedRow=function(data, index, rtRow)
135185
135409
  {
135186
135410
  if (!this.SelectedData) return;
@@ -135392,6 +135616,30 @@ function ChartDealList()
135392
135616
  event.Callback(event,data,this);
135393
135617
  }
135394
135618
  }
135619
+
135620
+ this.IsReserveString=function(value)
135621
+ {
135622
+ var ARARY_TYPE=
135623
+ [
135624
+ DEAL_COLUMN_ID.RESERVE_STRING1_ID,DEAL_COLUMN_ID.RESERVE_STRING2_ID,DEAL_COLUMN_ID.RESERVE_STRING3_ID,DEAL_COLUMN_ID.RESERVE_STRING4_ID,
135625
+ DEAL_COLUMN_ID.RESERVE_STRING5_ID,DEAL_COLUMN_ID.RESERVE_STRING6_ID,DEAL_COLUMN_ID.RESERVE_STRING7_ID,DEAL_COLUMN_ID.RESERVE_STRING8_ID,
135626
+ DEAL_COLUMN_ID.RESERVE_STRING9_ID,DEAL_COLUMN_ID.RESERVE_STRING10_ID
135627
+ ];
135628
+
135629
+ return ARARY_TYPE.includes(value);
135630
+ }
135631
+
135632
+ this.IsReserveNumber=function(value)
135633
+ {
135634
+ var ARARY_TYPE=
135635
+ [
135636
+ DEAL_COLUMN_ID.RESERVE_NUMBER1_ID,DEAL_COLUMN_ID.RESERVE_NUMBER2_ID,DEAL_COLUMN_ID.RESERVE_NUMBER3_ID,
135637
+ DEAL_COLUMN_ID.RESERVE_NUMBER4_ID,DEAL_COLUMN_ID.RESERVE_NUMBER5_ID,DEAL_COLUMN_ID.RESERVE_NUMBER6_ID,DEAL_COLUMN_ID.RESERVE_NUMBER7_ID,
135638
+ DEAL_COLUMN_ID.RESERVE_NUMBER8_ID,DEAL_COLUMN_ID.RESERVE_NUMBER9_ID,DEAL_COLUMN_ID.RESERVE_NUMBER10_ID
135639
+ ];
135640
+
135641
+ return ARARY_TYPE.includes(value);
135642
+ }
135395
135643
  }
135396
135644
  /*
135397
135645
  Copyright (c) 2018 jones
@@ -159214,7 +159462,7 @@ function HQChartScriptWorker()
159214
159462
 
159215
159463
 
159216
159464
 
159217
- var HQCHART_VERSION="1.1.14745";
159465
+ var HQCHART_VERSION="1.1.14749";
159218
159466
 
159219
159467
  function PrintHQChartVersion()
159220
159468
  {