hqchart 1.1.13403 → 1.1.13436

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.
@@ -59,7 +59,8 @@ HISTORY_MINUTE_ID:103,//历史分钟 走势图
59
59
  KLINE_DAY_ID:0,KLINE_WEEK_ID:1,KLINE_TWOWEEK_ID:21,KLINE_MONTH_ID:2,KLINE_QUARTER_ID:9,KLINE_YEAR_ID:3,KLINE_MINUTE_ID:4,KLINE_5_MINUTE_ID:5,KLINE_15_MINUTE_ID:6,KLINE_30_MINUTE_ID:7,KLINE_60_MINUTE_ID:8};//自定义的指标脚本
60
60
  function CustomIndexScript(){this.DataMap=new _map2.default();//key=指标id, value=data {ID:, Name:指标名字, Description:指标描述信息 Args:参数 ......}
61
61
  this.Get=function(id){if(!this.DataMap.has(id))return null;return this.DataMap.get(id);};this.Add=function(data){this.DataMap.set(data.ID,data);};}var g_CustomIndex=new CustomIndexScript();function JSIndexScript(){this.DataMap=new _map2.default([['MA',this.MA],['均线',this.MA],["MA4",this.MA4],["MA5",this.MA5],["MA6",this.MA6],["MA7",this.MA7],["MA8",this.MA8],['BOLL',this.BOLL],['BOLL副图',this.BOLL2],['BBI',this.BBI],['DKX',this.DKX],['MIKE',this.MIKE],['PBX',this.PBX],['ENE',this.ENE],['MACD',this.MACD],['KDJ',this.KDJ],["MACD2",this.MACD2],['VOL',this.VOL],['VOL2',this.VOL2],["VOL_OVERLAY",this.VOL_OVERLAY],['RSI',this.RSI],['BRAR',this.BRAR],['WR',this.WR],['BIAS',this.BIAS],['OBV',this.OBV],['DMI',this.DMI],['CR',this.CR],['PSY',this.PSY],['CCI',this.CCI],['DMA',this.DMA],['TRIX',this.TRIX],['VR',this.VR],['EMV',this.EMV],['ROC',this.ROC],['MTM',this.MTM],['FSL',this.FSL],['CYR',this.CYR],['MASS',this.MASS],['WAD',this.WAD],['CHO',this.CHO],['ADTM',this.ADTM],['HSL',this.HSL],['BIAS36',this.BIAS36],['BIAS_QL',this.BIAS_QL],['DPO',this.DPO],['OSC',this.OSC],['ATR',this.ATR],['NVI',this.NVI],['PVI',this.PVI],['UOS',this.UOS],['CYW',this.CYW],['LON',this.LON],['NDB',this.NDB],['SKDJ',this.SKDJ],['KD',this.KD],['FKX',this.FKX],['DKCOL',this.DKCOL],['UDL',this.UDL],['MFI',this.MFI],['LWR',this.LWR],['MARSI',this.MARSI],['CYD',this.CYD],['CYF',this.CYF],['TAPI',this.TAPI],['VMACD',this.VMACD],['QACD',this.QACD],['VPT',this.VPT],['WVAD',this.WVAD],['DBQR',this.DBQR],['JS',this.JS],['CYE',this.CYE],['QR',this.QR],['GDX',this.GDX],['JLHB',this.JLHB],['PCNT',this.PCNT],['BTX',this.BTX],['AMO',this.AMO],['VRSI',this.VRSI],['HSCOL',this.HSCOL],['DBQRV',this.DBQRV],['DBLB',this.DBLB],['ACD',this.ACD],['EXPMA',this.EXPMA],['EXPMA_S',this.EXPMA_S],['HMA',this.HMA],['LMA',this.LMA],['VMA',this.VMA],['AMV',this.AMV],['BBIBOLL',this.BBIBOLL],['ALLIGAT',this.ALLIGAT],['ZX',this.ZX],['XS',this.XS],['XS2',this.XS2],['SG-XDT',this.SG_XDT],['SG-SMX',this.SG_SMX],['SG-LB',this.SG_LB],['SG-PF',this.SG_PF],['RAD',this.RAD],['SHT',this.SHT],['ZLJC',this.ZLJC],['ZLMM',this.ZLMM],['SLZT',this.SLZT],['ADVOL',this.ADVOL],['CYC',this.CYC],['CYS',this.CYS],['CYQKL',this.CYQKL],['SCR',this.SCR],['ASR',this.ASR],['SAR',this.SAR],['TJCJL',this.TJCJL],['量比',this.VOLRate],['平均K线',this.HeikinAshi],["ADL",this.ADL],["SQJZ",this.SQJZ],["XT",this.XT],["CFJT",this.CFJT],["CYX",this.CYX],["WAVE",this.WAVE],['VOL-TDX',this.VOL_TDX],['EMPTY',this.EMPTY],//什么都不显示的指标
62
- ['神奇九转',this.NineTurns],['EMA',this.EMA3],['EMA4',this.EMA4],['EMA5',this.EMA5],['EMA6',this.EMA6],["ICHIMOKU",this.ICHIMOKU],["CDP-STD",this.CDP_STD],["TBP-STD",this.TBP_STD],["ADX",this.ADX],//通达信特色指标
62
+ ['神奇九转',this.NineTurns],['EMA',this.EMA3],['EMA4',this.EMA4],['EMA5',this.EMA5],['EMA6',this.EMA6],["ICHIMOKU",this.ICHIMOKU],["CDP-STD",this.CDP_STD],["TBP-STD",this.TBP_STD],["ADX",this.ADX],["持仓量",this.VOL_POSITION],//成交量+持仓量
63
+ //通达信特色指标
63
64
  ["散户线",this.ShareholderCount],["NXTS",this.NXTS],["FKX",this.FKX],["两融资金",this.Margin4],["ZSDB",this.ZSDB],['CJL2',this.CJL],//期货持仓量
64
65
  ['ASI',this.ASI],['DC',this.DC],['DEMA',this.DEMA],["VWAP",this.VWAP],//指南针
65
66
  ["ZNZ_CBAND",this.ZNZ_CBAND],["ZNZ_RPY2",this.ZNZ_RPY2],["ZNZ_RPY1",this.ZNZ_RPY1],['飞龙四式',this.Dragon4_Main],['飞龙四式-附图',this.Dragon4_Fig],['资金分析',this.FundsAnalysis],['融资占比',this.MarginProportion],['负面新闻',this.NewsNegative],['涨跌趋势',this.UpDownAnalyze],['北上资金',this.HK2SHSZ],['股东人数',this.ShareHolder],["两融余额",this.Margin2],["两融余额2",this.Margin3],//外包指标
@@ -868,7 +869,9 @@ DRAWKLINE(HHIGH,HOPEN,HLOW,HCLOSE);"};return data;};JSIndexScript.prototype.ADL=
868
869
  MAADL:MA(ADL,M);"};return data;};JSIndexScript.prototype.EMPTY=function(){var data={Name:'',Description:'空指标',IsMainIndex:true,Args:[],Script://脚本
869
870
  'VAR2:=C;'};return data;};JSIndexScript.prototype.CJL=function(){var data={Name:'CJL',Description:'期货持仓量',IsMainIndex:false,Args:[],Script://脚本
870
871
  "成交量:VOL,VOLSTICK;\n\
871
- 持仓量:VOLINSTK,LINEOVERLAY;"};return data;};JSIndexScript.prototype.ASI=function(){var data={Name:'ASI',Description:'振动升降指标',IsMainIndex:false,Args:[{Name:'N1',Value:6}],Script://脚本
872
+ 持仓量:VOLINSTK,LINEOVERLAY;"};return data;};JSIndexScript.prototype.VOL_POSITION=function(){var data={Name:'持仓量',Description:'持仓量',IsMainIndex:false,Args:[],Script://脚本
873
+ "成交量:VOL,VOLSTICK;\n\
874
+ 持仓量:VOLINSTK,SINGLELINE;"};return data;};JSIndexScript.prototype.ASI=function(){var data={Name:'ASI',Description:'振动升降指标',IsMainIndex:false,Args:[{Name:'N1',Value:6}],Script://脚本
872
875
  "X_1:=REF(CLOSE,1);\n\
873
876
  X_2:=ABS(HIGH-X_1);\n\
874
877
  X_3:=ABS(LOW-X_1);\n\
@@ -1138,7 +1141,7 @@ this.OffscreenCanvasElement;if(bOffscreen==true)this.OffscreenCanvasElement=docu
1138
1141
  this.CacheCanvasElement=null;if(bCacheCanvas)this.CacheCanvasElement=document.createElement("canvas");//改参数div
1139
1142
  this.ModifyIndexDialog=new ModifyIndexDialog(divElement);this.ChangeIndexDialog=new ChangeIndexDialog(divElement);this.MinuteDialog=new MinuteDialog(divElement);//额外的画布
1140
1143
  this.MapExtraCanvasElement=new _map2.default();//key=画布名字, value={ Element:, Canvas:}
1141
- this.CreateExtraCanvasElement=function(name,option){if(this.MapExtraCanvasElement.has(name))return this.MapExtraCanvasElement.get(name);var element=document.createElement("canvas");element.className='jschart-drawing-extra';element.id=Guid();if(name==JSChart.CorssCursorCanvasKey)element.setAttribute("tabindex",5);else element.setAttribute("tabindex",1);if(element.style){element.style.outline='none';element.style.position="absolute";element.style.left='0px';element.style.top='0px';element.style["pointer-events"]="none";}if(option){if(IFrameSplitOperator.IsNumber(option.TabIndex))element.setAttribute("tabindex",option.TabIndex);if(IFrameSplitOperator.IsNumber(option.ZIndex))element.style["z-index"]=option.ZIndex;}divElement.appendChild(element);var item={Element:element,Canvas:null};this.MapExtraCanvasElement.set(name,item);};this.GetExtraCanvas=function(name){if(!this.MapExtraCanvasElement.has(name))return null;var item=this.MapExtraCanvasElement.get(name);if(!item.Element)return null;if(!item.Canvas)item.Canvas=item.Element.getContext("2d");return item;};/*
1144
+ this.CreateExtraCanvasElement=function(name,option){if(this.MapExtraCanvasElement.has(name))return this.MapExtraCanvasElement.get(name);var element=document.createElement("canvas");element.className='jschart-drawing-extra';element.id=Guid();if(name==JSChart.CorssCursorCanvasKey)element.setAttribute("tabindex",5);else element.setAttribute("tabindex",1);if(element.style){element.style.outline='none';element.style.position="absolute";element.style.left='0px';element.style.top='0px';element.style["pointer-events"]="none";}if(option){if(IFrameSplitOperator.IsNumber(option.TabIndex))element.setAttribute("tabindex",option.TabIndex);if(IFrameSplitOperator.IsNumber(option.ZIndex))element.style["z-index"]=option.ZIndex;}if(this.CanvasElement){element.height=this.CanvasElement.height;element.width=this.CanvasElement.width;if(element.style){element.style.width=this.CanvasElement.style.width;element.style.height=this.CanvasElement.style.height;}}divElement.appendChild(element);var item={Element:element,Canvas:null};this.MapExtraCanvasElement.set(name,item);};this.GetExtraCanvas=function(name){if(!this.MapExtraCanvasElement.has(name))return null;var item=this.MapExtraCanvasElement.get(name);if(!item.Element)return null;if(!item.Canvas)item.Canvas=item.Element.getContext("2d");return item;};/*
1142
1145
  { Type: 1=K线柱子宽度不变 2=K线全部显示
1143
1146
  Redraw:是否重绘, XYSplit:是否重新计算分割线 }
1144
1147
  */this.OnSize=function(option){//画布大小通过div获取 如果有style里的大小 使用style里的
@@ -1161,7 +1164,9 @@ if(option.CustomShow&&IFrameSplitOperator.IsPlusNumber(option.CustomShow.Date)){
1161
1164
  {if(option.DrawPicture.StorageKey&&chart.ChartDrawStorage)chart.ChartDrawStorage.Load(option.DrawPicture.StorageKey);}if(option.DrawTool)//画图工具
1162
1165
  {if(option.DrawTool.StorageKey&&chart.ChartDrawStorage)chart.ChartDrawStorage.Load(option.DrawTool.StorageKey);}if(IFrameSplitOperator.IsNumber(option.StepPixel))chart.StepPixel=option.StepPixel;if(option.ZoomStepPixel>0)chart.ZoomStepPixel=option.ZoomStepPixel;if(option.IsApiPeriod==true)chart.IsApiPeriod=option.IsApiPeriod;//图形选中
1163
1166
  if(option.SelectedChart){var item=option.SelectedChart;if(IFrameSplitOperator.IsBool(item.EnableSelected))chart.SelectedChart.EnableSelected=item.EnableSelected;if(IFrameSplitOperator.IsBool(item.EnableMoveOn))chart.SelectedChart.EnableMoveOn=item.EnableMoveOn;}if(!option.Windows||option.Windows.length<=0)return null;//K线扩展计算方法配置
1164
- if(IFrameSplitOperator.IsNonEmptyArray(option.KLineCalcOption)){for(var i=0;i<option.KLineCalcOption.length;++i){var item=option.KLineCalcOption[i];if(!item.ClassName||!item.Option)continue;chart.SetKLineCalcOption(item.ClassName,item.Option);}}//创建子窗口
1167
+ if(IFrameSplitOperator.IsNonEmptyArray(option.KLineCalcOption)){for(var i=0;i<option.KLineCalcOption.length;++i){var item=option.KLineCalcOption[i];if(!item.ClassName||!item.Option)continue;chart.SetKLineCalcOption(item.ClassName,item.Option);}}if(chart.ClassName=="KLineChartContainer"){if(!option.DragSelectRect){option.DragSelectRect={Enable:true};//默认开启区间选中画布
1168
+ }if(option.DragSelectRect){var zindex=10;var item=option.DragSelectRect;if(IFrameSplitOperator.IsNumber(item.ZIndex))zindex=item.ZIndex;if(item.Enable)this.CreateExtraCanvasElement(JSChart.RectDragCanvasKey,{ZIndex:zindex});//创建独立的区间选择画布
1169
+ }}//创建子窗口
1165
1170
  chart.Create(option.Windows.length,option);this.SetChartBorder(chart,option);this.AdjustChartBorder(chart);if(option.KLine){if(option.KLine.PageSize>0)//一屏显示的数据个数
1166
1171
  {var pageSize=chart.GetMaxMinPageSize();if(pageSize.Max>10&&pageSize.Max<option.KLine.PageSize)chart.PageSize=pageSize.Max;else if(pageSize.Min>10&&pageSize.Min>option.KLine.PageSize)chart.PageSize=pageSize.Min;else chart.PageSize=option.KLine.PageSize;}}//取消显示十字光标刻度信息
1167
1172
  if(option.IsCorssOnlyDrawKLine===true)chart.ChartCorssCursor.IsOnlyDrawKLine=option.IsCorssOnlyDrawKLine;if(option.CorssCursorTouchEnd===true)chart.CorssCursorTouchEnd=option.CorssCursorTouchEnd;if(option.IsClickShowCorssCursor==true)chart.IsClickShowCorssCursor=option.IsClickShowCorssCursor;if(option.CorssCursorInfo){var item=option.CorssCursorInfo;if(!isNaN(option.CorssCursorInfo.Left))chart.ChartCorssCursor.ShowTextMode.Left=option.CorssCursorInfo.Left;if(!isNaN(option.CorssCursorInfo.Right))chart.ChartCorssCursor.ShowTextMode.Right=option.CorssCursorInfo.Right;if(!isNaN(option.CorssCursorInfo.Bottom))chart.ChartCorssCursor.ShowTextMode.Bottom=option.CorssCursorInfo.Bottom;if(option.CorssCursorInfo.IsShowCorss===false)chart.ChartCorssCursor.IsShowCorss=option.CorssCursorInfo.IsShowCorss;if(IFrameSplitOperator.IsBool(item.IsShowClose))chart.ChartCorssCursor.IsShowClose=item.IsShowClose;//Y轴显示收盘价
@@ -1202,7 +1207,9 @@ if(IFrameSplitOperator.IsBool(option.EnableZoomIndexWindow))chart.EnableZoomInde
1202
1207
  {if(option.DrawTool.StorageKey&&chart.ChartDrawStorage)chart.ChartDrawStorage.Load(option.DrawTool.StorageKey);}if(option.BeforeOpen)//集合竞价
1203
1208
  {var item=option.BeforeOpen;if(IFrameSplitOperator.IsBool(item.IsShow))chart.IsShowBeforeData=item.IsShow;if(IFrameSplitOperator.IsNumber(item.Width))chart.ExtendWidth.Left=item.Width;if(IFrameSplitOperator.IsBool(item.IsShowMultiDay))chart.IsShowMultiDayBeforeData=item.IsShowMultiDay;if(IFrameSplitOperator.IsNumber(item.MulitiDayWidth))chart.MultiDayExtendWidth.Left=item.MulitiDayWidth;}if(option.AfterClose)//收盘集合竞价
1204
1209
  {var item=option.AfterClose;if(IFrameSplitOperator.IsBool(item.IsShow))chart.IsShowAfterData=item.IsShow;if(IFrameSplitOperator.IsNumber(item.ShareVol))chart.ShareAfterVol=item.ShareVol;if(IFrameSplitOperator.IsNumber(item.Width))chart.ExtendWidth.Right=item.Width;if(IFrameSplitOperator.IsBool(item.IsShowMultiDay))chart.IsShowMultiDayAfterData=item.IsShowMultiDay;if(IFrameSplitOperator.IsNumber(item.MulitiDayWidth))chart.MultiDayExtendWidth.Right=item.MulitiDayWidth;}//图形选中
1205
- if(option.SelectedChart){var item=option.SelectedChart;if(IFrameSplitOperator.IsBool(item.EnableSelected))chart.SelectedChart.EnableSelected=item.EnableSelected;if(IFrameSplitOperator.IsBool(item.EnableMoveOn))chart.SelectedChart.EnableMoveOn=item.EnableMoveOn;}//分页
1210
+ if(option.SelectedChart){var item=option.SelectedChart;if(IFrameSplitOperator.IsBool(item.EnableSelected))chart.SelectedChart.EnableSelected=item.EnableSelected;if(IFrameSplitOperator.IsBool(item.EnableMoveOn))chart.SelectedChart.EnableMoveOn=item.EnableMoveOn;}if(chart.ClassName=="MinuteChartContainer"){if(!option.DragSelectRect){option.DragSelectRect={Enable:true};//默认开启区间选中画布
1211
+ }if(option.DragSelectRect){var item=option.DragSelectRect;var zindex=10;if(IFrameSplitOperator.IsNumber(item.ZIndex))zindex=item.ZIndex;if(item.Enable)this.CreateExtraCanvasElement(JSChart.RectDragCanvasKey,{ZIndex:zindex});//创建独立的区间选择画布
1212
+ }}//分页
1206
1213
  if(option.PageInfo)chart.SetPageInfo(option.PageInfo);chart.Create(windowsCount,option);//创建子窗口
1207
1214
  if(option.CorssCursorInfo){var item=option.CorssCursorInfo;if(!isNaN(option.CorssCursorInfo.Left))chart.ChartCorssCursor.ShowTextMode.Left=option.CorssCursorInfo.Left;if(!isNaN(option.CorssCursorInfo.Right))chart.ChartCorssCursor.ShowTextMode.Right=option.CorssCursorInfo.Right;if(!isNaN(option.CorssCursorInfo.Bottom))chart.ChartCorssCursor.ShowTextMode.Bottom=option.CorssCursorInfo.Bottom;if(option.CorssCursorInfo.IsShowCorss===false)chart.ChartCorssCursor.IsShowCorss=option.CorssCursorInfo.IsShowCorss;if(option.CorssCursorInfo.RightTextFormat>0)chart.ChartCorssCursor.TextFormat.Right=option.CorssCursorInfo.RightTextFormat;if(option.CorssCursorInfo.IsOnlyDrawMinute==true)chart.ChartCorssCursor.IsOnlyDrawMinute=option.CorssCursorInfo.IsOnlyDrawMinute;//Y轴显示收盘价
1208
1215
  if(IFrameSplitOperator.IsBool(option.CorssCursorInfo.IsFixXLastTime))chart.ChartCorssCursor.IsFixXLastTime=option.CorssCursorInfo.IsFixXLastTime;if(item.RightButton){if(IFrameSplitOperator.IsBool(item.RightButton.Enable))chart.ChartCorssCursor.RightButton.Enable=item.RightButton.Enable;}if(IFrameSplitOperator.IsNumber(item.PriceFormatType))chart.ChartCorssCursor.StringFormatY.PriceFormatType=item.PriceFormatType;if(IFrameSplitOperator.IsNumber(item.DataFormatType))chart.ChartCorssCursor.StringFormatY.DataFormatType=item.DataFormatType;if(IFrameSplitOperator.IsNumber(item.HPenType))chart.ChartCorssCursor.HPenType=item.HPenType;if(IFrameSplitOperator.IsNumber(item.VPenType))chart.ChartCorssCursor.VPenType=item.VPenType;}if(option.MinuteInfo)chart.CreateMinuteInfo(option.MinuteInfo);if(IFrameSplitOperator.IsBool(option.IsShowRightMenu))chart.IsShowRightMenu=option.IsShowRightMenu;if(IFrameSplitOperator.IsNumber(option.DayCount))chart.DayCount=option.DayCount;this.SetChartBorder(chart,option);if(option.SplashTitle)chart.ChartSplashPaint.SplashTitle=option.SplashTitle;if(IFrameSplitOperator.IsBool(option.EnableBorderDrag)){chart.EnableBorderDrag=option.EnableBorderDrag;}this.AdjustChartBorder(chart);if(option.Frame){for(var i=0;i<option.Frame.length;++i){var item=option.Frame[i];if(!chart.Frame.SubFrame[i])continue;var subFrame=chart.Frame.SubFrame[i].Frame;if(IFrameSplitOperator.IsNumber(item.SplitCount))chart.Frame.SubFrame[i].Frame.YSplitOperator.SplitCount=item.SplitCount;if(item.StringFormat)chart.Frame.SubFrame[i].Frame.YSplitOperator.StringFormat=item.StringFormat;if(IFrameSplitOperator.IsNumber(item.SplitType)){chart.Frame.SubFrame[i].Frame.YSplitOperator.SplitType=item.SplitType;chart.Frame.SubFrame[i].Frame.YSplitOperator.DefaultSplitType=item.SplitType;}if(item.IsShowLeftText==false){chart.Frame.SubFrame[i].Frame.IsShowYText[0]=item.IsShowLeftText;chart.Frame.SubFrame[i].Frame.YSplitOperator.IsShowLeftText=item.IsShowLeftText;//显示左边刻度
@@ -1296,7 +1303,7 @@ this.PasteChartDrawPicture=function(data,frameID,option){if(this.JSChartContaine
1296
1303
  this.ReloadResource=function(option){if(this.JSChartContainer&&typeof this.JSChartContainer.ReloadResource=='function'){JSConsole.Chart.Log('[JSChart:ReloadResource] ');this.JSChartContainer.ReloadResource(option);}};this.EnableSplashScreen=function(enable,option){if(this.JSChartContainer&&typeof this.JSChartContainer.EnableSplashScreen=='function'){JSConsole.Chart.Log('[JSChart:EnableSplashScreen] ');this.JSChartContainer.EnableSplashScreen(enable,option);}};this.Draw=function(){if(this.JSChartContainer&&typeof this.JSChartContainer.Draw=='function'){JSConsole.Chart.Log('[JSChart:Draw] ');this.JSChartContainer.Draw();}};this.SetFocus=function(){if(this.JSChartContainer&&typeof this.JSChartContainer.SetFocus=='function'){JSConsole.Chart.Log('[JSChart:SetFocus] ');this.JSChartContainer.SetFocus();}};//数据导出, option={ Start:{ Date, Time:可选}, End:{Date: Time:可选} }
1297
1304
  this.ExportData=function(option){if(this.JSChartContainer&&typeof this.JSChartContainer.ExportData=='function'){JSConsole.Chart.Log('[JSChart:ExportData] ');return this.JSChartContainer.ExportData(option);}};this.ChangePriceGap=function(option){if(this.JSChartContainer&&typeof this.JSChartContainer.ChangePriceGap=='function'){JSConsole.Chart.Log('[JSChart:ChangePriceGap] ');return this.JSChartContainer.ChangePriceGap(option);}};this.PopupMenuByTab=function(menuData,rtTab){if(this.JSChartContainer&&typeof this.JSChartContainer.PopupMenuByTab=='function'){JSConsole.Chart.Log('[JSChart:PopupMenuByTab] ');return this.JSChartContainer.PopupMenuByTab(menuData,rtTab);}};this.PopupMenuByDrapdown=function(menuData,rtButton){if(this.JSChartContainer&&typeof this.JSChartContainer.PopupMenuByDrapdown=='function'){JSConsole.Chart.Log('[JSChart:PopupMenuByDrapdown] ');return this.JSChartContainer.PopupMenuByDrapdown(menuData,rtButton);}};}JSChart.LastVersion=null;//最新的版本号
1298
1305
  JSChart.EnableCanvasWillReadFrequently=false;//https://html.spec.whatwg.org/multipage/canvas.html#concept-canvas-will-read-frequently
1299
- JSChart.CorssCursorCanvasKey="hqchart_corsscursor";JSChart.TooltipCursorCanvasKey="hqchart_tooltip";//初始化
1306
+ JSChart.CorssCursorCanvasKey="hqchart_corsscursor";JSChart.TooltipCursorCanvasKey="hqchart_tooltip";JSChart.RectDragCanvasKey="hqchart_drag_rect";//初始化
1300
1307
  JSChart.Init=function(divElement,bScreen,bCacheCanvas){var jsChartControl=new JSChart(divElement,bScreen,bCacheCanvas);jsChartControl.OnSize();return jsChartControl;};JSChart.SetDomain=function(domain,cacheDomain){if(domain)g_JSChartResource.Domain=domain;if(cacheDomain)g_JSChartResource.CacheDomain=cacheDomain;};JSChart.SetPyIndexDomain=function(domain)//设置py指标计算api域名
1301
1308
  {if(domain)g_JSChartResource.PyIndexDomain=domain;};//自定义风格
1302
1309
  JSChart.SetStyle=function(option){if(option)g_JSChartResource.SetStyle(option);};//value { EN:'', CH:'' }
@@ -1431,7 +1438,7 @@ ON_RCLICK_TREPORT_HEADER:125,//右键点击T型报价表头
1431
1438
  ON_TREPORT_LOCAL_SORT:126,//T型报价列表本地排序
1432
1439
  ON_CLICK_TREPORT_ROW:127,//左键点击点击T型报价列表
1433
1440
  ON_CHANGE_INDEX:150,//切换指标
1434
- ON_MENU_COMMAND:151,//菜单时间回调
1441
+ ON_MENU_COMMAND:151,//菜单事件回调
1435
1442
  ON_CREATE_RIGHT_MENU:152,//创建右键菜单
1436
1443
  ON_FORMAT_CALL_AUCTION_INDEX_TITLE:153//集合竞价指标窗口标题内容
1437
1444
  };var JSCHART_OPERATOR_ID={OP_SCROLL_LEFT:1,//往左移动
@@ -1504,8 +1511,8 @@ CMD_CHANGE_API_INDEX_ID:33,//切换后台接口指标
1504
1511
  CMD_CHANGE_SCRIPT_INDEX_ID:34,//切换成自定义的脚本指标
1505
1512
  CMD_CHANGE_BASELINE_ID:35,//分时图切换基准线
1506
1513
  CMD_ADD_OVERLAY_INDEX_ID:36,//添加叠加指标
1507
- CMD_CHANGE_LANGUAGE_ID:37//语言切换
1508
- };function PhoneDBClick(){this.Start=[];this.Clear=function(){this.Start=[];};this.AddTouchStart=function(x,y,time){if(this.Start.length>0){var item=this.Start[this.Start.length-1];var spanTime=time-item.Time;if(spanTime>0&&spanTime<300){this.Start.push({X:x,Y:y,Time:time});}else{this.Start=[];}}else{this.Start.push({X:x,Y:y,Time:time});}};this.IsVaildDBClick=function(){if(this.Start.length==2)return true;return false;};this.AddTouchEnd=function(time){if(this.Start.length<=0)return;var item=this.Start[this.Start.length-1];var spanTime=time-item.Time;if(spanTime>=0&&spanTime<150){}else{this.Start=[];}};}/*
1514
+ CMD_CHANGE_LANGUAGE_ID:37,//语言切换
1515
+ CMD_CHANGE_DRAG_RECT_SHOW_MODE_ID:38};function PhoneDBClick(){this.Start=[];this.Clear=function(){this.Start=[];};this.AddTouchStart=function(x,y,time){if(this.Start.length>0){var item=this.Start[this.Start.length-1];var spanTime=time-item.Time;if(spanTime>0&&spanTime<300){this.Start.push({X:x,Y:y,Time:time});}else{this.Start=[];}}else{this.Start.push({X:x,Y:y,Time:time});}};this.IsVaildDBClick=function(){if(this.Start.length==2)return true;return false;};this.AddTouchEnd=function(time){if(this.Start.length<=0)return;var item=this.Start[this.Start.length-1];var spanTime=time-item.Time;if(spanTime>=0&&spanTime<150){}else{this.Start=[];}};}/*
1509
1516
  图形控件
1510
1517
  */function JSChartContainer(uielement,OffscreenElement,cacheElement){var _this5=this;this.ClassName='JSChartContainer';var _self=this;this.Frame;//框架画法
1511
1518
  this.ChartPaint=new Array();//图形画法
@@ -1526,6 +1533,7 @@ this.IsDrawPictureXY=false;//选中的画图工具是否显示X,Y轴对应数值
1526
1533
  this.EnableShowCorssCursor={DrawPicture:true};//DrawPicture=画图是否显示十字光标
1527
1534
  this.ChartPictureMenu;//画图工具 单个图形设置菜单
1528
1535
  this.ChartCorssCursor;//十字光标
1536
+ this.ChartDragSelectRect;//选择区间选中
1529
1537
  this.IsClickShowCorssCursor=false;//手势点击显示十字光标
1530
1538
  this.ChartSplashPaint=null;//等待提示
1531
1539
  this.LoadDataSplashTitle="数据加载中";//下载数据提示信息
@@ -1554,10 +1562,7 @@ this.EnableAnimation=false;//是否开启动画
1554
1562
  //tooltip提示信息
1555
1563
  this.Tooltip=document.createElement("div");this.Tooltip.className='jschart-tooltip';this.Tooltip.style.background=g_JSChartResource.TooltipBGColor;this.Tooltip.style.opacity=g_JSChartResource.TooltipAlpha;this.Tooltip.style["pointer-events"]="none";this.Tooltip.id=Guid();uielement.parentNode.appendChild(this.Tooltip);this.IsShowTooltip=true;//是否显示K线tooltip
1556
1564
  this.TooltipCache={Type:null,IsShow:false,X:null,Y:null,Data:null,InnerHTML:null};//缓存tooltip数据
1557
- //区间选择
1558
- this.SelectRect=document.createElement("div");this.SelectRect.className="jschart-selectrect";this.SelectRect.style.background=g_JSChartResource.SelectRectBGColor;this.SelectRect.style["pointer-events"]="none";//this.SelectRect.style.opacity=g_JSChartResource.SelectRectAlpha;
1559
- this.SelectRect.id=Guid();this.SelectRect.oncontextmenu=function(){return false;};//屏蔽选中区域系统右键菜单
1560
- uielement.parentNode.appendChild(this.SelectRect);//坐标轴风格方法 double-更加数值型分割 price-更加股票价格分割
1565
+ //坐标轴风格方法 double-更加数值型分割 price-更加股票价格分割
1561
1566
  this.FrameSplitData=new _map2.default();this.FrameSplitData.set("double",new SplitData());this.FrameSplitData.set("price",new PriceSplitData());//事件回调
1562
1567
  this.mapEvent=new _map2.default();//通知外部调用 key:JSCHART_EVENT_ID value:{Callback:回调,}
1563
1568
  this.PhonePinch=null;//手机双指操作信息
@@ -1617,7 +1622,7 @@ return false;};this.UIOnDblClick=function(e){if(this.ChartSplashPaint&&this.Char
1617
1622
  this.TryYDrag=function(x,y){if(!this.EnableYDrag)return null;if(!this.EnableYDrag.Left&&!this.EnableYDrag.Right)return null;if(!this.Frame||!this.Frame.PtInFrameY)return null;var dragY=this.Frame.PtInFrameY(x,y);if(!dragY||dragY.Index<0)return null;if(dragY.IsOverlay===true){if(!dragY.Right||!this.EnableYDrag.Right)return null;if(this.Frame.IsEnableOverlayDragY(dragY.Index,dragY.OverlayIndex))return dragY;return null;}if(dragY.Left&&this.EnableYDrag.Left&&this.Frame.IsEnableDragY(dragY.Index)){return dragY;}if(dragY.Right&&this.EnableYDrag.Right&&this.Frame.IsEnableDragY(dragY.Index)){return dragY;}return null;};//是否可以上下拖拽
1618
1623
  this.TryUpDownDrag=function(x,y){var windowIndex=this.Frame.PtInFrame(x,y);if(windowIndex<0)return null;var item=this.Frame.SubFrame[windowIndex];if(!item||!item.Frame)return null;var frame=item.Frame;if(!frame.YSplitOperator||!frame.YSplitOperator.FixedYMaxMin)return null;return{Index:windowIndex,X:x,Y:y};};this.TryRectSelectDrag=function(x,y){var paint=this.GetRectSelectPaint();if(!paint)return null;if(paint.GetPointCount()<=0)return null;var item=paint.PtInPaint(x,y);return{Item:item,X:x,Y:y};};this.TryClickCrossCursor=function(x,y,e){if(!this.ChartCorssCursor)return;var button=this.ChartCorssCursor.PtInButton(x,y);if(!button)return false;var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CLICK_CROSSCURSOR_RIGHT);if(event&&event.Callback){var sendData={Button:button,e:e};event.Callback(event,sendData,this);}return true;};this.TryClickButton=function(x,y,e){var button=this.Frame.PtInButtons(x,y);if(button&&this.ClickFrameButton){this.ClickFrameButton(button,e);return true;}button=this.PtInExtendChartButtons(x,y);if(button&&this.ClickExtendChartButton){this.ClickExtendChartButton(button,e);return true;}button=this.PtInDrawPictureButtons(x,y);if(button&&this.ClickDrawPictureButton){this.ClickDrawPictureButton(button,e);return true;}button=this.PtInTitleButtons(x,y);if(button&&this.ClickTitleButton){this.ClickTitleButton(button,e);return true;}return false;};this.TryMouseMove_CustomChartDrag=function(sendData){var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CUSTOM_DRAG_MOUSE_MOVE);if(!event||!event.Callback)return false;return event.Callback(event,sendData,this);};this.TryClick_CustomChartDrag=function(sendData){var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CUSTOM_DRAG_MOUSE_DOWN);if(!event||!event.Callback)return false;sendData.ChartDrag=null;sendData.Cusrsor=null;event.Callback(event,sendData,this);this.CustomChartDrag=sendData.ChartDrag;this.SetCursor(sendData);};this.TryDragMove_CustomChartDrag=function(sendData){var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CUSTOM_DRAG_DOC_MOUSE_MOVE);if(!event||!event.Callback)return;var e=sendData.e;var drag=sendData.Drag;if(Math.abs(drag.LastMove.Y-e.clientY)<2&&Math.abs(drag.LastMove.X-e.clientX)<2)return;if(event.Callback(event,sendData,this)){drag.LastMove.X=e.clientX;drag.LastMove.Y=e.clientY;}};this.TryMouseUp_CustomChartDrag=function(sendData){var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CUSTOM_DRAG_DOC_MOUSE_UP);if(!event||!event.Callback)return;event.Callback(event,sendData,this);};this.UIOnMouseDown=function(e){var _this6=this;this.MoveOnChartDrawPicture=null;if(this.ChartSplashPaint&&this.ChartSplashPaint.IsEnableSplash==true)return;this.ClickDownPoint={X:e.clientX,Y:e.clientY};this.IsOnTouch=true;this.BorderDrag=null;this.YDrag=null;this.UpDownDrag=null;this.RectSelectDrag=null;this.IndexChartDrag=null;this.CustomChartDrag=null;var pixelTatio=GetDevicePixelRatio();var x=(e.clientX-this.UIElement.getBoundingClientRect().left)*pixelTatio;var y=(e.clientY-this.UIElement.getBoundingClientRect().top)*pixelTatio;if(this.TryClickButton(x,y,e)){this.IsOnTouch=false;return;}var bDrawDynamicInfo=false;if(this.GlobalOption.SelectedBorder&&this.GlobalOption.SelectedBorder.Mode>=1){var item=this.GlobalOption.SelectedBorder;var frameId=this.Frame.PtInFrame(x,y);if(frameId>=0&&frameId!=item.SelFrame){item.SelFrame=frameId;bDrawDynamicInfo=true;}}var bRedraw=false;if(this.GlobalOption.SelectedXBorder&&this.GlobalOption.SelectedXBorder.Mode>=1){if(this.PtInMulitDayMinute){var item=this.GlobalOption.SelectedXBorder;var selectedDate=this.PtInMulitDayMinute(x,y);if(item.Date!=selectedDate){item.Date=selectedDate;bRedraw=true;}}}if(this.TryClickCrossCursor(x,y,e)){this.IsOnTouch=false;return;}if(this.TryClickChartTooltipData&&this.TryClickChartTooltipData(x,y,e))//预留给外部点击图标什么用的
1619
1624
  {this.IsOnTouch=false;return;}if(this.TryClickLock){//JSConsole.Chart.Log('[uielement.onmousedown] left, top ',e.clientX, e.clientY, this.getBoundingClientRect().left,this.getBoundingClientRect().top);
1620
- if(this.TryClickLock(x,y))return;}this.HideSelectRect();if(this.ChartPictureMenu)this.ChartPictureMenu.Hide();var paint=this.GetRectSelectPaint();if(paint&&paint.GetPointCount()>0){var item=paint.PtInPaint(x,y);if(item){if(item.Type==4){//this.UIElement.style.cursor="pointer";
1625
+ if(this.TryClickLock(x,y))return;}this.HideSelectRect();this.ClearDragSelectRect();if(this.ChartPictureMenu)this.ChartPictureMenu.Hide();var paint=this.GetRectSelectPaint();if(paint&&paint.GetPointCount()>0){var item=paint.PtInPaint(x,y);if(item){if(item.Type==4){//this.UIElement.style.cursor="pointer";
1621
1626
  this.SetCursor({Cursor:"pointer"});var obj={X:e.clientX};if(this.GetXDataIndex(obj)){this.RectSelectDrag={DataIndex:obj.DataIndex,Type:item.Type,X:e.clientX};JSConsole.Chart.Log("[JSChartContainer::UIOnMouseDown] drag sub rect select ",obj);}}else{//this.UIElement.style.cursor="ew-resize";
1622
1627
  this.SetCursor({Cursor:"ew-resize"});this.RectSelectDrag={Index:item.PointIndex,Type:item.Type};JSConsole.Chart.Log("[JSChartContainer::UIOnMouseDown] drag rect select ",item);}}}if(!this.RectSelectDrag&&this.ClearRectSelect(false))this.Draw();if(this.EnableBorderDrag&&this.Frame){var dragBorder=this.Frame.PtInFrameBorder(x,y);if(dragBorder&&dragBorder.Index>=0){//this.UIElement.style.cursor="n-resize";
1623
1628
  this.SetCursor({Cursor:"n-resize"});this.BorderDrag={Index:dragBorder.Index};JSConsole.Chart.Log("[JSChartContainer::UIOnMouseDown] DragBorder ",dragBorder);}}//拖拽Y轴缩放
@@ -1647,8 +1652,7 @@ if(this.ChartSplashPaint&&this.ChartSplashPaint.IsEnableSplash)return;var drag=t
1647
1652
  JSConsole.Chart.Log("[JSChartContainer::DocOnMouseMove] YDrag ",this.YDrag,yMove);this.OnZoomUpDownFrameY(this.YDrag,yMove);drag.LastMove.X=e.clientX;drag.LastMove.Y=e.clientY;}else if(this.IndexChartDrag&&this.IndexChartDrag.SelectedChart){if(Math.abs(drag.LastMove.Y-e.clientY)<2&&Math.abs(drag.LastMove.X-e.clientX)<2)return;var chartMove=this.GetExtendChartByClassName("DragMovePaint");if(chartMove&&chartMove.Chart){var pixelTatio=GetDevicePixelRatio();var x=(e.clientX-this.UIElement.getBoundingClientRect().left)*pixelTatio;var y=(e.clientY-this.UIElement.getBoundingClientRect().top)*pixelTatio;chartMove.Chart.Point={X:x,Y:y};chartMove.Chart.IsShow=true;chartMove.Chart.Info=this.IndexChartDrag.Info;this.DrawDynamicInfo();}this.IndexChartDrag.LastMove.X=x;this.IndexChartDrag.LastMove.Y=y;drag.LastMove.X=e.clientX;drag.LastMove.Y=e.clientY;}else if(this.CustomChartDrag){var pixelTatio=GetDevicePixelRatio();var x=(e.clientX-this.UIElement.getBoundingClientRect().left)*pixelTatio;var y=(e.clientY-this.UIElement.getBoundingClientRect().top)*pixelTatio;var sendData={X:x,Y:y,e:e,ChartDrag:this.CustomChartDrag,Drag:drag};this.TryDragMove_CustomChartDrag(sendData);}else if(this.CurrentChartDrawPicture){var drawPicture=this.CurrentChartDrawPicture;if(drawPicture.Status==1||drawPicture.Status==2){if(Math.abs(drag.LastMove.X-e.clientX)<5&&Math.abs(drag.LastMove.Y-e.clientY)<5)return;if(this.SetChartDrawPictureSecondPoint(e.clientX,e.clientY)){this.DrawDynamicInfo();}}else if(drawPicture.Status==3){if(this.SetChartDrawPictureThirdPoint(e.clientX,e.clientY)){this.DrawDynamicInfo();}}else if(drawPicture.Status==20)//画图工具移动
1648
1653
  {if(Math.abs(drag.LastMove.X-e.clientX)<5&&Math.abs(drag.LastMove.Y-e.clientY)<1)return;if(this.SelectChartDrawPicture){if(this.SelectChartDrawPicture.EnableCtrlMove){if(!e.ctrlKey)return;}}if(this.SelectChartDrawPicture&&this.SelectChartDrawPicture.DragInfo)this.SelectChartDrawPicture.DragInfo.Move={X:e.clientX,Y:e.client};if(this.MoveChartDrawPicture(e.clientX-drag.LastMove.X,e.clientY-drag.LastMove.Y,false,drag)){this.DrawDynamicInfo();}}drag.LastMove.X=e.clientX;drag.LastMove.Y=e.clientY;}else if(this.DragMode==1||isDragSelectRect||isDragSubSelectRect)//数据上下左右拖拽
1649
1654
  {this.OnDragMode_One({X:moveSetp,Y:moveSetpY},e);}else if(this.DragMode==2)//区间选择
1650
- {var yMoveSetp=Math.abs(drag.LastMove.Y-e.clientY);if(moveSetp<5&&yMoveSetp<5)return;//this.UIElement.style.cursor="default";
1651
- this.SetCursor({Cursor:"default"});var x=drag.Click.X-uielement.getBoundingClientRect().left;var y=drag.Click.Y-uielement.getBoundingClientRect().top;var x2=e.clientX-uielement.getBoundingClientRect().left;var y2=e.clientY-uielement.getBoundingClientRect().top;this.ShowSelectRect(x,y,x2,y2);drag.LastMove.X=e.clientX;drag.LastMove.Y=e.clientY;}};this.OnDragMode_One=function(moveData,e){var moveSetp=moveData.X;var moveSetpY=moveData.Y;var drag=this.MouseDrag;if(moveSetp<5&&moveSetpY<5)return;var bNeedDraw=false;var bUpDownY=false;if(moveSetpY>=5){if(this.UpDownDrag&&this.UpDownDrag.Index>=0){var yMove=e.clientY-drag.LastMove.Y;JSConsole.Chart.Log("[JSChartContainer::OnDragMode_One] UpDownDrag ",this.UpDownDrag,yMove);//this.UIElement.style.cursor="pointer";
1655
+ {var yMoveSetp=Math.abs(drag.LastMove.Y-e.clientY);if(moveSetp<5&&yMoveSetp<5)return;this.SetCursor({Cursor:"default"});var ptStart=this.PointAbsoluteToRelative(drag.Click.X,drag.Click.Y);var ptEnd=this.PointAbsoluteToRelative(e.clientX,e.clientY);this.ShowDragSelectRect(ptStart,ptEnd);drag.LastMove.X=e.clientX;drag.LastMove.Y=e.clientY;}};this.OnDragMode_One=function(moveData,e){var moveSetp=moveData.X;var moveSetpY=moveData.Y;var drag=this.MouseDrag;if(moveSetp<5&&moveSetpY<5)return;var bNeedDraw=false;var bUpDownY=false;if(moveSetpY>=5){if(this.UpDownDrag&&this.UpDownDrag.Index>=0){var yMove=e.clientY-drag.LastMove.Y;JSConsole.Chart.Log("[JSChartContainer::OnDragMode_One] UpDownDrag ",this.UpDownDrag,yMove);//this.UIElement.style.cursor="pointer";
1652
1656
  this.SetCursor({Cursor:"pointer"});if(this.OnUpDonwFrameY(this.UpDownDrag,yMove)){bNeedDraw=true;bUpDownY=true;}drag.LastMove.Y=e.clientY;}}if(moveSetp>=5){if(this.RectSelectDrag){if(this.RectSelectDrag.Index>=0){var obj={X:e.clientX,Y:e.clientY,PointIndex:this.RectSelectDrag.Index,Name:"MoveRectSelectLine"};if(this.MoveRectSelectPoint(obj))bNeedDraw=true;}else if(this.RectSelectDrag.Type===4){var obj={X:e.clientX};if(!this.GetXDataIndex(obj))return;if(obj.DataIndex==this.RectSelectDrag.DataIndex)return;var step=obj.DataIndex-this.RectSelectDrag.DataIndex;var isLeft=true;if(step>0)isLeft=false;if(!this.MoveSubRectSelect({Step:Math.abs(step),IsLeft:isLeft,X:e.clientX,Y:e.clientY}))return;this.RectSelectDrag.DataIndex=obj.DataIndex;this.RectSelectDrag.X=e.clientX;bNeedDraw=true;}}else{var isLeft=true;if(drag.LastMove.X<e.clientX)isLeft=false;//右移数据
1653
1657
  var cursorStatus="pointer";if(drag.Click.IsInFrameBottom)cursorStatus="ew-resize";var oneStepWidth=this.GetMoveOneStepWidth();if(moveSetp<oneStepWidth){//this.UIElement.style.cursor=cursorStatus;
1654
1658
  this.SetCursor({Cursor:cursorStatus});if(bNeedDraw)this.Draw();return;}else{if(drag.Click&&drag.Click.IsInFrameBottom){if(this.XCoordinateZoom(moveSetp,isLeft)){this.UpdataDataoffset();this.UpdateFrameMaxMin();this.ResetFrameXYSplit();bNeedDraw=true;}}else if(this.DataMove(moveSetp,isLeft)){this.UpdataDataoffset();//this.UpdatePointByCursorIndex(); //推拽数据的时候不需要把鼠标位置更新到K线上
@@ -1659,7 +1663,7 @@ document.onmousemove=null;document.onmouseup=null;var IsMinuteChart=this.ClassNa
1659
1663
  this.SetCursor({Cursor:"default"});}else if(this.CustomChartDrag){var sendData={e:e,ChartDrag:this.CustomChartDrag,Drag:this.MouseDrag};this.TryMouseUp_CustomChartDrag(sendData);}else if(isDragSelectRect)//区间选择拖动范围
1660
1664
  {if(this.OnDragSelectRectMouseUp)this.OnDragSelectRectMouseUp(e);}else if(isDragSubSelectRect){if(this.OnDragSubSelectRectMouseUp)this.OnDragSubSelectRectMouseUp(e);}else if(IsMinuteChart){if(this.OnMinuteSelectRectMouseUp)this.OnMinuteSelectRectMouseUp(e);}else if(this.DragMode==2)//区间选择
1661
1665
  {var drag=this.MouseDrag;drag.LastMove.X=e.clientX;drag.LastMove.Y=e.clientY;var selectData=new SelectRectData();var pixelTatio=GetDevicePixelRatio();//区间起始位置 结束位子
1662
- selectData.XStart=(drag.Click.X-uielement.getBoundingClientRect().left)*pixelTatio;selectData.YStart=(drag.Click.Y-uielement.getBoundingClientRect().top)*pixelTatio;selectData.XEnd=(drag.LastMove.X-uielement.getBoundingClientRect().left)*pixelTatio;selectData.YEnd=(drag.LastMove.Y-uielement.getBoundingClientRect().top)*pixelTatio;selectData.JSChartContainer=this;selectData.Stock={Symbol:this.Symbol,Name:this.Name};if(!this.BorderDrag&&this.GetSelectRectData(selectData)){var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_SELECT_RECT);var paint=this.GetRectSelectPaint();var isShowMenu=true;if(event&&event.Callback){var data=(0,_defineProperty3.default)({X:drag.LastMove.X-uielement.getBoundingClientRect().left,Y:drag.LastMove.Y-uielement.getBoundingClientRect().top,SelectData:selectData,//区间选择的数据
1666
+ selectData.XStart=(drag.Click.X-uielement.getBoundingClientRect().left)*pixelTatio;selectData.YStart=(drag.Click.Y-uielement.getBoundingClientRect().top)*pixelTatio;selectData.XEnd=(drag.LastMove.X-uielement.getBoundingClientRect().left)*pixelTatio;selectData.YEnd=(drag.LastMove.Y-uielement.getBoundingClientRect().top)*pixelTatio;selectData.JSChartContainer=this;selectData.Stock={Symbol:this.Symbol,Name:this.Name};if(this.ChartDragSelectRect.Enable&&!this.BorderDrag&&this.GetSelectRectData(selectData)){var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_SELECT_RECT);var paint=this.GetRectSelectPaint();var isShowMenu=true;if(event&&event.Callback){var data=(0,_defineProperty3.default)({X:drag.LastMove.X-uielement.getBoundingClientRect().left,Y:drag.LastMove.Y-uielement.getBoundingClientRect().top,SelectData:selectData,//区间选择的数据
1663
1667
  RectSelectPaint:paint,//区间选择背景
1664
1668
  IsShowMenu:true,e:e},'e',e);event.Callback(event,data,this);isShowMenu=data.IsShowMenu;}if(IsMinuteChart)//分时图直接显示显示区间选择
1665
1669
  {this.HideSelectRect();this.UpdateSelectRect(selectData.Start,selectData.End);}else{if(isShowMenu){var data={Chart:this,X:drag.LastMove.X-uielement.getBoundingClientRect().left,Y:drag.LastMove.Y-uielement.getBoundingClientRect().top,SelectData:selectData,//区间选择的数据
@@ -1725,7 +1729,8 @@ for(var i=0;i<this.ChartDrawPicture.length;++i){var item=this.ChartDrawPicture[i
1725
1729
  for(var i=0;i<this.ChartPaint.length;++i){var item=this.ChartPaint[i];item.Canvas=canvas;}//扩展图形
1726
1730
  for(var i=0;i<this.ChartPaintEx.length;++i){var item=this.ChartPaintEx[i];item.Canvas=canvas;}//叠加股票
1727
1731
  for(var i=0;i<this.OverlayChartPaint.length;++i){var item=this.OverlayChartPaint[i];item.Canvas=canvas;}//扩展画法
1728
- for(var i=0;i<this.ExtendChartPaint.length;++i){var item=this.ExtendChartPaint[i];item.Canvas=canvas;}};this.Draw=function(){var _this7=this;if(this.ChartCorssCursor)this.ChartCorssCursor.Status=0;if(this.UIElement.width<=0||this.UIElement.height<=0)return;this.StopDrawDynamicInfo();var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_BEFORE_DRAW);if(event&&event.Callback){var sendData={};event.Callback(event,sendData,this);}this.Canvas.clearRect(0,0,this.UIElement.width,this.UIElement.height);if(this.CacheCanvas)this.CacheCanvas.clearRect(0,0,this.UIElement.width,this.UIElement.height);var pixelTatio=GetDevicePixelRatio();//获取设备的分辨率
1732
+ for(var i=0;i<this.ExtendChartPaint.length;++i){var item=this.ExtendChartPaint[i];item.Canvas=canvas;}};//清空画布
1733
+ this.ClearCanvas=function(canvas){if(!canvas)return;if(!this.UIElement)return;canvas.clearRect(0,0,this.UIElement.width,this.UIElement.height);};this.Draw=function(){var _this7=this;if(this.ChartCorssCursor)this.ChartCorssCursor.Status=0;if(this.UIElement.width<=0||this.UIElement.height<=0)return;this.StopDrawDynamicInfo();var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_BEFORE_DRAW);if(event&&event.Callback){var sendData={};event.Callback(event,sendData,this);}this.Canvas.clearRect(0,0,this.UIElement.width,this.UIElement.height);if(this.CacheCanvas)this.CacheCanvas.clearRect(0,0,this.UIElement.width,this.UIElement.height);var pixelTatio=GetDevicePixelRatio();//获取设备的分辨率
1729
1734
  this.Canvas.lineWidth=pixelTatio;//手机端需要根据分辨率比调整线段宽度
1730
1735
  if(this.ChartSplashPaint&&this.ChartSplashPaint.IsEnableSplash){var data=this.InvokeBeforeDrawSplashScreenCallback();if(data&&data.PreventDefault===true)return;this.Frame.ClearCoordinateText();this.Frame.Draw({IsEnableSplash:this.ChartSplashPaint.IsEnableSplash});this.ChartSplashPaint.Draw();return;}if(this.CacheCanvas)this.SetCanvas(this.CacheCanvas);//框架
1731
1736
  if(this.Frame.SetBeforeDrawXYCallback){this.Frame.SetBeforeDrawXYCallback(function(frame){_this7.BeforeDrawXYCoordinate(frame);});}this.Frame.Draw();if(this.Frame.DrawCustomVertical){var eventCVericalDraw=this.GetEventCallback(JSCHART_EVENT_ID.ON_CUSTOM_VERTICAL_DRAW);this.Frame.DrawCustomVertical(eventCVericalDraw);}this.Frame.CalculateLock();for(var i=0;i<this.ChartDrawPicture.length;++i){var item=this.ChartDrawPicture[i];if(!item.IsDrawMain)continue;if(item.IsDrawMain())item.MainDraw();}//框架内图形
@@ -1838,7 +1843,7 @@ this.Tooltip.style.position="absolute";this.Tooltip.style.left=left+"px";this.To
1838
1843
  {var left=x;var top=y;var format=g_DivTooltipDataForamt.Create('ScatterPlotDataStringFormat');format.Value=toolTip;format.Symbol=this.Symbol;format.Period=this.Period;format.LanguageID=this.LanguageID;if(!format.Operator())return;var width=format.Width;this.Tooltip.className='jchart-charscatterplot-tooltip';//OX指标数据
1839
1844
  this.Tooltip.style.position="absolute";this.Tooltip.style.left=left+"px";this.Tooltip.style.top=top+xMove+"px";this.Tooltip.style.width=width+"px";this.Tooltip.style.height=null;this.Tooltip.innerHTML=format.Text;;this.Tooltip.style.display="block";}else if(toolTip.Type==7)//ChartDrawSVG
1840
1845
  {var left=x;var top=y;var format=g_DivTooltipDataForamt.Create('ChartDrawSVGDataStringFormat');format.Value=toolTip;format.Symbol=this.Symbol;format.Period=this.Period;format.LanguageID=this.LanguageID;if(!format.Operator())return;var width=format.Width;this.Tooltip.className='jchart-chartdrawsvg-tooltip';//ChartDrawSVG指标数据
1841
- this.Tooltip.style.position="absolute";this.Tooltip.style.left=left+"px";this.Tooltip.style.top=top+xMove+"px";this.Tooltip.style.width=width+"px";this.Tooltip.style.height=null;this.Tooltip.innerHTML=format.Text;this.Tooltip.style.display="block";}};this.UpdateDOMTooltip=function(toolTipType,data){var _this11=this;if(!this.TooltipCache.IsShow)return;if(this.TooltipCache.Type!=toolTipType)return;if(!this.TooltipCache.Data)return;if(this.TooltipCache.Type===0){if(!data||!IFrameSplitOperator.IsNonEmptyArray(data.Data))return;var lastItem=data.Data[data.Data.length-1];if(lastItem.Date!=this.TooltipCache.Data.Date)return;if(IFrameSplitOperator.IsNumber(lastItem.Time)&&lastItem.Time!=this.TooltipCache.Data.Time)return;var klinePaint=this.ChartPaint[0];var format=g_DivTooltipDataForamt.Create('HistoryDataStringFormat');format.Value={Data:lastItem,ChartPaint:klinePaint,Type:this.TooltipCache.Type};format.Symbol=this.Symbol;format.LanguageID=this.LanguageID;format.GetEventCallback=function(id){return _this11.GetEventCallback(id);};if(!format.Operator())return;if(format.Text==this.TooltipCache.InnerHTML)return;this.Tooltip.innerHTML=format.Text;this.TooltipCache.InnerHTML=format.Text;}};this.HideTooltip=function(){this.TooltipCache.IsShow=false;this.TooltipCache.Type=null;this.TooltipCache.InnerHTML=null;this.TooltipCache.Data=null;if(this.Tooltip.style.display!="none")this.Tooltip.style.display="none";};this.ShowSelectRect=function(x,y,x2,y2){var left=x;var top=y;var border=this.Frame.ChartBorder.GetBorder();var borderRight=border.Right;var borderLeft=border.Left;if(x>borderRight)x=borderRight;if(x2>borderRight)x2=borderRight;if(x<borderLeft)x=borderLeft;if(x2<borderLeft)x2=borderLeft;if(x>x2)left=x2;if(y>y2)top=y2;var width=Math.abs(x-x2);var height=Math.abs(y-y2);this.SelectRect.style.width=width+"px";this.SelectRect.style.height=height+"px";this.SelectRect.style.position="absolute";this.SelectRect.style.left=left+"px";this.SelectRect.style.top=top+"px";this.SelectRect.style.display="block";};this.UpdateSelectRect=function(start,end){if(!this.ChartPaint[0].Data)return;var paint=this.GetRectSelectPaint();if(!paint)return;var data=this.ChartPaint[0].Data;var startItem=data.Data[start];var endItem=data.Data[end];JSConsole.Chart.Log('[JSChartContainer::UpdateSelectRect]',startItem,endItem);paint.SetPoint(startItem,{Index:0,DataIndex:start});paint.SetPoint(endItem,{Index:1,DataIndex:end});this.Draw();};this.HideSelectRect=function(){this.SelectRect.style.display="none";};this.ResetFrameXYSplit=function(){if(typeof this.Frame.ResetXYSplit=='function')this.Frame.ResetXYSplit();};this.ResetFrameXSplit=function(){if(typeof this.Frame.ResetXSplit=='function')this.Frame.ResetXSplit();};this.UpdateFrameMaxMinV2=function(){var mapFrame=new _map2.default();//key=frameid, value:{ ChartPaint:[] }
1846
+ this.Tooltip.style.position="absolute";this.Tooltip.style.left=left+"px";this.Tooltip.style.top=top+xMove+"px";this.Tooltip.style.width=width+"px";this.Tooltip.style.height=null;this.Tooltip.innerHTML=format.Text;this.Tooltip.style.display="block";}};this.UpdateDOMTooltip=function(toolTipType,data){var _this11=this;if(!this.TooltipCache.IsShow)return;if(this.TooltipCache.Type!=toolTipType)return;if(!this.TooltipCache.Data)return;if(this.TooltipCache.Type===0){if(!data||!IFrameSplitOperator.IsNonEmptyArray(data.Data))return;var lastItem=data.Data[data.Data.length-1];if(lastItem.Date!=this.TooltipCache.Data.Date)return;if(IFrameSplitOperator.IsNumber(lastItem.Time)&&lastItem.Time!=this.TooltipCache.Data.Time)return;var klinePaint=this.ChartPaint[0];var format=g_DivTooltipDataForamt.Create('HistoryDataStringFormat');format.Value={Data:lastItem,ChartPaint:klinePaint,Type:this.TooltipCache.Type};format.Symbol=this.Symbol;format.LanguageID=this.LanguageID;format.GetEventCallback=function(id){return _this11.GetEventCallback(id);};if(!format.Operator())return;if(format.Text==this.TooltipCache.InnerHTML)return;this.Tooltip.innerHTML=format.Text;this.TooltipCache.InnerHTML=format.Text;}};this.HideTooltip=function(){this.TooltipCache.IsShow=false;this.TooltipCache.Type=null;this.TooltipCache.InnerHTML=null;this.TooltipCache.Data=null;if(this.Tooltip.style.display!="none")this.Tooltip.style.display="none";};this.UpdateSelectRect=function(start,end){if(!this.ChartPaint[0].Data)return;var paint=this.GetRectSelectPaint();if(!paint)return;var data=this.ChartPaint[0].Data;var startItem=data.Data[start];var endItem=data.Data[end];JSConsole.Chart.Log('[JSChartContainer::UpdateSelectRect]',startItem,endItem);paint.SetPoint(startItem,{Index:0,DataIndex:start});paint.SetPoint(endItem,{Index:1,DataIndex:end});this.Draw();};this.HideSelectRect=function(){this.ClearDragSelectRect();};this.ResetFrameXYSplit=function(){if(typeof this.Frame.ResetXYSplit=='function')this.Frame.ResetXYSplit();};this.ResetFrameXSplit=function(){if(typeof this.Frame.ResetXSplit=='function')this.Frame.ResetXSplit();};this.UpdateFrameMaxMinV2=function(){var mapFrame=new _map2.default();//key=frameid, value:{ ChartPaint:[] }
1842
1847
  for(var i=0;i<this.Frame.SubFrame.length;++i){var subItem=this.Frame.SubFrame[i];if(!subItem||!subItem.Frame)continue;var frame=subItem.Frame;var key=frame.Identify;var item={ID:key,Frame:frame,ChartPaint:[],Max:null,Min:null,OverlayFrame:[],//共享坐标
1843
1848
  SingleOverlay:[],//独立坐标
1844
1849
  MainOverlayFrame:[null,null]//叠加坐标在主坐标显示[0]=left [1]=right
@@ -1888,7 +1893,7 @@ for(var i=0;i<data.length;++i){var item=data[i];strRow+='"'+item.Name+'"';if(i==
1888
1893
  {var item=this.ExtendChartPaint[i];if(item)item.LanguageID=this.LanguageID;}if(this.Frame&&this.Frame.SetLanguage)this.Frame.SetLanguage(this.LanguageID);//this.Frame.ClearYCoordinateMaxMin();
1889
1894
  this.ResetFrameXYSplit();this.Frame.SetSizeChage(true);this.Draw();};this.ReloadTiltePaintResource=function(resource)//重新加载配置
1890
1895
  {for(var i in this.TitlePaint){var item=this.TitlePaint[i];if(item.ReloadResource)item.ReloadResource(resource);}};this.ReloadExtendChartPaintResource=function(resource)//扩展画法重新加载配置
1891
- {for(var i in this.ExtendChartPaint){var item=this.ExtendChartPaint[i];if(item.ReloadResource)item.ReloadResource(resource);}};this.ReloadChartDrawPictureResource=function(resource){if(!IFrameSplitOperator.IsNonEmptyArray(this.ChartDrawPicture))return;for(var i=0;i<this.ChartDrawPicture.length;++i){var item=this.ChartDrawPicture[i];if(item.ReloadResource)item.ReloadResource(resource);}};this.ReloadResource=function(option){this.ReloadBorder(option);this.ReloadTiltePaintResource(option.Resource);this.ReloadChartPaint(option.Resource);this.ReloadFrame(option.Resource);this.ReloadExtendChartPaintResource(option.Resource);this.ReloadChartCorssCursor(option,option.Resource);this.ReloadChartDrawPictureResource(option.Resource);if(option.Update&&this.Update)this.Update({UpdateCursorIndexType:2});//是否立即更新并重绘
1896
+ {for(var i=0;i<this.ExtendChartPaint.length;++i){var item=this.ExtendChartPaint[i];if(item.ReloadResource)item.ReloadResource(resource);}if(this.ChartDragSelectRect&&this.ChartDragSelectRect.ReloadResource)this.ChartDragSelectRect.ReloadResource(resource);};this.ReloadChartDrawPictureResource=function(resource){if(!IFrameSplitOperator.IsNonEmptyArray(this.ChartDrawPicture))return;for(var i=0;i<this.ChartDrawPicture.length;++i){var item=this.ChartDrawPicture[i];if(item.ReloadResource)item.ReloadResource(resource);}};this.ReloadResource=function(option){this.ReloadBorder(option);this.ReloadTiltePaintResource(option.Resource);this.ReloadChartPaint(option.Resource);this.ReloadFrame(option.Resource);this.ReloadExtendChartPaintResource(option.Resource);this.ReloadChartCorssCursor(option,option.Resource);this.ReloadChartDrawPictureResource(option.Resource);if(option.Update&&this.Update)this.Update({UpdateCursorIndexType:2});//是否立即更新并重绘
1892
1897
  else if(option.Draw==true)this.Draw();//是否立即重绘
1893
1898
  };this.ReloadBorder=function(option)//根据页面缩放调整对应边框的尺长
1894
1899
  {if(!option)return;var pixelTatio=GetDevicePixelRatio();//获取设备的分辨率
@@ -1954,7 +1959,8 @@ var index=this.AddNewSubFrame(option);var indexData={Name:indexInfo.Name,Script:
1954
1959
  KLineType:indexInfo.KLineType,YSpecificMaxMin:indexInfo.YSpecificMaxMin,YSplitScale:indexInfo.YSplitScale,FloatPrecision:indexInfo.FloatPrecision,Condition:indexInfo.Condition,StringFormat:indexInfo.StringFormat,OutName:indexInfo.OutName};if(indexInfo.ID)indexData.ID=indexInfo.ID;this.WindowIndex[index]=new ScriptIndex(indexData.Name,indexData.Script,indexData.Args,indexData);//脚本执行
1955
1960
  if(this.ClassName=="MinuteChartContainer"||this.ClassName=="MinuteChartHScreenContainer")var bindData=this.SourceData;else var bindData=this.ChartPaint[0].Data;this.BindIndexData(index,bindData);//执行脚本
1956
1961
  };//区间选择
1957
- this.GetRectSelectPaint=function(){for(var i=0;i<this.ExtendChartPaint.length;++i){var item=this.ExtendChartPaint[i];if(item.ClassName=="RectSelectPaint")return item;}return null;};this.SetRectSelectData=function(kItem,index){var paint=this.GetRectSelectPaint();if(!paint)return false;if(paint.GetPointCount()==2){if(!paint.SpaceReselected)return false;var oldPreventClose=paint.PreventClose;//备份下
1962
+ this.GetRectSelectPaint=function(){var finder=this.GetExtendChartByClassName("RectSelectPaint");if(!finder)return null;return finder.Chart;};//鼠标拖动区域
1963
+ this.GetRectDragPaint=function(){var finder=this.GetExtendChartByClassName("RectDragPaint");if(!finder)return null;return finder.Chart;};this.SetRectSelectData=function(kItem,index){var paint=this.GetRectSelectPaint();if(!paint)return false;if(paint.GetPointCount()==2){if(!paint.SpaceReselected)return false;var oldPreventClose=paint.PreventClose;//备份下
1958
1964
  paint.PreventClose=false;paint.ClearPoint();paint.PreventClose=oldPreventClose;//还原
1959
1965
  }return paint.SetPoint(kItem,{DataIndex:index});};this.MoveRectSelectPoint=function(obj){var paint=this.GetRectSelectPaint();if(!paint)return false;if(!this.ChartPaint[0]||!this.ChartPaint[0].Data)return false;var kData=this.ChartPaint[0].Data;if(!this.Frame.SubFrame[0])return false;var subFrame=this.Frame.SubFrame[0].Frame;if(!subFrame)false;var pixelTatio=GetDevicePixelRatio();var x=(obj.X-uielement.getBoundingClientRect().left)*pixelTatio;var index=subFrame.GetXData(x);index=parseInt(index.toFixed(0));var dataIndex=index+kData.DataOffset;if(dataIndex>=kData.Data.length)dataIndex=kData.Data.length-1;var item=kData.Data[dataIndex];JSConsole.Chart.Log("[KLineChartContainer::MoveRectSelectPoint] point, item",obj.PointIndex,item);if(!paint.SetPoint(item,{Index:obj.PointIndex,DataIndex:dataIndex}))return false;var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_DRAG_SELECT_RECT);if(event){var selectData=paint.GetSelectRectData();var data={X:obj.X,Y:obj.Y,SelectData:selectData,RectSelectPaint:paint};event.Callback(event,data,this);}return true;};this.MoveSubRectSelect=function(obj){var paint=this.GetRectSelectPaint();if(!paint)return false;if(!paint.MoveSubRect(obj.Step,obj.IsLeft))return false;var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_DRAG_SUB_SELECT_RECT);if(event){var subRectData={Start:paint.SubClient.FirstPoint,End:paint.SubClient.SecondPoint};var data={X:obj.X,Y:obj.Y,SubRectSelectData:subRectData,RectSelectPaint:paint};event.Callback(event,data,this);}return true;};this.ClearRectSelect=function(bEnforce){var paint=this.GetRectSelectPaint();if(!paint)return false;if(bEnforce)paint.PreventClose=false;return paint.ClearPoint();};//删除指定窗口的所有叠加指标
1960
1966
  this.DeleteWindowsOverlayIndex=function(windowIndex){if(!IFrameSplitOperator.IsNumber(windowIndex))return;if(windowIndex<0||windowIndex>=this.Frame.SubFrame.length)return;var subFrame=this.Frame.SubFrame[windowIndex];if(!IFrameSplitOperator.IsNonEmptyArray(subFrame.OverlayIndex))return;var aryIndexID=[];for(var i=0;i<subFrame.OverlayIndex.length;++i){var overlayItem=subFrame.OverlayIndex[i];aryIndexID.push(overlayItem.Identify);for(var j=0;j<overlayItem.ChartPaint.length;++j)//图形销毁事件
@@ -2018,7 +2024,7 @@ this.UpdateFrameMaxMin();//调整坐标最大 最小值
2018
2024
  this.Draw();break;case JSCHART_MENU_ID.CMD_ENABLE_OVERLAY_SHARE_Y_ID:if(!srcParam||!IFrameSplitOperator.IsNumber(aryArgs[1]))return false;if(!this.GetOverlayIndexByIdentify)return false;var indexGuid=srcParam,showType=aryArgs[1];var finder=this.GetOverlayIndexByIdentify(indexGuid);if(!finder||!finder.OverlayItem)return false;var frame=finder.OverlayItem.Frame;if(showType==1)frame.IsShareY=false;else if(showType==2)frame.IsShareY==true;else frame.IsShareY=!frame.IsShareY;this.UpdataDataoffset();//更新数据偏移
2019
2025
  this.UpdateFrameMaxMin();//调整坐标最大 最小值
2020
2026
  this.Draw();break;case JSCHART_MENU_ID.CMD_CHANGE_DEFAULTCURSOR_ID:if(!IFrameSplitOperator.IsString(srcParam))return;this.DefaultCursor=srcParam;this.UIElement.style.cursor=this.DefaultCursor;break;case JSCHART_MENU_ID.CMD_ADD_OVERLAY_INDEX_ID://叠加指标 0=windowIndex, 1=indexinfo
2021
- if(param==null||!aryArgs[1])return false;var obj=aryArgs[1];obj.WindowIndex=param;this.AddOverlayIndex(obj);break;case JSCHART_MENU_ID.CMD_CHANGE_LANGUAGE_ID:if(srcParam)this.SetLanguage(srcParam);break;}};this.GetShowIndexMenuData=function(windowIndex,showType){var script=this.WindowIndex[windowIndex];if(!script)return null;var data={Name:script.IsShow?"隐藏指标":"显示指标",Data:{ID:JSCHART_MENU_ID.CMD_SHOW_INDEX_ID,Args:[windowIndex,0]}};return data;};this.GetShowOverlayIndexMenuData=function(indexGuid,showType){var overlay=this.GetOverlayIndexByIdentify(indexGuid);if(!overlay||!overlay.OverlayItem||!overlay.OverlayItem.Script)return null;var script=overlay.OverlayItem.Script;var data={Name:script.IsShow?"隐藏指标":"显示指标",Data:{ID:JSCHART_MENU_ID.CMD_SHOW_OVERLAY_INDEX_ID,Args:[indexGuid,0]}};return data;};this.GetShowOverlayIndexYAxisMenuData=function(indexGuid,showType){var overlay=this.GetOverlayIndexByIdentify(indexGuid);if(!overlay||!overlay.OverlayItem||!overlay.OverlayItem.Script)return null;var frame=overlay.OverlayItem.Frame;var data={Name:frame.IsShow?"隐藏Y轴":"显示Y轴",Data:{ID:JSCHART_MENU_ID.CMD_SHOW_OVERLAY_Y_AXIS_ID,Args:[indexGuid,0]}};return data;};this.GetOverlayIndexShareYMenuData=function(indexGuid,showType){var overlay=this.GetOverlayIndexByIdentify(indexGuid);if(!overlay||!overlay.OverlayItem||!overlay.OverlayItem.Script)return null;var frame=overlay.OverlayItem.Frame;var data={Name:"公用窗口Y轴",Data:{ID:JSCHART_MENU_ID.CMD_ENABLE_OVERLAY_SHARE_Y_ID,Args:[indexGuid,0]},Checked:frame.IsShareY};return data;};//点击右键菜单
2027
+ if(param==null||!aryArgs[1])return false;var obj=aryArgs[1];obj.WindowIndex=param;this.AddOverlayIndex(obj);break;case JSCHART_MENU_ID.CMD_CHANGE_LANGUAGE_ID:if(srcParam)this.SetLanguage(srcParam);break;case JSCHART_MENU_ID.CMD_CHANGE_DRAG_RECT_SHOW_MODE_ID:if(param!=null){if(this.ChartDragSelectRect)this.ChartDragSelectRect.ShowMode=param;}break;}};this.GetShowIndexMenuData=function(windowIndex,showType){var script=this.WindowIndex[windowIndex];if(!script)return null;var data={Name:script.IsShow?"隐藏指标":"显示指标",Data:{ID:JSCHART_MENU_ID.CMD_SHOW_INDEX_ID,Args:[windowIndex,0]}};return data;};this.GetShowOverlayIndexMenuData=function(indexGuid,showType){var overlay=this.GetOverlayIndexByIdentify(indexGuid);if(!overlay||!overlay.OverlayItem||!overlay.OverlayItem.Script)return null;var script=overlay.OverlayItem.Script;var data={Name:script.IsShow?"隐藏指标":"显示指标",Data:{ID:JSCHART_MENU_ID.CMD_SHOW_OVERLAY_INDEX_ID,Args:[indexGuid,0]}};return data;};this.GetShowOverlayIndexYAxisMenuData=function(indexGuid,showType){var overlay=this.GetOverlayIndexByIdentify(indexGuid);if(!overlay||!overlay.OverlayItem||!overlay.OverlayItem.Script)return null;var frame=overlay.OverlayItem.Frame;var data={Name:frame.IsShow?"隐藏Y轴":"显示Y轴",Data:{ID:JSCHART_MENU_ID.CMD_SHOW_OVERLAY_Y_AXIS_ID,Args:[indexGuid,0]}};return data;};this.GetOverlayIndexShareYMenuData=function(indexGuid,showType){var overlay=this.GetOverlayIndexByIdentify(indexGuid);if(!overlay||!overlay.OverlayItem||!overlay.OverlayItem.Script)return null;var frame=overlay.OverlayItem.Frame;var data={Name:"公用窗口Y轴",Data:{ID:JSCHART_MENU_ID.CMD_ENABLE_OVERLAY_SHARE_Y_ID,Args:[indexGuid,0]},Checked:frame.IsShareY};return data;};//点击右键菜单
2022
2028
  this.OnClickRightMenu=function(data){JSConsole.Chart.Log('[JSChartContainer::OnClickRightMenu] ',data);if(!data||!data.Data)return;var cmdID=data.Data.ID;//命令ID
2023
2029
  var aryArgs=data.Data.Args;//参数
2024
2030
  var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_MENU_COMMAND);//回调通知外部
@@ -2026,7 +2032,7 @@ if(event&&event.Callback){var data={PreventDefault:false,CommandID:cmdID,Args:ar
2026
2032
  this.CreateChartPaintExtend=function(chart,windowIndex){if(windowIndex<0)return false;var subFrame=this.Frame.SubFrame[windowIndex];if(!subFrame||!subFrame.Frame)return false;var frame=subFrame.Frame;chart.Canvas=this.Canvas;chart.ChartBorder=frame.ChartBorder;chart.ChartFrame=frame;this.ChartPaintEx.push(chart);return true;};//删除指标窗口扩展图形 option={ ChartID:图形ID, WindowIndex:窗口 }
2027
2033
  this.DeleteChartPaintExtend=function(option,bCallDestroy){if(!option)return;if(!IFrameSplitOperator.IsNonEmptyArray(this.ChartPaintEx))return;if(IFrameSplitOperator.IsNumber(option.WindowIndex)){var windowIndex=option.WindowIndex;if(!this.Frame.SubFrame[windowIndex])return;var subFrame=this.Frame.SubFrame[windowIndex].Frame;if(!subFrame)return;var paint=[];//踢出当前窗口的指标画法
2028
2034
  var deleteCount=0;for(var i=0;i<this.ChartPaintEx.length;++i){var item=this.ChartPaintEx[i];var bFind=item.ChartFrame.Guid==subFrame.Guid||item.ChartFrame==subFrame;if(!bFind){paint.push(item);}else{++deleteCount;if(bCallDestroy===true){if(item&&item.OnDestroy)item.OnDestroy();//图形销毁
2029
- }}}if(deleteCount>0)this.ChartPaintEx=paint;}};this.ClearCurrnetDrawPicture=function(){this.CurrentChartDrawPicture=null;};}function GetDevicePixelRatio(){if(typeof window=='undefined')return 1;return window.devicePixelRatio||1;}function GetFontHeight(context,font,word){if(!context)return null;if(font)context.font=font;var text='擎';if(IFrameSplitOperator.IsString(word))text=word;var fontInfo=context.measureText(text);var textHeight=fontInfo.fontBoundingBoxAscent+fontInfo.fontBoundingBoxDescent;if(!IFrameSplitOperator.IsNumber(textHeight))textHeight=fontInfo.width+2*GetDevicePixelRatio();return textHeight;}function IsPhoneWeb(){var userAgentInfo=navigator.userAgent;var Agents=new Array("Android","iPhone","SymbianOS","Windows Phone","iPad","iPod");for(var v=0;v<Agents.length;v++){if(userAgentInfo.indexOf(Agents[v])>0)return true;}return false;}function OnKeyDown(e)//键盘事件
2035
+ }}}if(deleteCount>0)this.ChartPaintEx=paint;}};this.ClearCurrnetDrawPicture=function(){this.CurrentChartDrawPicture=null;};this.CreateDragSelectRect=function(option){var chart=g_ExtendChartPaintFactory.Create("RectDragPaint",option);if(!chart)return null;if(option&&option.Enable===true)chart.Enable=true;chart.ChartBorder=this.Frame.ChartBorder;chart.ChartFrame=this.Frame;chart.HQChart=this;chart.SetOption(option);this.ChartDragSelectRect=chart;};this.ClearDragSelectRect=function(){if(!this.ChartDragSelectRect)return;this.ChartDragSelectRect.ClearPoint();};this.ShowDragSelectRect=function(ptStart,ptEnd){if(!this.ChartDragSelectRect)return;this.ChartDragSelectRect.SetFirstPoint(ptStart.X,ptStart.Y);this.ChartDragSelectRect.SetSecondPoint(ptEnd.X,ptEnd.Y);this.ChartDragSelectRect.Draw();};}function GetDevicePixelRatio(){if(typeof window=='undefined')return 1;return window.devicePixelRatio||1;}function GetFontHeight(context,font,word){if(!context)return null;if(font)context.font=font;var text='擎';if(IFrameSplitOperator.IsString(word))text=word;var fontInfo=context.measureText(text);var textHeight=fontInfo.fontBoundingBoxAscent+fontInfo.fontBoundingBoxDescent;if(!IFrameSplitOperator.IsNumber(textHeight))textHeight=fontInfo.width+2*GetDevicePixelRatio();return textHeight;}function IsPhoneWeb(){var userAgentInfo=navigator.userAgent;var Agents=new Array("Android","iPhone","SymbianOS","Windows Phone","iPad","iPod");for(var v=0;v<Agents.length;v++){if(userAgentInfo.indexOf(Agents[v])>0)return true;}return false;}function OnKeyDown(e)//键盘事件
2030
2036
  {if(this.JSChartContainer&&this.JSChartContainer.OnKeyDown)this.JSChartContainer.OnKeyDown(e);}function OnWheel(e)//上下滚动事件
2031
2037
  {if(this.JSChartContainer&&this.JSChartContainer.OnWheel)this.JSChartContainer.OnWheel(e);}function ToFixed(number,precision){var b=1;if(isNaN(number))return number;if(number<0)b=-1;var multiplier=Math.pow(10,precision);var value=Math.round(Math.abs(number)*multiplier)/multiplier*b;if(/^(\d+(?:\.\d+)?)(e)([\-]?\d+)$/.test(value))var s=value.toFixed2(precision);else var s=value.toString();var rs=s.indexOf('.');if(rs<0&&precision>0){rs=s.length;s+='.';}while(s.length<=rs+precision){s+='0';}return s;}Number.prototype.toFixed2=Number.prototype.toFixed;//备份下老的
2032
2038
  Number.prototype.toFixed=function(precision){return ToFixed(this,precision);};function Guid(){function S4(){return((1+Math.random())*0x10000|0).toString(16).substring(1);}return"guid"+(S4()+S4()+"-"+S4()+"-"+S4()+"-"+S4()+"-"+S4()+S4()+S4());}function GetScrollPosition(){var scrollPos={};var scrollTop=0;var scrollLeft=0;if(document.documentElement&&(document.documentElement.scrollTop||document.documentElement.scrollLeft)){scrollTop=document.documentElement.scrollTop;scrollLeft=document.documentElement.scrollLeft;}else if(document.body){scrollTop=document.body.scrollTop;scrollLeft=document.body.scrollLeft;}scrollPos.Top=scrollTop;scrollPos.Left=scrollLeft;return scrollPos;}//修正线段有毛刺
@@ -2864,6 +2870,7 @@ this.Unchanged;//平盘
2864
2870
  this.ExtendData;//扩展数据
2865
2871
  this.BFactor;//前复权
2866
2872
  this.AFactor;//后复权
2873
+ this.RightSeed;//本地计算的复权系数
2867
2874
  /*
2868
2875
  {
2869
2876
  PriceOffset: 每个单元的价格间距,
@@ -2978,7 +2985,7 @@ if(ChartData.IsDayPeriod(period,false))return this.GetDayPeriodData(period);//if
2978
2985
  if(ChartData.IsMinutePeriod(period,false))return this.GetMinutePeriodData(period);};//复权 0 不复权 1 前复权 2 后复权
2979
2986
  this.GetRightData=function(right,option){var result=[];if(this.Data.length<=0)return result;if(option&&option.AlgorithmType==1)//使用复权因子计算
2980
2987
  {for(var i=0;i<this.Data.length;++i){var item=this.Data[i];var seed=right==1?item.BFactor:item.AFactor;result[i]=HistoryData.CopyRight(item,seed);}return result;}if(right==1){var index=this.Data.length-1;var seed=1;//复权系数
2981
- var yClose=this.Data[index].YClose;result[index]=HistoryData.Copy(this.Data[index]);for(--index;index>=0;--index){if(yClose!=this.Data[index].Close)break;result[index]=HistoryData.Copy(this.Data[index]);yClose=this.Data[index].YClose;}for(;index>=0;--index){var value=this.Data[index].Close;if(yClose!=value&&value!=0)seed*=yClose/value;result[index]=HistoryData.CopyRight(this.Data[index],seed);yClose=this.Data[index].YClose;}}else if(right==2){var index=0;var seed=1;var close=this.Data[index].Close;result[index]=HistoryData.Copy(this.Data[index]);for(++index;index<this.Data.length;++index){if(close!=this.Data[index].YClose)break;result[index]=HistoryData.Copy(this.Data[index]);close=this.Data[index].Close;}for(;index<this.Data.length;++index){if(close!=this.Data[index].YClose)seed*=close/this.Data[index].YClose;result[index]=HistoryData.CopyRight(this.Data[index],seed);close=this.Data[index].Close;}}return result;};this.GetRightDate=this.GetRightData;//叠加数据和主数据拟合,去掉主数据没有日期的数据
2988
+ var yClose=this.Data[index].YClose;result[index]=HistoryData.Copy(this.Data[index]);result[index].RightSeed=seed;for(--index;index>=0;--index){if(yClose!=this.Data[index].Close)break;var newItem=HistoryData.Copy(this.Data[index]);newItem.RightSeed=seed;result[index]=newItem;yClose=this.Data[index].YClose;}for(;index>=0;--index){var value=this.Data[index].Close;if(yClose!=value&&value!=0)seed*=yClose/value;var newItem=HistoryData.CopyRight(this.Data[index],seed);newItem.RightSeed=seed;result[index]=newItem;yClose=this.Data[index].YClose;}}else if(right==2){var index=0;var seed=1;var close=this.Data[index].Close;result[index]=HistoryData.Copy(this.Data[index]);result[index].RightSeed=seed;for(++index;index<this.Data.length;++index){if(close!=this.Data[index].YClose)break;var newItem=HistoryData.Copy(this.Data[index]);newItem.RightSeed=seed;result[index]=newItem;close=this.Data[index].Close;}for(;index<this.Data.length;++index){if(close!=this.Data[index].YClose)seed*=close/this.Data[index].YClose;var newItem=HistoryData.CopyRight(this.Data[index],seed);newItem.RightSeed=seed;result[index]=newItem;close=this.Data[index].Close;}}return result;};this.GetRightDate=this.GetRightData;//叠加数据和主数据拟合,去掉主数据没有日期的数据
2982
2989
  this.GetOverlayData=function(overlayData,bApiPeriod){var result=[];for(var i=0,j=0;i<this.Data.length;){var date=this.Data[i].Date;if(j>=overlayData.length){result[i]=new HistoryData();result[i].Date=date;++i;continue;;}var overlayDate=overlayData[j].Date;if(overlayDate==date){result[i]=new HistoryData();result[i].Date=overlayData[j].Date;result[i].YClose=overlayData[j].YClose;result[i].Open=overlayData[j].Open;result[i].High=overlayData[j].High;result[i].Low=overlayData[j].Low;result[i].Close=overlayData[j].Close;result[i].Vol=overlayData[j].Vol;result[i].Amount=overlayData[j].Amount;//涨跌家数数据
2983
2990
  result[i].Stop=overlayData[j].Stop;result[i].Up=overlayData[j].Up;result[i].Down=overlayData[j].Down;result[i].Unchanged=overlayData[j].Unchanged;++j;++i;}else if(overlayDate<date){++j;}else{result[i]=new HistoryData();result[i].Date=date;++i;}}return result;};this.GetOverlayMinuteData=function(overlayData,bApiPeriod){var result=[];for(var i=0,j=0;i<this.Data.length;){var date=this.Data[i].Date;var time=this.Data[i].Time;if(j>=overlayData.length){result[i]=new HistoryData();result[i].Date=date;result[i].Time=time;++i;continue;;}var overlayDate=overlayData[j].Date;var overlayTime=overlayData[j].Time;if(overlayDate==date&&overlayTime==time){result[i]=new HistoryData();result[i].Date=overlayData[j].Date;result[i].Time=overlayData[j].Time;result[i].YClose=overlayData[j].YClose;result[i].Open=overlayData[j].Open;result[i].High=overlayData[j].High;result[i].Low=overlayData[j].Low;result[i].Close=overlayData[j].Close;result[i].Vol=overlayData[j].Vol;result[i].Amount=overlayData[j].Amount;//涨跌家数数据
2984
2991
  result[i].Stop=overlayData[j].Stop;result[i].Up=overlayData[j].Up;result[i].Down=overlayData[j].Down;result[i].Unchanged=overlayData[j].Unchanged;++j;++i;}else if(overlayDate<date||overlayDate==date&&overlayTime<time){++j;}else{result[i]=new HistoryData();result[i].Date=date;result[i].Time=time;++i;}}return result;};/*
@@ -3707,7 +3714,12 @@ this.DrawStraightLine=function(){var firstData=this.GetFirstVaildIndex();if(!fir
3707
3714
  var bFirstPoint=true;var drawCount=0,rate=0;for(var i=firstData.DataOffset,j=firstData.Index;i<this.Data.Data.length&&j<xPointCount;++i,++j){var value=this.Data.Data[i];if(value==null){if(drawCount>0)this.Canvas.stroke();bFirstPoint=true;drawCount=0;continue;}var x=this.ChartFrame.GetXFromIndex(j);var diff=value-firstData.OverlayValue;if(firstData.OverlayValue!=0)rate=1+diff/Math.abs(firstData.OverlayValue);else rate=1+diff;var fixedValue=firstData.MainValue*rate;//var fixedValue=value/firstData.OverlayValue*firstData.MainValue;
3708
3715
  var y=this.GetYFromData(fixedValue);if(x>chartright)break;if(bFirstPoint){this.Canvas.beginPath();if(bHScreen)this.Canvas.moveTo(y,x);//横屏坐标轴对调
3709
3716
  else this.Canvas.moveTo(x,y);bFirstPoint=false;}else{if(bHScreen)this.Canvas.lineTo(y,x);else this.Canvas.lineTo(x,y);}++drawCount;}if(drawCount>0)this.Canvas.stroke();this.Canvas.restore();};this.GetMaxMin=function(){var xPointCount=this.ChartFrame.XPointCount;var range={};range.Min=null;range.Max=null;var firstData=this.GetFirstVaildIndex();if(!firstData)return range;for(var i=firstData.DataOffset,j=firstData.Index;i<this.Data.Data.length&&j<xPointCount;++i,++j){var overlayValue=this.Data.Data[i];if(!IFrameSplitOperator.IsNumber(overlayValue))continue;var diff=overlayValue-firstData.OverlayValue;if(firstData.OverlayValue!=0)rate=1+diff/Math.abs(firstData.OverlayValue);else rate=1+diff;var value=firstData.MainValue*rate;//var value=overlayValue/firstData.OverlayValue*firstData.MainValue;
3710
- if(range.Max==null)range.Max=value;if(range.Min==null)range.Min=value;if(range.Max<value)range.Max=value;if(range.Min>value)range.Min=value;}return range;};}//彩色线段
3717
+ if(range.Max==null)range.Max=value;if(range.Min==null)range.Min=value;if(range.Max<value)range.Max=value;if(range.Min>value)range.Min=value;}return range;};}//独立线段
3718
+ function ChartSingleLine(){this.newMethod=ChartLine;//派生
3719
+ this.newMethod();delete this.newMethod;this.ClassName='ChartSingleLine';//类名
3720
+ this.MaxMin=null;//当前的显示范围
3721
+ this.Draw=function(){this.MaxMin=null;if(!this.IsShow||this.ChartFrame.IsMinSize||!this.IsVisible)return;if(this.IsShowIndexTitleOnly())return;if(this.IsHideScriptIndex())return;if(!this.Data||!this.Data.Data)return;this.MaxMin=this.GetCurrentMaxMin();if(!this.MaxMin)return;if(!IFrameSplitOperator.IsNumber(this.MaxMin.Max)||!IFrameSplitOperator.IsNumber(this.MaxMin.Min))return;switch(this.DrawType){default:return this.DrawStraightLine();}};//获取当前页的最大最小值
3722
+ this.GetCurrentMaxMin=function(){var xPointCount=this.ChartFrame.XPointCount;var range={Max:null,Min:null};for(var i=this.Data.DataOffset,j=0;i<this.Data.Data.length&&j<xPointCount;++i,++j){var value=this.Data.Data[i];if(!IFrameSplitOperator.IsNumber(value))continue;if(range.Max==null)range.Max=value;if(range.Min==null)range.Min=value;if(range.Max<value)range.Max=value;if(range.Min>value)range.Min=value;}return range;};this.GetMaxMin=function(){return{Max:null,Min:null};};this.GetYFromData=function(value){var bHScreen=this.ChartFrame.IsHScreen===true;if(bHScreen){if(value<=this.MaxMin.Min)return this.ChartBorder.GetLeftEx();if(value>=this.MaxMin.Max)return this.ChartBorder.GetRightEx();var width=this.ChartBorder.GetWidthEx()*(value-this.MaxMin.Min)/(this.MaxMin.Max-this.MaxMin.Min);return this.ChartBorder.GetLeftEx()+width;}else{if(value<=this.MaxMin.Min)return this.ChartBorder.GetBottomEx();if(value>=this.MaxMin.Max)return this.ChartBorder.GetTopEx();var height=this.ChartBorder.GetHeightEx()*(value-this.MaxMin.Min)/(this.MaxMin.Max-this.MaxMin.Min);return this.ChartBorder.GetBottomEx()-height;}};}//彩色线段
3711
3723
  function ChartPartLine(){this.newMethod=IChartPainting;//派生
3712
3724
  this.newMethod();delete this.newMethod;this.ClassName='ChartPartLine';//类名
3713
3725
  this.LineWidth;//线段宽度
@@ -3892,7 +3904,7 @@ this.Source;//原始分钟数据
3892
3904
  this.PtInChart=this.PtInLine;this.DrawSelectedStatus=this.DrawLinePoint;this.PtInChart=this.PtInLine;this.DrawSelectedStatus=this.DrawLinePoint;this.DayOffset;this.LastPoint={};//最后一个点的信息 {X, Y, Data:, Value:, DateTime:YYYYMMDDHHMMSS }
3893
3905
  this.FFMChart;//定制图形
3894
3906
  this.DrawType=0;//0=走势图 14=定制图形
3895
- this.UpdateLastPoint=function(dateTime,x,y,item){if(IFrameSplitOperator.IsNumber(this.LastPoint.DateTime)&&this.LastPoint.DateTime>dateTime)return;this.LastPoint.DateTime=dateTime;this.LastPoint.X=x;this.LastPoint.Y=y;this.LastPoint.Data=item;this.LastPoint.Value=item.Value;};this.Draw=function(){if(this.NotSupportMessage){this.DrawNotSupportmessage();return;}this.LastPoint={};if(!this.IsShow)return;if(this.DrawType==14){if(this.FFMChart&&this.FFMChart.Draw)this.FFMChart.Draw(this);return;}var isHScreen=this.ChartFrame.IsHScreen===true;var dataWidth=this.ChartFrame.DataWidth;var distanceWidth=this.ChartFrame.DistanceWidth;var chartright=this.ChartBorder.GetRight();if(isHScreen===true)chartright=this.ChartBorder.GetBottom();var xPointCount=this.ChartFrame.XPointCount;var minuteCount=this.ChartFrame.MinuteCount;var bottom=this.ChartBorder.GetBottomEx();var left=this.ChartBorder.GetLeftEx();var data=this.Data;this.DrawBeforeOpen();//盘前
3907
+ this.UpdateLastPoint=function(dateTime,x,y,item){if(IFrameSplitOperator.IsNumber(this.LastPoint.DateTime)&&this.LastPoint.DateTime>dateTime)return;this.LastPoint.DateTime=dateTime;this.LastPoint.X=x;this.LastPoint.Y=y;this.LastPoint.Data=item;this.LastPoint.Value=item.Value;};this.Draw=function(){if(this.NotSupportMessage){this.DrawNotSupportmessage();return;}this.LastPoint={};if(!this.IsShow)return;if(this.DrawType==14){if(this.FFMChart&&this.FFMChart.Draw)this.FFMChart.Draw(this);return;}var isHScreen=this.ChartFrame.IsHScreen===true;var dataWidth=this.ChartFrame.DataWidth;var distanceWidth=this.ChartFrame.DistanceWidth;var chartright=this.ChartBorder.GetRight();if(isHScreen===true)chartright=this.ChartBorder.GetBottom();var xPointCount=this.ChartFrame.XPointCount;var minuteCount=this.ChartFrame.MinuteCount;var bottom=this.ChartBorder.GetBottom();var left=this.ChartBorder.GetLeft();var data=this.Data;this.DrawBeforeOpen();//盘前
3896
3908
  this.DrawMultiDayBeforeOpen();if(this.IsShowLead)this.DrawLead();//领先指标
3897
3909
  if(!data)return;var bFirstPoint=true;var ptFirst={};//第1个点
3898
3910
  var drawCount=0;var pointCount=0;this.Canvas.save();if(IFrameSplitOperator.IsPlusNumber(this.LineWidth>0))this.Canvas.lineWidth=this.LineWidth;for(var i=data.DataOffset,j=0;i<data.Data.length&&j<xPointCount;++i,++j){var value=null;value=data.Data[i];++pointCount;if(value==null)continue;var x=this.ChartFrame.GetXFromIndex(j);var y=this.ChartFrame.GetYFromData(value);if(bFirstPoint){this.Canvas.strokeStyle=this.Color;this.Canvas.beginPath();if(isHScreen)this.Canvas.moveTo(y,x);else this.Canvas.moveTo(x,y);bFirstPoint=false;ptFirst={X:x,Y:y};}else{if(isHScreen)this.Canvas.lineTo(y,x);else this.Canvas.lineTo(x,y);}if(this.Source){var item=this.Source.Data[i];var dateTime=item.Date*1000000+item.Time*100;this.UpdateLastPoint(dateTime,x,y,{Value:value,Index:i,Date:item.Date,Time:item.Time,Type:0,Explain:"盘中"});}++drawCount;if(pointCount>=minuteCount)//上一天的数据和这天地数据线段要断开
@@ -4184,7 +4196,7 @@ this.newMethod();delete this.newMethod;this.ClassName="ChartOrderbookDepth";this
4184
4196
  };this.BidColor={Line:g_JSChartResource.DepthChart.BidColor.Line,Area:g_JSChartResource.DepthChart.BidColor.Area//买
4185
4197
  };this.LineWidth=g_JSChartResource.DepthChart.LineWidth;this.Draw=function(){if(!this.Data)return;var lineWidthBackup=this.Canvas.lineWidth;this.Canvas.lineWidth=this.LineWidth*GetDevicePixelRatio();this.DrawArea(this.Data.Bids,this.BidColor.Line,this.BidColor.Area,true);this.DrawArea(this.Data.Asks,this.AskColor.Line,this.AskColor.Area,false);this.Canvas.lineWidth=lineWidthBackup;};this.DrawArea=function(aryData,colorLine,colorArea,isLeft){var xRange=this.ChartFrame.VerticalRange;var aryPoint=[];for(var i in aryData){var item=aryData[i];if(isLeft){if(item.Price<xRange.Min)break;}else{if(item.Price>xRange.Max)break;}var x=this.ChartFrame.GetXFromIndex(item.Price);var y=this.ChartFrame.GetYFromData(item.Vol);aryPoint.push({X:x,Y:y});}if(aryPoint.length<=1)return;var left=this.ChartBorder.GetLeft();var bottom=this.ChartBorder.GetBottom();var right=this.ChartBorder.GetRight();this.Canvas.beginPath();this.Canvas.moveTo(aryPoint[0].X,bottom);for(var i in aryPoint){var item=aryPoint[i];this.Canvas.lineTo(item.X,item.Y);}this.Canvas.lineTo(isLeft?left:right,aryPoint[aryPoint.length-1].Y);this.Canvas.lineTo(isLeft?left:right,bottom);this.Canvas.lineTo(aryPoint[0].X,bottom);this.Canvas.closePath();this.Canvas.fillStyle=colorArea;this.Canvas.fill();this.Canvas.beginPath();this.Canvas.moveTo(aryPoint[0].X,bottom);for(var i in aryPoint){var item=aryPoint[i];this.Canvas.lineTo(item.X,item.Y);}this.Canvas.lineTo(isLeft?left:right,aryPoint[aryPoint.length-1].Y);this.Canvas.strokeStyle=colorLine;this.Canvas.stroke();};this.GetMaxMin=function(){var range={Min:null,Max:null,XMin:null,XMax:null};var xRange=this.ChartFrame.VerticalRange;for(var i in this.Data.Asks){var item=this.Data.Asks[i];if(item.Price>xRange.Max)break;if(range.XMin==null||range.XMin>item.Price)range.XMin=item.Price;if(range.XMax==null||range.XMax<item.Price)range.XMax=item.Price;if(range.Min==null||range.Min>item.Vol)range.Min=item.Vol;if(range.Max==null||range.Max<item.Vol)range.Max=item.Vol;}for(var i in this.Data.Bids){var item=this.Data.Bids[i];if(item.Price<xRange.Min)break;if(range.XMin==null||range.XMin>item.Price)range.XMin=item.Price;if(range.XMax==null||range.XMax<item.Price)range.XMax=item.Price;if(range.Min==null||range.Min>item.Vol)range.Min=item.Vol;if(range.Max==null||range.Max<item.Vol)range.Max=item.Vol;}return range;};}/*
4186
4198
  扩展图形
4187
- */function ExtendChartPaintFactory(){this.DataMap=new _map2.default([["FrameSplitPaint",{Create:function Create(){return new FrameSplitPaint();}}],["RectSelectPaint",{Create:function Create(){return new RectSelectPaint();}}],["DragMovePaint",{Create:function Create(){return new DragMovePaint();}}],["SessionBreaksPaint",{Create:function Create(){return new SessionBreaksPaint();}}],["FrameButtomToolbarPaint",{Create:function Create(){return new FrameButtomToolbarPaint();}}]]);this.SetCallbackDraw=new _set2.default();this.Create=function(name){if(!this.DataMap.has(name))return null;var item=this.DataMap.get(name);return item.Create();};this.Add=function(name,option){this.DataMap.set(name,{Create:option.Create});};this.AddCallbackDrawClassName=function(className){if(!className)return;this.SetCallbackDraw.add(className);};this.IsCallbackDraw=function(className){return this.SetCallbackDraw.has(className);};}var g_ExtendChartPaintFactory=new ExtendChartPaintFactory();function IExtendChartPainting(){this.Canvas;//画布
4199
+ */function ExtendChartPaintFactory(){this.DataMap=new _map2.default([["FrameSplitPaint",{Create:function Create(){return new FrameSplitPaint();}}],["RectSelectPaint",{Create:function Create(){return new RectSelectPaint();}}],["RectDragPaint",{Create:function Create(){return new RectDragPaint();}}],["DragMovePaint",{Create:function Create(){return new DragMovePaint();}}],["SessionBreaksPaint",{Create:function Create(){return new SessionBreaksPaint();}}],["FrameButtomToolbarPaint",{Create:function Create(){return new FrameButtomToolbarPaint();}}]]);this.SetCallbackDraw=new _set2.default();this.Create=function(name){if(!this.DataMap.has(name))return null;var item=this.DataMap.get(name);return item.Create();};this.Add=function(name,option){this.DataMap.set(name,{Create:option.Create});};this.AddCallbackDrawClassName=function(className){if(!className)return;this.SetCallbackDraw.add(className);};this.IsCallbackDraw=function(className){return this.SetCallbackDraw.has(className);};}var g_ExtendChartPaintFactory=new ExtendChartPaintFactory();function IExtendChartPainting(){this.Canvas;//画布
4188
4200
  this.ChartBorder;//边框信息
4189
4201
  this.ChartFrame;//框架画法
4190
4202
  this.Name;//名称
@@ -4628,7 +4640,15 @@ this.Canvas.beginPath();this.Canvas.moveTo(left,item.Top);this.Canvas.lineTo(lef
4628
4640
  return { Index:-1, Type:3, Self:this };
4629
4641
  }
4630
4642
  }
4631
- */return null;};this.DrawArea=function(startPoint,endPoint,startDate,startEnd,color,type){if(!startDate||!startEnd||!this.StartDate||!this.EndDate)return;var aryArea;if(startPoint&&endPoint)aryArea=[startPoint,endPoint];else if(!startPoint&&endPoint)aryArea=[startDate,endPoint];else if(startPoint&&!endPoint)aryArea=[startPoint,startEnd];else if(startDate.Date>this.StartDate.Date&&startEnd.Date<this.EndDate.Date)aryArea=[startDate,startEnd];if(aryArea&&aryArea.length==2){var start=aryArea[0],end=aryArea[1];var left=ToFixedPoint(start.X);var right=ToFixedPoint(end.X);var drawWidth=right-left;var drawHeight=start.Bottom-start.Top;this.Canvas.fillStyle=color;this.Canvas.fillRect(left,start.Top,drawWidth,drawHeight);var rtArea={X:left,Y:start.Top,Right:right,Bottom:start.Top+drawHeight,Width:drawWidth,Height:drawHeight};if(IFrameSplitOperator.IsNumber(type))this.DragRect.push({Rect:rtArea,Type:type});}};}//深度图 支持横屏
4643
+ */return null;};this.DrawArea=function(startPoint,endPoint,startDate,startEnd,color,type){if(!startDate||!startEnd||!this.StartDate||!this.EndDate)return;var aryArea;if(startPoint&&endPoint)aryArea=[startPoint,endPoint];else if(!startPoint&&endPoint)aryArea=[startDate,endPoint];else if(startPoint&&!endPoint)aryArea=[startPoint,startEnd];else if(startDate.Date>this.StartDate.Date&&startEnd.Date<this.EndDate.Date)aryArea=[startDate,startEnd];if(aryArea&&aryArea.length==2){var start=aryArea[0],end=aryArea[1];var left=ToFixedPoint(start.X);var right=ToFixedPoint(end.X);var drawWidth=right-left;var drawHeight=start.Bottom-start.Top;this.Canvas.fillStyle=color;this.Canvas.fillRect(left,start.Top,drawWidth,drawHeight);var rtArea={X:left,Y:start.Top,Right:right,Bottom:start.Top+drawHeight,Width:drawWidth,Height:drawHeight};if(IFrameSplitOperator.IsNumber(type))this.DragRect.push({Rect:rtArea,Type:type});}};}//鼠标拖动选中区域
4644
+ function RectDragPaint(){this.newMethod=IExtendChartPainting;//派生
4645
+ this.newMethod();delete this.newMethod;this.ClassName='RectDragPaint';this.LineColor=g_JSChartResource.RectDrag.LineColor;//竖线
4646
+ this.LineWidth=g_JSChartResource.RectDrag.LineWidth;this.BGColor=g_JSChartResource.RectDrag.BGColor;this.ShowMode=0;//0=只画边框 1=遮挡未选中区域 2=整体全选
4647
+ this.Enable=false;this.FirstPoint;this.SecondPoint;this.IsClearCanvas=true;//画布是否是清空状态
4648
+ //设置参数接口
4649
+ this.SetOption=function(option){if(option){if(option.LineColor)this.LineColor=option.LineColor;if(option.BGColor)this.BGColor=option.BGColor;if(IFrameSplitOperator.IsNumber(option.ShowMode))this.ShowMode=option.ShowMode;}};this.ReloadResource=function(resource){this.LineColor=g_JSChartResource.RectDrag.LineColor;//竖线
4650
+ this.LineWidth=g_JSChartResource.RectDrag.LineWidth;this.BGColor=g_JSChartResource.RectDrag.BGColor;//面积
4651
+ };this.ClearPoint=function(){this.FirstPoint=null;this.SecondPoint=null;if(!this.IsClearCanvas)this.Draw();};this.SetFirstPoint=function(x,y){this.FirstPoint={X:x,Y:y};};this.SetSecondPoint=function(x,y){this.SecondPoint={X:x,Y:y};};this.DrawSelectedBorderMode=function(rtSelect){this.Canvas.strokeStyle=this.LineColor;this.Canvas.strokeRect(ToFixedPoint(rtSelect.Left),ToFixedPoint(rtSelect.Top),ToFixedRect(rtSelect.Width),ToFixedRect(rtSelect.Height));};this.DrawUnselectedMaskMode=function(rtSelect,rtClient){if(this.BGColor){this.Canvas.save();var clipPath=new Path2D();clipPath.rect(rtClient.Left,rtClient.Top,rtClient.Width,rtSelect.Top-rtClient.Top);var leftPath=new Path2D();leftPath.rect(rtClient.Left,rtSelect.Top,rtSelect.Left-rtClient.Left,rtSelect.Height);clipPath.addPath(leftPath);var rightPath=new Path2D();rightPath.rect(rtSelect.Right,rtSelect.Top,rtClient.Right-rtSelect.Right,rtSelect.Height);clipPath.addPath(rightPath);var bottmPath=new Path2D();bottmPath.rect(rtClient.Left,rtSelect.Bottom,rtClient.Width,rtClient.Bottom-rtSelect.Bottom);clipPath.addPath(bottmPath);this.Canvas.clip(clipPath);this.Canvas.fillStyle=this.BGColor;this.Canvas.fillRect(rtClient.Left,rtClient.Top,rtClient.Width,rtClient.Height);this.Canvas.restore();}this.Canvas.strokeStyle=this.LineColor;this.Canvas.strokeRect(ToFixedPoint(rtSelect.Left),ToFixedPoint(rtSelect.Top),ToFixedRect(rtSelect.Width),ToFixedRect(rtSelect.Height));};this.DrawFullselectedMode=function(rtSelect,rtClient){if(this.BGColor){this.Canvas.save();var clipPath=new Path2D();clipPath.rect(rtClient.Left,rtClient.Top,rtSelect.Left-rtClient.Left,rtClient.Height);var rightPath=new Path2D();rightPath.rect(rtSelect.Right,rtClient.Top,rtClient.Right-rtSelect.Right,rtClient.Height);clipPath.addPath(rightPath);this.Canvas.clip(clipPath);this.Canvas.fillStyle=this.BGColor;this.Canvas.fillRect(rtClient.Left,rtClient.Top,rtClient.Width,rtClient.Height);this.Canvas.restore();}this.Canvas.strokeStyle=this.LineColor;this.Canvas.strokeRect(ToFixedPoint(rtSelect.Left),ToFixedPoint(rtClient.Top),ToFixedRect(rtSelect.Width),ToFixedRect(rtClient.Height));};this.Draw=function(){if(!this.Enable)return;if(!this.HQChart)return;var finder=this.HQChart.GetExtraCanvas(JSChart.RectDragCanvasKey);if(!finder)return;this.Canvas=finder.Canvas;this.HQChart.ClearCanvas(this.Canvas);this.IsClearCanvas=true;if(!this.FirstPoint&&!this.SecondPoint)return;var top=this.ChartBorder.GetTop();var bottom=this.ChartBorder.GetBottom();var left=this.ChartBorder.GetLeft();var right=this.ChartBorder.GetRight();var rtClient={Left:left,Top:top,Right:right,Bottom:bottom};rtClient.Width=rtClient.Right-rtClient.Left;rtClient.Height=rtClient.Bottom-rtClient.Top;var rtSelect={Left:Math.min(this.FirstPoint.X,this.SecondPoint.X),Right:Math.max(this.FirstPoint.X,this.SecondPoint.X),Top:Math.min(this.FirstPoint.Y,this.SecondPoint.Y),Bottom:Math.max(this.FirstPoint.Y,this.SecondPoint.Y)};if(rtSelect.Top<top)rtSelect.Top=top;else if(rtSelect.Top>bottom)rtSelect.Top=bottom;if(rtSelect.Bottom<top)rtSelect.Bottom=top;else if(rtSelect.Bottom>bottom)rtSelect.Bottom=bottom;if(rtSelect.Left<left)rtSelect.Left=left;else if(rtSelect.Left>right)rtSelect.Left=right;if(rtSelect.Right<left)rtSelect.Right=left;else if(rtSelect.Right>right)rtSelect.Right=right;rtSelect.Width=rtSelect.Right-rtSelect.Left;rtSelect.Height=rtSelect.Bottom-rtSelect.Top;switch(this.ShowMode){case 1:this.DrawUnselectedMaskMode(rtSelect,rtClient);break;case 2:this.DrawFullselectedMode(rtSelect,rtClient);break;default:this.DrawSelectedBorderMode(rtSelect);break;}this.IsClearCanvas=false;};}//深度图 支持横屏
4632
4652
  /*
4633
4653
  数据格式:
4634
4654
  [
@@ -5905,7 +5925,7 @@ if(moveonPoint&&mouseStatus){for(var i=0;i<this.AryButton.length;++i){var item=t
5905
5925
  if(labInfo.BGColor){this.Canvas.fillStyle=labInfo.BGColor;var rtTop=y-labSize.Height-4;this.Canvas.fillRect(ToFixedRect(drawLeft),ToFixedRect(rtTop),ToFixedRect(right+drawLeft),ToFixedRect(y-rtTop));}var yText=drawTop;for(var i=0;i<labInfo.AryText.length;++i){var item=labInfo.AryText[i];if(item.Name){this.Canvas.fillStyle=item.NameColor;this.Canvas.fillText(item.Name,drawLeft+1,yText+1);}if(item.Text){this.Canvas.fillStyle=item.TextColor;this.Canvas.fillText(item.Text,drawLeft+labSize.NameWidth+1,yText+1);}yText+=labSize.LineHeight;}};this.DrawRightLab=function(labInfo,rtLeftDraw){if(!labInfo)return;if(!IFrameSplitOperator.IsNonEmptyArray(labInfo.AryText))return;if(labInfo.Position!=2)return;var labSize=this.CalculateLabSize(labInfo);var drawLeft=rtLeftDraw.Right-labSize.Width;if(drawLeft<rtLeftDraw.Left)drawLeft=rtLeftDraw.Left;var drawRight=drawLeft+labSize.Width;var drawTop=rtLeftDraw.Bottom;var lineSpace=0;if(IFrameSplitOperator.IsNumber(labInfo.LineSpace))lineSpace=labInfo.LineSpace;//背景色
5906
5926
  var rtLab={Left:drawLeft,Top:drawTop,Width:labSize.Width,Height:labSize.Height};rtLab.Right=rtLab.Left+rtLab.Width;rtLab.Bottom=rtLab.Top+rtLab.Height;if(labInfo.BGColor){this.Canvas.fillStyle=labInfo.BGColor;this.Canvas.fillRect(ToFixedRect(rtLab.Left),ToFixedRect(rtLab.Top),ToFixedRect(rtLab.Width),ToFixedRect(rtLab.Height));}var yText=drawTop+1+lineSpace;this.Canvas.textBaseline="top";for(var i=0;i<labInfo.AryText.length;++i){var item=labInfo.AryText[i];if(item.Name){this.Canvas.textAlign="left";this.Canvas.fillStyle=item.NameColor;this.Canvas.fillText(item.Name,drawLeft+1,yText+1);}if(item.Text){this.Canvas.textAlign="right";this.Canvas.fillStyle=item.TextColor;this.Canvas.fillText(item.Text,drawRight-1,yText+1);}yText+=labSize.LineHeight+lineSpace;}this.DrawVerticalButton(rtLab);};this.DrawCustomHLine=function(labInfo,yLine){if(!labInfo)return;if(!IFrameSplitOperator.IsNonEmptyArray(labInfo.AryLine))return;var left=this.Frame.ChartBorder.GetLeft();var right=this.Frame.ChartBorder.GetRight();var pixelRatio=GetDevicePixelRatio();var yMax=yLine,yMin=yLine;for(var i=0;i<labInfo.AryLine.length;++i){var item=labInfo.AryLine[i];if(!IFrameSplitOperator.IsNumber(item.Value))continue;if(item.Width<0)continue;var y=this.Frame.GetYFromData(item.Value);var yFixed=ToFixedPoint(y);var xRight=right;if(IFrameSplitOperator.IsPlusNumber(item.Width)){if(item.Width<1)xRight=left+item.Width*(right-left);//0.3 百分比
5907
5927
  else xRight=left+item.Width*pixelRatio;//>1 实际数值就是长度
5908
- }if(item.Color)this.Canvas.strokeStyle=item.Color;else this.Canvas.strokeStyle=this.LineColor;this.Canvas.beginPath();this.Canvas.moveTo(left,yFixed);this.Canvas.lineTo(xRight,yFixed);this.Canvas.stroke();if(yMax<yFixed)yMax=yFixed;if(yMin>yFixed)yMin=yFixed;}if(yMax!=yMin&&labInfo.VLine){var item=labInfo.VLine;var x=left+20*pixelRatio;if(IFrameSplitOperator.IsNumber(item.XOffset))x=left+item.XOffset*pixelRatio;x=ToFixedPoint(x);if(item.Color)this.Canvas.strokeStyle=item.Color;else this.Canvas.strokeStyle=this.LineColor;this.Canvas.beginPath();this.Canvas.moveTo(x,yMax);this.Canvas.lineTo(x,yMin);this.Canvas.stroke();}};this.DrawValueText=function(y,rtDraw,labInfo){var left=this.Frame.ChartBorder.GetLeft();var right=this.Frame.ChartBorder.GetRight();var top=this.Frame.ChartBorder.GetTopEx();var bottom=this.Frame.ChartBorder.GetBottomEx();var pixelTatio=GetDevicePixelRatio();if(IFrameSplitOperator.IsNumber(labInfo.TopOffset))top-=labInfo.TopOffset;if(IFrameSplitOperator.IsNumber(labInfo.BottomOffset))bottom+=labInfo.BottomOffset;var yValue=this.Frame.GetYData(y,false);var strValue=yValue.toFixed(this.Precision);if(labInfo&&labInfo.PriceSuffixText)strValue+=labInfo.PriceSuffixText;var bVisibleRange=true;if(y<top){y=top;bVisibleRange=false;}else if(y>bottom){y=bottom;bVisibleRange=false;}if(this.RightSpaceWidth>0){if(!bVisibleRange)this.Canvas.setLineDash([2*pixelTatio,3*pixelTatio]);//虚线
5928
+ }if(item.Color)this.Canvas.strokeStyle=item.Color;else this.Canvas.strokeStyle=this.LineColor;this.Canvas.beginPath();this.Canvas.moveTo(left,yFixed);this.Canvas.lineTo(xRight,yFixed);this.Canvas.stroke();if(yMax<yFixed)yMax=yFixed;if(yMin>yFixed)yMin=yFixed;}if(yMax!=yMin&&labInfo.VLine){var item=labInfo.VLine;var x=left+20*pixelRatio;if(IFrameSplitOperator.IsNumber(item.XOffset))x=left+item.XOffset*pixelRatio;x=ToFixedPoint(x);if(item.Color)this.Canvas.strokeStyle=item.Color;else this.Canvas.strokeStyle=this.LineColor;this.Canvas.beginPath();this.Canvas.moveTo(x,yMax);this.Canvas.lineTo(x,yMin);this.Canvas.stroke();}};this.DrawValueText=function(y,rtDraw,labInfo){var left=this.Frame.ChartBorder.GetLeft();var right=this.Frame.ChartBorder.GetRight();var top=this.Frame.ChartBorder.GetTopEx();var bottom=this.Frame.ChartBorder.GetBottomEx();var pixelTatio=GetDevicePixelRatio();if(labInfo&&IFrameSplitOperator.IsNumber(labInfo.TopOffset))top-=labInfo.TopOffset;if(labInfo&&IFrameSplitOperator.IsNumber(labInfo.BottomOffset))bottom+=labInfo.BottomOffset;var yValue=this.Frame.GetYData(y,false);var strValue=yValue.toFixed(this.Precision);if(labInfo&&labInfo.PriceSuffixText)strValue+=labInfo.PriceSuffixText;var bVisibleRange=true;if(y<top){y=top;bVisibleRange=false;}else if(y>bottom){y=bottom;bVisibleRange=false;}if(this.RightSpaceWidth>0){if(!bVisibleRange)this.Canvas.setLineDash([2*pixelTatio,3*pixelTatio]);//虚线
5909
5929
  this.Canvas.strokeStyle=this.LineColor;this.Canvas.beginPath();this.Canvas.moveTo(right,ToFixedPoint(y));this.Canvas.lineTo(right+this.RightSpaceWidth,ToFixedPoint(y));this.Canvas.stroke();if(!bVisibleRange)this.Canvas.setLineDash([]);}this.Canvas.fillStyle=this.LineColor;this.Canvas.font=this.Font;var textWidth=this.Canvas.measureText(strValue).width;var lineHeight=this.GetFontHeight();var rtBG={Left:right+this.RightSpaceWidth,Top:y-lineHeight/2,Width:textWidth+4,Height:lineHeight};//rtBG.Right=rtBG.Left+rtBG.Width;
5910
5930
  rtBG.Bottom=rtBG.Top+rtBG.Height;rtBG.Width+=this.TextMargin.Left+this.TextMargin.Right;rtBG.Right=rtBG.Left+rtBG.Width;var xText=rtBG.Left+this.TextMargin.Left+2;if(this.ButtonPosition==1){this.Canvas.fillRect(ToFixedRect(rtBG.Left),ToFixedRect(rtBG.Top),ToFixedRect(rtBG.Width+this.ButtonBGWidth),ToFixedRect(rtBG.Height));}else{this.Canvas.fillRect(ToFixedRect(rtBG.Left),ToFixedRect(rtBG.Top),ToFixedRect(rtBG.Width),ToFixedRect(rtBG.Height));}this.Canvas.fillStyle=this.ValueTextColor;this.Canvas.textAlign="left";this.Canvas.textBaseline="middle";this.Canvas.fillText(strValue,xText,y);rtDraw.Left=rtBG.Left;rtDraw.Top=rtBG.Top;rtDraw.Bottom=rtBG.Bottom;rtDraw.Right=rtBG.Right;this.DrawButton(rtBG.Top,rtBG.Right,lineHeight,rtDraw);};this.DrawPriceText=function(text,ptStart,ptEnd,position){if(position!=1&&position!=0)return;var font=this.ShowPriceTextConfig.Font[position];this.Canvas.fillStyle=this.LineColor;this.Canvas.font=font;var textWidth=this.Canvas.measureText(text).width;var lineHeight=this.GetFontHeight();var rtBG=null;if(position==1){var rtBG={Left:ptStart.X,Top:ptStart.Y-lineHeight/2,Width:textWidth+4,Height:lineHeight};rtBG.Right=rtBG.Left+rtBG.Width;rtBG.Bottom=rtBG.Top+rtBG.Height;}else if(position==0){var rtBG={Right:ptEnd.X,Top:ptEnd.Y-lineHeight/2,Width:textWidth+4,Height:lineHeight};rtBG.Left=rtBG.Right-rtBG.Width;rtBG.Bottom=rtBG.Top+rtBG.Height;}this.Canvas.fillRect(ToFixedRect(rtBG.Left),ToFixedRect(rtBG.Top),ToFixedRect(rtBG.Width+this.ButtonBGWidth),ToFixedRect(rtBG.Height));this.Canvas.fillStyle=this.ValueTextColor;this.Canvas.textAlign="left";this.Canvas.textBaseline="middle";this.Canvas.fillText(text,rtBG.Left+2,ptStart.Y);};this.CalculateButtonSize=function(){var pixelRatio=GetDevicePixelRatio();if(!IFrameSplitOperator.IsNonEmptyArray(this.AryShowButton))return;var totalWidth=0;for(var i=0;i<this.AryShowButton.length;++i){var item=this.AryShowButton[i];var icon=item.Data;var font=icon.Size*pixelRatio+'px '+icon.Family;this.Canvas.font=font;item.Width=this.Canvas.measureText(icon.Text).width+2;item.Height=item.Width;if(icon.Margin){var margin=icon.Margin;if(IFrameSplitOperator.IsNumber(margin.Left))item.Width+=margin.Left;if(IFrameSplitOperator.IsNumber(margin.Right))item.Width+=margin.Right;if(IFrameSplitOperator.IsNumber(margin.Top))item.Height+=margin.Top;if(IFrameSplitOperator.IsNumber(margin.Bottom))item.Height+=margin.Bottom;}if(this.VerticalButtonInfo.Width<item.Width)this.VerticalButtonInfo.Width=item.Width;this.VerticalButtonInfo.Height+=item.Height;totalWidth+=item.Width;}this.ButtonBGWidth=totalWidth;};//垂直排列按钮
5911
5931
  this.DrawVerticalButton=function(rtLab){if(this.ButtonPosition!=3)return;if(!IFrameSplitOperator.IsNonEmptyArray(this.AryShowButton))return;if(this.VerticalButtonInfo.Height<=0)return;var rtBG={Left:rtLab.Right,Top:rtLab.Top,Width:this.VerticalButtonInfo.Width,Height:this.VerticalButtonInfo.Height};rtBG.Right=rtBG.Left+rtBG.Width;rtBG.Bottom=rtBG.Top+rtBG.Height;this.Canvas.fillStyle=this.ButtonBGColor;this.Canvas.fillRect(ToFixedRect(rtBG.Left),ToFixedRect(rtBG.Top),ToFixedRect(rtBG.Width),ToFixedRect(rtBG.Height));var pixelRatio=GetDevicePixelRatio();var yTop=rtLab.Top;for(var i=0;i<this.AryShowButton.length;++i){var item=this.AryShowButton[i];var icon=item.Data;var rtButton={Left:rtBG.Left,Top:yTop,Width:this.VerticalButtonInfo.Width,Height:item.Height};rtButton.Right=rtButton.Left+rtButton.Width;rtButton.Bottom=rtButton.Top+rtButton.Height;var yCenter=rtButton.Top+rtButton.Height/2;var xCenter=rtButton.Left+rtButton.Width/2;var font=icon.Size*pixelRatio+'px '+icon.Family;this.Canvas.font=font;this.Canvas.textAlign="center";this.Canvas.textBaseline="middle";this.Canvas.fillStyle=icon.Color;this.Canvas.fillText(icon.Text,xCenter,yCenter);this.AryButton.push({Rect:rtButton,ID:icon.ID,TooltipText:icon.TooltipText,Data:icon.Data});yTop=rtButton.Bottom;}};this.DrawButton=function(drawTop,drawLeft,drawHeight,rtDraw){if(!IFrameSplitOperator.IsNonEmptyArray(this.AryShowButton))return;if(this.ButtonPosition==3)return;//垂直按钮在DrawVerticalButton()调用
@@ -6573,8 +6593,12 @@ LineWidth:2,//线段宽度
6573
6593
  LineDash:[3,3],Tooltip:{BGColor:'rgba(236,240,245, 0.8)',TextColor:"rgb(130,140,151)",Border:{Top:5,Left:20,Right:20,Bottom:5,ItemSpace:5},Font:14*GetDevicePixelRatio()+"px 微软雅黑"}//区间选择
6574
6594
  };this.RectSelect={LineColor:"rgb(64,64,64)",//竖线
6575
6595
  LineWidth:1*GetDevicePixelRatio(),LineDotted:[3,3],AreaColor:"rgba(234,234,234,0.5)",//面积
6576
- SubAreaColor:"rgba(105,105,105,0.5)",RangeTextColor:"rgb(248,248,255)",RangeTextFont:14*GetDevicePixelRatio()+"px 微软雅黑",RangeTextBGColor:'rgb(43,54,69)',RangeTextSubColor:"rgb(255,255,255)",RangeTextSubFont:12*GetDevicePixelRatio()+"px 微软雅黑",RangeTextSubBGColor:'rgb(54,54,54)'};this.SelectedChart={LineWidth:1,LineColor:'rgb(55,100,100)',Radius:4,MinSpace:200,//点和点间最小间距
6577
- BGColor:"rgb(255,255,255)"};this.DragMovePaint={TextColor:"rgb(0,0,0)",Font:14*GetDevicePixelRatio()+"px 微软雅黑"};this.SessionBreaksPaint={BGColor:[null,"rgb(245,246,246)"],SplitLine:{Color:'rgb(73,133,231)',Width:1*GetDevicePixelRatio(),Dash:[5*GetDevicePixelRatio(),5*GetDevicePixelRatio()]}//成交明细
6596
+ SubAreaColor:"rgba(105,105,105,0.5)",RangeTextColor:"rgb(248,248,255)",RangeTextFont:14*GetDevicePixelRatio()+"px 微软雅黑",RangeTextBGColor:'rgb(43,54,69)',RangeTextSubColor:"rgb(255,255,255)",RangeTextSubFont:12*GetDevicePixelRatio()+"px 微软雅黑",RangeTextSubBGColor:'rgb(54,54,54)'//选中图形
6597
+ };this.SelectedChart={LineWidth:1,LineColor:'rgb(55,100,100)',Radius:4,MinSpace:200,//点和点间最小间距
6598
+ BGColor:"rgb(255,255,255)"//鼠标区间选中
6599
+ };this.RectDrag={LineColor:"rgb(0,0,0)",//竖线
6600
+ LineWidth:1*GetDevicePixelRatio(),BGColor:"rgba(128,128,128,0.2)"//面积
6601
+ };this.DragMovePaint={TextColor:"rgb(0,0,0)",Font:14*GetDevicePixelRatio()+"px 微软雅黑"};this.SessionBreaksPaint={BGColor:[null,"rgb(245,246,246)"],SplitLine:{Color:'rgb(73,133,231)',Width:1*GetDevicePixelRatio(),Dash:[5*GetDevicePixelRatio(),5*GetDevicePixelRatio()]}//成交明细
6578
6602
  };this.DealList={BorderColor:'rgb(192,192,192)',//边框线
6579
6603
  Header:{Color:"RGB(60,60,60)",Mergin:{Left:5,Right:5,Top:4,Bottom:2},Font:{Size:12,Name:"微软雅黑"}},Row:{Mergin:{Top:2,Bottom:2},Font:{Size:15,Name:"微软雅黑"},BarMergin:{Top:2,Left:3,Right:3,Bottom:2}},FieldColor:{Vol:"rgb(90,90,90)",//成交量
6580
6604
  Time:"rgb(60,60,60)",//时间
@@ -6630,7 +6654,7 @@ Font:{Size:15,Name:"微软雅黑"},BarMergin:{Top:2,Left:0,Right:0,Bottom:2},//
6630
6654
  NameFont:{Size:14,Name:"微软雅黑"},SymbolFont:{Size:12,Name:"微软雅黑"}}},//滚动条
6631
6655
  this.ScrollBar={BorderColor:'rgb(192,192,192)',XSplitTextFont:12*GetDevicePixelRatio()+'px \u5FAE\u8F6F\u96C5\u9ED1',XSplitTextColor:"rgb(0,0,0)",XSplitLineColor:"rgba(0,0,0,0.8)",BGChart:{Color:"rgb(135,206,250)",LineWidth:1,AreaColor:"rgba(135,206,250,0.5)"},Slider:{DateFont:14*GetDevicePixelRatio()+'px \u5FAE\u8F6F\u96C5\u9ED1',DateColor:'rgb(0,0,0)',BarColor:"rgb(207,207,207)",BarAreaColor:"rgba(232,232,232,0.65)",BarWidth:10,BarPadding:15,//上下留白
6632
6656
  MinCenterWidth:15}},this.FrameButtomToolbar={BGColor:"rgb(235,235,235)",BorderColor:"rgb(204,204,204)",Button:{Font:{Family:"微软雅黑",Size:12*GetDevicePixelRatio()},TitleColor:{Selected:"rgb(255,255,255)",Default:"rgb(125,125,125)",MoveOn:"rgb(234,85,4)"},BGColor:{Selected:"rgb(234,85,4)",Default:"rgb(235,235,235)",MoveOn:"rgb(242,242,242)"},BorderColor:"rgb(204,204,204)",Mergin:{Left:5*GetDevicePixelRatio(),Right:5*GetDevicePixelRatio(),Top:4*GetDevicePixelRatio(),Bottom:2*GetDevicePixelRatio()},SVG:{Family:"iconfont",Size:12*GetDevicePixelRatio(),MerginLeft:4*GetDevicePixelRatio()}}//自定义风格
6633
- };this.SetStyle=function(style){var T_SetButtonStyle=function T_SetButtonStyle(item,dest){if(!item)return;if(item.Color)dest.Color=item.Color;if(item.MoveOnColor)dest.MoveOnColor=item.MoveOnColor;if(item.SelectedColor)dest.SelectedColor=item.SelectedColor;if(item.Family)dest.Family=item.Family;if(item.Text)dest.Text=item.Text;if(IFrameSplitOperator.IsNumber(item.Size))dest.Size=item.Size;if(IFrameSplitOperator.IsNumber(item.MerginLeft))dest.MerginLeft=item.MerginLeft;};if(style.TooltipBGColor)this.TooltipBGColor=style.TooltipBGColor;if(style.TooltipAlpha)this.TooltipAlpha=style.TooltipAlpha;if(style.SelectRectBGColor)this.SelectRectBGColor=style.SelectRectBGColor;if(style.UpBarColor)this.UpBarColor=style.UpBarColor;if(style.DownBarColor)this.DownBarColor=style.DownBarColor;if(style.UnchagneBarColor)this.UnchagneBarColor=style.UnchagneBarColor;if(style.EmptyBarBGColor)this.EmptyBarBGColor=style.EmptyBarBGColor;if(style.HighLowBarColor)this.HighLowBarColor=style.HighLowBarColor;if(style.HighLowText){var dest=this.HighLowText;var item=style.HighLowText;if(item.FontName)dest.FontName=item.FontName;if(item.Color)dest.Color=item.Color;if(item.MaxText)dest.MaxText=item.MaxText;if(IFrameSplitOperator.IsPlusNumber(item.MaxSize))dest.MaxSize=item.MaxSize;if(IFrameSplitOperator.IsPlusNumber(item.MinSize))dest.MinSize=item.MinSize;}if(style.SplashScreen){var item=style.SplashScreen;if(item.BGColor)this.SplashScreen.BGColor=item.BGColor;if(item.Title)this.SplashScreen.Title=item.Title;if(item.TextColor)this.SplashScreen.TextColor=item.TextColor;if(item.Font)this.SplashScreen.Font=item.Font;}if(style.HLCArea){var item=style.HLCArea;if(item.HighLineColor)this.HLCArea.HighLineColor=item.HighLineColor;if(item.LowLineColor)this.HLCArea.LowLineColor=item.LowLineColor;if(item.CloseLineColor)this.HLCArea.CloseLineColor=item.CloseLineColor;if(item.UpAreaColor)this.HLCArea.UpAreaColor=item.UpAreaColor;if(item.DownAreaColor)this.HLCArea.DownAreaColor=item.DownAreaColor;if(IFrameSplitOperator.IsNumber(item.LineWidth))this.HLCArea.LineWidth=item.LineWidth;}if(style.Minute){if(style.Minute.VolBarColor)this.Minute.VolBarColor=style.Minute.VolBarColor;if(style.Minute.VolTitleColor)this.Minute.VolTitleColor=style.Minute.VolTitleColor;if(style.Minute.PriceColor)this.Minute.PriceColor=style.Minute.PriceColor;if(IFrameSplitOperator.IsNumber(style.Minute.PriceLineWidth))this.Minute.PriceLineWidth=style.Minute.PriceLineWidth;if(style.Minute.AvPriceColor)this.Minute.AvPriceColor=style.Minute.AvPriceColor;if(style.Minute.AreaPriceColor)this.Minute.AreaPriceColor=style.Minute.AreaPriceColor;if(style.Minute.PositionColor)this.Minute.PositionColor=style.Minute.PositionColor;if(style.Minute.FrameSplitTextColor)this.Minute.FrameSplitTextColor=style.Minute.FrameSplitTextColor;if(style.Minute.Before){var item=style.Minute.Before;if(item.BGColor)this.Minute.Before.BGColor=item.BGColor;if(item.LineColor)this.Minute.Before.LineColor=item.LineColor;if(item.VolColor)this.Minute.Before.VolColor=item.VolColor;if(item.AvPriceColor)this.Minute.Before.AvPriceColor=item.AvPriceColor;if(item.CloseIcon)T_SetButtonStyle(item.CloseIcon,this.Minute.Before.CloseIcon);if(item.Point){if(item.Point.Color)this.Minute.Before.Point.Color=item.Point.Color;if(item.Point.Radius)this.Minute.Before.Point.Radius=item.Point.Radius;}}if(style.Minute.After){var item=style.Minute.After;if(item.BGColor)this.Minute.After.BGColor=item.BGColor;if(item.LineColor)this.Minute.After.LineColor=item.LineColor;if(item.VolColor)this.Minute.After.VolColor=item.VolColor;if(item.AvPriceColor)this.Minute.After.AvPriceColor=item.AvPriceColor;if(item.Point){if(item.Point.Color)this.Minute.After.Point.Color=item.Point.Color;if(item.Point.Radius)this.Minute.After.Point.Radius=item.Point.Radius;}}}if(style.DefaultTextColor)this.DefaultTextColor=style.DefaultTextColor;if(style.DefaultTextFont)this.DefaultTextFont=style.DefaultTextFont;if(style.TitleFont)this.TitleFont=style.TitleFont;if(style.IndexTitleBGColor)this.IndexTitleBGColor=style.IndexTitleBGColor;if(style.IndexTitleBorderColor)this.IndexTitleBorderColor=style.IndexTitleBorderColor;if(style.IndexTitleBorderMoveOnColor)this.IndexTitleBorderMoveOnColor=style.IndexTitleBorderMoveOnColor;if(IFrameSplitOperator.IsNumber(style.IndexTitleBorderStyle))this.IndexTitleBorderStyle=style.IndexTitleBorderStyle;if(style.IndexTitleColor)this.IndexTitleColor=style.IndexTitleColor;if(style.IndexTitleSelectedColor)this.IndexTitleSelectedColor=style.IndexTitleSelectedColor;if(style.OverlayIndexTitleBGColor)this.OverlayIndexTitleBGColor=style.OverlayIndexTitleBGColor;if(style.UpTextColor)this.UpTextColor=style.UpTextColor;if(style.DownTextColor)this.DownTextColor=style.DownTextColor;if(style.UnchagneTextColor)this.UnchagneTextColor=style.UnchagneTextColor;if(style.CloseLineColor)this.CloseLineColor=style.CloseLineColor;if(style.CloseLineAreaColor)this.CloseLineAreaColor=style.CloseLineAreaColor;if(style.CloseLineWidth)this.CloseLineWidth=style.CloseLineWidth;if(style.FrameBorderPen)this.FrameBorderPen=style.FrameBorderPen;if(style.MultiDayBorderPen)this.MultiDayBorderPen=style.MultiDayBorderPen;if(style.FrameSplitPen)this.FrameSplitPen=style.FrameSplitPen;if(style.FrameDotSplitPen)this.FrameDotSplitPen=style.FrameDotSplitPen;if(style.FrameSplitTextColor)this.FrameSplitTextColor=style.FrameSplitTextColor;if(style.FrameSplitTextFont)this.FrameSplitTextFont=style.FrameSplitTextFont;if(style.FrameTitleBGColor)this.FrameTitleBGColor=style.FrameTitleBGColor;if(style.SelFrameBorderColor)this.SelFrameBorderColor=style.SelFrameBorderColor;if(IFrameSplitOperator.IsNumber(style.IndexTitleMerginLeft))this.IndexTitleMerginLeft=style.IndexTitleMerginLeft;if(style.IndexTitle){var item=style.IndexTitle;if(item.UpDownArrow){var subItem=item.UpDownArrow;if(subItem.UpColor)this.IndexTitle.UpDownArrow.UpColor=subItem.UpColor;if(subItem.DownColor)this.IndexTitle.UpDownArrow.DownColor=subItem.DownColor;if(subItem.UnchangeColor)this.IndexTitle.UpDownArrow.UnchangeColor=subItem.UnchangeColor;}}if(style.Frame){if(style.Frame.XBottomOffset)this.Frame.XBottomOffset=style.Frame.XBottomOffset;if(style.Frame.YTopOffset)this.Frame.YTopOffset=style.Frame.YTopOffset;if(style.Frame.PercentageText){var item=style.Frame.PercentageText;if(item.PriceColor)this.Frame.PercentageText.PriceColor=item.PriceColor;if(item.PercentageColor)this.Frame.PercentageText.PercentageColor=item.PercentageColor;if(item.SplitColor)this.Frame.PercentageText.SplitColor=item.SplitColor;if(item.Font)this.Frame.PercentageText.Font=item.Font;}}if(IFrameSplitOperator.IsNumber(style.ToolbarButtonStyle))this.ToolbarButtonStyle=style.ToolbarButtonStyle;if(IFrameSplitOperator.IsBool(style.IsDOMFrameTitle))this.IsDOMFrameTitle=style.IsDOMFrameTitle;if(style.FrameLatestPrice){var item=style.FrameLatestPrice;if(style.FrameLatestPrice.TextColor)this.FrameLatestPrice.TextColor=style.FrameLatestPrice.TextColor;if(style.FrameLatestPrice.UpBarColor)this.FrameLatestPrice.UpBarColor=style.FrameLatestPrice.UpBarColor;if(style.FrameLatestPrice.DownBarColor)this.FrameLatestPrice.DownBarColor=style.FrameLatestPrice.DownBarColor;if(style.FrameLatestPrice.UnchagneBarColor)this.FrameLatestPrice.UnchagneBarColor=style.FrameLatestPrice.UnchagneBarColor;if(style.FrameLatestPrice.BGAlpha)this.FrameLatestPrice.BGAlpha=style.FrameLatestPrice.BGAlpha;if(style.FrameLatestPrice.OverlayTextColor)this.FrameLatestPrice.OverlayTextColor=style.FrameLatestPrice.OverlayTextColor;if(item.EmptyBGColor)this.FrameLatestPrice.EmptyBGColor=item.EmptyBGColor;}if(style.OverlayFrame){var item=style.OverlayFrame;if(style.OverlayFrame.BolderPen)this.OverlayFrame.BolderPen=style.OverlayFrame.BolderPen;if(style.OverlayFrame.TitleColor)this.OverlayFrame.TitleColor=style.OverlayFrame.TitleColor;if(style.OverlayFrame.TitleFont)this.OverlayFrame.TitleFont=style.OverlayFrame.TitleFont;}if(style.CorssCursorBGColor)this.CorssCursorBGColor=style.CorssCursorBGColor;if(style.CorssCursorTextColor)this.CorssCursorTextColor=style.CorssCursorTextColor;if(style.CorssCursorTextFont)this.CorssCursorTextFont=style.CorssCursorTextFont;if(style.CorssCursorVPenColor)this.CorssCursorVPenColor=style.CorssCursorVPenColor;if(style.CorssCursorHPenColor)this.CorssCursorHPenColor=style.CorssCursorHPenColor;if(style.CorssCursorBorderColor)this.CorssCursorBorderColor=style.CorssCursorBorderColor;if(style.CorssCursorXRangeBGColor)this.CorssCursorXRangeBGColor=style.CorssCursorXRangeBGColor;if(style.CorssCursor&&style.CorssCursor.RightButton){var item=style.CorssCursor.RightButton;if(item.BGColor)this.CorssCursor.RightButton.BGColor=item.BGColor;if(item.PenColor)this.CorssCursor.RightButton.PenColor=item.PenColor;if(item.Icon)this.CorssCursor.RightButton.Icon=item.Icon;}if(style.KLine)this.KLine=style.KLine;if(style.VirtualKLine){var item=style.VirtualKLine;if(item.Color)this.VirtualKLine.Color=item.Color;if(item.LineDash)this.VirtualKLine.LineDash=item.LineDash;}if(style.PriceGapStyple){var item=style.PriceGapStyple;if(item.Line&&item.Line.Color)this.PriceGapStyple.Line.Color=item.Line.Color;if(item.Text){if(item.Text.Color)this.PriceGapStyple.Text.Color=item.Text.Color;if(item.Text.Font)this.PriceGapStyple.Text.Font=item.Text.Font;}}if(style.Index){if(style.Index.LineColor)this.Index.LineColor=style.Index.LineColor;if(style.Index.NotSupport)this.Index.NotSupport=style.Index.NotSupport;}if(style.ColorArray)this.ColorArray=style.ColorArray;if(style.DrawPicture){var item=style.DrawPicture;if(item.LineColor)this.DrawPicture.LineColor=item.LineColor;if(item.PointColor)this.DrawPicture.PointColor=item.PointColor;if(item.XYCoordinate)this.DrawPicture.XYCoordinate=item.XYCoordinate;if(IFrameSplitOperator.IsNumber(item.PointType))this.DrawPicture.PointType=item.PointType;if(IFrameSplitOperator.IsBool(item.IsShowPoint))this.DrawPicture.IsShowPoint=item.IsShowPoint;}if(style.TooltipPaint){if(style.TooltipPaint.BGColor)this.TooltipPaint.BGColor=style.TooltipPaint.BGColor;if(style.TooltipPaint.BorderColor)this.TooltipPaint.BorderColor=style.TooltipPaint.BorderColor;if(style.TooltipPaint.TitleColor)this.TooltipPaint.TitleColor=style.TooltipPaint.TitleColor;if(style.TooltipPaint.TitleFont)this.TooltipPaint.TitleFont=style.TooltipPaint.TitleFont;if(style.TooltipPaint.DateTimeColor)this.TooltipPaint.DateTimeColor=style.TooltipPaint.DateTimeColor;if(style.TooltipPaint.VolColor)this.TooltipPaint.VolColor=style.TooltipPaint.VolColor;if(style.TooltipPaint.AmountColor)this.TooltipPaint.AmountColor=style.TooltipPaint.AmountColor;}if(style.PCTooltipPaint){var item=style.PCTooltipPaint;if(item.BGColor)this.PCTooltipPaint.BGColor=item.BGColor;if(item.BorderColor)this.PCTooltipPaint.BorderColor=item.BorderColor;if(item.TitleColor)this.PCTooltipPaint.TitleColor=item.TitleColor;if(item.TitleFont)this.PCTooltipPaint.TitleFont=item.TitleFont;if(item.DateTimeColor)this.PCTooltipPaint.DateTimeColor=item.DateTimeColor;if(item.VolColor)this.PCTooltipPaint.VolColor=item.VolColor;if(item.AmountColor)this.PCTooltipPaint.AmountColor=item.AmountColor;}if(style.MinuteInfo){var item=style.MinuteInfo;if(style.MinuteInfo.TextColor)this.MinuteInfo.TextColor=style.MinuteInfo.TextColor;if(style.MinuteInfo.Font)this.MinuteInfo.Font=style.MinuteInfo.Font;if(style.MinuteInfo.PointColor)this.MinuteInfo.PointColor=style.MinuteInfo.PointColor;if(style.MinuteInfo.LineColor)this.MinuteInfo.LineColor=style.MinuteInfo.LineColor;if(style.MinuteInfo.TextBGColor)this.MinuteInfo.TextBGColor=style.MinuteInfo.TextBGColor;if(IFrameSplitOperator.IsNumber(item.PointRadius))this.MinuteInfo.PointRadius=item.PointRadius;}if(style.Title){if(style.Title.TradeIndexColor)this.Title.TradeIndexColor=style.Title.TradeIndexColor;if(style.Title.ColorIndexColor)this.Title.ColorIndexColor=style.Title.ColorIndexColor;if(style.Title.VolColor)this.Title.VolColor=style.Title.VolColor;if(style.Title.AmountColor)this.Title.AmountColor=style.Title.AmountColor;if(style.Title.DateTimeColor)this.Title.DateTimeColor=style.Title.DateTimeColor;if(style.Title.NameColor)this.Title.NameColor=style.Title.NameColor;if(style.Title.SettingColor)this.Title.SettingColor=style.Title.SettingColor;if(style.Title.TurnoverRateColor)this.Title.TurnoverRateColor=style.Title.TurnoverRateColor;if(style.Title.PositionColor)this.Title.PositionColor=style.Title.PositionColor;}if(style.DRAWICON){if(style.DRAWICON.Icon){var item=style.DRAWICON.Icon;if(IFrameSplitOperator.IsPlusNumber(item.MaxSize))this.DRAWICON.Icon.MaxSize=item.MaxSize;if(IFrameSplitOperator.IsPlusNumber(item.MinSize))this.DRAWICON.Icon.MinSize=item.MinSize;if(item.Zoom)this.DRAWICON.Icon.Zoom=item.Zoom;if(IFrameSplitOperator.IsNumber(item.YOffset))this.DRAWICON.Icon.YOffset=item.YOffset;}if(style.DRAWICON.Text){var item=style.DRAWICON.Text;if(IFrameSplitOperator.IsPlusNumber(item.MaxSize))this.DRAWICON.Text.MaxSize=item.MaxSize;if(IFrameSplitOperator.IsPlusNumber(item.MinSize))this.DRAWICON.Text.MinSize=item.MinSize;if(item.Zoom)this.DRAWICON.Text.Zoom=item.Zoom;if(item.FontName)this.DRAWICON.Text.FontName=item.FontName;if(IFrameSplitOperator.IsNumber(item.YOffset))this.DRAWICON.Text.YOffset=item.YOffset;}}if(style.DRAWTEXT){var item=style.DRAWTEXT;if(IFrameSplitOperator.IsPlusNumber(item.MaxSize))this.DRAWICON.MaxSize=item.MaxSize;if(IFrameSplitOperator.IsPlusNumber(item.MinSize))this.DRAWICON.MinSize=item.MinSize;if(item.Zoom)this.DRAWTEXT.Zoom=item.Zoom;if(item.FontName)this.DRAWTEXT.FontName=item.FontName;if(IFrameSplitOperator.IsNumber(item.YOffset))this.DRAWTEXT.YOffset=item.YOffset;}if(style.DRAWTEXT_FIX){var item=style.DRAWTEXT_FIX;if(item.Font)this.DRAWTEXT_FIX.Font=item.Font;}if(style.DRAWNUMBER_FIX){var item=style.DRAWNUMBER_FIX;if(item.Font)this.DRAWNUMBER_FIX.Font=item.Font;}if(style.DRAWNUMBER){var item=style.DRAWNUMBER;if(IFrameSplitOperator.IsPlusNumber(item.MaxSize))this.DRAWNUMBER.MaxSize=item.MaxSize;if(IFrameSplitOperator.IsPlusNumber(item.MinSize))this.DRAWNUMBER.MinSize=item.MinSize;if(item.Zoom)this.DRAWNUMBER.Zoom=item.Zoom;if(item.FontName)this.DRAWNUMBER.FontName=item.FontName;if(IFrameSplitOperator.IsNumber(item.YOffset))this.DRAWNUMBER.YOffset=item.YOffset;}if(style.DRAWABOVE){var item=style.DRAWABOVE;if(IFrameSplitOperator.IsNumber(item.YOffset))this.DRAWABOVE.YOffset=item.YOffset;}if(style.DOTLINE)this.DOTLINE=style.DOTLINE;if(style.DRAWSL)this.DOTLINE=style.DRAWSL;if(style.DragSubFrameBorder)this.DragSubFrameBorder=style.DragSubFrameBorder;if(style.DepthMapPaint){var item=style.DepthMapPaint;if(item.LineColor)this.DepthMapPaint.LineColor=item.LineColor;if(item.AreaColor)this.DepthMapPaint.AreaColor=item.AreaColor;if(item.TextColor)this.DepthMapPaint.TextColor=item.TextColor;if(item.TextBGColor)this.DepthMapPaint.TextBGColor=item.TextBGColor;}if(style.KLineYAxisBGPaint){var item=style.KLineYAxisBGPaint;if(item.Font)this.KLineYAxisBGPaint.Font=item.Font;if(item.LineColor)this.KLineYAxisBGPaint.LineColor=item.LineColor;if(item.DiffValutTextColor)this.KLineYAxisBGPaint.DiffValutTextColor=item.DiffValutTextColor;if(item.DiffValueBGColor)this.KLineYAxisBGPaint.DiffValueBGColor=item.DiffValueBGColor;}if(style.StockChip){var item=style.StockChip;if(item.InfoColor)this.StockChip.InfoColor=item.InfoColor;if(item.DayInfoColor)this.StockChip.DayInfoColor=item.DayInfoColor;if(item.DefaultButton)T_SetButtonStyle(item.DefaultButton,this.StockChip.DefaultButton);if(item.LongButton)T_SetButtonStyle(item.LongButton,this.StockChip.LongButton);if(item.RecentButton)T_SetButtonStyle(item.RecentButton,this.StockChip.RecentButton);}if(style.DepthChart){var item=style.DepthChart;if(item.BidColor){if(item.BidColor.Line)this.DepthChart.BidColor.Line=item.BidColor.Line;if(item.BidColor.Area)this.DepthChart.BidColor.Area=item.BidColor.Area;}if(item.AskColor){if(item.AskColor.Line)this.DepthChart.AskColor.Line=item.AskColor.Line;if(item.AskColor.Area)this.DepthChart.AskColor.Area=item.AskColor.Area;}if(item.LineWidth)this.DepthChart.LineWidth=item.LineWidth;}if(style.DepthCorss){var item=style.DepthCorss;if(item.BidColor){if(item.BidColor.Line)this.DepthCorss.BidColor.Line=item.BidColor.Line;}if(item.AskColor){if(item.AskColor.Line)this.DepthCorss.AskColor.Line=item.AskColor.Line;}if(item.LineWidth)this.DepthCorss.LineWidth=item.LineWidth;if(item.LineDash)this.DepthCorss.LineDash=item.LineDash;if(item.Tooltip){var tooltip=item.Tooltip;if(tooltip.BGColor)this.DepthCorss.Tooltip.BGColor=tooltip.BGColor;if(tooltip.TextColor)this.DepthCorss.Tooltip.TextColor=tooltip.TextColor;if(tooltip.Font)this.DepthCorss.Tooltip.Font=tooltip.Font;if(tooltip.LineHeight)this.DepthCorss.Tooltip.LineHeight=tooltip.LineHeight;var border=tooltip.Border;if(IFrameSplitOperator.IsNumber(border.Top))this.DepthCorss.Tooltip.Border.Top=border.Top;if(IFrameSplitOperator.IsNumber(border.Bottom))this.DepthCorss.Tooltip.Border.Bottom=border.Bottom;if(IFrameSplitOperator.IsNumber(border.Left))this.DepthCorss.Tooltip.Border.Left=border.Left;if(IFrameSplitOperator.IsNumber(border.Right))this.DepthCorss.Tooltip.Border.Right=border.Right;if(IFrameSplitOperator.IsNumber(border.ItemSpace))this.DepthCorss.Tooltip.Border.ItemSpace=border.ItemSpace;}}if(style.CIRCLEDOT){var item=style.CIRCLEDOT;if(IFrameSplitOperator.IsNumber(item.Radius))this.CIRCLEDOT.Radius=item.Radius;}if(style.POINTDOT){var item=style.POINTDOT;if(IFrameSplitOperator.IsNumber(item.Radius))this.POINTDOT.Radius=item.Radius;}if(style.RectSelect){var item=style.RectSelect;if(item.LineColor)this.RectSelect.LineColor=item.LineColor;if(item.LineWidth>0)this.RectSelect.LineWidth=item.LineWidth;if(item.LineDotted)this.RectSelect.LineDotted=item.LineDotted;if(item.AreaColor)this.RectSelect.AreaColor=item.AreaColor;if(item.SubAreaColor)this.RectSelect.SubAreaColor=item.SubAreaColor;if(item.RangeTextColor)this.RectSelect.RangeTextColor=item.RangeTextColor;if(item.RangeTextFont)this.RectSelect.RangeTextFont=item.RangeTextFont;if(item.RangeTextBGColor)this.RectSelect.RangeTextBGColor=item.RangeTextBGColor;if(item.RangeTextSubColor)this.RectSelect.RangeTextSubColor=item.RangeTextSubColor;if(item.RangeTextSubFont)this.RectSelect.RangeTextSubFont=item.RangeTextSubFont;if(item.RangeTextSubBGColor)this.RectSelect.RangeTextSubBGColor=item.RangeTextSubBGColor;}if(style.OrderFlow){item=style.OrderFlow;if(item.UpColor)this.OrderFlow.UpColor=item.UpColor;if(item.DownColor)this.OrderFlow.DownColor=item.DownColor;if(item.UnchagneColor)this.OrderFlow.UnchagneColor=item.UnchagneColor;if(item.Text)this.OrderFlow.Text=item.Text;if(item.Line)this.OrderFlow.Line=item.Line;}if(style.OrderFlow_Style2){item=style.OrderFlow_Style2;if(item.UpColor)this.OrderFlow_Style2.UpColor=item.UpColor;if(item.DownColor)this.OrderFlow_Style2.DownColor=item.DownColor;if(item.UnchagneColor)this.OrderFlow_Style2.UnchagneColor=item.UnchagneColor;if(IFrameSplitOperator.IsNumber(item.BarWidth))this.OrderFlow_Style2.BarWidth=item.BarWidth;}if(style.ChartOX){var item=style.ChartOX;if(item.Family)this.ChartOX.Family=item.Family;if(item.Up)this.ChartOX.Up=item.Up;if(item.Down)this.ChartOX.Down=item.Down;if(item.SquareLineColor)this.ChartOX.SquareLineColor=item.SquareLineColor;}if(style.DealList){var item=style.DealList;if(item.BorderColor)this.DealList.BorderColor=item.BorderColor;if(item.UpTextColor)this.DealList.UpTextColor=item.UpTextColor;if(item.DownTextColor)this.DealList.DownTextColor=item.DownTextColor;if(item.UnchagneTextColor)this.DealList.UnchagneTextColor=item.UnchagneTextColor;if(item.CloseLineColor)this.DealList.CloseLineColor=item.CloseLineColor;if(item.Header){var header=item.Header;if(header.Color)this.DealList.Header.Color=header.Color;if(header.Mergin){var mergin=header.Mergin;if(IFrameSplitOperator.IsNumber(mergin.Left))this.DealList.Header.Mergin.Left=mergin.Left;if(IFrameSplitOperator.IsNumber(mergin.Right))this.DealList.Header.Mergin.Left=mergin.Right;if(IFrameSplitOperator.IsNumber(mergin.Top))this.DealList.Header.Mergin.Top=mergin.Top;if(IFrameSplitOperator.IsNumber(mergin.Bottom))this.DealList.Header.Mergin.Bottom=mergin.Bottom;}if(header.Font){var font=header.Font;if(font.Name)this.DealList.Header.Font.Name=font.Name;if(IFrameSplitOperator.IsNumber(font.Size))this.DealList.Header.Font.Size=font.Size;}}if(item.Row){var row=item.Row;if(row.Mergin){var mergin=row.Mergin;if(IFrameSplitOperator.IsNumber(mergin.Top))this.DealList.Row.Mergin.Top=mergin.Top;if(IFrameSplitOperator.IsNumber(mergin.Bottom))this.DealList.Row.Mergin.Bottom=mergin.Bottom;}if(row.Font){var font=row.Font;if(font.Name)this.DealList.Row.Font.Name=font.Name;if(IFrameSplitOperator.IsNumber(font.Size))this.DealList.Row.Font.Size=font.Size;}if(row.BarMergin){var mergin=row.BarMergin;if(IFrameSplitOperator.IsNumber(mergin.Left))this.DealList.Row.BarMergin.Left=mergin.Left;if(IFrameSplitOperator.IsNumber(mergin.Top))this.DealList.Row.BarMergin.Top=mergin.Top;if(IFrameSplitOperator.IsNumber(mergin.Right))this.DealList.Row.BarMergin.Right=mergin.Right;if(IFrameSplitOperator.IsNumber(mergin.Bottom))this.DealList.Row.BarMergin.Bottom=mergin.Bottom;}}if(item.FieldColor){var filed=item.FieldColor;if(filed.Vol)this.DealList.FieldColor.Vol=filed.Vol;if(filed.Time)this.DealList.FieldColor.Time=filed.Time;if(filed.Deal)this.DealList.FieldColor.Deal=filed.Deal;if(filed.Index)this.DealList.FieldColor.Index=filed.Index;if(filed.BarTitle)this.DealList.FieldColor.BarTitle=filed.BarTitle;if(filed.Text)this.DealList.FieldColor.Text=filed.Text;if(IFrameSplitOperator.IsNonEmptyArray(filed.Bar)){for(var i=0;i<filed.Bar.length;++i){this.DealList.FieldColor.Bar[i]=filed.Bar[i];}}}}if(style.Report)this.SetReportStyle(style.Report);if(style.TReport)this.SetTReportStyle(style.TReport);if(style.SelectedChart){var item=style.SelectedChart;if(IFrameSplitOperator.IsNumber(item.LineWidth))this.SelectedChart.LineWidth=item.LineWidth;if(IFrameSplitOperator.IsNumber(item.Radius))this.SelectedChart.Radius=item.Radius;if(IFrameSplitOperator.IsNumber(item.MinSpace))this.SelectedChart.MinSpace=item.MinSpace;if(item.LineColor)this.SelectedChart.LineColor=item.LineColor;if(item.LineColor)this.SelectedChart.BGColor=item.BGColor;}if(style.DragMovePaint){var item=style.DragMovePaint;if(item.TextColor)this.DragMovePaint.TextColor=item.TextColor;if(item.Font)this.DragMovePaint.Font=item.Font;}if(style.SessionBreaksPaint){var item=style.SessionBreaksPaint;if(IFrameSplitOperator.IsNonEmptyArray(item.BGColor))this.SessionBreaksPaint.BGColor=item.BGColor.slice();if(item.SplitLine){var subItem=item.SplitLine;if(subItem.Color)this.SessionBreaksPaint.SplitLine.Color=subItem.Color;if(IFrameSplitOperator.IsNumber(subItem.Width))this.SessionBreaksPaint.SplitLine.Width=subItem.Width;this.SessionBreaksPaint.SplitLine.Dash=subItem.Dash;}}if(IFrameSplitOperator.IsNumber(style.ToolbarButtonStyle))this.ToolbarButtonStyle=style.ToolbarButtonStyle;if(style.Buttons){var buttons=style.Buttons;T_SetButtonStyle(buttons.CloseOverlayIndex,this.Buttons.CloseOverlayIndex);T_SetButtonStyle(buttons.CloseWindow,this.Buttons.CloseWindow);T_SetButtonStyle(buttons.ChangeIndex,this.Buttons.ChangeIndex);T_SetButtonStyle(buttons.OverlayIndex,this.Buttons.OverlayIndex);T_SetButtonStyle(buttons.ModifyIndexParam,this.Buttons.ModifyIndexParam);T_SetButtonStyle(buttons.MaxMinWindow,this.Buttons.MaxMinWindow);T_SetButtonStyle(buttons.TitleWindow,this.Buttons.TitleWindow);T_SetButtonStyle(buttons.ExportData,this.Buttons.ExportData);if(buttons.Tooltip){var item=buttons.Tooltip;var src=this.Buttons.Tooltip;if(item.Font)src.Font=item.Font;if(item.Color)src.Color=item.Color;if(item.ColorBG)src.ColorBG=item.ColorBG;if(item.ColorBorder)src.ColorBorder=item.ColorBorder;if(item.BorderRadius)src.BorderRadius=item.BorderRadius;if(item.Margin){if(IFrameSplitOperator.IsNumber(item.Margin.Left))src.Margin.Left=item.Margin.Left;if(IFrameSplitOperator.IsNumber(item.Margin.Top))src.Margin.Top=item.Margin.Top;if(IFrameSplitOperator.IsNumber(item.Margin.Bottom))src.Margin.Bottom=item.Margin.Bottom;if(IFrameSplitOperator.IsNumber(item.Margin.Right))src.Margin.Right=item.Margin.Right;}}}if(style.ChartDrawVolProfile){var item=style.ChartDrawVolProfile;if(item.UpVolColor)this.ChartDrawVolProfile.UpVolColor=item.UpVolColor;if(item.DownVolColor)this.ChartDrawVolProfile.DownVolColor=item.DownVolColor;if(item.AreaUpColor)this.ChartDrawVolProfile.AreaUpColor=item.AreaUpColor;if(item.AreaDonwColor)this.ChartDrawVolProfile.AreaDonwColor=item.AreaDonwColor;if(item.BGColor)this.ChartDrawVolProfile.BGColor=item.BGColor;if(item.BorderColor)this.ChartDrawVolProfile.BorderColor=item.BorderColor;if(item.VolLineColor)this.ChartDrawVolProfile.VolLineColor=item.VolLineColor;if(item.Text){if(item.Text.Color)this.ChartDrawVolProfile.Text.Color=item.Text.Color;if(item.Text.Family)this.ChartDrawVolProfile.Text.Family=item.Text.Family;if(IFrameSplitOperator.IsNumber(item.Text.FontMaxSize))this.ChartDrawVolProfile.Text.FontMaxSize=item.Text.FontMaxSize;if(IFrameSplitOperator.IsNumber(item.Text.FontMinSize))this.ChartDrawVolProfile.Text.FontMinSize=item.Text.FontMinSize;}}if(style.DisableLogo===true){if(this.FrameLogo)this.FrameLogo.Text=null;}if(style.ScrollBar){var item=style.ScrollBar;if(item.BorderColor)this.ScrollBar.BorderColor=item.BorderColor;if(item.XSplitTextFont)this.ScrollBar.XSplitTextFont=item.XSplitTextFont;if(item.XSplitTextColor)this.ScrollBar.XSplitTextColor=item.XSplitTextColor;if(item.XSplitLineColor)this.ScrollBar.XSplitLineColor=item.XSplitLineColor;if(item.Slider){var subItem=item.Slider;if(subItem.DateFont)this.ScrollBar.Slider.DateFont=subItem.DateFont;if(subItem.DateColor)this.ScrollBar.Slider.DateColor=subItem.DateColor;if(subItem.BarColor)this.ScrollBar.Slider.BarColor=subItem.BarColor;if(subItem.BarAreaColor)this.ScrollBar.Slider.BarAreaColor=subItem.BarAreaColor;if(IFrameSplitOperator.IsNumber(subItem.BarWidth))this.ScrollBar.Slider.BarWidth=subItem.BarWidth;if(IFrameSplitOperator.IsNumber(subItem.BarPadding))this.ScrollBar.Slider.BarPadding=subItem.BarPadding;if(IFrameSplitOperator.IsNumber(subItem.MinCenterWidth))this.ScrollBar.Slider.MinCenterWidth=subItem.MinCenterWidth;}if(item.BGChart){var subItem=item.BGChart;if(subItem.Color)this.ScrollBar.BGChart.Color=subItem.Color;if(subItem.AreaColor)this.ScrollBar.BGChart.AreaColor=subItem.AreaColor;if(IFrameSplitOperator.IsPlusNumber(subItem.LineWidth))this.ScrollBar.BGChart.LineWidth=subItem.LineWidth;}}if(style.FrameButtomToolbar)this.SetFrameButtomToolbar(style.FrameButtomToolbar);};this.SetReportStyle=function(style){var item=style;var dest=this.Report;if(item.BorderColor)this.Report.BorderColor=item.BorderColor;if(item.UpTextColor)this.Report.UpTextColor=item.UpTextColor;if(item.DownTextColor)this.Report.DownTextColor=item.DownTextColor;if(item.UnchagneTextColor)this.Report.UnchagneTextColor=item.UnchagneTextColor;if(item.BorderColor)this.Report.SelectedColor=item.SelectedColor;if(item.CloseLine){var closeLine=item.CloseLine;if(closeLine.CloseColor)this.Report.CloseLine.CloseColor=closeLine.CloseColor;if(closeLine.YCloseColor)this.Report.CloseLine.YCloseColor=closeLine.YCloseColor;if(closeLine.AreaColor)this.Report.CloseLine.AreaColor=closeLine.AreaColor;}if(item.KLine){var kline=item.KLine;if(kline.UpColor)this.Report.KLine.UpColor=kline.UpColor;if(kline.DownColor)this.Report.KLine.DownColor=kline.DownColor;if(kline.UnchagneColor)this.Report.KLine.UnchagneColor=kline.UnchagneColor;if(IFrameSplitOperator.IsNumber(kline.DataWidth))this.Report.KLine.DataWidth=kline.DataWidth;if(IFrameSplitOperator.IsNumber(kline.DistanceWidth))this.Report.KLine.DistanceWidth=kline.DistanceWidth;}if(item.Header){var header=item.Header;if(header.Color)this.Report.Header.Color=header.Color;if(header.SortColor)this.Report.Header.SortColor=header.SortColor;if(header.Mergin){var mergin=header.Mergin;if(IFrameSplitOperator.IsNumber(mergin.Left))this.Report.Header.Mergin.Left=mergin.Left;if(IFrameSplitOperator.IsNumber(mergin.Right))this.Report.Header.Mergin.Left=mergin.Right;if(IFrameSplitOperator.IsNumber(mergin.Top))this.Report.Header.Mergin.Top=mergin.Top;if(IFrameSplitOperator.IsNumber(mergin.Bottom))this.Report.Header.Mergin.Bottom=mergin.Bottom;}if(header.Font){var font=header.Font;if(font.Name)this.Report.Header.Font.Name=font.Name;if(IFrameSplitOperator.IsNumber(font.Size))this.Report.Header.Font.Size=font.Size;}}if(item.Item){var row=item.Item;if(row.Mergin){var mergin=row.Mergin;if(IFrameSplitOperator.IsNumber(mergin.Left))this.Report.Item.Mergin.Left=mergin.Left;if(IFrameSplitOperator.IsNumber(mergin.Right))this.Report.Item.Mergin.Right=mergin.Right;if(IFrameSplitOperator.IsNumber(mergin.Top))this.Report.Item.Mergin.Top=mergin.Top;if(IFrameSplitOperator.IsNumber(mergin.Bottom))this.Report.Item.Mergin.Bottom=mergin.Bottom;}if(row.Font){var font=row.Font;if(font.Name)this.Report.Item.Font.Name=font.Name;if(IFrameSplitOperator.IsNumber(font.Size))this.Report.Item.Font.Size=font.Size;}if(row.BarMergin){var mergin=row.BarMergin;if(IFrameSplitOperator.IsNumber(mergin.Left))this.Report.Item.BarMergin.Left=mergin.Left;if(IFrameSplitOperator.IsNumber(mergin.Top))this.Report.Item.BarMergin.Top=mergin.Top;if(IFrameSplitOperator.IsNumber(mergin.Right))this.Report.Item.BarMergin.Right=mergin.Right;if(IFrameSplitOperator.IsNumber(mergin.Bottom))this.Report.Item.BarMergin.Bottom=mergin.Bottom;}if(row.NameFont){var font=row.NameFont;if(font.Name)this.Report.Item.NameFont.Name=font.Name;if(IFrameSplitOperator.IsNumber(font.Size))this.Report.Item.NameFont.Size=font.Size;}if(row.SymbolFont){var font=row.SymbolFont;if(font.Name)this.Report.Item.SymbolFont.Name=font.Name;if(IFrameSplitOperator.IsNumber(font.Size))this.Report.Item.SymbolFont.Size=font.Size;}}if(item.FixedItem){var row=item.FixedItem;if(row.Font){var font=row.Font;if(font.Name)this.Report.FixedItem.Font.Name=font.Name;if(IFrameSplitOperator.IsNumber(font.Size))this.Report.FixedItem.Font.Size=font.Size;}}if(item.LimitBorder){var limit=item.LimitBorder;if(limit.Color)this.Report.LimitBorder.Color=limit.Color;if(limit.Mergin){var mergin=limit.Mergin;if(IFrameSplitOperator.IsNumber(mergin.Left))this.Report.LimitBorder.Mergin.Left=mergin.Left;if(IFrameSplitOperator.IsNumber(mergin.Top))this.Report.LimitBorder.Mergin.Top=mergin.Top;if(IFrameSplitOperator.IsNumber(mergin.Right))this.Report.LimitBorder.Mergin.Right=mergin.Right;if(IFrameSplitOperator.IsNumber(mergin.Bottom))this.Report.LimitBorder.Mergin.Bottom=mergin.Bottom;}}if(item.LimitColor){var limit=item.LimitColor;if(limit.UpColor)this.Report.LimitColor.UpColor=limit.UpColor;if(limit.DownColor)this.Report.LimitColor.DownColor=limit.DownColor;if(limit.TextColor)this.Report.LimitColor.UpColor=limit.TextColor;}if(item.FieldColor){var filed=item.FieldColor;if(filed.Name)this.Report.FieldColor.Name=filed.Name;if(filed.Symbol)this.Report.FieldColor.Symbol=filed.Symbol;if(filed.Vol)this.Report.FieldColor.Vol=filed.Vol;if(filed.Amount)this.Report.FieldColor.Amount=filed.Amount;if(filed.Index)this.Report.FieldColor.Index=filed.Index;if(filed.BarTitle)this.Report.FieldColor.BarTitle=filed.BarTitle;if(filed.Text)this.Report.FieldColor.Text=filed.Text;if(IFrameSplitOperator.IsNonEmptyArray(filed.Bar)){for(var i=0;i<filed.Bar.length;++i){this.Report.FieldColor.Bar[i]=filed.Bar[i];}}}if(item.Tab){var tab=item.Tab;if(tab.Font){var font=tab.Font;if(font.Name)this.Report.Tab.Font.Name=font.Name;if(IFrameSplitOperator.IsNumber(font.Size))this.Report.Tab.Font.Size=font.Size;}if(IFrameSplitOperator.IsNumber(tab.ScrollBarWidth))this.Report.Tab.ScrollBarWidth=tab.ScrollBarWidth;if(tab.ButtonColor)this.Report.Tab.ButtonColor=tab.ButtonColor;if(tab.BarColor)this.Report.Tab.BarColor=tab.BarColor;if(tab.BorderColor)this.Report.Tab.BorderColor=tab.BorderColor;if(tab.TabTitleColor)this.Report.Tab.TabTitleColor=tab.TabTitleColor;if(tab.TabSelectedTitleColor)this.Report.Tab.TabSelectedTitleColor=tab.TabSelectedTitleColor;if(tab.TabSelectedBGColor)this.Report.Tab.TabSelectedBGColor=tab.TabSelectedBGColor;if(tab.TabMoveOnTitleColor)this.Report.Tab.TabMoveOnTitleColor=tab.TabMoveOnTitleColor;if(tab.TabBGColor)this.Report.Tab.TabBGColor=tab.TabBGColor;}if(item.PageInfo){var pageinfo=item.PageInfo;if(pageinfo.Font){var font=pageinfo.Font;if(font.Name)this.Report.PageInfo.Font.Name=font.Name;if(IFrameSplitOperator.IsNumber(font.Size))this.Report.PageInfo.Font.Size=font.Size;}if(pageinfo.TextColor)this.Report.PageInfo.TextColor=pageinfo.TextColor;if(pageinfo.BGColor)this.Report.PageInfo.BGColor=pageinfo.BGColor;if(pageinfo.Mergin){var mergin=pageinfo.Mergin;if(IFrameSplitOperator.IsNumber(mergin.Left))this.Report.PageInfo.Mergin.Left=mergin.Left;if(IFrameSplitOperator.IsNumber(mergin.Top))this.Report.PageInfo.Mergin.Top=mergin.Top;if(IFrameSplitOperator.IsNumber(mergin.Right))this.Report.PageInfo.Mergin.Right=mergin.Right;if(IFrameSplitOperator.IsNumber(mergin.Bottom))this.Report.PageInfo.Mergin.Bottom=mergin.Bottom;}}if(item.DragRow){var dragRow=item.DragRow;if(dragRow.Color)this.Report.DragRow.Color=dragRow.Color;if(dragRow.TextColor)this.Report.DragRow.TextColor=dragRow.TextColor;if(dragRow.MoveRowColor)this.Report.DragRow.MoveRowColor=dragRow.MoveRowColor;if(dragRow.SrcRowColor)this.Report.DragRow.SrcRowColor=dragRow.SrcRowColor;}if(item.VScrollbar){var subItem=item.VScrollbar;if(IFrameSplitOperator.IsNumber(subItem.ScrollBarHeight))dest.VScrollbar.ScrollBarHeight=subItem.ScrollBarHeight;if(subItem.ButtonColor)dest.VScrollbar.ButtonColor=subItem.ButtonColor;if(subItem.BarColor)dest.VScrollbar.BarColor=subItem.BarColor;if(subItem.BorderColor)dest.VScrollbar.BorderColor=subItem.BorderColor;if(subItem.BGColor)dest.VScrollbar.BGColor=subItem.BGColor;}};this.SetTReportStyle=function(style){var item=style;var dest=this.TReport;if(item.BorderColor)dest.BorderColor=item.BorderColor;if(item.UpTextColor)dest.UpTextColor=item.UpTextColor;if(item.DownTextColor)dest.DownTextColor=item.DownTextColor;if(item.UnchangeTextColor)dest.UnchangeTextColor=item.UnchangeTextColor;if(item.BorderColor)dest.SelectedColor=item.SelectedColor;if(item.UpBGColor)dest.UpBGColor=item.UpBGColor;if(item.DownBGColor)dest.DownBGColor=item.DownBGColor;if(item.Header){var header=item.Header;if(header.Color)dest.Header.Color=header.Color;if(header.SortColor)dest.Header.SortColor=header.SortColor;if(header.Mergin){var mergin=header.Mergin;if(IFrameSplitOperator.IsNumber(mergin.Left))dest.Header.Mergin.Left=mergin.Left;if(IFrameSplitOperator.IsNumber(mergin.Right))dest.Header.Mergin.Left=mergin.Right;if(IFrameSplitOperator.IsNumber(mergin.Top))dest.Header.Mergin.Top=mergin.Top;if(IFrameSplitOperator.IsNumber(mergin.Bottom))dest.Header.Mergin.Bottom=mergin.Bottom;}if(header.Font){var font=header.Font;if(font.Name)dest.Header.Font.Name=font.Name;if(IFrameSplitOperator.IsNumber(font.Size))dest.Header.Font.Size=font.Size;}}if(item.CenterItem){var cell=item.CenterItem;if(cell.TextColor)dest.CenterItem.TextColor=cell.TextColor;if(cell.BaseTextColor)dest.CenterItem.BaseTextColor=cell.BaseTextColor;if(cell.BGColor)dest.CenterItem.BGColor=cell.BGColor;}if(item.Item){var row=item.Item;if(row.Mergin){var mergin=row.Mergin;if(IFrameSplitOperator.IsNumber(mergin.Left))dest.Item.Mergin.Left=mergin.Left;if(IFrameSplitOperator.IsNumber(mergin.Right))dest.Item.Mergin.Right=mergin.Right;if(IFrameSplitOperator.IsNumber(mergin.Top))dest.Item.Mergin.Top=mergin.Top;if(IFrameSplitOperator.IsNumber(mergin.Bottom))dest.Item.Mergin.Bottom=mergin.Bottom;}if(row.Font){var font=row.Font;if(font.Name)dest.Item.Font.Name=font.Name;if(IFrameSplitOperator.IsNumber(font.Size))dest.Item.Font.Size=font.Size;}if(row.NameFont){var font=row.NameFont;if(font.Name)dest.Item.NameFont.Name=font.Name;if(IFrameSplitOperator.IsNumber(font.Size))dest.Item.NameFont.Size=font.Size;}if(row.SymbolFont){var font=row.SymbolFont;if(font.Name)dest.Item.SymbolFont.Name=font.Name;if(IFrameSplitOperator.IsNumber(font.Size))dest.Item.SymbolFont.Size=font.Size;}}if(item.FieldColor){var filed=item.FieldColor;if(filed.Name)dest.FieldColor.Name=filed.Name;if(filed.Symbol)dest.FieldColor.Symbol=filed.Symbol;if(filed.Vol)dest.FieldColor.Vol=filed.Vol;if(filed.Amount)dest.FieldColor.Amount=filed.Amount;if(filed.Index)dest.FieldColor.Index=filed.Index;if(filed.Text)dest.FieldColor.Text=filed.Text;if(filed.Position)dest.FieldColor.Position=filed.Position;}if(item.MarkBorder){var subIem=item.MarkBorder;if(subIem.MaxPositionColor)dest.MarkBorder.MaxPositionColor=subIem.MaxPositionColor;}};this.SetFrameButtomToolbar=function(style){var dest=this.FrameButtomToolbar;if(style.BGColor)dest.BGColor=style.BGColor;if(style.BorderColor)dest.BorderColor=style.BorderColor;if(style.Button){var button=style.Button;if(button.BorderColor)dest.Button.BorderColor=button.BorderColor;if(button.Font){var item=button.Font;var destItem=this.FrameButtomToolbar.Button.Font;if(item.Family)destItem.Family=item.Family;if(IFrameSplitOperator.IsNumber(item.Size))destItem.Size=item.Size;}if(button.TitleColor){var item=button.TitleColor;var destItem=this.FrameButtomToolbar.Button.TitleColor;if(item.Selected)destItem.Selected=item.Selected;if(item.Default)destItem.Default=item.Default;if(item.MoveOn)destItem.MoveOn=item.MoveOn;}if(button.BGColor){var item=button.BGColor;var destItem=this.FrameButtomToolbar.Button.BGColor;if(item.Selected)destItem.Selected=item.Selected;if(item.Default)destItem.Default=item.Default;if(item.MoveOn)destItem.MoveOn=item.MoveOn;}if(button.Mergin){var item=button.Mergin;var destItem=this.FrameButtomToolbar.Button.Mergin;if(IFrameSplitOperator.IsNumber(item.Left))destItem.Left=item.Left;if(IFrameSplitOperator.IsNumber(item.Right))destItem.Left=item.Right;if(IFrameSplitOperator.IsNumber(item.Top))destItem.Top=item.Top;if(IFrameSplitOperator.IsNumber(item.Bottom))destItem.Bottom=item.Bottom;}if(button.SVG){var item=button.SVG;var destItem=this.FrameButtomToolbar.Button.SVG;if(IFrameSplitOperator.IsNumber(item.Size))destItem.Size=item.Size;if(IFrameSplitOperator.IsNumber(item.MerginLeft))destItem.MerginLeft=item.MerginLeft;if(item.Family)destItem.Family=item.Family;}}};}var g_JSChartResource=new JSChartResource();/////////////////////////////////////////////////////////////////////////////////
6657
+ };this.SetStyle=function(style){var T_SetButtonStyle=function T_SetButtonStyle(item,dest){if(!item)return;if(item.Color)dest.Color=item.Color;if(item.MoveOnColor)dest.MoveOnColor=item.MoveOnColor;if(item.SelectedColor)dest.SelectedColor=item.SelectedColor;if(item.Family)dest.Family=item.Family;if(item.Text)dest.Text=item.Text;if(IFrameSplitOperator.IsNumber(item.Size))dest.Size=item.Size;if(IFrameSplitOperator.IsNumber(item.MerginLeft))dest.MerginLeft=item.MerginLeft;};if(style.TooltipBGColor)this.TooltipBGColor=style.TooltipBGColor;if(style.TooltipAlpha)this.TooltipAlpha=style.TooltipAlpha;if(style.SelectRectBGColor)this.SelectRectBGColor=style.SelectRectBGColor;if(style.UpBarColor)this.UpBarColor=style.UpBarColor;if(style.DownBarColor)this.DownBarColor=style.DownBarColor;if(style.UnchagneBarColor)this.UnchagneBarColor=style.UnchagneBarColor;if(style.EmptyBarBGColor)this.EmptyBarBGColor=style.EmptyBarBGColor;if(style.HighLowBarColor)this.HighLowBarColor=style.HighLowBarColor;if(style.HighLowText){var dest=this.HighLowText;var item=style.HighLowText;if(item.FontName)dest.FontName=item.FontName;if(item.Color)dest.Color=item.Color;if(item.MaxText)dest.MaxText=item.MaxText;if(IFrameSplitOperator.IsPlusNumber(item.MaxSize))dest.MaxSize=item.MaxSize;if(IFrameSplitOperator.IsPlusNumber(item.MinSize))dest.MinSize=item.MinSize;}if(style.SplashScreen){var item=style.SplashScreen;if(item.BGColor)this.SplashScreen.BGColor=item.BGColor;if(item.Title)this.SplashScreen.Title=item.Title;if(item.TextColor)this.SplashScreen.TextColor=item.TextColor;if(item.Font)this.SplashScreen.Font=item.Font;}if(style.HLCArea){var item=style.HLCArea;if(item.HighLineColor)this.HLCArea.HighLineColor=item.HighLineColor;if(item.LowLineColor)this.HLCArea.LowLineColor=item.LowLineColor;if(item.CloseLineColor)this.HLCArea.CloseLineColor=item.CloseLineColor;if(item.UpAreaColor)this.HLCArea.UpAreaColor=item.UpAreaColor;if(item.DownAreaColor)this.HLCArea.DownAreaColor=item.DownAreaColor;if(IFrameSplitOperator.IsNumber(item.LineWidth))this.HLCArea.LineWidth=item.LineWidth;}if(style.Minute){if(style.Minute.VolBarColor)this.Minute.VolBarColor=style.Minute.VolBarColor;if(style.Minute.VolTitleColor)this.Minute.VolTitleColor=style.Minute.VolTitleColor;if(style.Minute.PriceColor)this.Minute.PriceColor=style.Minute.PriceColor;if(IFrameSplitOperator.IsNumber(style.Minute.PriceLineWidth))this.Minute.PriceLineWidth=style.Minute.PriceLineWidth;if(style.Minute.AvPriceColor)this.Minute.AvPriceColor=style.Minute.AvPriceColor;if(style.Minute.AreaPriceColor)this.Minute.AreaPriceColor=style.Minute.AreaPriceColor;if(style.Minute.PositionColor)this.Minute.PositionColor=style.Minute.PositionColor;if(style.Minute.FrameSplitTextColor)this.Minute.FrameSplitTextColor=style.Minute.FrameSplitTextColor;if(style.Minute.Before){var item=style.Minute.Before;if(item.BGColor)this.Minute.Before.BGColor=item.BGColor;if(item.LineColor)this.Minute.Before.LineColor=item.LineColor;if(item.VolColor)this.Minute.Before.VolColor=item.VolColor;if(item.AvPriceColor)this.Minute.Before.AvPriceColor=item.AvPriceColor;if(item.CloseIcon)T_SetButtonStyle(item.CloseIcon,this.Minute.Before.CloseIcon);if(item.Point){if(item.Point.Color)this.Minute.Before.Point.Color=item.Point.Color;if(item.Point.Radius)this.Minute.Before.Point.Radius=item.Point.Radius;}}if(style.Minute.After){var item=style.Minute.After;if(item.BGColor)this.Minute.After.BGColor=item.BGColor;if(item.LineColor)this.Minute.After.LineColor=item.LineColor;if(item.VolColor)this.Minute.After.VolColor=item.VolColor;if(item.AvPriceColor)this.Minute.After.AvPriceColor=item.AvPriceColor;if(item.Point){if(item.Point.Color)this.Minute.After.Point.Color=item.Point.Color;if(item.Point.Radius)this.Minute.After.Point.Radius=item.Point.Radius;}}}if(style.DefaultTextColor)this.DefaultTextColor=style.DefaultTextColor;if(style.DefaultTextFont)this.DefaultTextFont=style.DefaultTextFont;if(style.TitleFont)this.TitleFont=style.TitleFont;if(style.IndexTitleBGColor)this.IndexTitleBGColor=style.IndexTitleBGColor;if(style.IndexTitleBorderColor)this.IndexTitleBorderColor=style.IndexTitleBorderColor;if(style.IndexTitleBorderMoveOnColor)this.IndexTitleBorderMoveOnColor=style.IndexTitleBorderMoveOnColor;if(IFrameSplitOperator.IsNumber(style.IndexTitleBorderStyle))this.IndexTitleBorderStyle=style.IndexTitleBorderStyle;if(style.IndexTitleColor)this.IndexTitleColor=style.IndexTitleColor;if(style.IndexTitleSelectedColor)this.IndexTitleSelectedColor=style.IndexTitleSelectedColor;if(style.OverlayIndexTitleBGColor)this.OverlayIndexTitleBGColor=style.OverlayIndexTitleBGColor;if(style.UpTextColor)this.UpTextColor=style.UpTextColor;if(style.DownTextColor)this.DownTextColor=style.DownTextColor;if(style.UnchagneTextColor)this.UnchagneTextColor=style.UnchagneTextColor;if(style.CloseLineColor)this.CloseLineColor=style.CloseLineColor;if(style.CloseLineAreaColor)this.CloseLineAreaColor=style.CloseLineAreaColor;if(style.CloseLineWidth)this.CloseLineWidth=style.CloseLineWidth;if(style.FrameBorderPen)this.FrameBorderPen=style.FrameBorderPen;if(style.MultiDayBorderPen)this.MultiDayBorderPen=style.MultiDayBorderPen;if(style.FrameSplitPen)this.FrameSplitPen=style.FrameSplitPen;if(style.FrameDotSplitPen)this.FrameDotSplitPen=style.FrameDotSplitPen;if(style.FrameSplitTextColor)this.FrameSplitTextColor=style.FrameSplitTextColor;if(style.FrameSplitTextFont)this.FrameSplitTextFont=style.FrameSplitTextFont;if(style.FrameTitleBGColor)this.FrameTitleBGColor=style.FrameTitleBGColor;if(style.SelFrameBorderColor)this.SelFrameBorderColor=style.SelFrameBorderColor;if(IFrameSplitOperator.IsNumber(style.IndexTitleMerginLeft))this.IndexTitleMerginLeft=style.IndexTitleMerginLeft;if(style.IndexTitle){var item=style.IndexTitle;if(item.UpDownArrow){var subItem=item.UpDownArrow;if(subItem.UpColor)this.IndexTitle.UpDownArrow.UpColor=subItem.UpColor;if(subItem.DownColor)this.IndexTitle.UpDownArrow.DownColor=subItem.DownColor;if(subItem.UnchangeColor)this.IndexTitle.UpDownArrow.UnchangeColor=subItem.UnchangeColor;}}if(style.Frame){if(style.Frame.XBottomOffset)this.Frame.XBottomOffset=style.Frame.XBottomOffset;if(style.Frame.YTopOffset)this.Frame.YTopOffset=style.Frame.YTopOffset;if(style.Frame.PercentageText){var item=style.Frame.PercentageText;if(item.PriceColor)this.Frame.PercentageText.PriceColor=item.PriceColor;if(item.PercentageColor)this.Frame.PercentageText.PercentageColor=item.PercentageColor;if(item.SplitColor)this.Frame.PercentageText.SplitColor=item.SplitColor;if(item.Font)this.Frame.PercentageText.Font=item.Font;}}if(IFrameSplitOperator.IsNumber(style.ToolbarButtonStyle))this.ToolbarButtonStyle=style.ToolbarButtonStyle;if(IFrameSplitOperator.IsBool(style.IsDOMFrameTitle))this.IsDOMFrameTitle=style.IsDOMFrameTitle;if(style.FrameLatestPrice){var item=style.FrameLatestPrice;if(style.FrameLatestPrice.TextColor)this.FrameLatestPrice.TextColor=style.FrameLatestPrice.TextColor;if(style.FrameLatestPrice.UpBarColor)this.FrameLatestPrice.UpBarColor=style.FrameLatestPrice.UpBarColor;if(style.FrameLatestPrice.DownBarColor)this.FrameLatestPrice.DownBarColor=style.FrameLatestPrice.DownBarColor;if(style.FrameLatestPrice.UnchagneBarColor)this.FrameLatestPrice.UnchagneBarColor=style.FrameLatestPrice.UnchagneBarColor;if(style.FrameLatestPrice.BGAlpha)this.FrameLatestPrice.BGAlpha=style.FrameLatestPrice.BGAlpha;if(style.FrameLatestPrice.OverlayTextColor)this.FrameLatestPrice.OverlayTextColor=style.FrameLatestPrice.OverlayTextColor;if(item.EmptyBGColor)this.FrameLatestPrice.EmptyBGColor=item.EmptyBGColor;}if(style.OverlayFrame){var item=style.OverlayFrame;if(style.OverlayFrame.BolderPen)this.OverlayFrame.BolderPen=style.OverlayFrame.BolderPen;if(style.OverlayFrame.TitleColor)this.OverlayFrame.TitleColor=style.OverlayFrame.TitleColor;if(style.OverlayFrame.TitleFont)this.OverlayFrame.TitleFont=style.OverlayFrame.TitleFont;}if(style.CorssCursorBGColor)this.CorssCursorBGColor=style.CorssCursorBGColor;if(style.CorssCursorTextColor)this.CorssCursorTextColor=style.CorssCursorTextColor;if(style.CorssCursorTextFont)this.CorssCursorTextFont=style.CorssCursorTextFont;if(style.CorssCursorVPenColor)this.CorssCursorVPenColor=style.CorssCursorVPenColor;if(style.CorssCursorHPenColor)this.CorssCursorHPenColor=style.CorssCursorHPenColor;if(style.CorssCursorBorderColor)this.CorssCursorBorderColor=style.CorssCursorBorderColor;if(style.CorssCursorXRangeBGColor)this.CorssCursorXRangeBGColor=style.CorssCursorXRangeBGColor;if(style.CorssCursor&&style.CorssCursor.RightButton){var item=style.CorssCursor.RightButton;if(item.BGColor)this.CorssCursor.RightButton.BGColor=item.BGColor;if(item.PenColor)this.CorssCursor.RightButton.PenColor=item.PenColor;if(item.Icon)this.CorssCursor.RightButton.Icon=item.Icon;}if(style.KLine)this.KLine=style.KLine;if(style.VirtualKLine){var item=style.VirtualKLine;if(item.Color)this.VirtualKLine.Color=item.Color;if(item.LineDash)this.VirtualKLine.LineDash=item.LineDash;}if(style.PriceGapStyple){var item=style.PriceGapStyple;if(item.Line&&item.Line.Color)this.PriceGapStyple.Line.Color=item.Line.Color;if(item.Text){if(item.Text.Color)this.PriceGapStyple.Text.Color=item.Text.Color;if(item.Text.Font)this.PriceGapStyple.Text.Font=item.Text.Font;}}if(style.Index){if(style.Index.LineColor)this.Index.LineColor=style.Index.LineColor;if(style.Index.NotSupport)this.Index.NotSupport=style.Index.NotSupport;}if(style.ColorArray)this.ColorArray=style.ColorArray;if(style.DrawPicture){var item=style.DrawPicture;if(item.LineColor)this.DrawPicture.LineColor=item.LineColor;if(item.PointColor)this.DrawPicture.PointColor=item.PointColor;if(item.XYCoordinate)this.DrawPicture.XYCoordinate=item.XYCoordinate;if(IFrameSplitOperator.IsNumber(item.PointType))this.DrawPicture.PointType=item.PointType;if(IFrameSplitOperator.IsBool(item.IsShowPoint))this.DrawPicture.IsShowPoint=item.IsShowPoint;}if(style.TooltipPaint){if(style.TooltipPaint.BGColor)this.TooltipPaint.BGColor=style.TooltipPaint.BGColor;if(style.TooltipPaint.BorderColor)this.TooltipPaint.BorderColor=style.TooltipPaint.BorderColor;if(style.TooltipPaint.TitleColor)this.TooltipPaint.TitleColor=style.TooltipPaint.TitleColor;if(style.TooltipPaint.TitleFont)this.TooltipPaint.TitleFont=style.TooltipPaint.TitleFont;if(style.TooltipPaint.DateTimeColor)this.TooltipPaint.DateTimeColor=style.TooltipPaint.DateTimeColor;if(style.TooltipPaint.VolColor)this.TooltipPaint.VolColor=style.TooltipPaint.VolColor;if(style.TooltipPaint.AmountColor)this.TooltipPaint.AmountColor=style.TooltipPaint.AmountColor;}if(style.PCTooltipPaint){var item=style.PCTooltipPaint;if(item.BGColor)this.PCTooltipPaint.BGColor=item.BGColor;if(item.BorderColor)this.PCTooltipPaint.BorderColor=item.BorderColor;if(item.TitleColor)this.PCTooltipPaint.TitleColor=item.TitleColor;if(item.TitleFont)this.PCTooltipPaint.TitleFont=item.TitleFont;if(item.DateTimeColor)this.PCTooltipPaint.DateTimeColor=item.DateTimeColor;if(item.VolColor)this.PCTooltipPaint.VolColor=item.VolColor;if(item.AmountColor)this.PCTooltipPaint.AmountColor=item.AmountColor;}if(style.MinuteInfo){var item=style.MinuteInfo;if(style.MinuteInfo.TextColor)this.MinuteInfo.TextColor=style.MinuteInfo.TextColor;if(style.MinuteInfo.Font)this.MinuteInfo.Font=style.MinuteInfo.Font;if(style.MinuteInfo.PointColor)this.MinuteInfo.PointColor=style.MinuteInfo.PointColor;if(style.MinuteInfo.LineColor)this.MinuteInfo.LineColor=style.MinuteInfo.LineColor;if(style.MinuteInfo.TextBGColor)this.MinuteInfo.TextBGColor=style.MinuteInfo.TextBGColor;if(IFrameSplitOperator.IsNumber(item.PointRadius))this.MinuteInfo.PointRadius=item.PointRadius;}if(style.Title){if(style.Title.TradeIndexColor)this.Title.TradeIndexColor=style.Title.TradeIndexColor;if(style.Title.ColorIndexColor)this.Title.ColorIndexColor=style.Title.ColorIndexColor;if(style.Title.VolColor)this.Title.VolColor=style.Title.VolColor;if(style.Title.AmountColor)this.Title.AmountColor=style.Title.AmountColor;if(style.Title.DateTimeColor)this.Title.DateTimeColor=style.Title.DateTimeColor;if(style.Title.NameColor)this.Title.NameColor=style.Title.NameColor;if(style.Title.SettingColor)this.Title.SettingColor=style.Title.SettingColor;if(style.Title.TurnoverRateColor)this.Title.TurnoverRateColor=style.Title.TurnoverRateColor;if(style.Title.PositionColor)this.Title.PositionColor=style.Title.PositionColor;}if(style.DRAWICON){if(style.DRAWICON.Icon){var item=style.DRAWICON.Icon;if(IFrameSplitOperator.IsPlusNumber(item.MaxSize))this.DRAWICON.Icon.MaxSize=item.MaxSize;if(IFrameSplitOperator.IsPlusNumber(item.MinSize))this.DRAWICON.Icon.MinSize=item.MinSize;if(item.Zoom)this.DRAWICON.Icon.Zoom=item.Zoom;if(IFrameSplitOperator.IsNumber(item.YOffset))this.DRAWICON.Icon.YOffset=item.YOffset;}if(style.DRAWICON.Text){var item=style.DRAWICON.Text;if(IFrameSplitOperator.IsPlusNumber(item.MaxSize))this.DRAWICON.Text.MaxSize=item.MaxSize;if(IFrameSplitOperator.IsPlusNumber(item.MinSize))this.DRAWICON.Text.MinSize=item.MinSize;if(item.Zoom)this.DRAWICON.Text.Zoom=item.Zoom;if(item.FontName)this.DRAWICON.Text.FontName=item.FontName;if(IFrameSplitOperator.IsNumber(item.YOffset))this.DRAWICON.Text.YOffset=item.YOffset;}}if(style.DRAWTEXT){var item=style.DRAWTEXT;if(IFrameSplitOperator.IsPlusNumber(item.MaxSize))this.DRAWICON.MaxSize=item.MaxSize;if(IFrameSplitOperator.IsPlusNumber(item.MinSize))this.DRAWICON.MinSize=item.MinSize;if(item.Zoom)this.DRAWTEXT.Zoom=item.Zoom;if(item.FontName)this.DRAWTEXT.FontName=item.FontName;if(IFrameSplitOperator.IsNumber(item.YOffset))this.DRAWTEXT.YOffset=item.YOffset;}if(style.DRAWTEXT_FIX){var item=style.DRAWTEXT_FIX;if(item.Font)this.DRAWTEXT_FIX.Font=item.Font;}if(style.DRAWNUMBER_FIX){var item=style.DRAWNUMBER_FIX;if(item.Font)this.DRAWNUMBER_FIX.Font=item.Font;}if(style.DRAWNUMBER){var item=style.DRAWNUMBER;if(IFrameSplitOperator.IsPlusNumber(item.MaxSize))this.DRAWNUMBER.MaxSize=item.MaxSize;if(IFrameSplitOperator.IsPlusNumber(item.MinSize))this.DRAWNUMBER.MinSize=item.MinSize;if(item.Zoom)this.DRAWNUMBER.Zoom=item.Zoom;if(item.FontName)this.DRAWNUMBER.FontName=item.FontName;if(IFrameSplitOperator.IsNumber(item.YOffset))this.DRAWNUMBER.YOffset=item.YOffset;}if(style.DRAWABOVE){var item=style.DRAWABOVE;if(IFrameSplitOperator.IsNumber(item.YOffset))this.DRAWABOVE.YOffset=item.YOffset;}if(style.DOTLINE)this.DOTLINE=style.DOTLINE;if(style.DRAWSL)this.DOTLINE=style.DRAWSL;if(style.DragSubFrameBorder)this.DragSubFrameBorder=style.DragSubFrameBorder;if(style.DepthMapPaint){var item=style.DepthMapPaint;if(item.LineColor)this.DepthMapPaint.LineColor=item.LineColor;if(item.AreaColor)this.DepthMapPaint.AreaColor=item.AreaColor;if(item.TextColor)this.DepthMapPaint.TextColor=item.TextColor;if(item.TextBGColor)this.DepthMapPaint.TextBGColor=item.TextBGColor;}if(style.KLineYAxisBGPaint){var item=style.KLineYAxisBGPaint;if(item.Font)this.KLineYAxisBGPaint.Font=item.Font;if(item.LineColor)this.KLineYAxisBGPaint.LineColor=item.LineColor;if(item.DiffValutTextColor)this.KLineYAxisBGPaint.DiffValutTextColor=item.DiffValutTextColor;if(item.DiffValueBGColor)this.KLineYAxisBGPaint.DiffValueBGColor=item.DiffValueBGColor;}if(style.StockChip){var item=style.StockChip;if(item.InfoColor)this.StockChip.InfoColor=item.InfoColor;if(item.DayInfoColor)this.StockChip.DayInfoColor=item.DayInfoColor;if(item.DefaultButton)T_SetButtonStyle(item.DefaultButton,this.StockChip.DefaultButton);if(item.LongButton)T_SetButtonStyle(item.LongButton,this.StockChip.LongButton);if(item.RecentButton)T_SetButtonStyle(item.RecentButton,this.StockChip.RecentButton);}if(style.DepthChart){var item=style.DepthChart;if(item.BidColor){if(item.BidColor.Line)this.DepthChart.BidColor.Line=item.BidColor.Line;if(item.BidColor.Area)this.DepthChart.BidColor.Area=item.BidColor.Area;}if(item.AskColor){if(item.AskColor.Line)this.DepthChart.AskColor.Line=item.AskColor.Line;if(item.AskColor.Area)this.DepthChart.AskColor.Area=item.AskColor.Area;}if(item.LineWidth)this.DepthChart.LineWidth=item.LineWidth;}if(style.DepthCorss){var item=style.DepthCorss;if(item.BidColor){if(item.BidColor.Line)this.DepthCorss.BidColor.Line=item.BidColor.Line;}if(item.AskColor){if(item.AskColor.Line)this.DepthCorss.AskColor.Line=item.AskColor.Line;}if(item.LineWidth)this.DepthCorss.LineWidth=item.LineWidth;if(item.LineDash)this.DepthCorss.LineDash=item.LineDash;if(item.Tooltip){var tooltip=item.Tooltip;if(tooltip.BGColor)this.DepthCorss.Tooltip.BGColor=tooltip.BGColor;if(tooltip.TextColor)this.DepthCorss.Tooltip.TextColor=tooltip.TextColor;if(tooltip.Font)this.DepthCorss.Tooltip.Font=tooltip.Font;if(tooltip.LineHeight)this.DepthCorss.Tooltip.LineHeight=tooltip.LineHeight;var border=tooltip.Border;if(IFrameSplitOperator.IsNumber(border.Top))this.DepthCorss.Tooltip.Border.Top=border.Top;if(IFrameSplitOperator.IsNumber(border.Bottom))this.DepthCorss.Tooltip.Border.Bottom=border.Bottom;if(IFrameSplitOperator.IsNumber(border.Left))this.DepthCorss.Tooltip.Border.Left=border.Left;if(IFrameSplitOperator.IsNumber(border.Right))this.DepthCorss.Tooltip.Border.Right=border.Right;if(IFrameSplitOperator.IsNumber(border.ItemSpace))this.DepthCorss.Tooltip.Border.ItemSpace=border.ItemSpace;}}if(style.CIRCLEDOT){var item=style.CIRCLEDOT;if(IFrameSplitOperator.IsNumber(item.Radius))this.CIRCLEDOT.Radius=item.Radius;}if(style.POINTDOT){var item=style.POINTDOT;if(IFrameSplitOperator.IsNumber(item.Radius))this.POINTDOT.Radius=item.Radius;}if(style.RectSelect){var item=style.RectSelect;if(item.LineColor)this.RectSelect.LineColor=item.LineColor;if(item.LineWidth>0)this.RectSelect.LineWidth=item.LineWidth;if(item.LineDotted)this.RectSelect.LineDotted=item.LineDotted;if(item.AreaColor)this.RectSelect.AreaColor=item.AreaColor;if(item.SubAreaColor)this.RectSelect.SubAreaColor=item.SubAreaColor;if(item.RangeTextColor)this.RectSelect.RangeTextColor=item.RangeTextColor;if(item.RangeTextFont)this.RectSelect.RangeTextFont=item.RangeTextFont;if(item.RangeTextBGColor)this.RectSelect.RangeTextBGColor=item.RangeTextBGColor;if(item.RangeTextSubColor)this.RectSelect.RangeTextSubColor=item.RangeTextSubColor;if(item.RangeTextSubFont)this.RectSelect.RangeTextSubFont=item.RangeTextSubFont;if(item.RangeTextSubBGColor)this.RectSelect.RangeTextSubBGColor=item.RangeTextSubBGColor;}if(style.RectDrag){var item=style.RectDrag;var dest=this.RectDrag;if(item.LineColor)dest.LineColor=item.LineColor;if(IFrameSplitOperator.IsPlusNumber(item.LineWidth))dest.LineWidth=item.LineWidth;if(item.BGColor)dest.BGColor=item.BGColor;}if(style.OrderFlow){item=style.OrderFlow;if(item.UpColor)this.OrderFlow.UpColor=item.UpColor;if(item.DownColor)this.OrderFlow.DownColor=item.DownColor;if(item.UnchagneColor)this.OrderFlow.UnchagneColor=item.UnchagneColor;if(item.Text)this.OrderFlow.Text=item.Text;if(item.Line)this.OrderFlow.Line=item.Line;}if(style.OrderFlow_Style2){item=style.OrderFlow_Style2;if(item.UpColor)this.OrderFlow_Style2.UpColor=item.UpColor;if(item.DownColor)this.OrderFlow_Style2.DownColor=item.DownColor;if(item.UnchagneColor)this.OrderFlow_Style2.UnchagneColor=item.UnchagneColor;if(IFrameSplitOperator.IsNumber(item.BarWidth))this.OrderFlow_Style2.BarWidth=item.BarWidth;}if(style.ChartOX){var item=style.ChartOX;if(item.Family)this.ChartOX.Family=item.Family;if(item.Up)this.ChartOX.Up=item.Up;if(item.Down)this.ChartOX.Down=item.Down;if(item.SquareLineColor)this.ChartOX.SquareLineColor=item.SquareLineColor;}if(style.DealList){var item=style.DealList;if(item.BorderColor)this.DealList.BorderColor=item.BorderColor;if(item.UpTextColor)this.DealList.UpTextColor=item.UpTextColor;if(item.DownTextColor)this.DealList.DownTextColor=item.DownTextColor;if(item.UnchagneTextColor)this.DealList.UnchagneTextColor=item.UnchagneTextColor;if(item.CloseLineColor)this.DealList.CloseLineColor=item.CloseLineColor;if(item.Header){var header=item.Header;if(header.Color)this.DealList.Header.Color=header.Color;if(header.Mergin){var mergin=header.Mergin;if(IFrameSplitOperator.IsNumber(mergin.Left))this.DealList.Header.Mergin.Left=mergin.Left;if(IFrameSplitOperator.IsNumber(mergin.Right))this.DealList.Header.Mergin.Left=mergin.Right;if(IFrameSplitOperator.IsNumber(mergin.Top))this.DealList.Header.Mergin.Top=mergin.Top;if(IFrameSplitOperator.IsNumber(mergin.Bottom))this.DealList.Header.Mergin.Bottom=mergin.Bottom;}if(header.Font){var font=header.Font;if(font.Name)this.DealList.Header.Font.Name=font.Name;if(IFrameSplitOperator.IsNumber(font.Size))this.DealList.Header.Font.Size=font.Size;}}if(item.Row){var row=item.Row;if(row.Mergin){var mergin=row.Mergin;if(IFrameSplitOperator.IsNumber(mergin.Top))this.DealList.Row.Mergin.Top=mergin.Top;if(IFrameSplitOperator.IsNumber(mergin.Bottom))this.DealList.Row.Mergin.Bottom=mergin.Bottom;}if(row.Font){var font=row.Font;if(font.Name)this.DealList.Row.Font.Name=font.Name;if(IFrameSplitOperator.IsNumber(font.Size))this.DealList.Row.Font.Size=font.Size;}if(row.BarMergin){var mergin=row.BarMergin;if(IFrameSplitOperator.IsNumber(mergin.Left))this.DealList.Row.BarMergin.Left=mergin.Left;if(IFrameSplitOperator.IsNumber(mergin.Top))this.DealList.Row.BarMergin.Top=mergin.Top;if(IFrameSplitOperator.IsNumber(mergin.Right))this.DealList.Row.BarMergin.Right=mergin.Right;if(IFrameSplitOperator.IsNumber(mergin.Bottom))this.DealList.Row.BarMergin.Bottom=mergin.Bottom;}}if(item.FieldColor){var filed=item.FieldColor;if(filed.Vol)this.DealList.FieldColor.Vol=filed.Vol;if(filed.Time)this.DealList.FieldColor.Time=filed.Time;if(filed.Deal)this.DealList.FieldColor.Deal=filed.Deal;if(filed.Index)this.DealList.FieldColor.Index=filed.Index;if(filed.BarTitle)this.DealList.FieldColor.BarTitle=filed.BarTitle;if(filed.Text)this.DealList.FieldColor.Text=filed.Text;if(IFrameSplitOperator.IsNonEmptyArray(filed.Bar)){for(var i=0;i<filed.Bar.length;++i){this.DealList.FieldColor.Bar[i]=filed.Bar[i];}}}}if(style.Report)this.SetReportStyle(style.Report);if(style.TReport)this.SetTReportStyle(style.TReport);if(style.SelectedChart){var item=style.SelectedChart;if(IFrameSplitOperator.IsNumber(item.LineWidth))this.SelectedChart.LineWidth=item.LineWidth;if(IFrameSplitOperator.IsNumber(item.Radius))this.SelectedChart.Radius=item.Radius;if(IFrameSplitOperator.IsNumber(item.MinSpace))this.SelectedChart.MinSpace=item.MinSpace;if(item.LineColor)this.SelectedChart.LineColor=item.LineColor;if(item.LineColor)this.SelectedChart.BGColor=item.BGColor;}if(style.DragMovePaint){var item=style.DragMovePaint;if(item.TextColor)this.DragMovePaint.TextColor=item.TextColor;if(item.Font)this.DragMovePaint.Font=item.Font;}if(style.SessionBreaksPaint){var item=style.SessionBreaksPaint;if(IFrameSplitOperator.IsNonEmptyArray(item.BGColor))this.SessionBreaksPaint.BGColor=item.BGColor.slice();if(item.SplitLine){var subItem=item.SplitLine;if(subItem.Color)this.SessionBreaksPaint.SplitLine.Color=subItem.Color;if(IFrameSplitOperator.IsNumber(subItem.Width))this.SessionBreaksPaint.SplitLine.Width=subItem.Width;this.SessionBreaksPaint.SplitLine.Dash=subItem.Dash;}}if(IFrameSplitOperator.IsNumber(style.ToolbarButtonStyle))this.ToolbarButtonStyle=style.ToolbarButtonStyle;if(style.Buttons){var buttons=style.Buttons;T_SetButtonStyle(buttons.CloseOverlayIndex,this.Buttons.CloseOverlayIndex);T_SetButtonStyle(buttons.CloseWindow,this.Buttons.CloseWindow);T_SetButtonStyle(buttons.ChangeIndex,this.Buttons.ChangeIndex);T_SetButtonStyle(buttons.OverlayIndex,this.Buttons.OverlayIndex);T_SetButtonStyle(buttons.ModifyIndexParam,this.Buttons.ModifyIndexParam);T_SetButtonStyle(buttons.MaxMinWindow,this.Buttons.MaxMinWindow);T_SetButtonStyle(buttons.TitleWindow,this.Buttons.TitleWindow);T_SetButtonStyle(buttons.ExportData,this.Buttons.ExportData);if(buttons.Tooltip){var item=buttons.Tooltip;var src=this.Buttons.Tooltip;if(item.Font)src.Font=item.Font;if(item.Color)src.Color=item.Color;if(item.ColorBG)src.ColorBG=item.ColorBG;if(item.ColorBorder)src.ColorBorder=item.ColorBorder;if(item.BorderRadius)src.BorderRadius=item.BorderRadius;if(item.Margin){if(IFrameSplitOperator.IsNumber(item.Margin.Left))src.Margin.Left=item.Margin.Left;if(IFrameSplitOperator.IsNumber(item.Margin.Top))src.Margin.Top=item.Margin.Top;if(IFrameSplitOperator.IsNumber(item.Margin.Bottom))src.Margin.Bottom=item.Margin.Bottom;if(IFrameSplitOperator.IsNumber(item.Margin.Right))src.Margin.Right=item.Margin.Right;}}}if(style.ChartDrawVolProfile){var item=style.ChartDrawVolProfile;if(item.UpVolColor)this.ChartDrawVolProfile.UpVolColor=item.UpVolColor;if(item.DownVolColor)this.ChartDrawVolProfile.DownVolColor=item.DownVolColor;if(item.AreaUpColor)this.ChartDrawVolProfile.AreaUpColor=item.AreaUpColor;if(item.AreaDonwColor)this.ChartDrawVolProfile.AreaDonwColor=item.AreaDonwColor;if(item.BGColor)this.ChartDrawVolProfile.BGColor=item.BGColor;if(item.BorderColor)this.ChartDrawVolProfile.BorderColor=item.BorderColor;if(item.VolLineColor)this.ChartDrawVolProfile.VolLineColor=item.VolLineColor;if(item.Text){if(item.Text.Color)this.ChartDrawVolProfile.Text.Color=item.Text.Color;if(item.Text.Family)this.ChartDrawVolProfile.Text.Family=item.Text.Family;if(IFrameSplitOperator.IsNumber(item.Text.FontMaxSize))this.ChartDrawVolProfile.Text.FontMaxSize=item.Text.FontMaxSize;if(IFrameSplitOperator.IsNumber(item.Text.FontMinSize))this.ChartDrawVolProfile.Text.FontMinSize=item.Text.FontMinSize;}}if(style.DisableLogo===true){if(this.FrameLogo)this.FrameLogo.Text=null;}if(style.ScrollBar){var item=style.ScrollBar;if(item.BorderColor)this.ScrollBar.BorderColor=item.BorderColor;if(item.XSplitTextFont)this.ScrollBar.XSplitTextFont=item.XSplitTextFont;if(item.XSplitTextColor)this.ScrollBar.XSplitTextColor=item.XSplitTextColor;if(item.XSplitLineColor)this.ScrollBar.XSplitLineColor=item.XSplitLineColor;if(item.Slider){var subItem=item.Slider;if(subItem.DateFont)this.ScrollBar.Slider.DateFont=subItem.DateFont;if(subItem.DateColor)this.ScrollBar.Slider.DateColor=subItem.DateColor;if(subItem.BarColor)this.ScrollBar.Slider.BarColor=subItem.BarColor;if(subItem.BarAreaColor)this.ScrollBar.Slider.BarAreaColor=subItem.BarAreaColor;if(IFrameSplitOperator.IsNumber(subItem.BarWidth))this.ScrollBar.Slider.BarWidth=subItem.BarWidth;if(IFrameSplitOperator.IsNumber(subItem.BarPadding))this.ScrollBar.Slider.BarPadding=subItem.BarPadding;if(IFrameSplitOperator.IsNumber(subItem.MinCenterWidth))this.ScrollBar.Slider.MinCenterWidth=subItem.MinCenterWidth;}if(item.BGChart){var subItem=item.BGChart;if(subItem.Color)this.ScrollBar.BGChart.Color=subItem.Color;if(subItem.AreaColor)this.ScrollBar.BGChart.AreaColor=subItem.AreaColor;if(IFrameSplitOperator.IsPlusNumber(subItem.LineWidth))this.ScrollBar.BGChart.LineWidth=subItem.LineWidth;}}if(style.FrameButtomToolbar)this.SetFrameButtomToolbar(style.FrameButtomToolbar);};this.SetReportStyle=function(style){var item=style;var dest=this.Report;if(item.BorderColor)this.Report.BorderColor=item.BorderColor;if(item.UpTextColor)this.Report.UpTextColor=item.UpTextColor;if(item.DownTextColor)this.Report.DownTextColor=item.DownTextColor;if(item.UnchagneTextColor)this.Report.UnchagneTextColor=item.UnchagneTextColor;if(item.BorderColor)this.Report.SelectedColor=item.SelectedColor;if(item.CloseLine){var closeLine=item.CloseLine;if(closeLine.CloseColor)this.Report.CloseLine.CloseColor=closeLine.CloseColor;if(closeLine.YCloseColor)this.Report.CloseLine.YCloseColor=closeLine.YCloseColor;if(closeLine.AreaColor)this.Report.CloseLine.AreaColor=closeLine.AreaColor;}if(item.KLine){var kline=item.KLine;if(kline.UpColor)this.Report.KLine.UpColor=kline.UpColor;if(kline.DownColor)this.Report.KLine.DownColor=kline.DownColor;if(kline.UnchagneColor)this.Report.KLine.UnchagneColor=kline.UnchagneColor;if(IFrameSplitOperator.IsNumber(kline.DataWidth))this.Report.KLine.DataWidth=kline.DataWidth;if(IFrameSplitOperator.IsNumber(kline.DistanceWidth))this.Report.KLine.DistanceWidth=kline.DistanceWidth;}if(item.Header){var header=item.Header;if(header.Color)this.Report.Header.Color=header.Color;if(header.SortColor)this.Report.Header.SortColor=header.SortColor;if(header.Mergin){var mergin=header.Mergin;if(IFrameSplitOperator.IsNumber(mergin.Left))this.Report.Header.Mergin.Left=mergin.Left;if(IFrameSplitOperator.IsNumber(mergin.Right))this.Report.Header.Mergin.Left=mergin.Right;if(IFrameSplitOperator.IsNumber(mergin.Top))this.Report.Header.Mergin.Top=mergin.Top;if(IFrameSplitOperator.IsNumber(mergin.Bottom))this.Report.Header.Mergin.Bottom=mergin.Bottom;}if(header.Font){var font=header.Font;if(font.Name)this.Report.Header.Font.Name=font.Name;if(IFrameSplitOperator.IsNumber(font.Size))this.Report.Header.Font.Size=font.Size;}}if(item.Item){var row=item.Item;if(row.Mergin){var mergin=row.Mergin;if(IFrameSplitOperator.IsNumber(mergin.Left))this.Report.Item.Mergin.Left=mergin.Left;if(IFrameSplitOperator.IsNumber(mergin.Right))this.Report.Item.Mergin.Right=mergin.Right;if(IFrameSplitOperator.IsNumber(mergin.Top))this.Report.Item.Mergin.Top=mergin.Top;if(IFrameSplitOperator.IsNumber(mergin.Bottom))this.Report.Item.Mergin.Bottom=mergin.Bottom;}if(row.Font){var font=row.Font;if(font.Name)this.Report.Item.Font.Name=font.Name;if(IFrameSplitOperator.IsNumber(font.Size))this.Report.Item.Font.Size=font.Size;}if(row.BarMergin){var mergin=row.BarMergin;if(IFrameSplitOperator.IsNumber(mergin.Left))this.Report.Item.BarMergin.Left=mergin.Left;if(IFrameSplitOperator.IsNumber(mergin.Top))this.Report.Item.BarMergin.Top=mergin.Top;if(IFrameSplitOperator.IsNumber(mergin.Right))this.Report.Item.BarMergin.Right=mergin.Right;if(IFrameSplitOperator.IsNumber(mergin.Bottom))this.Report.Item.BarMergin.Bottom=mergin.Bottom;}if(row.NameFont){var font=row.NameFont;if(font.Name)this.Report.Item.NameFont.Name=font.Name;if(IFrameSplitOperator.IsNumber(font.Size))this.Report.Item.NameFont.Size=font.Size;}if(row.SymbolFont){var font=row.SymbolFont;if(font.Name)this.Report.Item.SymbolFont.Name=font.Name;if(IFrameSplitOperator.IsNumber(font.Size))this.Report.Item.SymbolFont.Size=font.Size;}}if(item.FixedItem){var row=item.FixedItem;if(row.Font){var font=row.Font;if(font.Name)this.Report.FixedItem.Font.Name=font.Name;if(IFrameSplitOperator.IsNumber(font.Size))this.Report.FixedItem.Font.Size=font.Size;}}if(item.LimitBorder){var limit=item.LimitBorder;if(limit.Color)this.Report.LimitBorder.Color=limit.Color;if(limit.Mergin){var mergin=limit.Mergin;if(IFrameSplitOperator.IsNumber(mergin.Left))this.Report.LimitBorder.Mergin.Left=mergin.Left;if(IFrameSplitOperator.IsNumber(mergin.Top))this.Report.LimitBorder.Mergin.Top=mergin.Top;if(IFrameSplitOperator.IsNumber(mergin.Right))this.Report.LimitBorder.Mergin.Right=mergin.Right;if(IFrameSplitOperator.IsNumber(mergin.Bottom))this.Report.LimitBorder.Mergin.Bottom=mergin.Bottom;}}if(item.LimitColor){var limit=item.LimitColor;if(limit.UpColor)this.Report.LimitColor.UpColor=limit.UpColor;if(limit.DownColor)this.Report.LimitColor.DownColor=limit.DownColor;if(limit.TextColor)this.Report.LimitColor.UpColor=limit.TextColor;}if(item.FieldColor){var filed=item.FieldColor;if(filed.Name)this.Report.FieldColor.Name=filed.Name;if(filed.Symbol)this.Report.FieldColor.Symbol=filed.Symbol;if(filed.Vol)this.Report.FieldColor.Vol=filed.Vol;if(filed.Amount)this.Report.FieldColor.Amount=filed.Amount;if(filed.Index)this.Report.FieldColor.Index=filed.Index;if(filed.BarTitle)this.Report.FieldColor.BarTitle=filed.BarTitle;if(filed.Text)this.Report.FieldColor.Text=filed.Text;if(IFrameSplitOperator.IsNonEmptyArray(filed.Bar)){for(var i=0;i<filed.Bar.length;++i){this.Report.FieldColor.Bar[i]=filed.Bar[i];}}}if(item.Tab){var tab=item.Tab;if(tab.Font){var font=tab.Font;if(font.Name)this.Report.Tab.Font.Name=font.Name;if(IFrameSplitOperator.IsNumber(font.Size))this.Report.Tab.Font.Size=font.Size;}if(IFrameSplitOperator.IsNumber(tab.ScrollBarWidth))this.Report.Tab.ScrollBarWidth=tab.ScrollBarWidth;if(tab.ButtonColor)this.Report.Tab.ButtonColor=tab.ButtonColor;if(tab.BarColor)this.Report.Tab.BarColor=tab.BarColor;if(tab.BorderColor)this.Report.Tab.BorderColor=tab.BorderColor;if(tab.TabTitleColor)this.Report.Tab.TabTitleColor=tab.TabTitleColor;if(tab.TabSelectedTitleColor)this.Report.Tab.TabSelectedTitleColor=tab.TabSelectedTitleColor;if(tab.TabSelectedBGColor)this.Report.Tab.TabSelectedBGColor=tab.TabSelectedBGColor;if(tab.TabMoveOnTitleColor)this.Report.Tab.TabMoveOnTitleColor=tab.TabMoveOnTitleColor;if(tab.TabBGColor)this.Report.Tab.TabBGColor=tab.TabBGColor;}if(item.PageInfo){var pageinfo=item.PageInfo;if(pageinfo.Font){var font=pageinfo.Font;if(font.Name)this.Report.PageInfo.Font.Name=font.Name;if(IFrameSplitOperator.IsNumber(font.Size))this.Report.PageInfo.Font.Size=font.Size;}if(pageinfo.TextColor)this.Report.PageInfo.TextColor=pageinfo.TextColor;if(pageinfo.BGColor)this.Report.PageInfo.BGColor=pageinfo.BGColor;if(pageinfo.Mergin){var mergin=pageinfo.Mergin;if(IFrameSplitOperator.IsNumber(mergin.Left))this.Report.PageInfo.Mergin.Left=mergin.Left;if(IFrameSplitOperator.IsNumber(mergin.Top))this.Report.PageInfo.Mergin.Top=mergin.Top;if(IFrameSplitOperator.IsNumber(mergin.Right))this.Report.PageInfo.Mergin.Right=mergin.Right;if(IFrameSplitOperator.IsNumber(mergin.Bottom))this.Report.PageInfo.Mergin.Bottom=mergin.Bottom;}}if(item.DragRow){var dragRow=item.DragRow;if(dragRow.Color)this.Report.DragRow.Color=dragRow.Color;if(dragRow.TextColor)this.Report.DragRow.TextColor=dragRow.TextColor;if(dragRow.MoveRowColor)this.Report.DragRow.MoveRowColor=dragRow.MoveRowColor;if(dragRow.SrcRowColor)this.Report.DragRow.SrcRowColor=dragRow.SrcRowColor;}if(item.VScrollbar){var subItem=item.VScrollbar;if(IFrameSplitOperator.IsNumber(subItem.ScrollBarHeight))dest.VScrollbar.ScrollBarHeight=subItem.ScrollBarHeight;if(subItem.ButtonColor)dest.VScrollbar.ButtonColor=subItem.ButtonColor;if(subItem.BarColor)dest.VScrollbar.BarColor=subItem.BarColor;if(subItem.BorderColor)dest.VScrollbar.BorderColor=subItem.BorderColor;if(subItem.BGColor)dest.VScrollbar.BGColor=subItem.BGColor;}};this.SetTReportStyle=function(style){var item=style;var dest=this.TReport;if(item.BorderColor)dest.BorderColor=item.BorderColor;if(item.UpTextColor)dest.UpTextColor=item.UpTextColor;if(item.DownTextColor)dest.DownTextColor=item.DownTextColor;if(item.UnchangeTextColor)dest.UnchangeTextColor=item.UnchangeTextColor;if(item.BorderColor)dest.SelectedColor=item.SelectedColor;if(item.UpBGColor)dest.UpBGColor=item.UpBGColor;if(item.DownBGColor)dest.DownBGColor=item.DownBGColor;if(item.Header){var header=item.Header;if(header.Color)dest.Header.Color=header.Color;if(header.SortColor)dest.Header.SortColor=header.SortColor;if(header.Mergin){var mergin=header.Mergin;if(IFrameSplitOperator.IsNumber(mergin.Left))dest.Header.Mergin.Left=mergin.Left;if(IFrameSplitOperator.IsNumber(mergin.Right))dest.Header.Mergin.Left=mergin.Right;if(IFrameSplitOperator.IsNumber(mergin.Top))dest.Header.Mergin.Top=mergin.Top;if(IFrameSplitOperator.IsNumber(mergin.Bottom))dest.Header.Mergin.Bottom=mergin.Bottom;}if(header.Font){var font=header.Font;if(font.Name)dest.Header.Font.Name=font.Name;if(IFrameSplitOperator.IsNumber(font.Size))dest.Header.Font.Size=font.Size;}}if(item.CenterItem){var cell=item.CenterItem;if(cell.TextColor)dest.CenterItem.TextColor=cell.TextColor;if(cell.BaseTextColor)dest.CenterItem.BaseTextColor=cell.BaseTextColor;if(cell.BGColor)dest.CenterItem.BGColor=cell.BGColor;}if(item.Item){var row=item.Item;if(row.Mergin){var mergin=row.Mergin;if(IFrameSplitOperator.IsNumber(mergin.Left))dest.Item.Mergin.Left=mergin.Left;if(IFrameSplitOperator.IsNumber(mergin.Right))dest.Item.Mergin.Right=mergin.Right;if(IFrameSplitOperator.IsNumber(mergin.Top))dest.Item.Mergin.Top=mergin.Top;if(IFrameSplitOperator.IsNumber(mergin.Bottom))dest.Item.Mergin.Bottom=mergin.Bottom;}if(row.Font){var font=row.Font;if(font.Name)dest.Item.Font.Name=font.Name;if(IFrameSplitOperator.IsNumber(font.Size))dest.Item.Font.Size=font.Size;}if(row.NameFont){var font=row.NameFont;if(font.Name)dest.Item.NameFont.Name=font.Name;if(IFrameSplitOperator.IsNumber(font.Size))dest.Item.NameFont.Size=font.Size;}if(row.SymbolFont){var font=row.SymbolFont;if(font.Name)dest.Item.SymbolFont.Name=font.Name;if(IFrameSplitOperator.IsNumber(font.Size))dest.Item.SymbolFont.Size=font.Size;}}if(item.FieldColor){var filed=item.FieldColor;if(filed.Name)dest.FieldColor.Name=filed.Name;if(filed.Symbol)dest.FieldColor.Symbol=filed.Symbol;if(filed.Vol)dest.FieldColor.Vol=filed.Vol;if(filed.Amount)dest.FieldColor.Amount=filed.Amount;if(filed.Index)dest.FieldColor.Index=filed.Index;if(filed.Text)dest.FieldColor.Text=filed.Text;if(filed.Position)dest.FieldColor.Position=filed.Position;}if(item.MarkBorder){var subIem=item.MarkBorder;if(subIem.MaxPositionColor)dest.MarkBorder.MaxPositionColor=subIem.MaxPositionColor;}};this.SetFrameButtomToolbar=function(style){var dest=this.FrameButtomToolbar;if(style.BGColor)dest.BGColor=style.BGColor;if(style.BorderColor)dest.BorderColor=style.BorderColor;if(style.Button){var button=style.Button;if(button.BorderColor)dest.Button.BorderColor=button.BorderColor;if(button.Font){var item=button.Font;var destItem=this.FrameButtomToolbar.Button.Font;if(item.Family)destItem.Family=item.Family;if(IFrameSplitOperator.IsNumber(item.Size))destItem.Size=item.Size;}if(button.TitleColor){var item=button.TitleColor;var destItem=this.FrameButtomToolbar.Button.TitleColor;if(item.Selected)destItem.Selected=item.Selected;if(item.Default)destItem.Default=item.Default;if(item.MoveOn)destItem.MoveOn=item.MoveOn;}if(button.BGColor){var item=button.BGColor;var destItem=this.FrameButtomToolbar.Button.BGColor;if(item.Selected)destItem.Selected=item.Selected;if(item.Default)destItem.Default=item.Default;if(item.MoveOn)destItem.MoveOn=item.MoveOn;}if(button.Mergin){var item=button.Mergin;var destItem=this.FrameButtomToolbar.Button.Mergin;if(IFrameSplitOperator.IsNumber(item.Left))destItem.Left=item.Left;if(IFrameSplitOperator.IsNumber(item.Right))destItem.Left=item.Right;if(IFrameSplitOperator.IsNumber(item.Top))destItem.Top=item.Top;if(IFrameSplitOperator.IsNumber(item.Bottom))destItem.Bottom=item.Bottom;}if(button.SVG){var item=button.SVG;var destItem=this.FrameButtomToolbar.Button.SVG;if(IFrameSplitOperator.IsNumber(item.Size))destItem.Size=item.Size;if(IFrameSplitOperator.IsNumber(item.MerginLeft))destItem.MerginLeft=item.MerginLeft;if(item.Family)destItem.Family=item.Family;}}};}var g_JSChartResource=new JSChartResource();/////////////////////////////////////////////////////////////////////////////////
6634
6658
  //
6635
6659
  //
6636
6660
  //
@@ -6846,7 +6870,7 @@ this.ChartCorssCursor=new ChartCorssCursor();this.ChartCorssCursor.Canvas=this.C
6846
6870
  this.ChartSplashPaint=new ChartSplashPaint();this.ChartSplashPaint.Canvas=this.Canvas;this.ChartSplashPaint.HQChart=this;//创建框架容器
6847
6871
  this.Frame=new HQTradeFrame();this.Frame.ChartBorder=new ChartBorder();this.Frame.ChartBorder.UIElement=this.UIElement;this.Frame.ChartBorder.Top=30;this.Frame.ChartBorder.Left=5;this.Frame.ChartBorder.Bottom=20;this.Frame.Canvas=this.Canvas;this.Frame.GetExtendChartRightWidth=function(){return _this17.GetExtendChartRightWidth();};this.Frame.GetExtendChartByClassName=function(name){return _this17.GetExtendChartByClassName(name);};this.Frame.GetEventCallback=function(id){return _this17.GetEventCallback(id);};this.ChartCorssCursor.Frame=this.Frame;//十字光标绑定框架
6848
6872
  this.ChartSplashPaint.Frame=this.Frame;this.CreateChildWindow(windowCount);this.CreateMainKLine();this.CreateExtendChart("RectSelectPaint",option?option.SelectRect:null);//区间统计
6849
- if(this.EnableIndexChartDrag)this.CreateExtendChart("DragMovePaint");//子窗口动态标题
6873
+ if(this.EnableIndexChartDrag)this.CreateExtendChart("DragMovePaint");this.CreateDragSelectRect(option?option.DragSelectRect:null);//子窗口动态标题
6850
6874
  for(var i in this.Frame.SubFrame){var titlePaint=new DynamicChartTitlePainting();titlePaint.Frame=this.Frame.SubFrame[i].Frame;titlePaint.Canvas=this.Canvas;titlePaint.LanguageID=this.LanguageID;titlePaint.GetEventCallback=function(id){return _this17.GetEventCallback(id);};titlePaint.SelectedChart=this.SelectedChart;this.TitlePaint.push(titlePaint);}this.ChartCorssCursor.StringFormatX.Frame=this.Frame.SubFrame[0].Frame;this.ChartCorssCursor.StringFormatY.Frame=this.Frame;var bRegisterKeydown=true;var bRegisterWheel=true;if(option&&option.Listener){var item=option.Listener;if(item.KeyDown===false){bRegisterKeydown=false;JSConsole.Chart.Log('[KLineChartContainer::Create] not register keydown event.');}if(item.Wheel===false){bRegisterWheel=false;JSConsole.Chart.Log('[KLineChartContainer::Create] not register wheel event.');}}if(bRegisterKeydown)this.UIElement.addEventListener("keydown",function(e){_this17.OnKeyDown(e);},true);//键盘消息
6851
6875
  if(bRegisterWheel)this.UIElement.addEventListener("wheel",function(e){_this17.OnWheel(e);},true);//上下滚动消息
6852
6876
  };this.OnCustomKeyDown=function(keyID,e)//自定义键盘事件
@@ -7419,7 +7443,7 @@ var coordinateType=null,yCoordinateType=null;//坐标类型
7419
7443
  var mainFrame=null;if(this.Frame.SubFrame[0]&&this.Frame.SubFrame[0].Frame)mainFrame=this.Frame.SubFrame[0].Frame;if(mainFrame){coordinateType=mainFrame.CoordinateType;if(mainFrame.YSplitOperator)yCoordinateType=mainFrame.YSplitOperator.CoordinateType;}var aryKLineInfo=[];//信息地雷
7420
7444
  for(var i=0;i<this.ChartInfo.length;++i){var item=this.ChartInfo[i];if(item&&item.ClassName)aryKLineInfo.push(item.ClassName);}var aryOverlaySymbol=[];//叠加的股票列表
7421
7445
  for(var i=0;i<this.OverlayChartPaint.length;++i){var item=this.OverlayChartPaint[i];if(item&&item.Symbol)aryOverlaySymbol.push(item.Symbol);}var bBGSpit=false,bShowStockChip=false;if(this.GetExtendChartByClassName("SessionBreaksPaint"))bBGSpit=true;if(this.GetExtendChartByClassName('StockChip'))bShowStockChip=true;//筹码
7422
- var aryMenu=[{Name:"分析周期",SubMenu:[{Name:"日线",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_PERIOD_ID,Args:[0]},Checked:this.Period==0},{Name:"周线",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_PERIOD_ID,Args:[1]},Checked:this.Period==1},{Name:"双周线",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_PERIOD_ID,Args:[21]},Checked:this.Period==21},{Name:"月线",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_PERIOD_ID,Args:[2]},Checked:this.Period==2},{Name:"季线",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_PERIOD_ID,Args:[9]},Checked:this.Period==9},{Name:"半年",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_PERIOD_ID,Args:[22]},Checked:this.Period==22},{Name:"年线",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_PERIOD_ID,Args:[3]},Checked:this.Period==3},{Name:"1分",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_PERIOD_ID,Args:[4]},Checked:this.Period==4},{Name:"5分",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_PERIOD_ID,Args:[5]},Checked:this.Period==5},{Name:"15分",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_PERIOD_ID,Args:[6]},Checked:this.Period==6},{Name:"30分",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_PERIOD_ID,Args:[7]},Checked:this.Period==7},{Name:"60分",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_PERIOD_ID,Args:[8]},Checked:this.Period==8},{Name:"2小时",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_PERIOD_ID,Args:[11]},Checked:this.Period==11},{Name:"4小时",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_PERIOD_ID,Args:[12]},Checked:this.Period==12},{Name:"分笔",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_PERIOD_ID,Args:[10]},Checked:this.Period==10},{Name:"自定义周期:3分钟",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_PERIOD_ID,Args:[20003]},Checked:this.Period==20003},{Name:"自定义周期:35分钟",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_PERIOD_ID,Args:[20035]},Checked:this.Period==20035},{Name:"自定义周期:8日",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_PERIOD_ID,Args:[40008]},Checked:this.Period==40008}]},{Name:"指标切换",SubMenu:[{Name:"均线",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_INDEX_ID,Args:[frameID,"均线"]}},{Name:"BOLL",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_INDEX_ID,Args:[frameID,"BOLL"]}},{Name:"MACD",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_INDEX_ID,Args:[frameID,"MACD"]}},{Name:"MACD(粗)",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_INDEX_ID,Args:[frameID,"MACD2"]}},{Name:"KDJ",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_INDEX_ID,Args:[frameID,"KDJ"]}},{Name:"VOL",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_INDEX_ID,Args:[frameID,"VOL"]}},{Name:"RSI",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_INDEX_ID,Args:[frameID,"RSI"]}},{Name:"BRAR",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_INDEX_ID,Args:[frameID,"BRAR"]}},{Name:"WR",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_INDEX_ID,Args:[frameID,"WR"]}}]},{Name:"五彩K线",SubMenu:[{Name:"十字星",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_COLOR_INDEX_ID,Args:["五彩K线-十字星"]}},{Name:"早晨之星",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_COLOR_INDEX_ID,Args:["五彩K线-早晨之星"]}},{Name:"垂死十字",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_COLOR_INDEX_ID,Args:["五彩K线-垂死十字"]}},{Name:"三只乌鸦",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_COLOR_INDEX_ID,Args:["五彩K线-三只乌鸦"]}},{Name:"光脚阴线",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_COLOR_INDEX_ID,Args:["五彩K线-光脚阴线"]}},{Name:"黄昏之星",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_COLOR_INDEX_ID,Args:["五彩K线-黄昏之星"]}}]},{Name:"专家系统",SubMenu:[{Name:"BIAS",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_TRADE_INDEX_ID,Args:["交易系统-BIAS"]}},{Name:"CCI",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_TRADE_INDEX_ID,Args:["交易系统-CCI"]}},{Name:"DMI",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_TRADE_INDEX_ID,Args:["交易系统-DMI"]}},{Name:"KD",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_TRADE_INDEX_ID,Args:["交易系统-KD"]}},{Name:"BOLL",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_TRADE_INDEX_ID,Args:["交易系统-BOLL"]}},{Name:"KDJ",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_TRADE_INDEX_ID,Args:["交易系统-KDJ"]}}]},{Name:"信息地雷",SubMenu:[{Name:"公告",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_KLINE_INFO_ID,Args:["公告",!aryKLineInfo.includes("AnnouncementInfo")]},Checked:aryKLineInfo.includes("AnnouncementInfo")},{Name:"业绩预告",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_KLINE_INFO_ID,Args:["业绩预告",!aryKLineInfo.includes("PforecastInfo")]},Checked:aryKLineInfo.includes("PforecastInfo")},{Name:"调研",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_KLINE_INFO_ID,Args:["调研",!aryKLineInfo.includes("ResearchInfo")]},Checked:aryKLineInfo.includes("ResearchInfo")},{Name:"大宗交易",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_KLINE_INFO_ID,Args:["大宗交易",!aryKLineInfo.includes("BlockTrading")]},Checked:aryKLineInfo.includes("BlockTrading")},{Name:"龙虎榜",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_KLINE_INFO_ID,Args:["龙虎榜",!aryKLineInfo.includes("TradeDetail")]},Checked:aryKLineInfo.includes("TradeDetail")},{Name:"互动易",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_KLINE_INFO_ID,Args:["互动易",!aryKLineInfo.includes("InvestorInfo")]},Checked:aryKLineInfo.includes("InvestorInfo")}]},{Name:"缺口提示",SubMenu:[{Name:"显示1个缺口",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_PRICE_GAP_ID,Args:[true,1]},Checked:priceGap.Enable==true&&priceGap.Count==1},{Name:"显示2个缺口",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_PRICE_GAP_ID,Args:[true,2]},Checked:priceGap.Enable==true&&priceGap.Count==2},{Name:"显示3个缺口",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_PRICE_GAP_ID,Args:[true,3]},Checked:priceGap.Enable==true&&priceGap.Count==3},{Name:"隐藏缺口",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_PRICE_GAP_ID,Args:[false]},Checked:priceGap.Enable==false}]},{Name:"叠加品种",SubMenu:[{Name:"上证指数",Data:{ID:JSCHART_MENU_ID.CMD_OVERLAY_SYMBOL_ID,Args:["000001.sh",!aryOverlaySymbol.includes("000001.sh")]},Checked:aryOverlaySymbol.includes("000001.sh")},{Name:"深证成指",Data:{ID:JSCHART_MENU_ID.CMD_OVERLAY_SYMBOL_ID,Args:["399001.sz",!aryOverlaySymbol.includes("399001.sz")]},Checked:aryOverlaySymbol.includes("399001.sz")},{Name:"中小板指",Data:{ID:JSCHART_MENU_ID.CMD_OVERLAY_SYMBOL_ID,Args:["399005.sz",!aryOverlaySymbol.includes("399005.sz")]},Checked:aryOverlaySymbol.includes("399005.sz")},{Name:"创业板指",Data:{ID:JSCHART_MENU_ID.CMD_OVERLAY_SYMBOL_ID,Args:["399006.sz",!aryOverlaySymbol.includes("399006.sz")]},Checked:aryOverlaySymbol.includes("399006.sz")},{Name:"沪深300",Data:{ID:JSCHART_MENU_ID.CMD_OVERLAY_SYMBOL_ID,Args:["000300.sh",!aryOverlaySymbol.includes("000300.sh")]},Checked:aryOverlaySymbol.includes("000300.sh")}]},{Name:"主图线型",SubMenu:[{Name:"K线(空心阳线)",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_KLINE_TYPE_ID,Args:[3]},Checked:klineType==3},{Name:"K线(实心阳线)",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_KLINE_TYPE_ID,Args:[0]},Checked:klineType==0},{Name:"美国线",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_KLINE_TYPE_ID,Args:[2,true,{IsThinAKBar:false}]},Checked:klineType==2&&!bThinAKBar},{Name:"美国线(细)",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_KLINE_TYPE_ID,Args:[2,true,{IsThinAKBar:true}]},Checked:klineType==2&&bThinAKBar},{Name:"收盘线",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_KLINE_TYPE_ID,Args:[1]},Checked:klineType==1},{Name:"收盘面积",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_KLINE_TYPE_ID,Args:[4]},Checked:klineType==4},{Name:"K线(空心阳线阴线)",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_KLINE_TYPE_ID,Args:[6]},Checked:klineType==6},{Name:"Heikin Ashi",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_KLINE_TYPE_ID,Args:[11]},Checked:klineType==11},{Name:"Line Break",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_KLINE_TYPE_ID,Args:[12]},Checked:klineType==12},{Name:"High-low",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_KLINE_TYPE_ID,Args:[13]},Checked:klineType==13},{Name:"HLC Area",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_KLINE_TYPE_ID,Args:[15]},Checked:klineType==15}]},{Name:"坐标类型",SubMenu:[{Name:"反转坐标",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_COORDINATETYPE_ID,Args:[{IsReverse:coordinateType==0}]},Checked:coordinateType==1},{Name:JSPopMenu.SEPARATOR_LINE_NAME},{Name:"普通坐标",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_COORDINATETYPE_ID,Args:[{Type:0}]},Checked:yCoordinateType==0},{Name:"百分比坐标",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_COORDINATETYPE_ID,Args:[{Type:1}]},Checked:yCoordinateType==1},{Name:"对数坐标",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_COORDINATETYPE_ID,Args:[{Type:2}]},Checked:yCoordinateType==2},{Name:"等比坐标",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_COORDINATETYPE_ID,Args:[{Type:3}]},Checked:yCoordinateType==3},{Name:"等分坐标",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_COORDINATETYPE_ID,Args:[{Type:4}]},Checked:yCoordinateType==4},{Name:"黄金分割",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_COORDINATETYPE_ID,Args:[{Type:5}]},Checked:yCoordinateType==5}]},{Name:"指标窗口个数",SubMenu:[{Name:"1个窗口",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_WINDOW_COUNT_ID,Args:[2]},Checked:2==windowCount},{Name:"2个窗口",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_WINDOW_COUNT_ID,Args:[3]},Checked:3==windowCount},{Name:"3个窗口",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_WINDOW_COUNT_ID,Args:[4]},Checked:4==windowCount},{Name:"4个窗口",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_WINDOW_COUNT_ID,Args:[5]},Checked:5==windowCount},{Name:"5个窗口",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_WINDOW_COUNT_ID,Args:[6]},Checked:6==windowCount}]},{Name:"其他设置",SubMenu:[{Name:"禁止拖拽",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_DRAG_MODE_ID,Args:[0]},Checked:0==this.DragMode},{Name:"启动拖拽",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_DRAG_MODE_ID,Args:[1]},Checked:1==this.DragMode},{Name:"区间选择",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_DRAG_MODE_ID,Args:[2]},Checked:2==this.DragMode},{Name:JSPopMenu.SEPARATOR_LINE_NAME},{Name:"背景分割",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_BG_SPLIT_ID,Args:[!bBGSpit]},Checked:bBGSpit},{Name:"画图工具",Data:{ID:JSCHART_MENU_ID.CMD_SHOW_DRAWTOOL_ID,Args:[]},Checked:this.IsShowDrawToolDialog()},{Name:"移动筹码图",Data:{ID:bShowStockChip?JSCHART_MENU_ID.CMD_HIDE_STOCKCHIP_ID:JSCHART_MENU_ID.CMD_SHOW_STOCKCHIP_ID,Args:[]},Checked:bShowStockChip},{Name:JSPopMenu.SEPARATOR_LINE_NAME},{Name:"鼠标形状",SubMenu:[{Name:"默认",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_DEFAULTCURSOR_ID,Args:["default"]},Checked:this.DefaultCursor=="default"},{Name:"十字线",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_DEFAULTCURSOR_ID,Args:["crosshair"]},Checked:this.DefaultCursor=="crosshair"}]},{Name:"语言设置",SubMenu:[{Name:"中文",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_LANGUAGE_ID,Args:["CN"]},Checked:this.LanguageID==JSCHART_LANGUAGE_ID.LANGUAGE_CHINESE_ID},{Name:"英语",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_LANGUAGE_ID,Args:["EN"]},Checked:this.LanguageID==JSCHART_LANGUAGE_ID.LANGUAGE_ENGLISH_ID},{Name:"繁体",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_LANGUAGE_ID,Args:["TC"]},Checked:this.LanguageID==JSCHART_LANGUAGE_ID.LANGUAGE_TRADITIONAL_CHINESE_ID}]}]}];//复权
7446
+ var aryMenu=[{Name:"分析周期",SubMenu:[{Name:"日线",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_PERIOD_ID,Args:[0]},Checked:this.Period==0},{Name:"周线",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_PERIOD_ID,Args:[1]},Checked:this.Period==1},{Name:"双周线",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_PERIOD_ID,Args:[21]},Checked:this.Period==21},{Name:"月线",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_PERIOD_ID,Args:[2]},Checked:this.Period==2},{Name:"季线",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_PERIOD_ID,Args:[9]},Checked:this.Period==9},{Name:"半年",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_PERIOD_ID,Args:[22]},Checked:this.Period==22},{Name:"年线",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_PERIOD_ID,Args:[3]},Checked:this.Period==3},{Name:"1分",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_PERIOD_ID,Args:[4]},Checked:this.Period==4},{Name:"5分",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_PERIOD_ID,Args:[5]},Checked:this.Period==5},{Name:"15分",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_PERIOD_ID,Args:[6]},Checked:this.Period==6},{Name:"30分",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_PERIOD_ID,Args:[7]},Checked:this.Period==7},{Name:"60分",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_PERIOD_ID,Args:[8]},Checked:this.Period==8},{Name:"2小时",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_PERIOD_ID,Args:[11]},Checked:this.Period==11},{Name:"4小时",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_PERIOD_ID,Args:[12]},Checked:this.Period==12},{Name:"分笔",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_PERIOD_ID,Args:[10]},Checked:this.Period==10},{Name:"自定义周期:3分钟",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_PERIOD_ID,Args:[20003]},Checked:this.Period==20003},{Name:"自定义周期:35分钟",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_PERIOD_ID,Args:[20035]},Checked:this.Period==20035},{Name:"自定义周期:8日",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_PERIOD_ID,Args:[40008]},Checked:this.Period==40008}]},{Name:"指标切换",SubMenu:[{Name:"均线",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_INDEX_ID,Args:[frameID,"均线"]}},{Name:"BOLL",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_INDEX_ID,Args:[frameID,"BOLL"]}},{Name:"MACD",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_INDEX_ID,Args:[frameID,"MACD"]}},{Name:"MACD(粗)",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_INDEX_ID,Args:[frameID,"MACD2"]}},{Name:"KDJ",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_INDEX_ID,Args:[frameID,"KDJ"]}},{Name:"VOL",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_INDEX_ID,Args:[frameID,"VOL"]}},{Name:"RSI",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_INDEX_ID,Args:[frameID,"RSI"]}},{Name:"BRAR",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_INDEX_ID,Args:[frameID,"BRAR"]}},{Name:"WR",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_INDEX_ID,Args:[frameID,"WR"]}}]},{Name:"五彩K线",SubMenu:[{Name:"十字星",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_COLOR_INDEX_ID,Args:["五彩K线-十字星"]}},{Name:"早晨之星",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_COLOR_INDEX_ID,Args:["五彩K线-早晨之星"]}},{Name:"垂死十字",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_COLOR_INDEX_ID,Args:["五彩K线-垂死十字"]}},{Name:"三只乌鸦",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_COLOR_INDEX_ID,Args:["五彩K线-三只乌鸦"]}},{Name:"光脚阴线",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_COLOR_INDEX_ID,Args:["五彩K线-光脚阴线"]}},{Name:"黄昏之星",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_COLOR_INDEX_ID,Args:["五彩K线-黄昏之星"]}}]},{Name:"专家系统",SubMenu:[{Name:"BIAS",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_TRADE_INDEX_ID,Args:["交易系统-BIAS"]}},{Name:"CCI",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_TRADE_INDEX_ID,Args:["交易系统-CCI"]}},{Name:"DMI",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_TRADE_INDEX_ID,Args:["交易系统-DMI"]}},{Name:"KD",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_TRADE_INDEX_ID,Args:["交易系统-KD"]}},{Name:"BOLL",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_TRADE_INDEX_ID,Args:["交易系统-BOLL"]}},{Name:"KDJ",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_TRADE_INDEX_ID,Args:["交易系统-KDJ"]}}]},{Name:"信息地雷",SubMenu:[{Name:"公告",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_KLINE_INFO_ID,Args:["公告",!aryKLineInfo.includes("AnnouncementInfo")]},Checked:aryKLineInfo.includes("AnnouncementInfo")},{Name:"业绩预告",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_KLINE_INFO_ID,Args:["业绩预告",!aryKLineInfo.includes("PforecastInfo")]},Checked:aryKLineInfo.includes("PforecastInfo")},{Name:"调研",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_KLINE_INFO_ID,Args:["调研",!aryKLineInfo.includes("ResearchInfo")]},Checked:aryKLineInfo.includes("ResearchInfo")},{Name:"大宗交易",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_KLINE_INFO_ID,Args:["大宗交易",!aryKLineInfo.includes("BlockTrading")]},Checked:aryKLineInfo.includes("BlockTrading")},{Name:"龙虎榜",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_KLINE_INFO_ID,Args:["龙虎榜",!aryKLineInfo.includes("TradeDetail")]},Checked:aryKLineInfo.includes("TradeDetail")},{Name:"互动易",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_KLINE_INFO_ID,Args:["互动易",!aryKLineInfo.includes("InvestorInfo")]},Checked:aryKLineInfo.includes("InvestorInfo")}]},{Name:"缺口提示",SubMenu:[{Name:"显示1个缺口",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_PRICE_GAP_ID,Args:[true,1]},Checked:priceGap.Enable==true&&priceGap.Count==1},{Name:"显示2个缺口",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_PRICE_GAP_ID,Args:[true,2]},Checked:priceGap.Enable==true&&priceGap.Count==2},{Name:"显示3个缺口",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_PRICE_GAP_ID,Args:[true,3]},Checked:priceGap.Enable==true&&priceGap.Count==3},{Name:"隐藏缺口",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_PRICE_GAP_ID,Args:[false]},Checked:priceGap.Enable==false}]},{Name:"叠加品种",SubMenu:[{Name:"上证指数",Data:{ID:JSCHART_MENU_ID.CMD_OVERLAY_SYMBOL_ID,Args:["000001.sh",!aryOverlaySymbol.includes("000001.sh")]},Checked:aryOverlaySymbol.includes("000001.sh")},{Name:"深证成指",Data:{ID:JSCHART_MENU_ID.CMD_OVERLAY_SYMBOL_ID,Args:["399001.sz",!aryOverlaySymbol.includes("399001.sz")]},Checked:aryOverlaySymbol.includes("399001.sz")},{Name:"中小板指",Data:{ID:JSCHART_MENU_ID.CMD_OVERLAY_SYMBOL_ID,Args:["399005.sz",!aryOverlaySymbol.includes("399005.sz")]},Checked:aryOverlaySymbol.includes("399005.sz")},{Name:"创业板指",Data:{ID:JSCHART_MENU_ID.CMD_OVERLAY_SYMBOL_ID,Args:["399006.sz",!aryOverlaySymbol.includes("399006.sz")]},Checked:aryOverlaySymbol.includes("399006.sz")},{Name:"沪深300",Data:{ID:JSCHART_MENU_ID.CMD_OVERLAY_SYMBOL_ID,Args:["000300.sh",!aryOverlaySymbol.includes("000300.sh")]},Checked:aryOverlaySymbol.includes("000300.sh")}]},{Name:"主图线型",SubMenu:[{Name:"K线(空心阳线)",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_KLINE_TYPE_ID,Args:[3]},Checked:klineType==3},{Name:"K线(实心阳线)",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_KLINE_TYPE_ID,Args:[0]},Checked:klineType==0},{Name:"美国线",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_KLINE_TYPE_ID,Args:[2,true,{IsThinAKBar:false}]},Checked:klineType==2&&!bThinAKBar},{Name:"美国线(细)",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_KLINE_TYPE_ID,Args:[2,true,{IsThinAKBar:true}]},Checked:klineType==2&&bThinAKBar},{Name:"收盘线",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_KLINE_TYPE_ID,Args:[1]},Checked:klineType==1},{Name:"收盘面积",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_KLINE_TYPE_ID,Args:[4]},Checked:klineType==4},{Name:"K线(空心阳线阴线)",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_KLINE_TYPE_ID,Args:[6]},Checked:klineType==6},{Name:"Heikin Ashi",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_KLINE_TYPE_ID,Args:[11]},Checked:klineType==11},{Name:"Line Break",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_KLINE_TYPE_ID,Args:[12]},Checked:klineType==12},{Name:"High-low",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_KLINE_TYPE_ID,Args:[13]},Checked:klineType==13},{Name:"HLC Area",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_KLINE_TYPE_ID,Args:[15]},Checked:klineType==15}]},{Name:"坐标类型",SubMenu:[{Name:"反转坐标",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_COORDINATETYPE_ID,Args:[{IsReverse:coordinateType==0}]},Checked:coordinateType==1},{Name:JSPopMenu.SEPARATOR_LINE_NAME},{Name:"普通坐标",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_COORDINATETYPE_ID,Args:[{Type:0}]},Checked:yCoordinateType==0},{Name:"百分比坐标",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_COORDINATETYPE_ID,Args:[{Type:1}]},Checked:yCoordinateType==1},{Name:"对数坐标",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_COORDINATETYPE_ID,Args:[{Type:2}]},Checked:yCoordinateType==2},{Name:"等比坐标",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_COORDINATETYPE_ID,Args:[{Type:3}]},Checked:yCoordinateType==3},{Name:"等分坐标",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_COORDINATETYPE_ID,Args:[{Type:4}]},Checked:yCoordinateType==4},{Name:"黄金分割",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_COORDINATETYPE_ID,Args:[{Type:5}]},Checked:yCoordinateType==5}]},{Name:"指标窗口个数",SubMenu:[{Name:"1个窗口",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_WINDOW_COUNT_ID,Args:[2]},Checked:2==windowCount},{Name:"2个窗口",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_WINDOW_COUNT_ID,Args:[3]},Checked:3==windowCount},{Name:"3个窗口",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_WINDOW_COUNT_ID,Args:[4]},Checked:4==windowCount},{Name:"4个窗口",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_WINDOW_COUNT_ID,Args:[5]},Checked:5==windowCount},{Name:"5个窗口",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_WINDOW_COUNT_ID,Args:[6]},Checked:6==windowCount}]},{Name:"其他设置",SubMenu:[{Name:"禁止拖拽",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_DRAG_MODE_ID,Args:[0]},Checked:0==this.DragMode},{Name:"启动拖拽",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_DRAG_MODE_ID,Args:[1]},Checked:1==this.DragMode},{Name:"左键区间选择",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_DRAG_MODE_ID,Args:[2]},Checked:2==this.DragMode},{Name:JSPopMenu.SEPARATOR_LINE_NAME},{Name:"背景分割",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_BG_SPLIT_ID,Args:[!bBGSpit]},Checked:bBGSpit},{Name:"画图工具",Data:{ID:JSCHART_MENU_ID.CMD_SHOW_DRAWTOOL_ID,Args:[]},Checked:this.IsShowDrawToolDialog()},{Name:"移动筹码图",Data:{ID:bShowStockChip?JSCHART_MENU_ID.CMD_HIDE_STOCKCHIP_ID:JSCHART_MENU_ID.CMD_SHOW_STOCKCHIP_ID,Args:[]},Checked:bShowStockChip},{Name:JSPopMenu.SEPARATOR_LINE_NAME},{Name:"鼠标形状",SubMenu:[{Name:"默认",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_DEFAULTCURSOR_ID,Args:["default"]},Checked:this.DefaultCursor=="default"},{Name:"十字线",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_DEFAULTCURSOR_ID,Args:["crosshair"]},Checked:this.DefaultCursor=="crosshair"}]},{Name:"语言设置",SubMenu:[{Name:"中文",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_LANGUAGE_ID,Args:["CN"]},Checked:this.LanguageID==JSCHART_LANGUAGE_ID.LANGUAGE_CHINESE_ID},{Name:"英语",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_LANGUAGE_ID,Args:["EN"]},Checked:this.LanguageID==JSCHART_LANGUAGE_ID.LANGUAGE_ENGLISH_ID},{Name:"繁体",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_LANGUAGE_ID,Args:["TC"]},Checked:this.LanguageID==JSCHART_LANGUAGE_ID.LANGUAGE_TRADITIONAL_CHINESE_ID}]},{Name:"区间选择样式",SubMenu:[{Name:"样式1(默认)",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_DRAG_RECT_SHOW_MODE_ID,Args:[0]},Checked:0==this.ChartDragSelectRect.ShowMode},{Name:"样式2",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_DRAG_RECT_SHOW_MODE_ID,Args:[1]},Checked:1==this.ChartDragSelectRect.ShowMode},{Name:"样式3",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_DRAG_RECT_SHOW_MODE_ID,Args:[2]},Checked:2==this.ChartDragSelectRect.ShowMode}]}]}];//复权
7423
7447
  if(!MARKET_SUFFIX_NAME.IsSHSZIndex(this.Symbol)&&!MARKET_SUFFIX_NAME.IsBIT(this.Symbol)){var rightMenu={Name:"复权处理",SubMenu:[{Name:"不复权",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_RIGHT_ID,Args:[0]},Checked:0==this.Right},{Name:"前复权",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_RIGHT_ID,Args:[1]},Checked:1==this.Right},{Name:"后复权",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_RIGHT_ID,Args:[2]},Checked:2==this.Right}]};aryMenu.splice(1,0,rightMenu);}//删除菜单
7424
7448
  for(var i=0;i<aryMenu.length;++i){var item=aryMenu[i];if(item.Name=="五彩K线"){if(this.ColorIndex){item.SubMenu.push({Name:JSPopMenu.SEPARATOR_LINE_NAME});item.SubMenu.push({Name:"删除五彩K线",Data:{ID:JSCHART_MENU_ID.CMD_DELETE_COLOR_INDEX_ID}});}}else if(item.Name=="专家系统"){if(this.TradeIndex){item.SubMenu.push({Name:JSPopMenu.SEPARATOR_LINE_NAME});item.SubMenu.push({Name:"删除专家系统",Data:{ID:JSCHART_MENU_ID.CMD_DELETE_TRADE_INDEX_ID}});}}else if(item.Name=="叠加品种"){for(var j=0;j<item.SubMenu.length;++j){if(item.SubMenu[j].Checked){item.SubMenu.push({Name:JSPopMenu.SEPARATOR_LINE_NAME});item.SubMenu.push({Name:"取消叠加",Data:{ID:JSCHART_MENU_ID.CMD_DELETE_ALL_OVERLAY_SYMBOL_ID}});break;}}}else if(item.Name=="信息地雷"){for(var j=0;j<item.SubMenu.length;++j){if(item.SubMenu[j].Checked){item.SubMenu.push({Name:JSPopMenu.SEPARATOR_LINE_NAME});item.SubMenu.push({Name:"删除所有",Data:{ID:JSCHART_MENU_ID.CMD_DELETE_ALL_KLINE_INFO_ID}});break;}}}}return aryMenu;};this.PopupSelectRectMenuV2=function(data,e){var _this26=this;var aryMenu=[{Name:"区间统计",Data:{ID:JSCHART_MENU_ID.CMD_SELECTED_SUMMARY_ID,Args:[e]}},{Name:"区间放大",Data:{ID:JSCHART_MENU_ID.CMD_SELECTED_ZOOM_ID,Args:[data.SelectData]}}];var menuData={Menu:aryMenu,Position:JSPopMenu.POSITION_ID.RIGHT_MENU_ID};menuData.ClickCallback=function(data){_this26.OnClickRightMenu(data);};var x=data.X,y=data.Y;this.PopupMenuByRClick(menuData,x,y);};//重新加载画图工具(切换股票|周期)
7425
7449
  this.ReloadChartDrawPicture=function(){this.ChartDrawPicture=[];if(this.SelectChartDrawPicture)this.SelectChartDrawPicture.IsSelected=false;this.SelectChartDrawPicture=null;this.CurrentChartDrawPicture=null;if(this.ChartDrawStorage){this.ChartDrawStorageCache=this.ChartDrawStorage.GetDrawData({Symbol:this.Symbol,Period:this.Period});var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_LOAD_DRAWPICTURE);if(event&&event.Callback){var sendData={Symbol:this.Symbol,Period:this.Period,DrawStorage:this.ChartDrawStorage,ChartDrawStorageCache:this.ChartDrawStorageCache};event.Callback(event,sendData,this);}}};this.CreateChartDrawPictureByStorage=function()//把缓存(this.ChartDrawStorageCache) 画图工具创建出来
@@ -7708,7 +7732,7 @@ var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_MOUSE_MOVE);var titleChart=t
7708
7732
  if(!event||!event.Callback)return;var sendData={DayOffset:this.DayOffset,DayData:this.DayData};event.Callback(event,sendData,this);};this.IsMouseOnClient=function(x,y){var border=this.Frame.IsHScreen?this.Frame.ChartBorder.GetHScreenBorder():this.Frame.ChartBorder.GetBorder();var rect={Left:border.Left,Top:border.Top,Right:border.Right,Bottom:border.Bottom};if(x>=rect.Left&&x<=rect.Right&&y>=rect.Top&&y<=rect.Bottom)return true;return false;};//左右拖拽
7709
7733
  this.OnDragMode_One=function(moveData,e){var drag=this.MouseDrag;var moveSetp=moveData.X;var yMoveSetp=moveData.Y;if(this.RectSelectDrag&&this.RectSelectDrag.Index>=0)//区间选择
7710
7734
  {if(moveSetp<5)return;var obj={X:e.clientX,Y:e.clientY,PointIndex:this.RectSelectDrag.Index,Name:"MoveRectSelectLine"};if(this.MoveRectSelectPoint(obj)){drag.LastMove.X=e.clientX;this.Draw();}}else{if(moveSetp<5&&yMoveSetp<5)return;if(!this.EnableSelectRect)return;//this.UIElement.style.cursor="default";
7711
- this.SetCursor({Cursor:"default"});var x=drag.Click.X-uielement.getBoundingClientRect().left;var y=drag.Click.Y-uielement.getBoundingClientRect().top;var x2=e.clientX-uielement.getBoundingClientRect().left;var y2=e.clientY-uielement.getBoundingClientRect().top;this.ShowSelectRect(x,y,x2,y2);drag.LastMove.X=e.clientX;drag.LastMove.Y=e.clientY;}};this.OnMinuteSelectRectMouseUp=function(e){var drag=this.MouseDrag;drag.LastMove.X=e.clientX;drag.LastMove.Y=e.clientY;var selectData=new SelectRectData();var pixelTatio=GetDevicePixelRatio();//区间起始位置 结束位子
7735
+ this.SetCursor({Cursor:"default"});var ptStart=this.PointAbsoluteToRelative(drag.Click.X,drag.Click.Y);var ptEnd=this.PointAbsoluteToRelative(e.clientX,e.clientY);this.ShowDragSelectRect(ptStart,ptEnd);drag.LastMove.X=e.clientX;drag.LastMove.Y=e.clientY;}};this.OnMinuteSelectRectMouseUp=function(e){var drag=this.MouseDrag;drag.LastMove.X=e.clientX;drag.LastMove.Y=e.clientY;var selectData=new SelectRectData();var pixelTatio=GetDevicePixelRatio();//区间起始位置 结束位子
7712
7736
  selectData.XStart=(drag.Click.X-uielement.getBoundingClientRect().left)*pixelTatio;selectData.YStart=(drag.Click.Y-uielement.getBoundingClientRect().top)*pixelTatio;selectData.XEnd=(drag.LastMove.X-uielement.getBoundingClientRect().left)*pixelTatio;selectData.YEnd=(drag.LastMove.Y-uielement.getBoundingClientRect().top)*pixelTatio;selectData.JSChartContainer=this;selectData.Stock={Symbol:this.Symbol,Name:this.Name};if(this.EnableSelectRect&&!this.BorderDrag&&this.GetSelectRectData(selectData)){var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_SELECT_RECT);var paint=this.GetRectSelectPaint();var isShowDialog=true;//是否显示内置区间选择框
7713
7737
  if(event&&event.Callback){var data={X:drag.LastMove.X-uielement.getBoundingClientRect().left,Y:drag.LastMove.Y-uielement.getBoundingClientRect().top,SelectData:selectData,//区间选择的数据
7714
7738
  RectSelectPaint:paint,//区间选择背景
@@ -7767,7 +7791,7 @@ this.OnRightMenu=function(x,y,e){var pixelTatio=GetDevicePixelRatio();//x,y 需
7767
7791
  var frameId=this.Frame.PtInFrame(x*pixelTatio,y*pixelTatio);this.PopupRightMenuV2({X:e.offsetX,Y:e.offsetY,FrameID:frameId},e);var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CONTEXT_MENU);if(event){var data={X:x,Y:y,Event:e,FrameID:frameId};event.Callback(event,data,this);}};//右键菜单数据
7768
7792
  this.GetRightMenuData=function(frameID){var windowCount=this.Frame.SubFrame.length;//窗口个数
7769
7793
  var aryOverlaySymbol=[];//叠加的股票列表
7770
- for(var i=0;i<this.OverlayChartPaint.length;++i){var item=this.OverlayChartPaint[i];if(item&&item.Symbol)aryOverlaySymbol.push(item.Symbol);}var aryMenu=[{Name:"叠加品种",SubMenu:[{Name:"上证指数",Data:{ID:JSCHART_MENU_ID.CMD_OVERLAY_SYMBOL_ID,Args:["000001.sh",!aryOverlaySymbol.includes("000001.sh")]},Checked:aryOverlaySymbol.includes("000001.sh")},{Name:"深证成指",Data:{ID:JSCHART_MENU_ID.CMD_OVERLAY_SYMBOL_ID,Args:["399001.sz",!aryOverlaySymbol.includes("399001.sz")]},Checked:aryOverlaySymbol.includes("399001.sz")},{Name:"中小板指",Data:{ID:JSCHART_MENU_ID.CMD_OVERLAY_SYMBOL_ID,Args:["399005.sz",!aryOverlaySymbol.includes("399005.sz")]},Checked:aryOverlaySymbol.includes("399005.sz")},{Name:"创业板指",Data:{ID:JSCHART_MENU_ID.CMD_OVERLAY_SYMBOL_ID,Args:["399006.sz",!aryOverlaySymbol.includes("399006.sz")]},Checked:aryOverlaySymbol.includes("399006.sz")},{Name:"沪深300",Data:{ID:JSCHART_MENU_ID.CMD_OVERLAY_SYMBOL_ID,Args:["000300.sh",!aryOverlaySymbol.includes("000300.sh")]},Checked:aryOverlaySymbol.includes("000300.sh")}]},{Name:"多日分时图",SubMenu:[{Name:"当日分时图",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_DAY_COUNT_ID,Args:[1]},Checked:this.DayCount==1},{Name:"最近2日",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_DAY_COUNT_ID,Args:[2]},Checked:this.DayCount==2},{Name:"最近3日",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_DAY_COUNT_ID,Args:[3]},Checked:this.DayCount==3},{Name:"最近4日",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_DAY_COUNT_ID,Args:[4]},Checked:this.DayCount==4},{Name:"最近5日",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_DAY_COUNT_ID,Args:[5]},Checked:this.DayCount==5},{Name:"基准线选择",SubMenu:[{Name:"最新昨收价",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_BASELINE_ID,Args:[0]},Checked:this.BaselineType===0},{Name:"多日前昨收价",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_BASELINE_ID,Args:[1]},Checked:this.BaselineType===1}]}]},{Name:"指标窗口个数",SubMenu:[{Name:"1个窗口",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_WINDOW_COUNT_ID,Args:[2]},Checked:3==windowCount},{Name:"2个窗口",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_WINDOW_COUNT_ID,Args:[3]},Checked:4==windowCount},{Name:"3个窗口",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_WINDOW_COUNT_ID,Args:[4]},Checked:5==windowCount},{Name:"4个窗口",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_WINDOW_COUNT_ID,Args:[5]},Checked:6==windowCount},{Name:"5个窗口",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_WINDOW_COUNT_ID,Args:[6]},Checked:7==windowCount}]},{Name:"指标切换",SubMenu:[{Name:"MACD",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_INDEX_ID,Args:[frameID,"MACD"]}},{Name:"DMI",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_INDEX_ID,Args:[frameID,"DMI"]}},{Name:"DMA",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_INDEX_ID,Args:[frameID,"DMA"]}},{Name:"BRAR",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_INDEX_ID,Args:[frameID,"BRAR"]}},{Name:"KDJ",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_INDEX_ID,Args:[frameID,"KDJ"]}},{Name:"RSI",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_INDEX_ID,Args:[frameID,"RSI"]}},{Name:"WR",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_INDEX_ID,Args:[frameID,"WR"]}},{Name:"CCI",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_INDEX_ID,Args:[frameID,"CCI"]}},{Name:"TRIX",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_INDEX_ID,Args:[frameID,"TRIX"]}}]},{Name:"区间选择",Data:{ID:JSCHART_MENU_ID.CMD_ENABLE_SELECT_RECT_ID,Args:[!this.EnableSelectRect]},Checked:this.EnableSelectRect},{Name:"其他设置",SubMenu:[{Name:"画图工具",Data:{ID:JSCHART_MENU_ID.CMD_SHOW_DRAWTOOL_ID,Args:[]},Checked:this.IsShowDrawToolDialog()}]}];if(MARKET_SUFFIX_NAME.IsSHSZStockA(this.Symbol)){var item={Name:"集合竞价",Data:{ID:JSCHART_MENU_ID.CMD_SHOW_BEFORE_DATA_ID,Args:[!this.IsShowBeforeData]},Checked:this.IsShowBeforeData};aryMenu.splice(4,0,item);}//删除菜单
7794
+ for(var i=0;i<this.OverlayChartPaint.length;++i){var item=this.OverlayChartPaint[i];if(item&&item.Symbol)aryOverlaySymbol.push(item.Symbol);}var aryMenu=[{Name:"叠加品种",SubMenu:[{Name:"上证指数",Data:{ID:JSCHART_MENU_ID.CMD_OVERLAY_SYMBOL_ID,Args:["000001.sh",!aryOverlaySymbol.includes("000001.sh")]},Checked:aryOverlaySymbol.includes("000001.sh")},{Name:"深证成指",Data:{ID:JSCHART_MENU_ID.CMD_OVERLAY_SYMBOL_ID,Args:["399001.sz",!aryOverlaySymbol.includes("399001.sz")]},Checked:aryOverlaySymbol.includes("399001.sz")},{Name:"中小板指",Data:{ID:JSCHART_MENU_ID.CMD_OVERLAY_SYMBOL_ID,Args:["399005.sz",!aryOverlaySymbol.includes("399005.sz")]},Checked:aryOverlaySymbol.includes("399005.sz")},{Name:"创业板指",Data:{ID:JSCHART_MENU_ID.CMD_OVERLAY_SYMBOL_ID,Args:["399006.sz",!aryOverlaySymbol.includes("399006.sz")]},Checked:aryOverlaySymbol.includes("399006.sz")},{Name:"沪深300",Data:{ID:JSCHART_MENU_ID.CMD_OVERLAY_SYMBOL_ID,Args:["000300.sh",!aryOverlaySymbol.includes("000300.sh")]},Checked:aryOverlaySymbol.includes("000300.sh")}]},{Name:"多日分时图",SubMenu:[{Name:"当日分时图",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_DAY_COUNT_ID,Args:[1]},Checked:this.DayCount==1},{Name:"最近2日",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_DAY_COUNT_ID,Args:[2]},Checked:this.DayCount==2},{Name:"最近3日",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_DAY_COUNT_ID,Args:[3]},Checked:this.DayCount==3},{Name:"最近4日",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_DAY_COUNT_ID,Args:[4]},Checked:this.DayCount==4},{Name:"最近5日",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_DAY_COUNT_ID,Args:[5]},Checked:this.DayCount==5},{Name:"基准线选择",SubMenu:[{Name:"最新昨收价",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_BASELINE_ID,Args:[0]},Checked:this.BaselineType===0},{Name:"多日前昨收价",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_BASELINE_ID,Args:[1]},Checked:this.BaselineType===1}]}]},{Name:"指标窗口个数",SubMenu:[{Name:"1个窗口",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_WINDOW_COUNT_ID,Args:[2]},Checked:3==windowCount},{Name:"2个窗口",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_WINDOW_COUNT_ID,Args:[3]},Checked:4==windowCount},{Name:"3个窗口",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_WINDOW_COUNT_ID,Args:[4]},Checked:5==windowCount},{Name:"4个窗口",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_WINDOW_COUNT_ID,Args:[5]},Checked:6==windowCount},{Name:"5个窗口",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_WINDOW_COUNT_ID,Args:[6]},Checked:7==windowCount}]},{Name:"指标切换",SubMenu:[{Name:"MACD",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_INDEX_ID,Args:[frameID,"MACD"]}},{Name:"DMI",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_INDEX_ID,Args:[frameID,"DMI"]}},{Name:"DMA",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_INDEX_ID,Args:[frameID,"DMA"]}},{Name:"BRAR",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_INDEX_ID,Args:[frameID,"BRAR"]}},{Name:"KDJ",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_INDEX_ID,Args:[frameID,"KDJ"]}},{Name:"RSI",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_INDEX_ID,Args:[frameID,"RSI"]}},{Name:"WR",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_INDEX_ID,Args:[frameID,"WR"]}},{Name:"CCI",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_INDEX_ID,Args:[frameID,"CCI"]}},{Name:"TRIX",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_INDEX_ID,Args:[frameID,"TRIX"]}}]},{Name:"区间选择",Data:{ID:JSCHART_MENU_ID.CMD_ENABLE_SELECT_RECT_ID,Args:[!this.EnableSelectRect]},Checked:this.EnableSelectRect},{Name:"其他设置",SubMenu:[{Name:"画图工具",Data:{ID:JSCHART_MENU_ID.CMD_SHOW_DRAWTOOL_ID,Args:[]},Checked:this.IsShowDrawToolDialog()},{Name:"区间选择样式",SubMenu:[{Name:"样式1(默认)",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_DRAG_RECT_SHOW_MODE_ID,Args:[0]},Checked:0==this.ChartDragSelectRect.ShowMode},{Name:"样式2",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_DRAG_RECT_SHOW_MODE_ID,Args:[1]},Checked:1==this.ChartDragSelectRect.ShowMode},{Name:"样式3",Data:{ID:JSCHART_MENU_ID.CMD_CHANGE_DRAG_RECT_SHOW_MODE_ID,Args:[2]},Checked:2==this.ChartDragSelectRect.ShowMode}]}]}];if(MARKET_SUFFIX_NAME.IsSHSZStockA(this.Symbol)){var item={Name:"集合竞价",Data:{ID:JSCHART_MENU_ID.CMD_SHOW_BEFORE_DATA_ID,Args:[!this.IsShowBeforeData]},Checked:this.IsShowBeforeData};aryMenu.splice(4,0,item);}//删除菜单
7771
7795
  for(var i=0;i<aryMenu.length;++i){var item=aryMenu[i];if(item.Name=="叠加品种"){for(var j=0;j<item.SubMenu.length;++j){if(item.SubMenu[j].Checked){item.SubMenu.push({Name:JSPopMenu.SEPARATOR_LINE_NAME});item.SubMenu.push({Name:"取消叠加",Data:{ID:JSCHART_MENU_ID.CMD_DELETE_ALL_OVERLAY_SYMBOL_ID}});break;}}}}return aryMenu;};this.OnWheel=function(e){JSConsole.Chart.Log('[MinuteChartContainer::OnWheel]',e);};this.OnDoubleClick=function(x,y,e){JSConsole.Chart.Log("[MinuteChartContainer::OnDoubleClick]",e);if(this.ClickChartTimer!=null){clearTimeout(this.ClickChartTimer);this.ClickChartTimer=null;}var selectedChart;//图形选中
7772
7796
  if(this.SelectedChart.EnableSelected){selectedChart=this.PtInChart(x,y);}var dbClickInfo={SelectedChart:selectedChart};this.DBClickEvent(dbClickInfo,e);//没有图形选中,双击缩放窗口
7773
7797
  if(!selectedChart&&this.EnableZoomIndexWindow){var frameId=this.Frame.PtInFrame(x,y);JSConsole.Chart.Log("[MinuteChartContainer::OnDoubleClick] frameId",frameId);if(frameId>=this.Frame.ZoomStartWindowIndex){if(this.ZoomIndexWindow(frameId,{X:x,Y:y})){this.Frame.SetSizeChage(true);this.Draw();}}}};this.GetDataItem=function(pointInfo){if(!pointInfo)return null;if(!IFrameSplitOperator.IsNumber(pointInfo.Index))return null;if(!this.SourceData||!this.SourceData.Data)return null;var data=this.SourceData;var clientPos=pointInfo.ClientPos;if(clientPos==2||clientPos==3||clientPos>=200&&clientPos<=299||clientPos>=300&&clientPos<=399){if(!this.ChartCorssCursor||!this.ChartCorssCursor.CallAcutionXOperator)return null;var isHScreen=this.Frame.IsHScreen===true;var callAcutionXOper=this.ChartCorssCursor.CallAcutionXOperator;callAcutionXOper.Value=isHScreen?pointInfo.Point.Y:pointInfo.Point.X;callAcutionXOper.Point={X:pointInfo.Point.X,Y:pointInfo.Point.Y};callAcutionXOper.ClientPos=clientPos;if(clientPos==2){if(!this.BeforeOpenData)return null;}else if(clientPos==3){if(!this.AfterCloseData)return null;}else if(clientPos>=200&&clientPos<=299){if(!this.MultiDayBeforeOpenData||!IFrameSplitOperator.IsNonEmptyArray(this.MultiDayBeforeOpenData))return;}else if(clientPos>=300&&tclientPos<=399){if(!this.MultiDayAfterCloseData||!IFrameSplitOperator.IsNonEmptyArray(this.MultiDayAfterCloseData))return;}if(callAcutionXOper.Operator()){var item=callAcutionXOper.Item;return{Type:clientPos,Item:item,Index:callAcutionXOper.DataIndex};}return null;}var index=parseInt(pointInfo.Index.toFixed(0));var dataIndex=index+data.DataOffset;if(dataIndex>=data.Data.length)return null;var item=data.Data[dataIndex];return{Type:clientPos,Item:item,Index:dataIndex};};this.UpdatePointByCursorIndex=function(){this.LastPoint.X=this.Frame.GetXFromIndex(this.CursorIndex);var index=this.CursorIndex;index=parseInt(index.toFixed(0));var data=this.Frame.SourceData;if(data.DataOffset+index>=data.Data.length){return;}var item=data.Data[data.DataOffset+index];var close=null;if(item.Before)close=item.Before.Close;else close=item.Close;this.LastPoint.Y=this.Frame.GetYFromData(close);};//创建
@@ -7777,7 +7801,7 @@ this.ChartCorssCursor=new ChartCorssCursor();this.ChartCorssCursor.PtInClient=fu
7777
7801
  this.ChartSplashPaint=new ChartSplashPaint();this.ChartSplashPaint.Canvas=this.Canvas;this.ChartSplashPaint.HQChart=this;//创建框架容器
7778
7802
  this.Frame=new HQTradeFrame();this.Frame.ChartBorder=new ChartBorder();this.Frame.ChartBorder.UIElement=this.UIElement;this.Frame.ChartBorder.Top=25;this.Frame.ChartBorder.TitleHeight=0;this.Frame.ChartBorder.Left=50;this.Frame.ChartBorder.Bottom=20;this.Frame.Canvas=this.Canvas;this.Frame.GetExtendChartRightWidth=function(){return _this27.GetExtendChartRightWidth();};this.Frame.GetEventCallback=function(id){return _this27.GetEventCallback(id);};this.Frame.ZoomStartWindowIndex=2;this.ChartCorssCursor.Frame=this.Frame;//十字光标绑定框架
7779
7803
  this.ChartSplashPaint.Frame=this.Frame;this.CreateChildWindow(windowCount);this.CreateMainKLine();this.CreateExtendChart("RectSelectPaint",option?option.SelectRect:null);//区间统计
7780
- if(this.EnableIndexChartDrag)this.CreateExtendChart("DragMovePaint");//子窗口动态标题
7804
+ if(this.EnableIndexChartDrag)this.CreateExtendChart("DragMovePaint");this.CreateDragSelectRect(option?option.DragSelectRect:null);//子窗口动态标题
7781
7805
  for(var i=0;i<this.Frame.SubFrame.length;++i){var titlePaint=new DynamicChartTitlePainting();if(i==0||i==1)titlePaint.IsShowMainIndexTitle=false;titlePaint.Frame=this.Frame.SubFrame[i].Frame;titlePaint.Canvas=this.Canvas;titlePaint.LanguageID=this.LanguageID;titlePaint.GetEventCallback=function(id){return _this27.GetEventCallback(id);};titlePaint.SelectedChart=this.SelectedChart;titlePaint.MainTitlePaint=this.TitlePaint[0];this.TitlePaint.push(titlePaint);}this.ChartCorssCursor.StringFormatX.Frame=this.Frame.SubFrame[0].Frame;this.ChartCorssCursor.StringFormatY.Frame=this.Frame;if(this.ChartCorssCursor.CallAcutionXOperator)this.ChartCorssCursor.CallAcutionXOperator.Frame=this.Frame.SubFrame[0].Frame;var bRegisterKeydown=true;var bRegisterWheel=true;if(option&&option.Listener){var item=option.Listener;if(item.KeyDown===false){bRegisterKeydown=false;JSConsole.Chart.Log('[MinuteChartContainer::Create] not register keydown event.');}if(item.Wheel===false){bRegisterWheel=false;JSConsole.Chart.Log('[MinuteChartContainer::Create] not register wheel event.');}}if(bRegisterKeydown)this.UIElement.addEventListener("keydown",function(e){_this27.OnKeyDown(e);},true);//键盘消息
7782
7806
  if(bRegisterWheel)this.UIElement.addEventListener("wheel",function(e){_this27.OnWheel(e);},true);//上下滚动消息
7783
7807
  };//创建子窗口
@@ -11170,6 +11194,7 @@ if(item.Type==Syntax.ExpressionStatement&&item.Expression){if(item.Expression.Ty
11170
11194
  {var _outVar4=item.Expression.Value;if(IFrameSplitOperator.IsString(_outVar4)&&_outVar4.indexOf("$")>0)_outVar4=this.SymbolData.GetOtherSymolCacheData({Literal:_outVar4});varName="__temp_li_"+i+"__";var type=0;if(!Array.isArray(_outVar4))_outVar4=this.SingleDataToArrayData(_outVar4);this.OutVarTable.push({Name:varName,Data:_outVar4,Type:type,NoneName:true});}else if(item.Expression.Type==Syntax.BinaryExpression){var varName="__temp_b_"+i+"__";var _outVar5=item.Expression.Out;var type=0;if(!Array.isArray(_outVar5))_outVar5=this.SingleDataToArrayData(_outVar5);this.OutVarTable.push({Name:varName,Data:_outVar5,Type:type,NoneName:true});}else if(item.Expression.Type==Syntax.LogicalExpression)//逻辑语句 如 T1 AND T2
11171
11195
  {var varName="__temp_l_"+i+"__";var _outVar6=item.Expression.Out;var type=0;if(!Array.isArray(_outVar6))_outVar6=this.SingleDataToArrayData(_outVar6);this.OutVarTable.push({Name:varName,Data:_outVar6,Type:type,NoneName:true});}else if(item.Expression.Type==Syntax.UnaryExpression){var varName="__temp_u_"+i+"__";var varInfo={};if(this.ReadUnaryExpression(item.Expression,varInfo)){var type=0;this.OutVarTable.push({Name:varName,Data:varInfo.OutVar,Type:type,NoneName:true});}}else if(item.Expression.Type==Syntax.MemberExpression)//MA.MA2
11172
11196
  {var outVar=this.ReadMemberVariable(item.Expression);if(outVar){var type=0;var varName="__temp_di_"+i+"__";if(!Array.isArray(outVar))outVar=this.SingleDataToArrayData(outVar);this.OutVarTable.push({Name:varName,Data:outVar,Type:type,NoneName:true});}}else if(item.Expression.Type==Syntax.SequenceExpression){var _varName3=void 0;var _draw3=void 0;var color=void 0,upColor=void 0,downColor=void 0,stickType=void 0;var lineWidth=void 0;var colorStick=false;var pointDot=false;var upDownDot=false;var circleDot=false;var lineStick=false;var stick=false;var volStick=false;var lineArea=false;var stepLine=false;var isShow=true;var isExData=false;var isDotLine=false;var isOverlayLine=false;//叠加线
11197
+ var isSingleLine=false;//独立线段
11173
11198
  var isNoneName=false;var isShowTitle=true;//显示在位置之上,对于DRAWTEXT和DRAWNUMBER等函数有用,放在语句的最后面(不能与LINETHICK等函数共用),比如:
11174
11199
  //DRAWNUMBER(CLOSE>OPEN,HIGH,CLOSE),DRAWABOVE;
11175
11200
  var isDrawAbove=false;var isDrawCenter=false;var isDrawBelow=false;//VALIGN0,VALIGN1,VALIGN2 设置文字垂直对齐方式(上中下)
@@ -11177,7 +11202,7 @@ var isDrawAbove=false;var isDrawCenter=false;var isDrawBelow=false;//VALIGN0,VAL
11177
11202
  var drawAlign=-1,drawVAlign=-1;var fontSize=-1;var bgConfig=null;//背景设置
11178
11203
  var vLineConfig=null;var isFirstDraw=null;var xOffset=null,yOffset=null;var klineType=null;for(var _j14=0;_j14<item.Expression.Expression.length;++_j14){var itemExpression=item.Expression.Expression[_j14];if(itemExpression.Type==Syntax.AssignmentExpression&&itemExpression.Operator==':'&&itemExpression.Left){if(_j14==0){_varName3=itemExpression.Left.Name;var _varValue=this.VarTable.get(_varName3);if(this.VarDrawTable.has(_varName3))//绘图函数赋值
11179
11204
  {_draw3=this.VarDrawTable.get(_varName3);}else if(!Array.isArray(_varValue)){_varValue=this.SingleDataToArrayData(_varValue);this.VarTable.set(_varName3,_varValue);//把常量放到变量表里
11180
- }}else{}}else if(itemExpression.Type==Syntax.Identifier){var _value3=itemExpression.Name;if(_value3==='COLORSTICK')colorStick=true;else if(_value3==='POINTDOT')pointDot=true;else if(_value3==='CIRCLEDOT')circleDot=true;else if(_value3==='DOTLINE')isDotLine=true;else if(_value3=="UPDOWNDOT")upDownDot=true;else if(_value3==='LINESTICK')lineStick=true;else if(_value3==='STICK')stick=true;else if(_value3==='VOLSTICK')volStick=true;else if(_value3=="LINEAREA")lineArea=true;else if(_value3==="DRAWABOVE")isDrawAbove=true;else if(_value3==="DRAWCENTER")isDrawCenter=true;else if(_value3=="DRAWBELOW")isDrawBelow=true;else if(_value3=="STEPLINE")stepLine=true;else if(_value3.indexOf('COLOR')==0)color=_value3;else if(_value3.indexOf("RGBX")==0&&_value3.length==10)color=_value3;//RGBX+“RRGGBB”
11205
+ }}else{}}else if(itemExpression.Type==Syntax.Identifier){var _value3=itemExpression.Name;if(_value3==='COLORSTICK')colorStick=true;else if(_value3==='POINTDOT')pointDot=true;else if(_value3==='CIRCLEDOT')circleDot=true;else if(_value3==='DOTLINE')isDotLine=true;else if(_value3=="UPDOWNDOT")upDownDot=true;else if(_value3==='LINESTICK')lineStick=true;else if(_value3==='STICK')stick=true;else if(_value3==='VOLSTICK')volStick=true;else if(_value3=="LINEAREA")lineArea=true;else if(_value3==="DRAWABOVE")isDrawAbove=true;else if(_value3==="DRAWCENTER")isDrawCenter=true;else if(_value3=="DRAWBELOW")isDrawBelow=true;else if(_value3=="STEPLINE")stepLine=true;else if(_value3=="SINGLELINE")isSingleLine=true;else if(_value3.indexOf('COLOR')==0)color=_value3;else if(_value3.indexOf("RGBX")==0&&_value3.length==10)color=_value3;//RGBX+“RRGGBB”
11181
11206
  else if(_value3.indexOf('LINETHICK')==0)lineWidth=_value3;else if(_value3=="ALIGN0")drawAlign=0;else if(_value3=="ALIGN1")drawAlign=1;else if(_value3=="ALIGN2")drawAlign=2;else if(_value3=="VALIGN0")drawVAlign=0;else if(_value3=="VALIGN1")drawVAlign=1;else if(_value3=="VALIGN2")drawVAlign=2;else if(_value3.indexOf('NODRAW')==0)isShow=false;else if(_value3.indexOf('EXDATA')==0)isExData=true;//扩展数据, 不显示再图形里面
11182
11207
  else if(_value3.indexOf('LINEOVERLAY')==0)isOverlayLine=true;else if(_value3.indexOf("NOTEXT")==0||_value3.indexOf("NOTITLE")==0)isShowTitle=false;//标题不显示
11183
11208
  else if(_value3.indexOf("FONTSIZE")==0){var strFontSize=_value3.replace("FONTSIZE","");fontSize=parseInt(strFontSize);}else{if(_j14==0){_varName3=itemExpression.Name;var _varValue2=this.ReadVariable(_varName3,itemExpression);if(!Array.isArray(_varValue2))_varValue2=this.SingleDataToArrayData(_varValue2);_varName3="__temp_si_"+i+"__";isNoneName=true;this.VarTable.set(_varName3,_varValue2);//放到变量表里
@@ -11193,8 +11218,8 @@ else if(_value3.indexOf("FONTSIZE")==0){var strFontSize=_value3.replace("FONTSIZ
11193
11218
  {var _outVar11=this.VarTable.get(_varName3);var _value8={Name:_varName3,Data:_outVar11,Type:5};if(color)_value8.Color=color;if(lineWidth)_value8.LineWidth=lineWidth;this.OutVarTable.push(_value8);}else if(volStick&&_varName3)//VOLSTICK 画彩色柱状线
11194
11219
  {var _outVar12=this.VarTable.get(_varName3);var _value9={Name:_varName3,Data:_outVar12,Type:6};if(color)_value9.Color=color;if(upColor)_value9.UpColor=upColor;if(downColor)_value9.DownColor=downColor;if(lineWidth)_value9.LineWidth=lineWidth;if(IFrameSplitOperator.IsNumber(stickType))_value9.StickType=stickType;this.OutVarTable.push(_value9);}else if(lineArea&&_varName3)//LINEAREA 面积
11195
11220
  {var _outVar13=this.VarTable.get(_varName3);var _value10={Name:_varName3,Data:_outVar13,Type:9};if(color)_value10.Color=color;if(upColor)_value10.UpColor=upColor;if(downColor)_value10.DownColor=downColor;if(lineWidth)_value10.LineWidth=lineWidth;this.OutVarTable.push(_value10);}else if(colorStick&&_varName3)//CYW: SUM(VAR4,10)/10000, COLORSTICK; 画上下柱子
11196
- {var _outVar14=this.VarTable.get(_varName3);var _value11={Name:_varName3,Data:_outVar14,Color:color,Type:2};if(lineWidth)_value11.LineWidth=lineWidth;if(color)_value11.Color=color;if(upColor)_value11.UpColor=upColor;if(downColor)_value11.DownColor=downColor;this.OutVarTable.push(_value11);}else if(_varName3&&color&&!_draw3){var _outVar15=this.VarTable.get(_varName3);if(!Array.isArray(_outVar15))_outVar15=this.SingleDataToArrayData(_outVar15);var _value12={Name:_varName3,Data:_outVar15,Color:color,Type:0};if(lineWidth)_value12.LineWidth=lineWidth;if(isShow==false)_value12.IsShow=false;if(isExData==true)_value12.IsExData=true;if(isDotLine==true)_value12.IsDotLine=true;if(isOverlayLine==true)_value12.IsOverlayLine=true;if(isNoneName==true)_value12.NoneName=true;if(isShowTitle==false)_value12.IsShowTitle=false;if(stepLine==true)_value12.Type=7;this.OutVarTable.push(_value12);}else if(_draw3)//画图函数
11197
- {var outVar={Name:_draw3.Name,Draw:_draw3,Type:1};if(color)outVar.Color=color;if(isDotLine==true)outVar.IsDotLine=true;if(lineWidth)outVar.LineWidth=lineWidth;if(isDrawAbove)outVar.IsDrawAbove=true;if(isDrawCenter)outVar.IsDrawCenter=true;if(isDrawBelow)outVar.IsDrawBelow=true;if(drawAlign>=0)outVar.DrawAlign=drawAlign;if(drawVAlign>=0)outVar.DrawVAlign=drawVAlign;if(fontSize>0)outVar.DrawFontSize=fontSize;if(bgConfig)outVar.Background=bgConfig;if(vLineConfig)outVar.VerticalLine=vLineConfig;if(IFrameSplitOperator.IsNumber(xOffset))outVar.XOffset=xOffset;if(IFrameSplitOperator.IsNumber(yOffset))outVar.YOffset=yOffset;if(IFrameSplitOperator.IsBool(isFirstDraw))outVar.IsFirstDraw=isFirstDraw;if(IFrameSplitOperator.IsNumber(klineType))outVar.KLineType=klineType;this.OutVarTable.push(outVar);}else if(_varName3){var _outVar16=this.VarTable.get(_varName3);var _value13={Name:_varName3,Data:_outVar16,Type:0};if(color)_value13.Color=color;if(lineWidth)_value13.LineWidth=lineWidth;if(isShow==false)_value13.IsShow=false;if(isExData==true)_value13.IsExData=true;if(isDotLine==true)_value13.IsDotLine=true;if(isOverlayLine==true)_value13.IsOverlayLine=true;if(isShowTitle==false)_value13.IsShowTitle=false;if(stepLine==true)_value13.Type=7;this.OutVarTable.push(_value13);}}}};this.ReadUnaryExpression=function(item,varInfo){var argument=item.Argument;var outVar=null;if(argument.Type==Syntax.Literal){outVar=argument.Value;if(!Array.isArray(outVar))outVar=this.SingleDataToArrayData(outVar);}else if(argument.Type==Syntax.Identifier){var varName=argument.Name;outVar=this.ReadVariable(varName,item.Expression);if(!Array.isArray(outVar))outVar=this.SingleDataToArrayData(outVar);}else if(argument.Type==Syntax.BinaryExpression){outVar=argument.Out;if(!Array.isArray(outVar))outVar=this.SingleDataToArrayData(outVar);}else if(argument.Type==Syntax.CallExpression){var callItem=argument;if(this.Draw.IsDrawFunction(callItem.Callee.Name)){return false;}else if(callItem.Callee.Name==="IFC"&&callItem.Draw){return false;}else{outVar=callItem.Out;if(!Array.isArray(outVar))outVar=this.SingleDataToArrayData(outVar);}}else{return false;}if(item.Operator=='-'){if(outVar)outVar=this.Algorithm.Subtract(0,outVar);}varInfo.OutVar=outVar;return true;};this.GetOutIconData=function(cond,iconDraw){if(Array.isArray(cond)){for(var i=0;i<cond.length&&i<iconDraw.DrawData.length;++i){var item=cond[i];if(item<=0)iconDraw.DrawData[i]=null;}return iconDraw;}if(cond)return iconDraw;return null;};this.GetSoundEvent=function(){if(!this.GetEventCallback)return null;return this.GetEventCallback(JSCHART_EVENT_ID.ON_PLAY_SOUND);};this.Run=function(){try{var data=this.RunAST();//执行脚本
11221
+ {var _outVar14=this.VarTable.get(_varName3);var _value11={Name:_varName3,Data:_outVar14,Color:color,Type:2};if(lineWidth)_value11.LineWidth=lineWidth;if(color)_value11.Color=color;if(upColor)_value11.UpColor=upColor;if(downColor)_value11.DownColor=downColor;this.OutVarTable.push(_value11);}else if(_varName3&&color&&!_draw3){var _outVar15=this.VarTable.get(_varName3);if(!Array.isArray(_outVar15))_outVar15=this.SingleDataToArrayData(_outVar15);var _value12={Name:_varName3,Data:_outVar15,Color:color,Type:0};if(lineWidth)_value12.LineWidth=lineWidth;if(isShow==false)_value12.IsShow=false;if(isExData==true)_value12.IsExData=true;if(isDotLine==true)_value12.IsDotLine=true;if(isOverlayLine==true)_value12.IsOverlayLine=true;if(isSingleLine==true)_value12.IsSingleLine=true;if(isNoneName==true)_value12.NoneName=true;if(isShowTitle==false)_value12.IsShowTitle=false;if(stepLine==true)_value12.Type=7;this.OutVarTable.push(_value12);}else if(_draw3)//画图函数
11222
+ {var outVar={Name:_draw3.Name,Draw:_draw3,Type:1};if(color)outVar.Color=color;if(isDotLine==true)outVar.IsDotLine=true;if(lineWidth)outVar.LineWidth=lineWidth;if(isDrawAbove)outVar.IsDrawAbove=true;if(isDrawCenter)outVar.IsDrawCenter=true;if(isDrawBelow)outVar.IsDrawBelow=true;if(drawAlign>=0)outVar.DrawAlign=drawAlign;if(drawVAlign>=0)outVar.DrawVAlign=drawVAlign;if(fontSize>0)outVar.DrawFontSize=fontSize;if(bgConfig)outVar.Background=bgConfig;if(vLineConfig)outVar.VerticalLine=vLineConfig;if(IFrameSplitOperator.IsNumber(xOffset))outVar.XOffset=xOffset;if(IFrameSplitOperator.IsNumber(yOffset))outVar.YOffset=yOffset;if(IFrameSplitOperator.IsBool(isFirstDraw))outVar.IsFirstDraw=isFirstDraw;if(IFrameSplitOperator.IsNumber(klineType))outVar.KLineType=klineType;this.OutVarTable.push(outVar);}else if(_varName3){var _outVar16=this.VarTable.get(_varName3);var _value13={Name:_varName3,Data:_outVar16,Type:0};if(color)_value13.Color=color;if(lineWidth)_value13.LineWidth=lineWidth;if(isShow==false)_value13.IsShow=false;if(isExData==true)_value13.IsExData=true;if(isDotLine==true)_value13.IsDotLine=true;if(isOverlayLine==true)_value13.IsOverlayLine=true;if(isSingleLine==true)_value13.IsSingleLine=true;if(isShowTitle==false)_value13.IsShowTitle=false;if(stepLine==true)_value13.Type=7;this.OutVarTable.push(_value13);}}}};this.ReadUnaryExpression=function(item,varInfo){var argument=item.Argument;var outVar=null;if(argument.Type==Syntax.Literal){outVar=argument.Value;if(!Array.isArray(outVar))outVar=this.SingleDataToArrayData(outVar);}else if(argument.Type==Syntax.Identifier){var varName=argument.Name;outVar=this.ReadVariable(varName,item.Expression);if(!Array.isArray(outVar))outVar=this.SingleDataToArrayData(outVar);}else if(argument.Type==Syntax.BinaryExpression){outVar=argument.Out;if(!Array.isArray(outVar))outVar=this.SingleDataToArrayData(outVar);}else if(argument.Type==Syntax.CallExpression){var callItem=argument;if(this.Draw.IsDrawFunction(callItem.Callee.Name)){return false;}else if(callItem.Callee.Name==="IFC"&&callItem.Draw){return false;}else{outVar=callItem.Out;if(!Array.isArray(outVar))outVar=this.SingleDataToArrayData(outVar);}}else{return false;}if(item.Operator=='-'){if(outVar)outVar=this.Algorithm.Subtract(0,outVar);}varInfo.OutVar=outVar;return true;};this.GetOutIconData=function(cond,iconDraw){if(Array.isArray(cond)){for(var i=0;i<cond.length&&i<iconDraw.DrawData.length;++i){var item=cond[i];if(item<=0)iconDraw.DrawData[i]=null;}return iconDraw;}if(cond)return iconDraw;return null;};this.GetSoundEvent=function(){if(!this.GetEventCallback)return null;return this.GetEventCallback(JSCHART_EVENT_ID.ON_PLAY_SOUND);};this.Run=function(){try{var data=this.RunAST();//执行脚本
11198
11223
  JSConsole.Complier.Log('[JSComplier.Run] execute finish',data);if(this.IndexCtrl)this.IndexCtrl.Status=0;if(this.UpdateUICallback){JSConsole.Complier.Log('[JSComplier.Run] invoke UpdateUICallback.');if(this.CallbackParam&&this.CallbackParam.Job&&this.CallbackParam.Job.ID==JS_EXECUTE_JOB_ID.JOB_EXECUTE_INDEX){this.UpdateUICallback(data,this.CallbackParam,this.SymbolData);}else{if(this.CallbackParam&&this.CallbackParam.Self&&this.CallbackParam.Self.ClassName==='ScriptIndexConsole')this.CallbackParam.JSExecute=this;if(this.IsUsePageData==true)this.CallbackParam.Self.IsUsePageData=true;this.UpdateUICallback(data,this.CallbackParam);}}}catch(error){JSConsole.Complier.Log(error);if(error.Job){JSConsole.Complier.Log('[JSComplier.Run] download job and reexectue',error.Job);this.JobList.push(error.Job);this.JobList.push({ID:JS_EXECUTE_JOB_ID.JOB_RUN_SCRIPT});this.Execute();}else if(this.ErrorCallback){if(this.IndexCtrl)this.IndexCtrl.Status=0;this.ErrorCallback(error,this.CallbackParam);}}};this.DebugRun_End=function(){var data=this.OutVarTable;JSConsole.Complier.Log('[JSComplier.DebugRun_End] execute finish',data);if(this.IndexCtrl)this.IndexCtrl.Status=0;if(this.UpdateUICallback){JSConsole.Complier.Log('[JSComplier.DebugRun_End] invoke UpdateUICallback.');if(this.CallbackParam&&this.CallbackParam.Job&&this.CallbackParam.Job.ID==JS_EXECUTE_JOB_ID.JOB_EXECUTE_INDEX){this.UpdateUICallback(data,this.CallbackParam,this.SymbolData);}else{if(this.CallbackParam&&this.CallbackParam.Self&&this.CallbackParam.Self.ClassName==='ScriptIndexConsole')this.CallbackParam.JSExecute=this;if(this.IsUsePageData==true)this.CallbackParam.Self.IsUsePageData=true;this.UpdateUICallback(data,this.CallbackParam);}}};this.DebugRun_Next=function(debugCtrl){var _this47=this;if(debugCtrl.ExeLine<debugCtrl.LineCount){var item=this.AST.Body[debugCtrl.ExeLine];this.RunASTNode(item);++debugCtrl.ExeLine;this.DebugFilter(debugCtrl,function(){_this47.DebugRun_Next(debugCtrl);});}else{this.DebugRun_End();debugCtrl.Status=2;this.DebugFilter(debugCtrl,null);}};//debug模式
11199
11224
  this.DebugRun=function(){var _this48=this;try{if(!this.AST)this.ThrowError();if(!this.AST.Body)this.ThrowError();var debugCtrl={LineCount:this.AST.Body.length,ExeLine:0,Self:this,Status:1};this.DebugFilter(debugCtrl,function(){_this48.DebugRun_Next(debugCtrl);});}catch(error){if(this.ErrorCallback){if(this.IndexCtrl)this.IndexCtrl.Status=0;this.ErrorCallback(error,this.CallbackParam);}}};this.VisitNode=function(node){switch(node.Type){case Syntax.SequenceExpression:this.VisitSequenceExpression(node);break;case Syntax.ExpressionStatement:this.VisitNode(node.Expression);break;case Syntax.AssignmentExpression:this.VisitAssignmentExpression(node);break;case Syntax.BinaryExpression:case Syntax.LogicalExpression:this.VisitBinaryExpression(node);break;case Syntax.CallExpression:this.VisitCallExpression(node);break;case Syntax.UnaryExpression:this.VisitUnaryExpression(node);break;}};this.VisitUnaryExpression=function(node){if(node.Operator=='-'){var tempValue=this.GetNodeValueEx(node.Argument);var value=this.Algorithm.Subtract(0,tempValue);}else{var value=node.Argument.Value;}return value;};this.VisitSequenceExpression=function(node){for(var _i130 in node.Expression){var _item18=node.Expression[_i130];this.VisitNode(_item18);}};this.GetDynamicScriptIndex=function(node,args){var dynamicName=node.Callee.Value;var aryValue=dynamicName.split(".");if(aryValue.length!=2){this.ThrowUnexpectedNode(node,'\u8C03\u7528\u6307\u6807\u683C\u5F0F\''+dynamicName+'\'\u9519\u8BEF');}var name=aryValue[0];var outName=aryValue[1];var period=null;var pos=outName.indexOf('#');if(pos!=-1){period=outName.slice(pos+1);//周期
11200
11225
  outName=outName.slice(0,pos);}var strValue="";for(var i=0;i<args.length;++i){var value=args[i];if(strValue.length>0)strValue+=",";strValue+=''+value;}var strArgs='('+strValue+')';var key=outName+'#'+strArgs;if(period)key+='#'+period;if(!this.VarTable.has(name))return null;var indexData=this.VarTable.get(name);var value=indexData[key];return value;};//函数调用
@@ -11388,7 +11413,10 @@ if(varItem.IsShow==false)line.IsShow=false;var titleIndex=windowIndex+1;line.Dat
11388
11413
  if(varItem.IsShow==false)line.IsShow=false;var titleIndex=windowIndex+1;line.Data.Data=varItem.Data;if(varItem.IsShowTitle===false)//NOTEXT 不绘制标题
11389
11414
  {}else if(IFrameSplitOperator.IsString(varItem.Name)&&varItem.Name.indexOf("NOTEXT")==0)//标题中包含NOTEXT不绘制标题
11390
11415
  {}else{if(varItem.NoneName)hqChart.TitlePaint[titleIndex].Data[id]=new DynamicTitleData(line.Data,null,line.Color);else hqChart.TitlePaint[titleIndex].Data[id]=new DynamicTitleData(line.Data,varItem.Name,line.Color);hqChart.TitlePaint[titleIndex].Data[id].ChartClassName=line.ClassName;}this.SetChartIndexName(line);hqChart.ChartPaint.push(line);};this.CreateOverlayLine=function(hqChart,windowIndex,varItem,id,lineType){if(lineType==7)var line=new ChartStepLine();var line=new ChartSubLine();line.Canvas=hqChart.Canvas;line.DrawType=1;line.Name=varItem.Name;line.ChartBorder=hqChart.Frame.SubFrame[windowIndex].Frame.ChartBorder;line.ChartFrame=hqChart.Frame.SubFrame[windowIndex].Frame;if(varItem.Color)line.Color=this.GetColor(varItem.Color);else line.Color=this.GetDefaultColor(id);if(varItem.LineWidth){var width=parseInt(varItem.LineWidth.replace("LINETHICK",""));if(!isNaN(width)&&width>0)line.LineWidth=width;}if(varItem.IsDotLine)line.IsDotLine=true;//虚线
11391
- if(varItem.IsShow==false)line.IsShow=false;var titleIndex=windowIndex+1;line.Data.Data=varItem.Data;hqChart.TitlePaint[titleIndex].Data[id]=new DynamicTitleData(line.Data,varItem.Name,line.Color);hqChart.TitlePaint[titleIndex].Data[id].ChartClassName=line.ClassName;hqChart.ChartPaint.push(line);};//创建柱子
11416
+ if(varItem.IsShow==false)line.IsShow=false;var titleIndex=windowIndex+1;line.Data.Data=varItem.Data;hqChart.TitlePaint[titleIndex].Data[id]=new DynamicTitleData(line.Data,varItem.Name,line.Color);hqChart.TitlePaint[titleIndex].Data[id].ChartClassName=line.ClassName;hqChart.ChartPaint.push(line);};this.CreateSingleLine=function(hqChart,windowIndex,varItem,id,lineType){var line=new ChartSingleLine();line.Canvas=hqChart.Canvas;line.DrawType=1;line.Name=varItem.Name;line.ChartBorder=hqChart.Frame.SubFrame[windowIndex].Frame.ChartBorder;line.ChartFrame=hqChart.Frame.SubFrame[windowIndex].Frame;line.Identify=this.Guid;if(varItem.Color)line.Color=this.GetColor(varItem.Color);else line.Color=this.GetDefaultColor(id);if(varItem.LineWidth){var width=parseInt(varItem.LineWidth.replace("LINETHICK",""));if(!isNaN(width)&&width>0)line.LineWidth=width;}if(varItem.IsDotLine)line.IsDotLine=true;//虚线
11417
+ if(varItem.IsShow==false)line.IsShow=false;var titleIndex=windowIndex+1;line.Data.Data=varItem.Data;this.ReloadChartResource(hqChart,windowIndex,line);if(varItem.IsShowTitle===false)//NOTEXT 不绘制标题
11418
+ {}else if(IFrameSplitOperator.IsString(varItem.Name)&&varItem.Name.indexOf("NOTEXT")==0)//标题中包含NOTEXT不绘制标题
11419
+ {}else{if(varItem.NoneName)hqChart.TitlePaint[titleIndex].Data[id]=new DynamicTitleData(line.Data,null,line.Color);else hqChart.TitlePaint[titleIndex].Data[id]=new DynamicTitleData(line.Data,varItem.Name,line.Color);this.SetTitleData(hqChart.TitlePaint[titleIndex].Data[id],line);}this.SetChartIndexName(line);hqChart.ChartPaint.push(line);};//创建柱子
11392
11420
  this.CreateBar=function(hqChart,windowIndex,varItem,id){var bar=new ChartStickLine();bar.Canvas=hqChart.Canvas;if(varItem.Draw.Width>0)bar.Width=varItem.Draw.Width;else bar.Width=0;bar.Name=varItem.Name;bar.ChartBorder=hqChart.Frame.SubFrame[windowIndex].Frame.ChartBorder;bar.ChartFrame=hqChart.Frame.SubFrame[windowIndex].Frame;if(varItem.Color)bar.Color=this.GetColor(varItem.Color);else bar.Color=this.GetDefaultColor(id);var titleIndex=windowIndex+1;bar.Data.Data=varItem.Draw.DrawData;bar.BarType=varItem.Draw.Type;//hqChart.TitlePaint[titleIndex].Data[id]=new DynamicTitleData(bar.Data,varItem.Name,bar.Color);
11393
11421
  this.SetChartIndexName(bar);hqChart.ChartPaint.push(bar);};//创建文本
11394
11422
  this.CreateText=function(hqChart,windowIndex,varItem,id,resource){var chartText=new ChartSingleText();chartText.Canvas=hqChart.Canvas;chartText.Name=varItem.Name;chartText.ChartBorder=hqChart.Frame.SubFrame[windowIndex].Frame.ChartBorder;chartText.ChartFrame=hqChart.Frame.SubFrame[windowIndex].Frame;chartText.ReloadResource();if(varItem.Color)chartText.Color=this.GetColor(varItem.Color);else chartText.Color=this.GetDefaultColor(id);if(varItem.IsDrawCenter===true)chartText.TextAlign='center';if(varItem.IsDrawAbove===true)chartText.Direction=1;if(varItem.IsDrawBelow===true)chartText.Direction=2;var titleIndex=windowIndex+1;if(varItem.Draw.Position)chartText.Position=varItem.Draw.Position;//赋值坐标
@@ -11457,7 +11485,7 @@ if(this.YSplitScale)hqChart.Frame.SubFrame[windowIndex].Frame.YSplitScale=this.Y
11457
11485
  }
11458
11486
  */for(var _i135=0;_i135<this.OutVar.length;++_i135){var _item24=this.OutVar[_i135];if(_item24.IsExData===true)continue;//扩展数据不显示图形
11459
11487
  if(_item24.Type==1000||_item24.Type==1001)continue;//数据集合, 字符串
11460
- if(_item24.Type==0){if(_item24.IsOverlayLine)this.CreateOverlayLine(hqChart,windowIndex,_item24,_i135,_item24.Type);else this.CreateLine(hqChart,windowIndex,_item24,_i135,_item24.Type);}else if(_item24.Type==1){switch(_item24.Draw.DrawType){case'STICKLINE':this.CreateBar(hqChart,windowIndex,_item24,_i135);break;case'DRAWTEXT':this.CreateDrawTextV2(hqChart,windowIndex,_item24,_i135);break;case'SUPERDRAWTEXT':this.CreateText(hqChart,windowIndex,_item24,_i135);break;case'DRAWLINE':this.CreateStraightLine(hqChart,windowIndex,_item24,_i135);break;case'DRAWBAND':this.CreateBand(hqChart,windowIndex,_item24,_i135);break;case"FILLRGN":this.CreateFillRGN(hqChart,windowIndex,_item24,_i135);break;case"FILLRGN2":this.CreateFillRGN2(hqChart,windowIndex,_item24,_i135);break;case"FILLTOPRGN":case"FILLBOTTOMRGN":case"FILLVERTICALRGN":this.CreateFillBGRGN(hqChart,windowIndex,_item24,_i135);break;case"FLOATRGN":this.CreateFLOATRGN(hqChart,windowIndex,_item24,_i135);break;case'DRAWKLINE':case"DRAWKLINE1":this.CreateKLine(hqChart,windowIndex,_item24,_i135);break;case"DRAWOVERLAYKLINE":this.CreateOverlayKLine(hqChart,windowIndex,_item24,_i135);break;case"DRAWCOLORKLINE":this.CreateDrawColorKLine(hqChart,windowIndex,_item24,_i135);break;case'DRAWKLINE_IF':this.CreateKLine(hqChart,windowIndex,_item24,_i135);break;case'POLYLINE':this.CreatePolyLine(hqChart,windowIndex,_item24,_i135);break;case'DRAWGBK':case"DRAWGBK2":this.CreateBackgroud(hqChart,windowIndex,_item24,_i135);break;case"DRAWGBK_DIV":this.CreateBackgroundDiv(hqChart,windowIndex,_item24,_i135);break;case'DRAWTEXT_LINE':this.CreateTextLine(hqChart,windowIndex,_item24,_i135);break;case'DRAWNUMBER':this.CreateDrawNumber(hqChart,windowIndex,_item24,_i135);break;case"DRAWNUMBER_FIX":case'DRAWTEXT_FIX':this.CreateNumberText(hqChart,windowIndex,_item24,_i135);break;case'DRAWICON':this.CreateIcon(hqChart,windowIndex,_item24,_i135);break;case"ICON":this.CreateIcon(hqChart,windowIndex,_item24,_i135);break;case"TIPICON":this.CreateTipIcon(hqChart,windowIndex,_item24,_i135);break;case'DRAWCHANNEL':this.CreateChannel(hqChart,windowIndex,_item24,_i135);break;case'PARTLINE':this.CreatePartLine(hqChart,windowIndex,_item24,_i135);break;case'DRAWRECTREL':this.CreateRectangle(hqChart,windowIndex,_item24,_i135);break;case"DRAWTEXTABS":case"DRAWTEXTREL":this.CreateDrawText(hqChart,windowIndex,_item24,_i135);break;case"DRAWOVERLAYLINE":this.CreateScriptOverlayLine(hqChart,windowIndex,_item24,_i135);break;case"DRAWSL":this.CreateChartSlopeLine(hqChart,windowIndex,_item24,_i135);break;case"VERTLINE":this.CreateChartVericaltLine(hqChart,windowIndex,_item24,_i135);break;case"HORLINE":this.CreateChartHorizontalLine(hqChart,windowIndex,_item24,_i135);break;case'MULTI_LINE':this.CreateMultiLine(hqChart,windowIndex,_item24,_i135);break;case"MULTI_POINT":this.CreateMultiPoint(hqChart,windowIndex,_item24,_i135);break;case'MULTI_BAR':this.CreateMultiBar(hqChart,windowIndex,_item24,_i135);break;case'MULTI_TEXT':this.CreateMultiText(hqChart,windowIndex,_item24,_i135);break;case'MULTI_SVGICON':this.CreateMultiSVGIcon(hqChart,windowIndex,_item24,_i135);break;case"DRAWSVG":this.CreateChartDrawSVG(hqChart,windowIndex,_item24,_i135);break;case"MULTI_HTMLDOM":this.CreateMulitHtmlDom(hqChart,windowIndex,_item24,_i135);break;case"COLOR_KLINE":this.CreateColorKLine(hqChart,windowIndex,_item24,_i135);break;case"KLINE_BG":this.CreateBackgroud(hqChart,windowIndex,_item24,_i135);break;case"MULTI_POINT_LINE":this.CreateLineMultiData(hqChart,windowIndex,_item24,_i135);break;case"BUY":case"SELL":case"SELLSHORT":case"BUYSHORT":this.CreateTradeIcon(hqChart,windowIndex,_item24,_i135);break;case SCRIPT_CHART_NAME.OVERLAY_BARS:this.CreateStackedBar(hqChart,windowIndex,_item24,_i135);break;case SCRIPT_CHART_NAME.KLINE_TABLE:this.CreateKLineTable(hqChart,windowIndex,_item24,_i135);break;case SCRIPT_CHART_NAME.SCATTER_PLOT:this.CreateScatterPlot(hqChart,windowIndex,_item24,_i135);break;default:{var find=g_ScriptIndexChartFactory.Get(_item24.Draw.DrawType);//外部挂接
11488
+ if(_item24.Type==0){if(_item24.IsOverlayLine)this.CreateOverlayLine(hqChart,windowIndex,_item24,_i135,_item24.Type);else if(_item24.IsSingleLine)this.CreateSingleLine(hqChart,windowIndex,_item24,_i135,_item24.Type);else this.CreateLine(hqChart,windowIndex,_item24,_i135,_item24.Type);}else if(_item24.Type==1){switch(_item24.Draw.DrawType){case'STICKLINE':this.CreateBar(hqChart,windowIndex,_item24,_i135);break;case'DRAWTEXT':this.CreateDrawTextV2(hqChart,windowIndex,_item24,_i135);break;case'SUPERDRAWTEXT':this.CreateText(hqChart,windowIndex,_item24,_i135);break;case'DRAWLINE':this.CreateStraightLine(hqChart,windowIndex,_item24,_i135);break;case'DRAWBAND':this.CreateBand(hqChart,windowIndex,_item24,_i135);break;case"FILLRGN":this.CreateFillRGN(hqChart,windowIndex,_item24,_i135);break;case"FILLRGN2":this.CreateFillRGN2(hqChart,windowIndex,_item24,_i135);break;case"FILLTOPRGN":case"FILLBOTTOMRGN":case"FILLVERTICALRGN":this.CreateFillBGRGN(hqChart,windowIndex,_item24,_i135);break;case"FLOATRGN":this.CreateFLOATRGN(hqChart,windowIndex,_item24,_i135);break;case'DRAWKLINE':case"DRAWKLINE1":this.CreateKLine(hqChart,windowIndex,_item24,_i135);break;case"DRAWOVERLAYKLINE":this.CreateOverlayKLine(hqChart,windowIndex,_item24,_i135);break;case"DRAWCOLORKLINE":this.CreateDrawColorKLine(hqChart,windowIndex,_item24,_i135);break;case'DRAWKLINE_IF':this.CreateKLine(hqChart,windowIndex,_item24,_i135);break;case'POLYLINE':this.CreatePolyLine(hqChart,windowIndex,_item24,_i135);break;case'DRAWGBK':case"DRAWGBK2":this.CreateBackgroud(hqChart,windowIndex,_item24,_i135);break;case"DRAWGBK_DIV":this.CreateBackgroundDiv(hqChart,windowIndex,_item24,_i135);break;case'DRAWTEXT_LINE':this.CreateTextLine(hqChart,windowIndex,_item24,_i135);break;case'DRAWNUMBER':this.CreateDrawNumber(hqChart,windowIndex,_item24,_i135);break;case"DRAWNUMBER_FIX":case'DRAWTEXT_FIX':this.CreateNumberText(hqChart,windowIndex,_item24,_i135);break;case'DRAWICON':this.CreateIcon(hqChart,windowIndex,_item24,_i135);break;case"ICON":this.CreateIcon(hqChart,windowIndex,_item24,_i135);break;case"TIPICON":this.CreateTipIcon(hqChart,windowIndex,_item24,_i135);break;case'DRAWCHANNEL':this.CreateChannel(hqChart,windowIndex,_item24,_i135);break;case'PARTLINE':this.CreatePartLine(hqChart,windowIndex,_item24,_i135);break;case'DRAWRECTREL':this.CreateRectangle(hqChart,windowIndex,_item24,_i135);break;case"DRAWTEXTABS":case"DRAWTEXTREL":this.CreateDrawText(hqChart,windowIndex,_item24,_i135);break;case"DRAWOVERLAYLINE":this.CreateScriptOverlayLine(hqChart,windowIndex,_item24,_i135);break;case"DRAWSL":this.CreateChartSlopeLine(hqChart,windowIndex,_item24,_i135);break;case"VERTLINE":this.CreateChartVericaltLine(hqChart,windowIndex,_item24,_i135);break;case"HORLINE":this.CreateChartHorizontalLine(hqChart,windowIndex,_item24,_i135);break;case'MULTI_LINE':this.CreateMultiLine(hqChart,windowIndex,_item24,_i135);break;case"MULTI_POINT":this.CreateMultiPoint(hqChart,windowIndex,_item24,_i135);break;case'MULTI_BAR':this.CreateMultiBar(hqChart,windowIndex,_item24,_i135);break;case'MULTI_TEXT':this.CreateMultiText(hqChart,windowIndex,_item24,_i135);break;case'MULTI_SVGICON':this.CreateMultiSVGIcon(hqChart,windowIndex,_item24,_i135);break;case"DRAWSVG":this.CreateChartDrawSVG(hqChart,windowIndex,_item24,_i135);break;case"MULTI_HTMLDOM":this.CreateMulitHtmlDom(hqChart,windowIndex,_item24,_i135);break;case"COLOR_KLINE":this.CreateColorKLine(hqChart,windowIndex,_item24,_i135);break;case"KLINE_BG":this.CreateBackgroud(hqChart,windowIndex,_item24,_i135);break;case"MULTI_POINT_LINE":this.CreateLineMultiData(hqChart,windowIndex,_item24,_i135);break;case"BUY":case"SELL":case"SELLSHORT":case"BUYSHORT":this.CreateTradeIcon(hqChart,windowIndex,_item24,_i135);break;case SCRIPT_CHART_NAME.OVERLAY_BARS:this.CreateStackedBar(hqChart,windowIndex,_item24,_i135);break;case SCRIPT_CHART_NAME.KLINE_TABLE:this.CreateKLineTable(hqChart,windowIndex,_item24,_i135);break;case SCRIPT_CHART_NAME.SCATTER_PLOT:this.CreateScatterPlot(hqChart,windowIndex,_item24,_i135);break;default:{var find=g_ScriptIndexChartFactory.Get(_item24.Draw.DrawType);//外部挂接
11461
11489
  if(find&&find.CreateChartCallback)find.CreateChartCallback(hqChart,windowIndex,_item24,_i135,this);}break;}}else if(_item24.Type==2){this.CreateMACD(hqChart,windowIndex,_item24,_i135);}else if(_item24.Type==3){this.CreatePointDot(hqChart,windowIndex,_item24,_i135,hisData);}else if(_item24.Type==4){this.CreateLineStick(hqChart,windowIndex,_item24,_i135);}else if(_item24.Type==5){this.CreateStick(hqChart,windowIndex,_item24,_i135);}else if(_item24.Type==6){this.CreateVolStick(hqChart,windowIndex,_item24,_i135,hisData);}else if(_item24.Type==7){this.CreateLine(hqChart,windowIndex,_item24,_i135,_item24.Type);}else if(_item24.Type==8){this.CreateLine(hqChart,windowIndex,_item24,_i135,_item24.Type);}else if(_item24.Type==9){this.CreateArea(hqChart,windowIndex,_item24,_i135);}var titlePaint=hqChart.TitlePaint[windowIndex+1];if(titlePaint&&titlePaint.Data&&_i135<titlePaint.Data.length)//设置标题数值 小数位数和格式
11462
11490
  {if(this.StringFormat>0)titlePaint.Data[_i135].StringFormat=this.StringFormat;if(this.FloatPrecision>=0)titlePaint.Data[_i135].FloatPrecision=this.FloatPrecision;if(this.OutName&&this.OutName.length>0&&this.Arguments&&this.Arguments.length>0){titlePaint.SetDynamicTitle(this.OutName,this.Arguments);}}}var titleIndex=windowIndex+1;var titlePaint=hqChart.TitlePaint[titleIndex];titlePaint.Title=this.Name;titlePaint.Identify=this.Guid;//指标ID
11463
11491
  titlePaint.ArgumentsText=null;titlePaint.Script=this;titlePaint.IsShowMainIndexTitle=this.IsShowIndexTitle;if(!this.IsShortTitle){var indexParam='';for(var _i136=0;_i136<this.Arguments.length;++_i136){var _item25=this.Arguments[_i136];if(indexParam.length>0)indexParam+=',';indexParam+=_item25.Value.toString();}if(indexParam.length>0)titlePaint.ArgumentsText='('+indexParam+')';}if(this.TitleFont)titlePaint.Font=this.TitleFont;return true;};//给一个默认的颜色
@@ -11908,6 +11936,7 @@ LineDash:[3,3],Tooltip:{BGColor:'rgba(54,54,54, 0.8)',TextColor:"rgb(203,215,224
11908
11936
  },//区间选择
11909
11937
  RectSelect:{LineColor:"rgb(115,83,64)",//竖线
11910
11938
  LineWidth:1*GetDevicePixelRatio(),LineDotted:[3,3],AreaColor:"rgba(26,13,7,0.5)"//面积
11939
+ },RectDrag:{LineColor:"rgb(220,220,220)",LineWidth:1*GetDevicePixelRatio(),BGColor:"rgba(220,220,220,0.2)"//面积
11911
11940
  },SelectedChart:{LineWidth:1,LineColor:'rgb(55,100,100)',Radius:4,MinSpace:200,//点和点间最小间距
11912
11941
  BGColor:"rgb(255,255,255)"},DragMovePaint:{TextColor:"rgb(255,255,255)"//Font:14*GetDevicePixelRatio() +"px 微软雅黑"
11913
11942
  },SessionBreaksPaint:{BGColor:[null,"rgb(42,46,57)"],SplitLine:{Color:'rgb(73,133,231)',Width:1*GetDevicePixelRatio(),Dash:[5*GetDevicePixelRatio(),5*GetDevicePixelRatio()]}},//成交明细
@@ -13160,7 +13189,7 @@ hisData.Symbol=message.symbol;}var stockObj={HQDataType:HQ_DATA_TYPE.KLINE_ID,St
13160
13189
  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);};}/********************************************************************************
13161
13190
  * 版本信息输出
13162
13191
  *
13163
- */var HQCHART_VERSION="1.1.13402";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();//把给外界调用的方法暴露出来
13192
+ */var HQCHART_VERSION="1.1.13435";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();//把给外界调用的方法暴露出来
13164
13193
  exports.default=(_jsChartInit$jsChartS={jsChartInit:JSChart.Init,jsChartStyle:JSChart.SetStyle,// IsIndexSymbol:IsIndexSymbol,
13165
13194
  // BaseIndex:BaseIndex,
13166
13195
  // ChartLine:ChartLine,