hqchart 1.1.14455 → 1.1.14460

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.
@@ -7187,7 +7187,7 @@ this.ChartDrawStorage=new ChartDrawStorage();this.ChartDrawStorageCache=null;//
7187
7187
  this.RightSpaceCount=0;//右侧空白个数
7188
7188
  this.SourceDataLimit=new _map2.default();//每个周期缓存数据最大个数 key=周期 value=最大个数
7189
7189
  this.CtrlMoveStep=5;//Ctrl+(Left/Right) 移动数据个数
7190
- this.CustomShow=null;//首先显示的K线的起始日期 { Date:日期, Time:时间, PageSize:, Callback:}
7190
+ this.CustomShow=null;//首先显示的K线的起始日期 { Date:日期, Time:时间, PageSize:, Callback:, Position:0=left 1=center }
7191
7191
  this.ZoomType=0;//缩放模式 0=最右边固定缩放, 1=十字光标两边缩放
7192
7192
  this.IsZoomLockRight=false;this.KLineSize=null;//{ DataWidth:, }
7193
7193
  //this.EnableYDrag={ Left:false, Right:true };
@@ -7266,11 +7266,12 @@ var firstPoint,secondPoint,subFirstPoint,subSecondPoint;for(var i=0;i<hisData.Da
7266
7266
  if(obj.Type==0)//滑块移动
7267
7267
  {hisData.DataOffset=obj.Start.Index;this.CursorIndex=0;this.LastPoint.X=null;this.LastPoint.Y=null;this.ChartOperator_Temp_Update();}else if(obj.Type==1||obj.Type==2)//左,右
7268
7268
  {var startIndex=obj.Start.Index;var showCount=obj.End.Index-obj.Start.Index+1;var start=hisData.Data[obj.Start.Index];var end=hisData.Data[obj.End.Index];//设置X轴显示数据个数
7269
- this.Frame.SetXShowCount(showCount);hisData.DataOffset=obj.Start.Index;this.CursorIndex=0;this.LastPoint.X=null;this.LastPoint.Y=null;this.ChartOperator_Temp_Update();}}else if(id==JSCHART_OPERATOR_ID.OP_GOTO)//{ Date:日期, Time:, PageSize:可选 }
7270
- {if(!IFrameSplitOperator.IsNumber(obj.Date))return;var hisData=this.ChartOperator_Temp_GetHistoryData();if(!hisData)return;//数据还没有到达
7271
- var index=this.ChartOperator_GetIndex_ByDateTime(hisData,obj,this.Period,0);if(index===null){JSConsole.Chart.Log('[KLineChartContainer::ChartOperator] OP_GOTO can\'t find date='+obj.Date+' time='+obj.Time);return;}var oldXPointCount=this.Frame.SubFrame[0].Frame.XPointCount;var xPointCount=oldXPointCount;if(obj.PageSize>0)//调整一屏显示的个数
7269
+ this.Frame.SetXShowCount(showCount);hisData.DataOffset=obj.Start.Index;this.CursorIndex=0;this.LastPoint.X=null;this.LastPoint.Y=null;this.ChartOperator_Temp_Update();}}else if(id==JSCHART_OPERATOR_ID.OP_GOTO)//{ Date:日期, Time:, PageSize:可选, Position:0=left 1=center }
7270
+ {if(!IFrameSplitOperator.IsNumber(obj.Date))return;var hisData=this.ChartOperator_Temp_GetHistoryData();if(!hisData||!IFrameSplitOperator.IsNonEmptyArray(hisData.Data))return;//数据还没有到达
7271
+ var index=this.ChartOperator_GetIndex_ByDateTime(hisData,obj,this.Period,0);if(index===null){JSConsole.Chart.Log('[KLineChartContainer::ChartOperator] OP_GOTO can\'t find date='+obj.Date+' time='+obj.Time);return;}var position=0;if(IFrameSplitOperator.IsNumber(obj.Position))position=obj.Position;var oldXPointCount=this.Frame.SubFrame[0].Frame.XPointCount;var xPointCount=oldXPointCount;if(obj.PageSize>0)//调整一屏显示的个数
7272
7272
  {xPointCount=obj.PageSize;}if(xPointCount!=oldXPointCount){//设置X轴显示数据个数
7273
- this.Frame.SetXShowCount(xPointCount);}hisData.DataOffset=index;this.CursorIndex=0;this.LastPoint.X=null;this.LastPoint.Y=null;this.ChartOperator_Temp_Update();}else if(id==JSCHART_OPERATOR_ID.OP_GOTO_BY_DATAINDEX)//{PageSize:可选, DataIndex:起始位置数据索引}
7273
+ this.Frame.SetXShowCount(xPointCount);}if(position==1)//居中
7274
+ {var moveStep=parseInt(xPointCount/2);index-=moveStep;if(index<0)index=0;}else{}hisData.DataOffset=index;this.CursorIndex=0;this.LastPoint.X=null;this.LastPoint.Y=null;this.ChartOperator_Temp_Update();}else if(id==JSCHART_OPERATOR_ID.OP_GOTO_BY_DATAINDEX)//{PageSize:可选, DataIndex:起始位置数据索引}
7274
7275
  {if(!IFrameSplitOperator.IsNumber(obj.DataIndex))return;var hisData=this.ChartOperator_Temp_GetHistoryData();if(!hisData)return;//数据还没有到达
7275
7276
  if(obj.DataIndex<0||obj.DataIndex>=hisData.Data.length){JSConsole.Chart.Log('[KLineChartContainer::ChartOperator] OP_GOTO_BY_DATAINDEX obj.DataIndex='+obj.DataIndex+' error.}');return;}var oldXPointCount=this.Frame.SubFrame[0].Frame.XPointCount;var xPointCount=oldXPointCount;if(obj.PageSize>0)xPointCount=obj.PageSize;//调整一屏显示的个数
7276
7277
  if(xPointCount!=oldXPointCount)this.Frame.SetXShowCount(xPointCount);//设置X轴显示数据个数
@@ -7354,7 +7355,7 @@ this.TitlePaint[0].Symbol=this.Symbol;this.TitlePaint[0].Name=this.Name;this.Cha
7354
7355
  this.Frame.Data=this.ChartPaint[0].Data;for(var i in this.OverlayChartPaint)//主图股票数据绑定到叠加股票上
7355
7356
  {var item=this.OverlayChartPaint[i];item.MainData=this.ChartPaint[0].Data;}this.ChartCorssCursor.StringFormatY.Symbol=this.Symbol;};this.SetCustomShow=function(customShow,hisData){if(customShow.Callback)//预留给外部回调,可以定制移动
7356
7357
  {customShow.Callback(chart,hisData);return;}var index=this.ChartOperator_GetIndex_ByDateTime(hisData,customShow,this.Period,0);if(index===null){JSConsole.Chart.Log("[KLineChartContainer::SetCustomShow] Can't find index by customShow=",customShow);return;}if(IFrameSplitOperator.IsPlusNumber(customShow.PageSize))//调整一屏显示个数 否则使用默认的
7357
- {var showCount=customShow.PageSize;for(var i=0;i<this.Frame.SubFrame.length;++i){var item=this.Frame.SubFrame[i].Frame;item.XPointCount=showCount;}}this.ChartPaint[0].Data.DataOffset=index;this.CursorIndex=0;};this.OnDragSelectRectMouseUp=function(e){var paint=this.GetRectSelectPaint();if(!paint)return;var selectData=paint.GetSelectRectData();if(!selectData)return;var pixelTatio=GetDevicePixelRatio();var corssCursor=this.ChartCorssCursor;//十字光标
7358
+ {var showCount=customShow.PageSize;for(var i=0;i<this.Frame.SubFrame.length;++i){var item=this.Frame.SubFrame[i].Frame;item.XPointCount=showCount;}}if(IFrameSplitOperator.IsNumber(customShow.Position)){var xCount=this.Frame.SubFrame[0].Frame.XPointCount;var moveStep=parseInt(xCount/2);index-=moveStep;if(index<0)index=0;}this.ChartPaint[0].Data.DataOffset=index;this.CursorIndex=0;};this.OnDragSelectRectMouseUp=function(e){var paint=this.GetRectSelectPaint();if(!paint)return;var selectData=paint.GetSelectRectData();if(!selectData)return;var pixelTatio=GetDevicePixelRatio();var corssCursor=this.ChartCorssCursor;//十字光标
7358
7359
  var x=corssCursor.LastPoint.X/pixelTatio;var y=corssCursor.LastPoint.Y/pixelTatio;var isShowMenu=true;var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_DRAG_SELECT_RECT_MOUSEUP);if(event){var data={X:x,Y:y,SelectData:selectData,//区间选择的数据
7359
7360
  RectSelectPaint:paint,//区间选择背景
7360
7361
  IsShowMenu:false};event.Callback(event,data,this);isShowMenu=data.IsShowMenu;}if(this.IsShowSelectRectDialog())//区间统计
@@ -7645,7 +7646,7 @@ this.ClearIndexPaint();this.ResetOverlaySymbolStatus();this.ResetScrollBar();thi
7645
7646
  this.AutoUpdateEvent(false,'KLineChartContainer::ChangeRight');//切换复权先停止更新
7646
7647
  this.ClearIndexPaint();this.ResetOverlaySymbolStatus();this.ResetScrollBar();this.Frame.ClearYCoordinateMaxMin();this.UnlockCorssCursor();this.RequestHistoryMinuteData();//请求分钟数据
7647
7648
  }}};//设置第1屏的起始日期
7648
- this.SetFirstShowDate=function(obj){if(!obj||!obj.Date)return;var option={ID:JSCHART_OPERATOR_ID.OP_GOTO,Date:obj.Date};if(IFrameSplitOperator.IsNumber(obj.Time))option.Time=obj.Time;if(IFrameSplitOperator.IsNumber(obj.PageSize))option.PageSize=obj.PageSize;this.ChartOperator(option);};//删除某一个窗口的指标, bCallDestory=是否调用图形销毁函数
7649
+ this.SetFirstShowDate=function(obj){if(!obj||!obj.Date)return;var option={ID:JSCHART_OPERATOR_ID.OP_GOTO,Date:obj.Date,Position:0};if(IFrameSplitOperator.IsNumber(obj.Time))option.Time=obj.Time;if(IFrameSplitOperator.IsNumber(obj.PageSize))option.PageSize=obj.PageSize;if(IFrameSplitOperator.IsNumber(obj.Position))option.Position=obj.Position;this.ChartOperator(option);};//删除某一个窗口的指标, bCallDestory=是否调用图形销毁函数
7649
7650
  this.DeleteIndexPaint=function(windowIndex,bCallDestroy){if(!this.Frame.SubFrame[windowIndex])return;var subFrame=this.Frame.SubFrame[windowIndex].Frame;if(!subFrame)return;var paint=[];//踢出当前窗口的指标画法
7650
7651
  for(var i=0;i<this.ChartPaint.length;++i){var item=this.ChartPaint[i];var bFind=item.ChartFrame.Guid==subFrame.Guid||item.ChartFrame==subFrame;if(i==0||!bFind){paint.push(item);}else{if(bCallDestroy===true){if(item&&item.OnDestroy)item.OnDestroy();//图形销毁
7651
7652
  }}}subFrame.YSpecificMaxMin=null;//清空指定最大最小值
@@ -7806,7 +7807,7 @@ this.ClearIndexPaint();//清空指标
7806
7807
  if(option){if(IFrameSplitOperator.IsNonEmptyArray(option.Windows)){var windows=option.Windows;for(var i=0;i<windows.length;++i){if(i>=this.WindowIndex.length)break;//暂时不支持 动态增加/减少
7807
7808
  var item=windows[i];if(!item)continue;if(item.Script){this.WindowIndex[i]=new ScriptIndex(item.Name,item.Script,item.Args,item);//脚本执行
7808
7809
  }else if(item.API){var apiItem=item.API;this.WindowIndex[i]=new APIScriptIndex(apiItem.Name,apiItem.Script,apiItem.Args,item);}else{var indexID=item.Index;var systemScript=new JSIndexScript();var indexInfo=systemScript.Get(indexID);if(indexInfo){JSIndexScript.ModifyAttribute(indexInfo,item);indexInfo.ID=indexID;this.WindowIndex[i]=new ScriptIndex(indexInfo.Name,indexInfo.Script,indexInfo.Args,indexInfo);//脚本执行
7809
- }}}}if(option.CustomShow&&IFrameSplitOperator.IsPlusNumber(option.CustomShow.Date)){var item=option.CustomShow;this.CustomShow={Date:item.Date};if(IFrameSplitOperator.IsNumber(item.Time))this.CustomShow.Time=item.Time;if(IFrameSplitOperator.IsPlusNumber(item.PageSize))this.CustomShow.PageSize=item.PageSize;}}this.ReloadChartDrawPicture();this.Frame.ClearUpDonwFrameYData();if(ChartData.IsDayPeriod(this.Period,true)){this.ClearStockCache();this.RequestHistoryData();//请求日线数据
7810
+ }}}}if(option.CustomShow&&IFrameSplitOperator.IsPlusNumber(option.CustomShow.Date)){var item=option.CustomShow;this.CustomShow={Date:item.Date,Position:0};if(IFrameSplitOperator.IsNumber(item.Time))this.CustomShow.Time=item.Time;if(IFrameSplitOperator.IsPlusNumber(item.PageSize))this.CustomShow.PageSize=item.PageSize;if(IFrameSplitOperator.IsNumber(item.Position))this.CustomShow.Position=item.Position;}}this.ReloadChartDrawPicture();this.Frame.ClearUpDonwFrameYData();if(ChartData.IsDayPeriod(this.Period,true)){this.ClearStockCache();this.RequestHistoryData();//请求日线数据
7810
7811
  //this.ReqeustKLineInfoData();
7811
7812
  }else if(ChartData.IsMinutePeriod(this.Period,true)||ChartData.IsSecondPeriod(this.Period)||ChartData.IsMilliSecondPeriod(this.Period)){this.ClearStockCache();this.RequestHistoryMinuteData();//请求分钟数据
7812
7813
  }else if(ChartData.IsTickPeriod(this.Period)){this.ClearStockCache();this.RequestTickData();}};this.ReqeustKLineInfoData=function(obj){if(obj&&obj.FunctionName=="RecvDragDayData")//增量更新
@@ -8282,7 +8283,10 @@ var aryOverlaySymbol=[];//叠加的股票列表
8282
8283
  for(var i=0;i<this.OverlayChartPaint.length;++i){var item=this.OverlayChartPaint[i];if(item&&item.Symbol)aryOverlaySymbol.push(item.Symbol);}var bShowCorss=false;//十字光标十字线
8283
8284
  var bCorssDrawCloseLine=false;//十字光标只能画在走势图价格线上
8284
8285
  var bCorssDrawVaildTime=false;var bCorssDrawPoint=false;if(this.ChartCorssCursor){bShowCorss=this.ChartCorssCursor.IsShowCorss;bCorssDrawCloseLine=this.ChartCorssCursor.IsOnlyDrawMinute;bCorssDrawVaildTime=this.ChartCorssCursor.IsFixXLastTime;bCorssDrawPoint=this.ChartCorssCursor.CorssPointConfig.Enable;}var minItem=null;if(frameID>=0&&option&&IFrameSplitOperator.IsNumber(option.CursorIndex)){var kData=this.GetKData();if(kData&&IFrameSplitOperator.IsNonEmptyArray(kData.Data)){var dataIndex=kData.DataOffset+parseInt(option.CursorIndex.toFixed(0));if(dataIndex>=0&&dataIndex<kData.Data.length)minItem=kData.Data[dataIndex];}}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_CORSS_LINE_ID,Args:[!bShowCorss]},Checked:bShowCorss},{Name:"画在价格线上",Data:{ID:JSCHART_MENU_ID.CMD_CORSS_ON_CLOSE_LINE_ID,Args:[!bCorssDrawCloseLine]},Checked:bCorssDrawCloseLine},{Name:"画在有效X轴上",Data:{ID:JSCHART_MENU_ID.CMD_CORSS_ON_VAILD_TIME_ID,Args:[!bCorssDrawVaildTime]},Checked:bCorssDrawVaildTime},{Name:"画圆点",Data:{ID:JSCHART_MENU_ID.CMD_CORSS_POINT_ID,Args:[!bCorssDrawPoint]},Checked:bCorssDrawPoint}]},{Name:"其他设置",SubMenu:[{Name:"画图工具",Data:{ID:JSCHART_MENU_ID.CMD_SHOW_DRAWTOOL_ID,Args:[]},Checked:this.IsShowDrawToolDialog()},{Name:JSPopMenu.SEPARATOR_LINE_NAME},{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}]},{Name:"K线浮动框",SubMenu:[{Name:"禁用",Data:{ID:JSCHART_MENU_ID.CMD_DIALOG_TOOLTIP_ATTRIBUTE,Args:[{Enable:false}]},Checked:!this.DialogTooltip},{Name:"样式1",Data:{ID:JSCHART_MENU_ID.CMD_DIALOG_TOOLTIP_ATTRIBUTE,Args:[{Enable:true,Style:0}]},Checked:this.DialogTooltip&&this.DialogTooltip.Style===0},{Name:"样式2",Data:{ID:JSCHART_MENU_ID.CMD_DIALOG_TOOLTIP_ATTRIBUTE,Args:[{Enable:true,Style:1}]},Checked:this.DialogTooltip&&this.DialogTooltip.Style===1}]}]}];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);}for(var i=0;i<aryMenu.length;++i){var item=aryMenu[i];if(item.Name=="叠加品种")//删除菜单
8285
- {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=="十字光标"){if(minItem){var bLocked=this.IsLockCorssCursor();if(bLocked)item.SubMenu.push({Name:"锁十字光标",Data:{ID:JSCHART_MENU_ID.CMD_UNLOCK_CROSSCURSOR},Checked:bLocked});else item.SubMenu.push({Name:"锁十字光标",Data:{ID:JSCHART_MENU_ID.CMD_LOCK_CROSSCURSOR,Args:[{KItem:{Date:minItem.Date,Time:minItem.Time},Draw:true}]},Checked:bLocked});}}}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.EnableYDrag&&(this.EnableYDrag.Left||this.EnableYDrag.Right)&&this.Frame&&this.Frame.PtInFrameY){var pixelTatio=GetDevicePixelRatio();var x=(e.clientX-this.UIElement.getBoundingClientRect().left)*pixelTatio;var y=(e.clientY-this.UIElement.getBoundingClientRect().top)*pixelTatio;var dragY=this.Frame.PtInFrameY(x,y);if(dragY&&dragY.Index>=0){this.CancelZoomUpDownFrameY(dragY);}}if(this.ClickChartTimer!=null){clearTimeout(this.ClickChartTimer);this.ClickChartTimer=null;}var selectedChart;//图形选中
8286
+ {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=="十字光标"){if(minItem){var bLocked=this.IsLockCorssCursor();if(bLocked)item.SubMenu.push({Name:"锁十字光标",Data:{ID:JSCHART_MENU_ID.CMD_UNLOCK_CROSSCURSOR},Checked:bLocked});else item.SubMenu.push({Name:"锁十字光标",Data:{ID:JSCHART_MENU_ID.CMD_LOCK_CROSSCURSOR,Args:[{KItem:{Date:minItem.Date,Time:minItem.Time},Draw:true}]},Checked:bLocked});}}}return aryMenu;};this.OnWheel=function(e){JSConsole.Chart.Log('[MinuteChartContainer::OnWheel]',e);if(this.ChartSplashPaint&&this.ChartSplashPaint.IsEnableSplash==true)return;var pixelTatio=GetDevicePixelRatio();var x=(e.clientX-this.UIElement.getBoundingClientRect().left)*pixelTatio;var y=(e.clientY-this.UIElement.getBoundingClientRect().top)*pixelTatio;var isInClient=false;var rtClient={Left:this.Frame.ChartBorder.GetLeft(),Right:this.Frame.ChartBorder.GetRight(),Top:this.Frame.ChartBorder.GetTop(),Bottom:this.Frame.ChartBorder.GetBottom(),Width:this.Frame.ChartBorder.GetWidth(),Height:this.Frame.ChartBorder.GetHeight()};if(x>=rtClient.Left&&x<=rtClient.Right&&y>=rtClient.Top&&y<=rtClient.Bottom)isInClient=true;if(!this.OnWheel_ZoomUpDownFrameY(e,x,y))return;if(e.preventDefault)e.preventDefault();else e.returnValue=false;};//通过滚轴缩放Y轴
8287
+ this.OnWheel_ZoomUpDownFrameY=function(e,x,y){if(!this.EnableYDrag.Wheel)return false;var frameID=this.Frame.PtInFrame(x,y);if(frameID<0)return false;var frame=this.Frame.SubFrame[frameID].Frame;var splitOper=frame.YSplitOperator;if(!splitOper||!splitOper.FixedYMaxMin)return false;//Y轴缩放状态下才有效
8288
+ var wheelValue=e.wheelDelta;if(!IFrameSplitOperator.IsObjectExist(e.wheelDelta))wheelValue=e.deltaY*-0.01;var yMove=this.EnableYDrag.WheelYMove;if(wheelValue>0)yMove*=-1;var dragY={Position:0,Index:frameID,Right:false,Left:false};//只能两边缩放
8289
+ if(!this.Frame.OnZoomUpDownFrameY(dragY,yMove))return false;this.Frame.SetSizeChage(true);this.Draw();return true;};this.OnDoubleClick=function(x,y,e){JSConsole.Chart.Log("[MinuteChartContainer::OnDoubleClick]",e);if(this.EnableYDrag&&(this.EnableYDrag.Left||this.EnableYDrag.Right)&&this.Frame&&this.Frame.PtInFrameY){var pixelTatio=GetDevicePixelRatio();var x=(e.clientX-this.UIElement.getBoundingClientRect().left)*pixelTatio;var y=(e.clientY-this.UIElement.getBoundingClientRect().top)*pixelTatio;var dragY=this.Frame.PtInFrameY(x,y);if(dragY&&dragY.Index>=0){this.CancelZoomUpDownFrameY(dragY);}}if(this.ClickChartTimer!=null){clearTimeout(this.ClickChartTimer);this.ClickChartTimer=null;}var selectedChart;//图形选中
8286
8290
  if(this.SelectedChart.EnableSelected){selectedChart=this.PtInChart(x,y);}var dbClickInfo={SelectedChart:selectedChart};this.DBClickEvent(dbClickInfo,e);//没有图形选中,双击缩放窗口
8287
8291
  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);};//创建
8288
8292
  //windowCount 窗口个数
@@ -12363,7 +12367,7 @@ chart.Frame.ChartBorder.Left*=pixelTatio;chart.Frame.ChartBorder.Right*=pixelTat
12363
12367
  this.ChangeSymbol=function(symbol,option){if(this.JSChartContainer)this.JSChartContainer.ChangeSymbol(symbol,option);};this.SetColumn=function(aryColumn,option){if(this.JSChartContainer)this.JSChartContainer.SetColumn(aryColumn,option);};this.EnableFilter=function(bEnable,option)//启动|关闭筛选
12364
12368
  {if(this.JSChartContainer)this.JSChartContainer.EnableFilter(bEnable,option);};//事件回调
12365
12369
  this.AddEventCallback=function(obj){if(this.JSChartContainer&&typeof this.JSChartContainer.AddEventCallback=='function'){JSConsole.Chart.Log('[JSDealChart:AddEventCallback] obj=',obj);this.JSChartContainer.AddEventCallback(obj);}};//重新加载配置
12366
- this.ReloadResource=function(option){if(this.JSChartContainer&&typeof this.JSChartContainer.ReloadResource=='function'){JSConsole.Chart.Log('[JSDealChart:ReloadResource] ');this.JSChartContainer.ReloadResource(option);}};}JSDealChart.Init=function(divElement){var jsChartControl=new JSDealChart(divElement);jsChartControl.OnSize();return jsChartControl;};function JSDealChartContainer(uielement){this.ClassName='JSDealChartContainer';this.Frame;//框架画法
12370
+ this.ReloadResource=function(option){if(this.JSChartContainer&&typeof this.JSChartContainer.ReloadResource=='function'){JSConsole.Chart.Log('[JSDealChart:ReloadResource] ');this.JSChartContainer.ReloadResource(option);}};this.ChartDestroy=function(){if(this.JSChartContainer&&typeof this.JSChartContainer.ChartDestroy=='function'){this.JSChartContainer.ChartDestroy();}};}JSDealChart.Init=function(divElement){var jsChartControl=new JSDealChart(divElement);jsChartControl.OnSize();return jsChartControl;};function JSDealChartContainer(uielement){this.ClassName='JSDealChartContainer';this.Frame;//框架画法
12367
12371
  this.ChartPaint=[];//图形画法
12368
12372
  this.ChartSplashPaint=null;//等待提示
12369
12373
  this.LoadDataSplashTitle="数据加载中";//下载数据提示信息
@@ -12378,7 +12382,7 @@ this.AutoUpdateTimer=null;this.AutoUpdateFrequency=15000;//更新频率
12378
12382
  this.LoadDataSplashTitle="数据加载中";//下载数据提示信息
12379
12383
  this.UIElement=uielement;this.LastPoint=new Point();//鼠标位置
12380
12384
  this.IsDestroy=false;//是否已经销毁了
12381
- this.ChartDestory=function()//销毁
12385
+ this.ChartDestroy=function()//销毁
12382
12386
  {this.IsDestroy=true;this.StopAutoUpdate();};this.EnableFilterData=false;//是否启动筛选
12383
12387
  //筛选数据
12384
12388
  this.FilterData=function(aryDeal){if(!this.EnableFilterData)return aryDeal;//过滤由外部处理
@@ -12508,7 +12512,7 @@ chart.Frame.ChartBorder.Left*=pixelTatio;chart.Frame.ChartBorder.Right*=pixelTat
12508
12512
  this.ChangeSymbol=function(symbol,option){if(this.JSChartContainer)this.JSChartContainer.ChangeSymbol(symbol,option);};this.SetColumn=function(aryColumn,option){if(this.JSChartContainer)this.JSChartContainer.SetColumn(aryColumn,option);};this.SetSelectedRow=function(option){if(this.JSChartContainer)this.JSChartContainer.SetSelectedRow(option);};this.EnableFilter=function(bEnable,option)//启动|关闭筛选
12509
12513
  {if(this.JSChartContainer)this.JSChartContainer.EnableFilter(bEnable,option);};//事件回调
12510
12514
  this.AddEventCallback=function(obj){if(this.JSChartContainer&&typeof this.JSChartContainer.AddEventCallback=='function'){JSConsole.Chart.Log('[JSReportChart:AddEventCallback] obj=',obj);this.JSChartContainer.AddEventCallback(obj);}};//重新加载配置
12511
- this.ReloadResource=function(option){if(this.JSChartContainer&&typeof this.JSChartContainer.ReloadResource=='function'){JSConsole.Chart.Log('[JSReportChart:ReloadResource] ');this.JSChartContainer.ReloadResource(option);}};this.ChartDestory=function(){if(this.JSChartContainer&&typeof this.JSChartContainer.ChartDestory=='function'){this.JSChartContainer.ChartDestory();}};this.Draw=function(){if(this.JSChartContainer&&typeof this.JSChartContainer.Draw=='function'){JSConsole.Chart.Log('[JSReportChart:Draw] ');this.JSChartContainer.Draw();}};}JSReportChart.Init=function(divElement){var jsChartControl=new JSReportChart(divElement);jsChartControl.OnSize();return jsChartControl;};//自定义风格
12515
+ this.ReloadResource=function(option){if(this.JSChartContainer&&typeof this.JSChartContainer.ReloadResource=='function'){JSConsole.Chart.Log('[JSReportChart:ReloadResource] ');this.JSChartContainer.ReloadResource(option);}};this.ChartDestroy=function(){if(this.JSChartContainer&&typeof this.JSChartContainer.ChartDestroy=='function'){this.JSChartContainer.ChartDestroy();}};this.Draw=function(){if(this.JSChartContainer&&typeof this.JSChartContainer.Draw=='function'){JSConsole.Chart.Log('[JSReportChart:Draw] ');this.JSChartContainer.Draw();}};}JSReportChart.Init=function(divElement){var jsChartControl=new JSReportChart(divElement);jsChartControl.OnSize();return jsChartControl;};//自定义风格
12512
12516
  JSReportChart.SetStyle=function(option){if(option)g_JSChartResource.SetStyle(option);};//获取颜色配置 (设置配必须啊在JSChart.Init()之前)
12513
12517
  JSReportChart.GetResource=function(){return g_JSChartResource;};function HQReportItem(){this.OriginalSymbol;//原始代码
12514
12518
  this.Symbol;this.Name;this.YClose;this.Open;this.Price;this.High;this.Low;this.Amount;this.Vol;this.Increase;//涨幅
@@ -12567,7 +12571,7 @@ this.JSPopMenu;//内置菜单
12567
12571
  this.IsShowRightMenu=true;//
12568
12572
  this.TooltipMinuteChart;//分时图
12569
12573
  //MouseOnStatus:{ RowIndex:行, ColumnIndex:列}
12570
- this.LastMouseStatus={MoveStatus:null,TooltipStatus:null,MouseOnStatus:null};this.ChartDestory=function()//销毁
12574
+ this.LastMouseStatus={MoveStatus:null,TooltipStatus:null,MouseOnStatus:null};this.ChartDestroy=function()//销毁
12571
12575
  {this.IsDestroy=true;this.StopAutoUpdate();this.DestroyMinuteChartTooltip();this.DestroyFloatTooltip();};this.StopAutoDragScrollTimer=function(){JSConsole.Chart.Log("[JSReportChartContainer::StopAutoDragScrollTimer] stop ");this.EnablePageScroll=false;if(this.AutoDragScrollTimer!=null){clearTimeout(this.AutoDragScrollTimer);this.AutoDragScrollTimer=null;}};this.InitalPopMenu=function()//初始化弹出窗口
12572
12576
  {if(this.JSPopMenu)return;this.JSPopMenu=new JSPopMenu();//内置菜单
12573
12577
  this.JSPopMenu.Inital();};this.InitalMinuteChartTooltip=function(option){if(this.TooltipMinuteChart)return;this.TooltipMinuteChart=new JSTooltipMinuteChart();this.TooltipMinuteChart.Inital(this,option);this.TooltipMinuteChart.Create();};this.DestroyMinuteChartTooltip=function(){if(!this.TooltipMinuteChart)return;this.TooltipMinuteChart.Destroy();this.TooltipMinuteChart=null;};this.InitalFloatTooltip=function(option){if(this.FloatTooltip)return;this.FloatTooltip=new JSFloatTooltip();this.FloatTooltip.Inital(this,option);this.FloatTooltip.Create();};this.HideFloatTooltip=function(){if(!this.FloatTooltip)return;this.FloatTooltip.Hide();};this.DestroyFloatTooltip=function(){if(!this.FloatTooltip)return;this.FloatTooltip.Destroy();this.FloatTooltip=null;};this.DrawFloatTooltip=function(point,toolTip){if(!this.FloatTooltip)return;this.UpdateFloatTooltip(point,toolTip);};this.UpdateFloatTooltip=function(point,toolTip){if(!this.FloatTooltip)return;var sendData={Tooltip:toolTip,Point:point,DataType:3};this.FloatTooltip.Update(sendData);};//data={ Symbol }
@@ -13337,7 +13341,7 @@ chart.Frame.ChartBorder.Left*=pixelTatio;chart.Frame.ChartBorder.Right*=pixelTat
13337
13341
  //切换股票代码接口
13338
13342
  this.ChangeSymbol=function(symbol,option){if(this.JSChartContainer)this.JSChartContainer.ChangeSymbol(symbol,option);};this.SetColumn=function(aryColumn,option){if(this.JSChartContainer)this.JSChartContainer.SetColumn(aryColumn,option);};//事件回调
13339
13343
  this.AddEventCallback=function(obj){if(this.JSChartContainer&&typeof this.JSChartContainer.AddEventCallback=='function'){JSConsole.Chart.Log('[JSTReportChart:AddEventCallback] obj=',obj);this.JSChartContainer.AddEventCallback(obj);}};//重新加载配置
13340
- this.ReloadResource=function(option){if(this.JSChartContainer&&typeof this.JSChartContainer.ReloadResource=='function'){JSConsole.Chart.Log('[JSTReportChart:ReloadResource] ');this.JSChartContainer.ReloadResource(option);}};this.ChartDestory=function(){if(this.JSChartContainer&&typeof this.JSChartContainer.ChartDestory=='function'){this.JSChartContainer.ChartDestory();}};this.Draw=function(){if(this.JSChartContainer&&typeof this.JSChartContainer.Draw=='function'){JSConsole.Chart.Log('[JSTReportChart:Draw] ');this.JSChartContainer.Draw();}};}JSTReportChart.Init=function(divElement){var jsChartControl=new JSTReportChart(divElement);jsChartControl.OnSize();return jsChartControl;};//自定义风格
13344
+ this.ReloadResource=function(option){if(this.JSChartContainer&&typeof this.JSChartContainer.ReloadResource=='function'){JSConsole.Chart.Log('[JSTReportChart:ReloadResource] ');this.JSChartContainer.ReloadResource(option);}};this.ChartDestroy=function(){if(this.JSChartContainer&&typeof this.JSChartContainer.ChartDestroy=='function'){this.JSChartContainer.ChartDestroy();}};this.Draw=function(){if(this.JSChartContainer&&typeof this.JSChartContainer.Draw=='function'){JSConsole.Chart.Log('[JSTReportChart:Draw] ');this.JSChartContainer.Draw();}};}JSTReportChart.Init=function(divElement){var jsChartControl=new JSTReportChart(divElement);jsChartControl.OnSize();return jsChartControl;};//自定义风格
13341
13345
  JSTReportChart.SetStyle=function(option){if(option)g_JSChartResource.SetStyle(option);};//获取颜色配置 (设置配必须啊在JSChart.Init()之前)
13342
13346
  JSTReportChart.GetResource=function(){return g_JSChartResource;};JSTReportChart.GetfloatPrecision=function(symbol){return GetfloatPrecision(symbol);};function HQTReportItem(){this.Symbol;this.Name;this.YClose;this.Open;this.Price;this.High;this.Low;this.Amount;this.Vol;this.Positon;//持仓量
13343
13347
  this.Increase;//涨幅
@@ -13378,7 +13382,7 @@ this.EnablePageCycle=false;//是否循环翻页
13378
13382
  this.TooltipMinuteChart;//分时图
13379
13383
  this.FloatTooltip;//浮框提示
13380
13384
  this.LastMouseStatus={MoveStatus:null,TooltipStatus:null,MouseOnStatus:null};this.IsDestroy=false;//是否已经销毁了
13381
- this.ChartDestory=function()//销毁
13385
+ this.ChartDestroy=function()//销毁
13382
13386
  {this.IsDestroy=true;this.StopAutoUpdate();this.DestroyMinuteChartTooltip();this.DestroyFloatTooltip();};this.InitalMinuteChartTooltip=function(option){if(this.TooltipMinuteChart)return;this.TooltipMinuteChart=new JSTooltipMinuteChart();this.TooltipMinuteChart.Inital(this,option);this.TooltipMinuteChart.Create();};this.DestroyMinuteChartTooltip=function(){if(!this.TooltipMinuteChart)return;this.TooltipMinuteChart.Destroy();this.TooltipMinuteChart=null;};//data={ Symbol }
13383
13387
  this.ShowMinuteChartTooltip=function(x,y,data){if(!this.TooltipMinuteChart)return;var rtClient=this.UIElement.getBoundingClientRect();var rtScroll=GetScrollPosition();var offsetLeft=rtClient.left+rtScroll.Left;var offsetTop=rtClient.top+rtScroll.Top;data.Offset={Left:offsetLeft,Top:offsetTop};this.TooltipMinuteChart.Show(data,x,y);};this.HideMinuteChartTooltip=function(){if(!this.TooltipMinuteChart)return;this.TooltipMinuteChart.Hide();};this.InitalFloatTooltip=function(option){if(this.FloatTooltip)return;this.FloatTooltip=new JSFloatTooltip();this.FloatTooltip.Inital(this,option);this.FloatTooltip.Create();};this.HideFloatTooltip=function(){if(!this.FloatTooltip)return;this.FloatTooltip.Hide();};this.DestroyFloatTooltip=function(){if(!this.FloatTooltip)return;this.FloatTooltip.Destroy();this.FloatTooltip=null;};this.DrawFloatTooltip=function(point,toolTip){if(!this.FloatTooltip)return;this.UpdateFloatTooltip(point,toolTip);};this.UpdateFloatTooltip=function(point,toolTip){if(!this.FloatTooltip)return;var sendData={Tooltip:toolTip,Point:point,DataType:4};this.FloatTooltip.Update(sendData);};//清空固定行数据
13384
13388
  this.ClearFixedRowData=function(){this.FixedRowData.Data=[];};//设置固定行
@@ -13644,7 +13648,7 @@ chart.Frame.ChartBorder.Left*=pixelTatio;chart.Frame.ChartBorder.Right*=pixelTat
13644
13648
  //对外接口
13645
13649
  this.SetColumn=function(aryColumn,option){if(this.JSChartContainer)this.JSChartContainer.SetColumn(aryColumn,option);};//事件回调
13646
13650
  this.AddEventCallback=function(obj){if(this.JSChartContainer&&typeof this.JSChartContainer.AddEventCallback=='function'){JSConsole.Chart.Log('[JSKeyboardChart:AddEventCallback] obj=',obj);this.JSChartContainer.AddEventCallback(obj);}};//重新加载配置
13647
- this.ReloadResource=function(option){if(this.JSChartContainer&&typeof this.JSChartContainer.ReloadResource=='function'){JSConsole.Chart.Log('[JSKeyboardChart:ReloadResource] ');this.JSChartContainer.ReloadResource(option);}};this.ChartDestory=function(){if(this.JSChartContainer&&typeof this.JSChartContainer.ChartDestory=='function'){this.JSChartContainer.ChartDestory();}};this.Draw=function(){if(this.JSChartContainer&&typeof this.JSChartContainer.Draw=='function'){JSConsole.Chart.Log('[JSKeyboardChart:Draw] ');this.JSChartContainer.Draw();}};this.SetSymbolData=function(arySymbol){if(this.JSChartContainer&&typeof this.JSChartContainer.Draw=='function'){JSConsole.Chart.Log('[JSKeyboardChart:SetSymbolData] ',arySymbol);this.JSChartContainer.SetSymbolData(arySymbol);}};this.Search=function(strText){if(this.JSChartContainer&&typeof this.JSChartContainer.Search=='function'){JSConsole.Chart.Log('[JSKeyboardChart:Search] ',strText);this.JSChartContainer.Search(strText);}};this.OnKeyDown=function(event){if(this.JSChartContainer&&typeof this.JSChartContainer.OnKeyDown=='function'){JSConsole.Chart.Log('[JSKeyboardChart:OnKeyDown] ',event);this.JSChartContainer.OnKeyDown(event);}};this.ClearSearch=function(option){if(this.JSChartContainer&&typeof this.JSChartContainer.ClearSearch=='function'){JSConsole.Chart.Log('[JSKeyboardChart:ClearSearch] ',option);this.JSChartContainer.ClearSearch(option);}};}JSKeyboardChart.Init=function(divElement){var jsChartControl=new JSKeyboardChart(divElement);jsChartControl.OnSize();return jsChartControl;};//自定义风格
13651
+ this.ReloadResource=function(option){if(this.JSChartContainer&&typeof this.JSChartContainer.ReloadResource=='function'){JSConsole.Chart.Log('[JSKeyboardChart:ReloadResource] ');this.JSChartContainer.ReloadResource(option);}};this.ChartDestroy=function(){if(this.JSChartContainer&&typeof this.JSChartContainer.ChartDestroy=='function'){this.JSChartContainer.ChartDestroy();}};this.Draw=function(){if(this.JSChartContainer&&typeof this.JSChartContainer.Draw=='function'){JSConsole.Chart.Log('[JSKeyboardChart:Draw] ');this.JSChartContainer.Draw();}};this.SetSymbolData=function(arySymbol){if(this.JSChartContainer&&typeof this.JSChartContainer.Draw=='function'){JSConsole.Chart.Log('[JSKeyboardChart:SetSymbolData] ',arySymbol);this.JSChartContainer.SetSymbolData(arySymbol);}};this.Search=function(strText){if(this.JSChartContainer&&typeof this.JSChartContainer.Search=='function'){JSConsole.Chart.Log('[JSKeyboardChart:Search] ',strText);this.JSChartContainer.Search(strText);}};this.OnKeyDown=function(event){if(this.JSChartContainer&&typeof this.JSChartContainer.OnKeyDown=='function'){JSConsole.Chart.Log('[JSKeyboardChart:OnKeyDown] ',event);this.JSChartContainer.OnKeyDown(event);}};this.ClearSearch=function(option){if(this.JSChartContainer&&typeof this.JSChartContainer.ClearSearch=='function'){JSConsole.Chart.Log('[JSKeyboardChart:ClearSearch] ',option);this.JSChartContainer.ClearSearch(option);}};}JSKeyboardChart.Init=function(divElement){var jsChartControl=new JSKeyboardChart(divElement);jsChartControl.OnSize();return jsChartControl;};//自定义风格
13648
13652
  JSKeyboardChart.SetStyle=function(option){if(option)g_JSChartResource.SetStyle(option);};function JSKeyboardChartContainer(uielement){this.ClassName='JSKeyboardChartContainer';this.Frame;//框架画法
13649
13653
  this.ChartPaint=[];//图形画法
13650
13654
  this.Canvas=uielement.getContext("2d");//画布
@@ -13658,7 +13662,7 @@ this.UIElement=uielement;this.LastPoint=new Point();//鼠标位置
13658
13662
  //拖拽滚动条
13659
13663
  this.DragYScroll=null;//{Start:{x,y}, End:{x, y}}
13660
13664
  this.IsDestroy=false;//是否已经销毁了
13661
- this.ChartDestory=function()//销毁
13665
+ this.ChartDestroy=function()//销毁
13662
13666
  {this.IsDestroy=true;};this.ClearSearch=function(option){this.Data.Data=[];this.Data.XOffset=0;this.Data.YOffset=0;if(option&&option.Redraw==true)this.Draw();};this.SearchFunctionKeyData=function(strSearch){if(strSearch.length<=0)return null;if(!IFrameSplitOperator.IsNonEmptyArray(this.FunctionKeyData))return null;var aryData=[];for(var i=0;i<this.FunctionKeyData.length;++i){var groupData=this.FunctionKeyData[i];if(!groupData)continue;if(!IFrameSplitOperator.IsNonEmptyArray(groupData.Data))continue;var aryExactQuery=[];//精确查询
13663
13667
  var aryFuzzyQuery=[];//模糊查询
13664
13668
  var aryEqualQuery=[];//相等
@@ -13797,7 +13801,7 @@ chart.Frame.ChartBorder.Left*=pixelTatio;chart.Frame.ChartBorder.Right*=pixelTat
13797
13801
  //对外接口
13798
13802
  //事件回调
13799
13803
  this.AddEventCallback=function(obj){if(this.JSChartContainer&&typeof this.JSChartContainer.AddEventCallback=='function'){JSConsole.Chart.Log('[JSScrollBarChart:AddEventCallback] obj=',obj);this.JSChartContainer.AddEventCallback(obj);}};//重新加载配置
13800
- this.ReloadResource=function(option){if(this.JSChartContainer&&typeof this.JSChartContainer.ReloadResource=='function'){JSConsole.Chart.Log('[JSScrollBarChart:ReloadResource] ');this.JSChartContainer.ReloadResource(option);}};this.ChartDestory=function(){if(this.JSChartContainer&&typeof this.JSChartContainer.ChartDestory=='function'){this.JSChartContainer.ChartDestory();}};this.Draw=function(){if(this.JSChartContainer&&typeof this.JSChartContainer.Draw=='function'){JSConsole.Chart.Log('[JSScrollBarChart:Draw] ');this.JSChartContainer.Draw();}};this.RecvData=function(data,option){if(this.JSChartContainer&&typeof this.JSChartContainer.RecvData=='function'){JSConsole.Chart.Log('[JSScrollBarChart:RecvData] ');this.JSChartContainer.RecvData(data,option);}};this.UpdateSlider=function(obj){if(this.JSChartContainer&&typeof this.JSChartContainer.UpdateSlider=='function'){JSConsole.Chart.Log('[JSScrollBarChart:UpdateSlider] ');this.JSChartContainer.UpdateSlider(obj);}};this.Reset=function(option){if(this.JSChartContainer&&typeof this.JSChartContainer.Reset=='function'){JSConsole.Chart.Log('[JSScrollBarChart:Reset] ');this.JSChartContainer.Reset(option);}};//重新加载配置
13804
+ this.ReloadResource=function(option){if(this.JSChartContainer&&typeof this.JSChartContainer.ReloadResource=='function'){JSConsole.Chart.Log('[JSScrollBarChart:ReloadResource] ');this.JSChartContainer.ReloadResource(option);}};this.ChartDestroy=function(){if(this.JSChartContainer&&typeof this.JSChartContainer.ChartDestroy=='function'){this.JSChartContainer.ChartDestroy();}};this.Draw=function(){if(this.JSChartContainer&&typeof this.JSChartContainer.Draw=='function'){JSConsole.Chart.Log('[JSScrollBarChart:Draw] ');this.JSChartContainer.Draw();}};this.RecvData=function(data,option){if(this.JSChartContainer&&typeof this.JSChartContainer.RecvData=='function'){JSConsole.Chart.Log('[JSScrollBarChart:RecvData] ');this.JSChartContainer.RecvData(data,option);}};this.UpdateSlider=function(obj){if(this.JSChartContainer&&typeof this.JSChartContainer.UpdateSlider=='function'){JSConsole.Chart.Log('[JSScrollBarChart:UpdateSlider] ');this.JSChartContainer.UpdateSlider(obj);}};this.Reset=function(option){if(this.JSChartContainer&&typeof this.JSChartContainer.Reset=='function'){JSConsole.Chart.Log('[JSScrollBarChart:Reset] ');this.JSChartContainer.Reset(option);}};//重新加载配置
13801
13805
  this.ReloadResource=function(option){if(this.JSChartContainer&&typeof this.JSChartContainer.ReloadResource=='function'){JSConsole.Chart.Log('[JSScrollBarChart:ReloadResource] ');this.JSChartContainer.ReloadResource(option);}};}JSScrollBarChart.Init=function(divElement){var jsChartControl=new JSScrollBarChart(divElement);jsChartControl.OnSize();return jsChartControl;};//自定义风格
13802
13806
  JSScrollBarChart.SetStyle=function(option){if(option)g_JSChartResource.SetStyle(option);};//获取颜色配置 (设置配必须啊在JSChart.Init()之前)
13803
13807
  JSScrollBarChart.GetResource=function(){return g_JSChartResource;};//////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -13821,7 +13825,7 @@ this.mapEvent=new _map2.default();//通知外部调用 key:JSCHART_EVENT_ID valu
13821
13825
  this.UIElement=uielement;this.LastPoint=new Point();//鼠标位置
13822
13826
  //this.XStepPixel=10*GetDevicePixelRatio();
13823
13827
  this.IsDestroy=false;//是否已经销毁了
13824
- this.HQChart=null;this.ChartDestory=function()//销毁
13828
+ this.HQChart=null;this.ChartDestroy=function()//销毁
13825
13829
  {this.IsDestroy=true;};this.GetHQChart=function(){return this.HQChart;};//设置事件回调
13826
13830
  //{event:事件id, callback:回调函数}
13827
13831
  this.AddEventCallback=function(object){if(!object||!object.event||!object.callback)return;var data={Callback:object.callback,Source:object};this.mapEvent.set(object.event,data);};this.RemoveEventCallback=function(eventid){if(!this.mapEvent.has(eventid))return;this.mapEvent.delete(eventid);};this.GetEventCallback=function(id)//获取事件回调
@@ -14340,7 +14344,7 @@ hisData.Symbol=message.symbol;}var stockObj={HQDataType:HQ_DATA_TYPE.KLINE_ID,St
14340
14344
  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);};}/********************************************************************************
14341
14345
  * 版本信息输出
14342
14346
  *
14343
- */var HQCHART_VERSION="1.1.14454";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();//把给外界调用的方法暴露出来
14347
+ */var HQCHART_VERSION="1.1.14459";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();//把给外界调用的方法暴露出来
14344
14348
  exports.default=(_jsChartInit$jsChartS={jsChartInit:JSChart.Init,jsChartStyle:JSChart.SetStyle,// IsIndexSymbol:IsIndexSymbol,
14345
14349
  // BaseIndex:BaseIndex,
14346
14350
  // ChartLine:ChartLine,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hqchart",
3
- "version": "1.1.14455",
3
+ "version": "1.1.14460",
4
4
  "description": "HQChart - H5, 微信小程序 沪深/港股/数字货币/期货/美股 K线图(kline),走势图,缩放,拖拽,十字光标,画图工具,截图,筹码图. 分析家语法,通达信语法,(麦语法),第3方数据对接",
5
5
  "main": "lib/main.js",
6
6
  "scripts": {
@@ -193,11 +193,11 @@ function JSTReportChart(divElement)
193
193
  }
194
194
  }
195
195
 
196
- this.ChartDestory=function()
196
+ this.ChartDestroy=function()
197
197
  {
198
- if (this.JSChartContainer && typeof (this.JSChartContainer.ChartDestory) == 'function')
198
+ if (this.JSChartContainer && typeof (this.JSChartContainer.ChartDestroy) == 'function')
199
199
  {
200
- this.JSChartContainer.ChartDestory();
200
+ this.JSChartContainer.ChartDestroy();
201
201
  }
202
202
  }
203
203
 
@@ -333,7 +333,7 @@ function JSTReportChartContainer(uielement)
333
333
 
334
334
  this.IsDestroy=false; //是否已经销毁了
335
335
 
336
- this.ChartDestory=function() //销毁
336
+ this.ChartDestroy=function() //销毁
337
337
  {
338
338
  this.IsDestroy=true;
339
339
  this.StopAutoUpdate();
@@ -155,6 +155,14 @@ function JSDealChart(divElement)
155
155
  this.JSChartContainer.ReloadResource(option);
156
156
  }
157
157
  }
158
+
159
+ this.ChartDestroy=function()
160
+ {
161
+ if (this.JSChartContainer && typeof (this.JSChartContainer.ChartDestroy) == 'function')
162
+ {
163
+ this.JSChartContainer.ChartDestroy();
164
+ }
165
+ }
158
166
  }
159
167
 
160
168
 
@@ -198,7 +206,7 @@ function JSDealChartContainer(uielement)
198
206
 
199
207
  this.IsDestroy=false; //是否已经销毁了
200
208
 
201
- this.ChartDestory=function() //销毁
209
+ this.ChartDestroy=function() //销毁
202
210
  {
203
211
  this.IsDestroy=true;
204
212
  this.StopAutoUpdate();
@@ -75227,7 +75227,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
75227
75227
  this.SourceDataLimit=new Map(); //每个周期缓存数据最大个数 key=周期 value=最大个数
75228
75228
  this.CtrlMoveStep=5; //Ctrl+(Left/Right) 移动数据个数
75229
75229
 
75230
- this.CustomShow=null; //首先显示的K线的起始日期 { Date:日期, Time:时间, PageSize:, Callback:}
75230
+ this.CustomShow=null; //首先显示的K线的起始日期 { Date:日期, Time:时间, PageSize:, Callback:, Position:0=left 1=center }
75231
75231
  this.ZoomType=0; //缩放模式 0=最右边固定缩放, 1=十字光标两边缩放
75232
75232
  this.IsZoomLockRight=false;
75233
75233
  this.KLineSize=null; //{ DataWidth:, }
@@ -75815,12 +75815,12 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
75815
75815
  this.ChartOperator_Temp_Update();
75816
75816
  }
75817
75817
  }
75818
- else if (id==JSCHART_OPERATOR_ID.OP_GOTO) //{ Date:日期, Time:, PageSize:可选 }
75818
+ else if (id==JSCHART_OPERATOR_ID.OP_GOTO) //{ Date:日期, Time:, PageSize:可选, Position:0=left 1=center }
75819
75819
  {
75820
75820
  if (!IFrameSplitOperator.IsNumber(obj.Date)) return;
75821
75821
 
75822
75822
  var hisData=this.ChartOperator_Temp_GetHistoryData();
75823
- if (!hisData) return; //数据还没有到达
75823
+ if (!hisData || !IFrameSplitOperator.IsNonEmptyArray(hisData.Data)) return; //数据还没有到达
75824
75824
 
75825
75825
  var index=this.ChartOperator_GetIndex_ByDateTime(hisData, obj, this.Period, 0);
75826
75826
 
@@ -75830,6 +75830,8 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
75830
75830
  return;
75831
75831
  }
75832
75832
 
75833
+ var position=0;
75834
+ if (IFrameSplitOperator.IsNumber(obj.Position)) position=obj.Position;
75833
75835
  var oldXPointCount=this.Frame.SubFrame[0].Frame.XPointCount;
75834
75836
  var xPointCount=oldXPointCount;
75835
75837
  if (obj.PageSize>0) //调整一屏显示的个数
@@ -75843,6 +75845,17 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
75843
75845
  this.Frame.SetXShowCount(xPointCount);
75844
75846
  }
75845
75847
 
75848
+ if (position==1) //居中
75849
+ {
75850
+ var moveStep=parseInt(xPointCount/2);
75851
+ index-=moveStep;
75852
+ if (index<0) index=0;
75853
+ }
75854
+ else
75855
+ {
75856
+
75857
+ }
75858
+
75846
75859
  hisData.DataOffset=index;
75847
75860
  this.CursorIndex=0;
75848
75861
  this.LastPoint.X=null;
@@ -76748,6 +76761,15 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
76748
76761
  item.XPointCount=showCount;
76749
76762
  }
76750
76763
  }
76764
+
76765
+ if (IFrameSplitOperator.IsNumber(customShow.Position))
76766
+ {
76767
+ var xCount=this.Frame.SubFrame[0].Frame.XPointCount;
76768
+ var moveStep=parseInt(xCount/2);
76769
+ index-=moveStep;
76770
+ if (index<0) index=0;
76771
+ }
76772
+
76751
76773
 
76752
76774
  this.ChartPaint[0].Data.DataOffset=index;
76753
76775
  this.CursorIndex=0;
@@ -78773,9 +78795,10 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
78773
78795
  {
78774
78796
  if (!obj || !obj.Date) return;
78775
78797
 
78776
- var option={ ID:JSCHART_OPERATOR_ID.OP_GOTO, Date:obj.Date };
78798
+ var option={ ID:JSCHART_OPERATOR_ID.OP_GOTO, Date:obj.Date, Position:0 };
78777
78799
  if (IFrameSplitOperator.IsNumber(obj.Time)) option.Time=obj.Time;
78778
78800
  if (IFrameSplitOperator.IsNumber(obj.PageSize)) option.PageSize=obj.PageSize;
78801
+ if (IFrameSplitOperator.IsNumber(obj.Position)) option.Position=obj.Position;
78779
78802
 
78780
78803
  this.ChartOperator(option);
78781
78804
  }
@@ -80173,9 +80196,10 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
80173
80196
  if (option.CustomShow && IFrameSplitOperator.IsPlusNumber(option.CustomShow.Date))
80174
80197
  {
80175
80198
  var item=option.CustomShow;
80176
- this.CustomShow={ Date:item.Date };
80199
+ this.CustomShow={ Date:item.Date, Position:0 };
80177
80200
  if (IFrameSplitOperator.IsNumber(item.Time)) this.CustomShow.Time=item.Time;
80178
80201
  if (IFrameSplitOperator.IsPlusNumber(item.PageSize)) this.CustomShow.PageSize=item.PageSize;
80202
+ if (IFrameSplitOperator.IsNumber(item.Position)) this.CustomShow.Position=item.Position;
80179
80203
  }
80180
80204
  }
80181
80205
 
@@ -85334,6 +85358,53 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
85334
85358
  this.OnWheel=function(e)
85335
85359
  {
85336
85360
  JSConsole.Chart.Log('[MinuteChartContainer::OnWheel]',e);
85361
+ if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash == true) return;
85362
+
85363
+ var pixelTatio = GetDevicePixelRatio();
85364
+ var x = (e.clientX-this.UIElement.getBoundingClientRect().left)*pixelTatio;
85365
+ var y = (e.clientY-this.UIElement.getBoundingClientRect().top)*pixelTatio;
85366
+
85367
+ var isInClient=false;
85368
+ var rtClient=
85369
+ {
85370
+ Left:this.Frame.ChartBorder.GetLeft(), Right:this.Frame.ChartBorder.GetRight(),
85371
+ Top:this.Frame.ChartBorder.GetTop(), Bottom:this.Frame.ChartBorder.GetBottom(),
85372
+ Width:this.Frame.ChartBorder.GetWidth(), Height:this.Frame.ChartBorder.GetHeight()
85373
+ };
85374
+
85375
+ if (x>=rtClient.Left && x<=rtClient.Right && y>=rtClient.Top && y<=rtClient.Bottom ) isInClient=true;
85376
+
85377
+ if (!this.OnWheel_ZoomUpDownFrameY(e,x,y)) return;
85378
+
85379
+ if(e.preventDefault) e.preventDefault();
85380
+ else e.returnValue = false;
85381
+ }
85382
+
85383
+ //通过滚轴缩放Y轴
85384
+ this.OnWheel_ZoomUpDownFrameY=function(e, x, y)
85385
+ {
85386
+ if (!this.EnableYDrag.Wheel) return false;
85387
+
85388
+ var frameID=this.Frame.PtInFrame(x,y);
85389
+ if (frameID<0) return false;
85390
+
85391
+ var frame=this.Frame.SubFrame[frameID].Frame;
85392
+ var splitOper=frame.YSplitOperator;
85393
+ if (!splitOper || !splitOper.FixedYMaxMin) return false; //Y轴缩放状态下才有效
85394
+
85395
+ var wheelValue=e.wheelDelta;
85396
+ if (!IFrameSplitOperator.IsObjectExist(e.wheelDelta))
85397
+ wheelValue=e.deltaY* -0.01;
85398
+
85399
+ var yMove=this.EnableYDrag.WheelYMove;
85400
+ if (wheelValue>0) yMove*=-1;
85401
+ var dragY={ Position:0, Index:frameID, Right:false, Left:false }; //只能两边缩放
85402
+ if (!this.Frame.OnZoomUpDownFrameY(dragY, yMove)) return false;
85403
+
85404
+ this.Frame.SetSizeChage(true);
85405
+ this.Draw();
85406
+
85407
+ return true;
85337
85408
  }
85338
85409
 
85339
85410
  this.OnDoubleClick=function(x,y,e)
@@ -167,11 +167,11 @@ function JSKeyboardChart(divElement)
167
167
  }
168
168
  }
169
169
 
170
- this.ChartDestory=function()
170
+ this.ChartDestroy=function()
171
171
  {
172
- if (this.JSChartContainer && typeof (this.JSChartContainer.ChartDestory) == 'function')
172
+ if (this.JSChartContainer && typeof (this.JSChartContainer.ChartDestroy) == 'function')
173
173
  {
174
- this.JSChartContainer.ChartDestory();
174
+ this.JSChartContainer.ChartDestroy();
175
175
  }
176
176
  }
177
177
 
@@ -261,7 +261,7 @@ function JSKeyboardChartContainer(uielement)
261
261
 
262
262
  this.IsDestroy=false; //是否已经销毁了
263
263
 
264
- this.ChartDestory=function() //销毁
264
+ this.ChartDestroy=function() //销毁
265
265
  {
266
266
  this.IsDestroy=true;
267
267
  }
@@ -308,11 +308,11 @@ function JSReportChart(divElement)
308
308
  }
309
309
  }
310
310
 
311
- this.ChartDestory=function()
311
+ this.ChartDestroy=function()
312
312
  {
313
- if (this.JSChartContainer && typeof (this.JSChartContainer.ChartDestory) == 'function')
313
+ if (this.JSChartContainer && typeof (this.JSChartContainer.ChartDestroy) == 'function')
314
314
  {
315
- this.JSChartContainer.ChartDestory();
315
+ this.JSChartContainer.ChartDestroy();
316
316
  }
317
317
  }
318
318
 
@@ -481,7 +481,7 @@ function JSReportChartContainer(uielement)
481
481
  //MouseOnStatus:{ RowIndex:行, ColumnIndex:列}
482
482
  this.LastMouseStatus={ MoveStatus:null, TooltipStatus:null, MouseOnStatus:null };
483
483
 
484
- this.ChartDestory=function() //销毁
484
+ this.ChartDestroy=function() //销毁
485
485
  {
486
486
  this.IsDestroy=true;
487
487
  this.StopAutoUpdate();
@@ -153,11 +153,11 @@ function JSScrollBarChart(divElement)
153
153
  }
154
154
  }
155
155
 
156
- this.ChartDestory=function()
156
+ this.ChartDestroy=function()
157
157
  {
158
- if (this.JSChartContainer && typeof (this.JSChartContainer.ChartDestory) == 'function')
158
+ if (this.JSChartContainer && typeof (this.JSChartContainer.ChartDestroy) == 'function')
159
159
  {
160
- this.JSChartContainer.ChartDestory();
160
+ this.JSChartContainer.ChartDestroy();
161
161
  }
162
162
  }
163
163
 
@@ -270,7 +270,7 @@ function JSScrollBarChartContainer(uielement)
270
270
 
271
271
  this.HQChart=null;
272
272
 
273
- this.ChartDestory=function() //销毁
273
+ this.ChartDestroy=function() //销毁
274
274
  {
275
275
  this.IsDestroy=true;
276
276
  }
@@ -79152,7 +79152,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
79152
79152
  this.SourceDataLimit=new Map(); //每个周期缓存数据最大个数 key=周期 value=最大个数
79153
79153
  this.CtrlMoveStep=5; //Ctrl+(Left/Right) 移动数据个数
79154
79154
 
79155
- this.CustomShow=null; //首先显示的K线的起始日期 { Date:日期, Time:时间, PageSize:, Callback:}
79155
+ this.CustomShow=null; //首先显示的K线的起始日期 { Date:日期, Time:时间, PageSize:, Callback:, Position:0=left 1=center }
79156
79156
  this.ZoomType=0; //缩放模式 0=最右边固定缩放, 1=十字光标两边缩放
79157
79157
  this.IsZoomLockRight=false;
79158
79158
  this.KLineSize=null; //{ DataWidth:, }
@@ -79740,12 +79740,12 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
79740
79740
  this.ChartOperator_Temp_Update();
79741
79741
  }
79742
79742
  }
79743
- else if (id==JSCHART_OPERATOR_ID.OP_GOTO) //{ Date:日期, Time:, PageSize:可选 }
79743
+ else if (id==JSCHART_OPERATOR_ID.OP_GOTO) //{ Date:日期, Time:, PageSize:可选, Position:0=left 1=center }
79744
79744
  {
79745
79745
  if (!IFrameSplitOperator.IsNumber(obj.Date)) return;
79746
79746
 
79747
79747
  var hisData=this.ChartOperator_Temp_GetHistoryData();
79748
- if (!hisData) return; //数据还没有到达
79748
+ if (!hisData || !IFrameSplitOperator.IsNonEmptyArray(hisData.Data)) return; //数据还没有到达
79749
79749
 
79750
79750
  var index=this.ChartOperator_GetIndex_ByDateTime(hisData, obj, this.Period, 0);
79751
79751
 
@@ -79755,6 +79755,8 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
79755
79755
  return;
79756
79756
  }
79757
79757
 
79758
+ var position=0;
79759
+ if (IFrameSplitOperator.IsNumber(obj.Position)) position=obj.Position;
79758
79760
  var oldXPointCount=this.Frame.SubFrame[0].Frame.XPointCount;
79759
79761
  var xPointCount=oldXPointCount;
79760
79762
  if (obj.PageSize>0) //调整一屏显示的个数
@@ -79768,6 +79770,17 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
79768
79770
  this.Frame.SetXShowCount(xPointCount);
79769
79771
  }
79770
79772
 
79773
+ if (position==1) //居中
79774
+ {
79775
+ var moveStep=parseInt(xPointCount/2);
79776
+ index-=moveStep;
79777
+ if (index<0) index=0;
79778
+ }
79779
+ else
79780
+ {
79781
+
79782
+ }
79783
+
79771
79784
  hisData.DataOffset=index;
79772
79785
  this.CursorIndex=0;
79773
79786
  this.LastPoint.X=null;
@@ -80673,6 +80686,15 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
80673
80686
  item.XPointCount=showCount;
80674
80687
  }
80675
80688
  }
80689
+
80690
+ if (IFrameSplitOperator.IsNumber(customShow.Position))
80691
+ {
80692
+ var xCount=this.Frame.SubFrame[0].Frame.XPointCount;
80693
+ var moveStep=parseInt(xCount/2);
80694
+ index-=moveStep;
80695
+ if (index<0) index=0;
80696
+ }
80697
+
80676
80698
 
80677
80699
  this.ChartPaint[0].Data.DataOffset=index;
80678
80700
  this.CursorIndex=0;
@@ -82698,9 +82720,10 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
82698
82720
  {
82699
82721
  if (!obj || !obj.Date) return;
82700
82722
 
82701
- var option={ ID:JSCHART_OPERATOR_ID.OP_GOTO, Date:obj.Date };
82723
+ var option={ ID:JSCHART_OPERATOR_ID.OP_GOTO, Date:obj.Date, Position:0 };
82702
82724
  if (IFrameSplitOperator.IsNumber(obj.Time)) option.Time=obj.Time;
82703
82725
  if (IFrameSplitOperator.IsNumber(obj.PageSize)) option.PageSize=obj.PageSize;
82726
+ if (IFrameSplitOperator.IsNumber(obj.Position)) option.Position=obj.Position;
82704
82727
 
82705
82728
  this.ChartOperator(option);
82706
82729
  }
@@ -84098,9 +84121,10 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
84098
84121
  if (option.CustomShow && IFrameSplitOperator.IsPlusNumber(option.CustomShow.Date))
84099
84122
  {
84100
84123
  var item=option.CustomShow;
84101
- this.CustomShow={ Date:item.Date };
84124
+ this.CustomShow={ Date:item.Date, Position:0 };
84102
84125
  if (IFrameSplitOperator.IsNumber(item.Time)) this.CustomShow.Time=item.Time;
84103
84126
  if (IFrameSplitOperator.IsPlusNumber(item.PageSize)) this.CustomShow.PageSize=item.PageSize;
84127
+ if (IFrameSplitOperator.IsNumber(item.Position)) this.CustomShow.Position=item.Position;
84104
84128
  }
84105
84129
  }
84106
84130
 
@@ -89259,6 +89283,53 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
89259
89283
  this.OnWheel=function(e)
89260
89284
  {
89261
89285
  JSConsole.Chart.Log('[MinuteChartContainer::OnWheel]',e);
89286
+ if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash == true) return;
89287
+
89288
+ var pixelTatio = GetDevicePixelRatio();
89289
+ var x = (e.clientX-this.UIElement.getBoundingClientRect().left)*pixelTatio;
89290
+ var y = (e.clientY-this.UIElement.getBoundingClientRect().top)*pixelTatio;
89291
+
89292
+ var isInClient=false;
89293
+ var rtClient=
89294
+ {
89295
+ Left:this.Frame.ChartBorder.GetLeft(), Right:this.Frame.ChartBorder.GetRight(),
89296
+ Top:this.Frame.ChartBorder.GetTop(), Bottom:this.Frame.ChartBorder.GetBottom(),
89297
+ Width:this.Frame.ChartBorder.GetWidth(), Height:this.Frame.ChartBorder.GetHeight()
89298
+ };
89299
+
89300
+ if (x>=rtClient.Left && x<=rtClient.Right && y>=rtClient.Top && y<=rtClient.Bottom ) isInClient=true;
89301
+
89302
+ if (!this.OnWheel_ZoomUpDownFrameY(e,x,y)) return;
89303
+
89304
+ if(e.preventDefault) e.preventDefault();
89305
+ else e.returnValue = false;
89306
+ }
89307
+
89308
+ //通过滚轴缩放Y轴
89309
+ this.OnWheel_ZoomUpDownFrameY=function(e, x, y)
89310
+ {
89311
+ if (!this.EnableYDrag.Wheel) return false;
89312
+
89313
+ var frameID=this.Frame.PtInFrame(x,y);
89314
+ if (frameID<0) return false;
89315
+
89316
+ var frame=this.Frame.SubFrame[frameID].Frame;
89317
+ var splitOper=frame.YSplitOperator;
89318
+ if (!splitOper || !splitOper.FixedYMaxMin) return false; //Y轴缩放状态下才有效
89319
+
89320
+ var wheelValue=e.wheelDelta;
89321
+ if (!IFrameSplitOperator.IsObjectExist(e.wheelDelta))
89322
+ wheelValue=e.deltaY* -0.01;
89323
+
89324
+ var yMove=this.EnableYDrag.WheelYMove;
89325
+ if (wheelValue>0) yMove*=-1;
89326
+ var dragY={ Position:0, Index:frameID, Right:false, Left:false }; //只能两边缩放
89327
+ if (!this.Frame.OnZoomUpDownFrameY(dragY, yMove)) return false;
89328
+
89329
+ this.Frame.SetSizeChage(true);
89330
+ this.Draw();
89331
+
89332
+ return true;
89262
89333
  }
89263
89334
 
89264
89335
  this.OnDoubleClick=function(x,y,e)
@@ -129522,6 +129593,14 @@ function JSDealChart(divElement)
129522
129593
  this.JSChartContainer.ReloadResource(option);
129523
129594
  }
129524
129595
  }
129596
+
129597
+ this.ChartDestroy=function()
129598
+ {
129599
+ if (this.JSChartContainer && typeof (this.JSChartContainer.ChartDestroy) == 'function')
129600
+ {
129601
+ this.JSChartContainer.ChartDestroy();
129602
+ }
129603
+ }
129525
129604
  }
129526
129605
 
129527
129606
 
@@ -129565,7 +129644,7 @@ function JSDealChartContainer(uielement)
129565
129644
 
129566
129645
  this.IsDestroy=false; //是否已经销毁了
129567
129646
 
129568
- this.ChartDestory=function() //销毁
129647
+ this.ChartDestroy=function() //销毁
129569
129648
  {
129570
129649
  this.IsDestroy=true;
129571
129650
  this.StopAutoUpdate();
@@ -131131,11 +131210,11 @@ function JSReportChart(divElement)
131131
131210
  }
131132
131211
  }
131133
131212
 
131134
- this.ChartDestory=function()
131213
+ this.ChartDestroy=function()
131135
131214
  {
131136
- if (this.JSChartContainer && typeof (this.JSChartContainer.ChartDestory) == 'function')
131215
+ if (this.JSChartContainer && typeof (this.JSChartContainer.ChartDestroy) == 'function')
131137
131216
  {
131138
- this.JSChartContainer.ChartDestory();
131217
+ this.JSChartContainer.ChartDestroy();
131139
131218
  }
131140
131219
  }
131141
131220
 
@@ -131304,7 +131383,7 @@ function JSReportChartContainer(uielement)
131304
131383
  //MouseOnStatus:{ RowIndex:行, ColumnIndex:列}
131305
131384
  this.LastMouseStatus={ MoveStatus:null, TooltipStatus:null, MouseOnStatus:null };
131306
131385
 
131307
- this.ChartDestory=function() //销毁
131386
+ this.ChartDestroy=function() //销毁
131308
131387
  {
131309
131388
  this.IsDestroy=true;
131310
131389
  this.StopAutoUpdate();
@@ -140401,11 +140480,11 @@ function JSKeyboardChart(divElement)
140401
140480
  }
140402
140481
  }
140403
140482
 
140404
- this.ChartDestory=function()
140483
+ this.ChartDestroy=function()
140405
140484
  {
140406
- if (this.JSChartContainer && typeof (this.JSChartContainer.ChartDestory) == 'function')
140485
+ if (this.JSChartContainer && typeof (this.JSChartContainer.ChartDestroy) == 'function')
140407
140486
  {
140408
- this.JSChartContainer.ChartDestory();
140487
+ this.JSChartContainer.ChartDestroy();
140409
140488
  }
140410
140489
  }
140411
140490
 
@@ -140495,7 +140574,7 @@ function JSKeyboardChartContainer(uielement)
140495
140574
 
140496
140575
  this.IsDestroy=false; //是否已经销毁了
140497
140576
 
140498
- this.ChartDestory=function() //销毁
140577
+ this.ChartDestroy=function() //销毁
140499
140578
  {
140500
140579
  this.IsDestroy=true;
140501
140580
  }
@@ -142246,11 +142325,11 @@ function JSScrollBarChart(divElement)
142246
142325
  }
142247
142326
  }
142248
142327
 
142249
- this.ChartDestory=function()
142328
+ this.ChartDestroy=function()
142250
142329
  {
142251
- if (this.JSChartContainer && typeof (this.JSChartContainer.ChartDestory) == 'function')
142330
+ if (this.JSChartContainer && typeof (this.JSChartContainer.ChartDestroy) == 'function')
142252
142331
  {
142253
- this.JSChartContainer.ChartDestory();
142332
+ this.JSChartContainer.ChartDestroy();
142254
142333
  }
142255
142334
  }
142256
142335
 
@@ -142363,7 +142442,7 @@ function JSScrollBarChartContainer(uielement)
142363
142442
 
142364
142443
  this.HQChart=null;
142365
142444
 
142366
- this.ChartDestory=function() //销毁
142445
+ this.ChartDestroy=function() //销毁
142367
142446
  {
142368
142447
  this.IsDestroy=true;
142369
142448
  }
@@ -143573,7 +143652,7 @@ function ScrollBarBGChart()
143573
143652
 
143574
143653
 
143575
143654
 
143576
- var HQCHART_VERSION="1.1.14454";
143655
+ var HQCHART_VERSION="1.1.14459";
143577
143656
 
143578
143657
  function PrintHQChartVersion()
143579
143658
  {
@@ -5,7 +5,7 @@
5
5
 
6
6
 
7
7
 
8
- var HQCHART_VERSION="1.1.14454";
8
+ var HQCHART_VERSION="1.1.14459";
9
9
 
10
10
  function PrintHQChartVersion()
11
11
  {
@@ -79196,7 +79196,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
79196
79196
  this.SourceDataLimit=new Map(); //每个周期缓存数据最大个数 key=周期 value=最大个数
79197
79197
  this.CtrlMoveStep=5; //Ctrl+(Left/Right) 移动数据个数
79198
79198
 
79199
- this.CustomShow=null; //首先显示的K线的起始日期 { Date:日期, Time:时间, PageSize:, Callback:}
79199
+ this.CustomShow=null; //首先显示的K线的起始日期 { Date:日期, Time:时间, PageSize:, Callback:, Position:0=left 1=center }
79200
79200
  this.ZoomType=0; //缩放模式 0=最右边固定缩放, 1=十字光标两边缩放
79201
79201
  this.IsZoomLockRight=false;
79202
79202
  this.KLineSize=null; //{ DataWidth:, }
@@ -79784,12 +79784,12 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
79784
79784
  this.ChartOperator_Temp_Update();
79785
79785
  }
79786
79786
  }
79787
- else if (id==JSCHART_OPERATOR_ID.OP_GOTO) //{ Date:日期, Time:, PageSize:可选 }
79787
+ else if (id==JSCHART_OPERATOR_ID.OP_GOTO) //{ Date:日期, Time:, PageSize:可选, Position:0=left 1=center }
79788
79788
  {
79789
79789
  if (!IFrameSplitOperator.IsNumber(obj.Date)) return;
79790
79790
 
79791
79791
  var hisData=this.ChartOperator_Temp_GetHistoryData();
79792
- if (!hisData) return; //数据还没有到达
79792
+ if (!hisData || !IFrameSplitOperator.IsNonEmptyArray(hisData.Data)) return; //数据还没有到达
79793
79793
 
79794
79794
  var index=this.ChartOperator_GetIndex_ByDateTime(hisData, obj, this.Period, 0);
79795
79795
 
@@ -79799,6 +79799,8 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
79799
79799
  return;
79800
79800
  }
79801
79801
 
79802
+ var position=0;
79803
+ if (IFrameSplitOperator.IsNumber(obj.Position)) position=obj.Position;
79802
79804
  var oldXPointCount=this.Frame.SubFrame[0].Frame.XPointCount;
79803
79805
  var xPointCount=oldXPointCount;
79804
79806
  if (obj.PageSize>0) //调整一屏显示的个数
@@ -79812,6 +79814,17 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
79812
79814
  this.Frame.SetXShowCount(xPointCount);
79813
79815
  }
79814
79816
 
79817
+ if (position==1) //居中
79818
+ {
79819
+ var moveStep=parseInt(xPointCount/2);
79820
+ index-=moveStep;
79821
+ if (index<0) index=0;
79822
+ }
79823
+ else
79824
+ {
79825
+
79826
+ }
79827
+
79815
79828
  hisData.DataOffset=index;
79816
79829
  this.CursorIndex=0;
79817
79830
  this.LastPoint.X=null;
@@ -80717,6 +80730,15 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
80717
80730
  item.XPointCount=showCount;
80718
80731
  }
80719
80732
  }
80733
+
80734
+ if (IFrameSplitOperator.IsNumber(customShow.Position))
80735
+ {
80736
+ var xCount=this.Frame.SubFrame[0].Frame.XPointCount;
80737
+ var moveStep=parseInt(xCount/2);
80738
+ index-=moveStep;
80739
+ if (index<0) index=0;
80740
+ }
80741
+
80720
80742
 
80721
80743
  this.ChartPaint[0].Data.DataOffset=index;
80722
80744
  this.CursorIndex=0;
@@ -82742,9 +82764,10 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
82742
82764
  {
82743
82765
  if (!obj || !obj.Date) return;
82744
82766
 
82745
- var option={ ID:JSCHART_OPERATOR_ID.OP_GOTO, Date:obj.Date };
82767
+ var option={ ID:JSCHART_OPERATOR_ID.OP_GOTO, Date:obj.Date, Position:0 };
82746
82768
  if (IFrameSplitOperator.IsNumber(obj.Time)) option.Time=obj.Time;
82747
82769
  if (IFrameSplitOperator.IsNumber(obj.PageSize)) option.PageSize=obj.PageSize;
82770
+ if (IFrameSplitOperator.IsNumber(obj.Position)) option.Position=obj.Position;
82748
82771
 
82749
82772
  this.ChartOperator(option);
82750
82773
  }
@@ -84142,9 +84165,10 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
84142
84165
  if (option.CustomShow && IFrameSplitOperator.IsPlusNumber(option.CustomShow.Date))
84143
84166
  {
84144
84167
  var item=option.CustomShow;
84145
- this.CustomShow={ Date:item.Date };
84168
+ this.CustomShow={ Date:item.Date, Position:0 };
84146
84169
  if (IFrameSplitOperator.IsNumber(item.Time)) this.CustomShow.Time=item.Time;
84147
84170
  if (IFrameSplitOperator.IsPlusNumber(item.PageSize)) this.CustomShow.PageSize=item.PageSize;
84171
+ if (IFrameSplitOperator.IsNumber(item.Position)) this.CustomShow.Position=item.Position;
84148
84172
  }
84149
84173
  }
84150
84174
 
@@ -89303,6 +89327,53 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
89303
89327
  this.OnWheel=function(e)
89304
89328
  {
89305
89329
  JSConsole.Chart.Log('[MinuteChartContainer::OnWheel]',e);
89330
+ if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash == true) return;
89331
+
89332
+ var pixelTatio = GetDevicePixelRatio();
89333
+ var x = (e.clientX-this.UIElement.getBoundingClientRect().left)*pixelTatio;
89334
+ var y = (e.clientY-this.UIElement.getBoundingClientRect().top)*pixelTatio;
89335
+
89336
+ var isInClient=false;
89337
+ var rtClient=
89338
+ {
89339
+ Left:this.Frame.ChartBorder.GetLeft(), Right:this.Frame.ChartBorder.GetRight(),
89340
+ Top:this.Frame.ChartBorder.GetTop(), Bottom:this.Frame.ChartBorder.GetBottom(),
89341
+ Width:this.Frame.ChartBorder.GetWidth(), Height:this.Frame.ChartBorder.GetHeight()
89342
+ };
89343
+
89344
+ if (x>=rtClient.Left && x<=rtClient.Right && y>=rtClient.Top && y<=rtClient.Bottom ) isInClient=true;
89345
+
89346
+ if (!this.OnWheel_ZoomUpDownFrameY(e,x,y)) return;
89347
+
89348
+ if(e.preventDefault) e.preventDefault();
89349
+ else e.returnValue = false;
89350
+ }
89351
+
89352
+ //通过滚轴缩放Y轴
89353
+ this.OnWheel_ZoomUpDownFrameY=function(e, x, y)
89354
+ {
89355
+ if (!this.EnableYDrag.Wheel) return false;
89356
+
89357
+ var frameID=this.Frame.PtInFrame(x,y);
89358
+ if (frameID<0) return false;
89359
+
89360
+ var frame=this.Frame.SubFrame[frameID].Frame;
89361
+ var splitOper=frame.YSplitOperator;
89362
+ if (!splitOper || !splitOper.FixedYMaxMin) return false; //Y轴缩放状态下才有效
89363
+
89364
+ var wheelValue=e.wheelDelta;
89365
+ if (!IFrameSplitOperator.IsObjectExist(e.wheelDelta))
89366
+ wheelValue=e.deltaY* -0.01;
89367
+
89368
+ var yMove=this.EnableYDrag.WheelYMove;
89369
+ if (wheelValue>0) yMove*=-1;
89370
+ var dragY={ Position:0, Index:frameID, Right:false, Left:false }; //只能两边缩放
89371
+ if (!this.Frame.OnZoomUpDownFrameY(dragY, yMove)) return false;
89372
+
89373
+ this.Frame.SetSizeChage(true);
89374
+ this.Draw();
89375
+
89376
+ return true;
89306
89377
  }
89307
89378
 
89308
89379
  this.OnDoubleClick=function(x,y,e)
@@ -129566,6 +129637,14 @@ function JSDealChart(divElement)
129566
129637
  this.JSChartContainer.ReloadResource(option);
129567
129638
  }
129568
129639
  }
129640
+
129641
+ this.ChartDestroy=function()
129642
+ {
129643
+ if (this.JSChartContainer && typeof (this.JSChartContainer.ChartDestroy) == 'function')
129644
+ {
129645
+ this.JSChartContainer.ChartDestroy();
129646
+ }
129647
+ }
129569
129648
  }
129570
129649
 
129571
129650
 
@@ -129609,7 +129688,7 @@ function JSDealChartContainer(uielement)
129609
129688
 
129610
129689
  this.IsDestroy=false; //是否已经销毁了
129611
129690
 
129612
- this.ChartDestory=function() //销毁
129691
+ this.ChartDestroy=function() //销毁
129613
129692
  {
129614
129693
  this.IsDestroy=true;
129615
129694
  this.StopAutoUpdate();
@@ -131175,11 +131254,11 @@ function JSReportChart(divElement)
131175
131254
  }
131176
131255
  }
131177
131256
 
131178
- this.ChartDestory=function()
131257
+ this.ChartDestroy=function()
131179
131258
  {
131180
- if (this.JSChartContainer && typeof (this.JSChartContainer.ChartDestory) == 'function')
131259
+ if (this.JSChartContainer && typeof (this.JSChartContainer.ChartDestroy) == 'function')
131181
131260
  {
131182
- this.JSChartContainer.ChartDestory();
131261
+ this.JSChartContainer.ChartDestroy();
131183
131262
  }
131184
131263
  }
131185
131264
 
@@ -131348,7 +131427,7 @@ function JSReportChartContainer(uielement)
131348
131427
  //MouseOnStatus:{ RowIndex:行, ColumnIndex:列}
131349
131428
  this.LastMouseStatus={ MoveStatus:null, TooltipStatus:null, MouseOnStatus:null };
131350
131429
 
131351
- this.ChartDestory=function() //销毁
131430
+ this.ChartDestroy=function() //销毁
131352
131431
  {
131353
131432
  this.IsDestroy=true;
131354
131433
  this.StopAutoUpdate();
@@ -140471,11 +140550,11 @@ function JSTReportChart(divElement)
140471
140550
  }
140472
140551
  }
140473
140552
 
140474
- this.ChartDestory=function()
140553
+ this.ChartDestroy=function()
140475
140554
  {
140476
- if (this.JSChartContainer && typeof (this.JSChartContainer.ChartDestory) == 'function')
140555
+ if (this.JSChartContainer && typeof (this.JSChartContainer.ChartDestroy) == 'function')
140477
140556
  {
140478
- this.JSChartContainer.ChartDestory();
140557
+ this.JSChartContainer.ChartDestroy();
140479
140558
  }
140480
140559
  }
140481
140560
 
@@ -140611,7 +140690,7 @@ function JSTReportChartContainer(uielement)
140611
140690
 
140612
140691
  this.IsDestroy=false; //是否已经销毁了
140613
140692
 
140614
- this.ChartDestory=function() //销毁
140693
+ this.ChartDestroy=function() //销毁
140615
140694
  {
140616
140695
  this.IsDestroy=true;
140617
140696
  this.StopAutoUpdate();
@@ -143606,11 +143685,11 @@ function JSKeyboardChart(divElement)
143606
143685
  }
143607
143686
  }
143608
143687
 
143609
- this.ChartDestory=function()
143688
+ this.ChartDestroy=function()
143610
143689
  {
143611
- if (this.JSChartContainer && typeof (this.JSChartContainer.ChartDestory) == 'function')
143690
+ if (this.JSChartContainer && typeof (this.JSChartContainer.ChartDestroy) == 'function')
143612
143691
  {
143613
- this.JSChartContainer.ChartDestory();
143692
+ this.JSChartContainer.ChartDestroy();
143614
143693
  }
143615
143694
  }
143616
143695
 
@@ -143700,7 +143779,7 @@ function JSKeyboardChartContainer(uielement)
143700
143779
 
143701
143780
  this.IsDestroy=false; //是否已经销毁了
143702
143781
 
143703
- this.ChartDestory=function() //销毁
143782
+ this.ChartDestroy=function() //销毁
143704
143783
  {
143705
143784
  this.IsDestroy=true;
143706
143785
  }
@@ -145451,11 +145530,11 @@ function JSScrollBarChart(divElement)
145451
145530
  }
145452
145531
  }
145453
145532
 
145454
- this.ChartDestory=function()
145533
+ this.ChartDestroy=function()
145455
145534
  {
145456
- if (this.JSChartContainer && typeof (this.JSChartContainer.ChartDestory) == 'function')
145535
+ if (this.JSChartContainer && typeof (this.JSChartContainer.ChartDestroy) == 'function')
145457
145536
  {
145458
- this.JSChartContainer.ChartDestory();
145537
+ this.JSChartContainer.ChartDestroy();
145459
145538
  }
145460
145539
  }
145461
145540
 
@@ -145568,7 +145647,7 @@ function JSScrollBarChartContainer(uielement)
145568
145647
 
145569
145648
  this.HQChart=null;
145570
145649
 
145571
- this.ChartDestory=function() //销毁
145650
+ this.ChartDestroy=function() //销毁
145572
145651
  {
145573
145652
  this.IsDestroy=true;
145574
145653
  }
@@ -153385,7 +153464,7 @@ function HQChartScriptWorker()
153385
153464
 
153386
153465
 
153387
153466
 
153388
- var HQCHART_VERSION="1.1.14454";
153467
+ var HQCHART_VERSION="1.1.14459";
153389
153468
 
153390
153469
  function PrintHQChartVersion()
153391
153470
  {