hqchart 1.1.15178 → 1.1.15184

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.
@@ -1707,7 +1707,8 @@ ON_REPORT_SHOW_TOOLTIP:175,//报价列表 提示信息\
1707
1707
  ON_FORMAT_TVLONGPOSITION_LABEL:176,ON_FORMAT_COUNTDOWN_TEXT:177,//倒计时
1708
1708
  ON_CLICK_INDEX_LOCK:178,//点击指标锁
1709
1709
  ON_CORSSCURSOR_STATUS_CHANGE:179,//十字光标状态改变
1710
- ON_BEFORE_DRAW_HLINE:180//画图工具-水平线(ChartDrawPictureHorizontalLine) 绘图前
1710
+ ON_BEFORE_DRAW_HLINE:180,//画图工具-水平线(ChartDrawPictureHorizontalLine) 绘图前
1711
+ ON_HIDE_ALL_POP_DIV:181//隐藏所有弹框div
1711
1712
  };var JSCHART_OPERATOR_ID={OP_SCROLL_LEFT:1,//往左移动
1712
1713
  OP_SCROLL_RIGHT:2,//往右移动
1713
1714
  OP_ZOOM_OUT:3,//缩小
@@ -1948,7 +1949,7 @@ if(this.GlobalOption.CorssCursorStatus.Value!=status){this.GlobalOption.CorssCur
1948
1949
  {if(this.JSPopMenu)return;this.JSPopMenu=new JSPopMenu();//内置菜单
1949
1950
  this.JSPopMenu.Inital(this);};this.InitalDrawToolDialog=function(){if(this.DialogDrawTool)return;this.DialogDrawTool=new JSDialogDrawTool();this.DialogDrawTool.Inital(this);this.DialogDrawTool.Create();};this.InitalTooltipDialog=function(option){if(this.DialogTooltip)return;this.DialogTooltip=new JSDialogTooltip();this.DialogTooltip.Inital(this,option);this.DialogTooltip.Create();};this.InitalFloatTooltip=function(option){if(this.FloatTooltip)return;this.FloatTooltip=new JSFloatTooltip();this.FloatTooltip.Inital(this,option);this.FloatTooltip.Create();};this.InitalSmallFloatTooltip=function(option){if(this.SmallFloatTooltipGroup)return;this.SmallFloatTooltipGroup=new JSSmallFloatTooltipGroup();this.SmallFloatTooltipGroup.Inital(this,option);this.SmallFloatTooltipGroup.Create();};this.InitalModifyDrawDialog=function(){if(this.DialogModifyDraw)return;this.DialogModifyDraw=new JSDialogModifyDraw();this.DialogModifyDraw.Inital(this);this.DialogModifyDraw.Create();};this.InitalSelectRectDialog=function(option){if(this.DialogSelectRect)return;this.DialogSelectRect=new JSDialogSelectRect();this.DialogSelectRect.Inital(this,option);this.DialogSelectRect.Create();};this.InitalSearchIndexDialog=function(option){if(this.DialogSearchIndex)return;this.DialogSearchIndex=new JSDialogSearchIndex();this.DialogSearchIndex.Inital(this,option);this.DialogSearchIndex.Create();};this.InitalModifyIndexParamDialog=function(option){if(this.DialogModifyIndexParam)return;this.DialogModifyIndexParam=new JSDialogModifyIndexParam();this.DialogModifyIndexParam.Inital(this,option);this.DialogModifyIndexParam.Create();};this.ShowChangeIndexDialog=function(data){if(!data)return;if(!this.DialogSearchIndex)return;data.Title='\u5207\u6362\u6307\u6807 [\u7A97\u53E3'+(data.WindowIndex+1)+']';this.DialogSearchIndex.SetOpData(data);this.DialogSearchIndex.Show();};this.ShowAddOverlayIndexDialog=function(data){if(!data)return;if(!this.DialogSearchIndex)return;data.Title='\u6DFB\u52A0\u53E0\u52A0\u6307\u6807 [\u7A97\u53E3'+(data.WindowIndex+1)+']';this.DialogSearchIndex.SetOpData(data);this.DialogSearchIndex.Show();};//添加指标窗口
1950
1951
  this.ShowAddIndexWindowDialog=function(option){if(!this.DialogSearchIndex)return;var data=option;if(!data)data={};data.OpType=3;data.Title='\u589E\u52A0\u6307\u6807\u7A97\u53E3';this.DialogSearchIndex.SetOpData(data);this.DialogSearchIndex.Show();};this.ShowModifyIndexParamDialog=function(data){if(!this.DialogModifyIndexParam)return;if(data.Type==1){var indexScript=this.WindowIndex[data.WindowIndex];if(!indexScript)return;data.IndexScript=indexScript;data.Title='['+indexScript.Name+']\u53C2\u6570\u4FEE\u6539 \u7A97\u53E3['+(data.WindowIndex+1)+']';}else if(data.Type==2){var overlayIndex=this.GetOverlayIndexByIdentify(data.Identify);if(!overlayIndex||!overlayIndex.OverlayItem.Script)return;var indexScript=overlayIndex.OverlayItem.Script;data.IndexScript=indexScript;data.Title='['+indexScript.Name+']\u53C2\u6570\u4FEE\u6539 \u53E0\u52A0\u7A97\u53E3['+(data.WindowIndex+1)+']';}this.DialogModifyIndexParam.SetIndexData(data);this.DialogModifyIndexParam.Show();};this.DrawSelectRectDialog=function(){};this.IsShowSelectRectDialog=function(){if(!this.DialogSelectRect)return false;return this.DialogSelectRect.IsShow();};this.ShowDrawToolDialog=function(x,y){if(!this.DialogDrawTool)return;var rtClient=this.UIElement.getBoundingClientRect();var rtScroll=GetScrollPosition();var top=this.UIElement.offsetTop+15;var left=this.UIElement.offsetWidth-this.DialogDrawTool.DivDialog.offsetWidth-15;left+=rtClient.left+rtScroll.Left;top+=rtClient.top+rtScroll.Top;this.DialogDrawTool.Show(left,top);};this.IsShowDrawToolDialog=function(){if(!this.DialogDrawTool)return false;return this.DialogDrawTool.IsShow();};this.ShowModifyDrawDialog=function(chart,x,y){if(!this.DialogModifyDraw)return;this.DialogModifyDraw.SetChartPicture(chart);if(this.DialogModifyDraw.IsShow())return;var rtClient=this.UIElement.getBoundingClientRect();var rtScroll=GetScrollPosition();var top=this.UIElement.offsetTop+15;var left=(this.UIElement.offsetWidth-this.DialogModifyDraw.DivDialog.offsetWidth)/2;left+=rtClient.left+rtScroll.Left;top+=rtClient.top+rtScroll.Top;this.DialogModifyDraw.Show(left,top);};this.CloseModifyDrawDialog=function(){if(!this.DialogModifyDraw)return;this.DialogModifyDraw.Close();};this.IsShowTooltipDialog=function(){if(!this.DialogTooltip)return false;return this.DialogTooltip.IsShow();};this.CloseTooltipDialog=function(){if(!this.DialogTooltip)return;this.DialogTooltip.Close();};this.HideFloatTooltip=function(){if(!this.FloatTooltip)return;this.FloatTooltip.Hide();};this.HideSmallFloatTooltip=function(){if(!this.SmallFloatTooltipGroup)return;this.SmallFloatTooltipGroup.Hide();};this.DestroyTooltipDialog=function(){if(!this.DialogTooltip)return;this.DialogTooltip.Destroy();this.DialogTooltip=null;};this.DestroyFloatTooltip=function(){if(!this.FloatTooltip)return;this.FloatTooltip.Destroy();this.FloatTooltip=null;};this.DestroySmallFloatTooltip=function(){if(!this.SmallFloatTooltipGroup)return;this.SmallFloatTooltipGroup.Destroy();this.SmallFloatTooltipGroup=null;};this.DestroySearchIndexDialog=function(){if(!this.DialogSearchIndex)return;this.DialogSearchIndex.Destroy();this.DialogSearchIndex=null;};this.DestroyDialogDrawTool=function(){if(!this.DialogDrawTool)return;this.DialogDrawTool.Destroy();this.DialogDrawTool=null;};this.DestroyDialogModifyIndexParam=function(){if(!this.DialogModifyIndexParam)return;this.DialogModifyIndexParam.Destroy();this.DialogModifyIndexParam=null;};this.DestroyDialogSelectRect=function(){if(!this.DialogSelectRect)return;this.DialogSelectRect.Destroy();this.DialogSelectRect=null;};this.DestroyDialogModifyDraw=function(){if(!this.DialogModifyDraw)return;this.DialogModifyDraw.Destroy();this.DialogModifyDraw=null;};this.DestroyPopMenu=function(){if(!this.JSPopMenu)return;this.JSPopMenu.Destroy();this.JSPopMenu=null;};//隐藏内置的弹框div
1951
- this.HideAllPopDiv=function(){this.HideFloatTooltip();this.CloseTooltipDialog();this.HideSmallFloatTooltip();if(this.DialogDrawTool)this.DialogDrawTool.Close();this.CloseModifyDrawDialog();if(this.DialogSelectRect)this.DialogSelectRect.Close();if(this.DialogSearchIndex)this.DialogSearchIndex.Close();if(this.DialogModifyIndexParam)this.DialogModifyIndexParam.Close();};//obj={ Element:, Canvas: }
1952
+ this.HideAllPopDiv=function(){this.HideFloatTooltip();this.CloseTooltipDialog();this.HideSmallFloatTooltip();if(this.DialogDrawTool)this.DialogDrawTool.Close();this.CloseModifyDrawDialog();if(this.DialogSelectRect)this.DialogSelectRect.Close();if(this.DialogSearchIndex)this.DialogSearchIndex.Close();if(this.DialogModifyIndexParam)this.DialogModifyIndexParam.Close();var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_HIDE_ALL_POP_DIV);if(event&&event.Callback){var sendData={};event.Callback(event,sendData,this);}};//obj={ Element:, Canvas: }
1952
1953
  this.SetCorssCursorElement=function(obj){if(!obj||!obj.Element||!obj.Canvas)return;this.CorssCursorElement=obj.Element;this.CorssCursorCanvas=obj.Canvas;};this.StopDisplayLatest=function(){this.GlobalOption.IsDisplayLatest=false;if(this.DisplayLatestOption.Timer){clearTimeout(this.DisplayLatestOption.Timer);this.DisplayLatestOption.Timer=null;}};this.StartStopDisplayLatest=function(){var _this6=this;this.StopDisplayLatest();if(!this.DisplayLatestOption.Enable)return;this.DisplayLatestOption.Timer=setTimeout(function(){if(_this6.DisplayLatest){JSConsole.Chart.Log('[JSChartContainer:StartStopDisplayLatest] call this.DisplayLatest()');_this6.DisplayLatest();}},this.DisplayLatestOption.DelayTime);};this.StopDrawDynamicInfo=function(){if(this.DrawDynamicInfoOption.Timer){clearTimeout(this.DrawDynamicInfoOption.Timer);this.DrawDynamicInfoOption.Timer=null;}};this.StartLatestPointFlash=function(){var _this7=this;this.LatestPointFlashOption.Timer=setInterval(function(){_this7.DrawLatestPoint();},this.LatestPointFlashOption.DelayTime);};this.StopLatestPointFlash=function(){if(this.LatestPointFlashOption.Timer){clearInterval(this.LatestPointFlashOption.Timer);this.LatestPointFlashOption.Timer=null;}};this.DrawLatestPoint=function(){var finder=this.GetExtendChartByClassName("LatestPointFlashPaint");if(finder&&finder.Chart)finder.Chart.Draw();};this.SetLatestPointFlash=function(flashCount,option){if(!IFrameSplitOperator.IsNumber(flashCount))return;var finder=this.GetExtendChartByClassName("LatestPointFlashPaint");if(!finder||!finder.Chart)return false;var chart=finder.Chart;chart.FlashCount=flashCount;};this.StartCountDown=function(){var _this8=this;this.CountDownOption.Timer=setInterval(function(){_this8.DrawCountDown();},this.CountDownOption.DelayTime);};this.DrawCountDown=function(){var finder=this.GetExtendChartByClassName("KLineCountDownPaint");if(finder&&finder.Chart)finder.Chart.Draw();};this.StopCountDown=function(){if(this.CountDownOption.Timer){clearInterval(this.CountDownOption.Timer);this.CountDownOption.Timer=null;}};this.ChartDestroy=function()//销毁
1953
1954
  {this.IsDestroy=true;this.StopAutoUpdate();this.DestroyTooltipDialog();this.DestroyFloatTooltip();this.DestroySmallFloatTooltip();this.DestroySearchIndexDialog();this.DestroyDialogModifyIndexParam();this.DestroyDialogDrawTool();this.DestroyDialogModifyDraw();this.DestroyDialogSelectRect();this.DestroyPopMenu();if(this.DestroyPopMinuteChart)this.DestroyPopMinuteChart();this.StopLatestPointFlash();this.StopCountDown();document.oncontextmenu=null;this.RemoveAllEventListener();};this.ChartDestory=this.ChartDestroy;//老版本写错了,需要兼容下
1954
1955
  //设置焦点
@@ -2449,8 +2450,8 @@ if(event&&event.Callback){var sendData={DrawPicture:drawPicture};event.Callback(
2449
2450
  return { AryDelete:aryDelete, AryNew:aryNew, AryEqual:aryEqual };
2450
2451
  }
2451
2452
  *///清空所有的画线工具 option={ Draw:false/true }
2452
- this.ClearChartDrawPicture=function(drawPicture,option){var bDraw=true;if(!drawPicture){this.ChartDrawPicture=[];if(this.ChartDrawStorage)this.ChartDrawStorage.Clear();this.SelectChartDrawPicture=null;if(option&&option.Draw==false)bDraw=false;if(bDraw)this.Draw();if(this.DialogModifyDraw)this.DialogModifyDraw.OnClearChartDrawPicture(null);}else{for(var i=0;i<this.ChartDrawPicture.length;++i){var item=this.ChartDrawPicture[i];if(item.Guid==drawPicture.Guid||item==drawPicture){if(this.ChartDrawStorage)this.ChartDrawStorage.DeleteDrawData(drawPicture);this.ChartDrawPicture.splice(i,1);if(this.SelectChartDrawPicture)//去掉选中
2453
- {if(this.SelectChartDrawPicture.Guid==drawPicture.Guid||this.SelectChartDrawPicture==drawPicture)this.SelectChartDrawPicture=null;}if(option&&option.Draw==false)bDraw=false;if(bDraw)this.Draw();if(this.DialogModifyDraw)this.DialogModifyDraw.OnClearChartDrawPicture(drawPicture);break;}}}};//获取画图工具当前选中图形的Guid
2453
+ this.ClearChartDrawPicture=function(drawPicture,option){var bDraw=true;if(!drawPicture){this.ChartDrawPicture=[];if(this.ChartDrawStorage)this.ChartDrawStorage.Clear();this.SelectChartDrawPicture=null;if(option&&option.Draw==false)bDraw=false;if(bDraw)this.Draw();if(this.DialogModifyDraw)this.DialogModifyDraw.OnClearChartDrawPicture(null);}else{for(var i=0;i<this.ChartDrawPicture.length;++i){var item=this.ChartDrawPicture[i];if(item.Guid==drawPicture.Guid||item==drawPicture){if(this.ChartDrawStorage)this.ChartDrawStorage.DeleteDrawData(item);this.ChartDrawPicture.splice(i,1);if(this.SelectChartDrawPicture)//去掉选中
2454
+ {if(this.SelectChartDrawPicture.Guid==drawPicture.Guid||this.SelectChartDrawPicture==drawPicture)this.SelectChartDrawPicture=null;}if(option&&option.Draw==false)bDraw=false;if(bDraw)this.Draw();if(this.DialogModifyDraw)this.DialogModifyDraw.OnClearChartDrawPicture(item);break;}}}};//获取画图工具当前选中图形的Guid
2454
2455
  this.GetActiveDrawPicture=function(){var result={Move:{Guid:null},Select:{Guid:null},MoveOn:{Guid:null}};if(this.CurrentChartDrawPicture)result.Move={Guid:this.CurrentChartDrawPicture.Guid};if(this.SelectChartDrawPicture)result.Select={Guid:this.SelectChartDrawPicture.Guid,Chart:this.SelectChartDrawPicture};if(this.MoveOnChartDrawPicture)result.MoveOn={Guid:this.MoveOnChartDrawPicture.Guid};return result;};this.SetChartDrawOption=function(option){if(IFrameSplitOperator.IsBool(option.IsLockScreen))this.ChartDrawOption.IsLockScreen=option.IsLockScreen;if(IFrameSplitOperator.IsNumber(option.Zoom)&&option.Zoom>=0)this.ChartDrawOption.Zoom=option.Zoom;if(option.Magnet){var item=option.Magnet;if(!this.ChartDrawOption.Magnet)this.ChartDrawOption.Magnet={Type:0,Distance:20*GetDevicePixelRatio(),Enable:false};if(IFrameSplitOperator.IsBool(item.Enable))this.ChartDrawOption.Magnet.Enable=item.Enable;if(IFrameSplitOperator.IsNumber(item.Type))this.ChartDrawOption.Magnet.Type=item.Type;if(IFrameSplitOperator.IsNumber(item.Distance))this.ChartDrawOption.Magnet.Distance=item.Distance;}};//是否显示十字光标的十字线
2455
2456
  this.EnableShowCorssCursorLine=function(bShow){if(!this.ChartCorssCursor)return;this.ChartCorssCursor.IsShowCorss=bShow;};//获取扩展画法
2456
2457
  this.GetExtendChartByClassName=function(name){for(var i=0;i<this.ExtendChartPaint.length;++i){var item=this.ExtendChartPaint[i];if(item.ClassName==name)return{Index:i,Chart:item};}return null;};//获取多个扩展画法
@@ -2820,8 +2821,9 @@ this.XLineExtend;//[0]=底部 { Mode:1, Color: } Mode=1 分割线 Mode=2短
2820
2821
  this.FrameData={SubFrameItem:null};//窗口框架信息
2821
2822
  //画图工具刻度
2822
2823
  this.DrawPicture={BGColor:g_JSChartResource.DrawPicture.XYCoordinate.BGColor,TextBGColor:g_JSChartResource.DrawPicture.XYCoordinate.TextBGColor,TextColor:g_JSChartResource.DrawPicture.XYCoordinate.TextColor,Font:g_JSChartResource.DrawPicture.XYCoordinate.Font};this.IChartFramePainting_ReloadResource=this.ReloadResource;this.ReloadResource=function(resource){this.IChartFramePainting_ReloadResource(resource);if(!resource){this.ToolbarButtonStyle=g_JSChartResource.ToolbarButtonStyle;this.CloseWindowButton=CloneData(g_JSChartResource.Buttons.CloseWindow);this.OverlayIndexButton=CloneData(g_JSChartResource.Buttons.OverlayIndex);this.ChangeIndexButton=CloneData(g_JSChartResource.Buttons.ChangeIndex);this.ModifyIndexParamButton=CloneData(g_JSChartResource.Buttons.ModifyIndexParam);this.MaxMinWindowButton=CloneData(g_JSChartResource.Buttons.MaxMinWindow);this.TitleWindowButton=CloneData(g_JSChartResource.Buttons.TitleWindow);this.ButtonTooltip=CloneData(g_JSChartResource.Buttons.Tooltip);this.AddIndexWindowButton=CloneData(g_JSChartResource.Buttons.AddIndexWindow);this.IndexHelpButton=CloneData(g_JSChartResource.Buttons.IndexHelp);}if(this.ToolbarButtonStyle==1){this.ClearToolbar();}else{if(this.DivFrameToolbar)this.DivFrameToolbar.ReloadResource(resource);}};this.DrawFrame=function(){if(this.XPointCount>0){var dInterval=this.ChartBorder.GetWidth()/(6*this.XPointCount);//分6份, 数据4 间距2
2823
- this.DistanceWidth=2*dInterval;this.DataWidth=4*dInterval;}this.DrawHorizontal();this.DrawVertical();};this.DrawTitleButton=function(aryButton,moveonPoint,mouseStatus){var border=this.GetBorder();if(this.IsHScreen){var y=border.Bottom-3;var x=border.RightTitle+this.ChartBorder.TitleHeight/2;this.Canvas.save();this.Canvas.translate(x,y);this.Canvas.rotate(90*Math.PI/180);//底部开始画
2824
- var yButton=0,xButton=0,bottom=0;for(var i=0;i<aryButton.length;++i){var item=aryButton[i];var size=item.Style.Size;var xButton=bottom-size-item.Style.MerginLeft;var font=size+'px '+item.Style.Family;var color=item.Style.Color;this.Canvas.fillStyle=color;this.Canvas.font=font;this.Canvas.textAlign="left";this.Canvas.textBaseline="middle";this.Canvas.fillText(item.Style.Text,xButton,0);var rtButton={Left:x-size/2,Right:x+size/2,Bottom:y,Width:size,Height:size+item.Style.MerginLeft};rtButton.Top=rtButton.Bottom-size-item.Style.MerginLeft;this.Buttons.push({ID:item.ID,Rect:rtButton});bottom=xButton;y=rtButton.Top;}this.Canvas.restore();}else{var right=border.RightEx-3;var left=border.Left;var yButton=border.Top+this.ChartBorder.TitleHeight/2;this.ToolbarCacheSize={RToolbar:{Right:right,Left:right}//右往左绘制
2824
+ this.DistanceWidth=2*dInterval;this.DataWidth=4*dInterval;}this.DrawHorizontal();this.DrawVertical();};this.DrawTitleButton=function(aryButton,moveonPoint,mouseStatus){var border=this.GetBorder();if(this.IsHScreen){var y=border.Bottom-3;var x=border.RightTitle+this.ChartBorder.TitleHeight/2;this.ToolbarCacheSize={RToolbar:{Right:y,Left:y}};//相当于额 Top, Bottom
2825
+ this.Canvas.save();this.Canvas.translate(x,y);this.Canvas.rotate(90*Math.PI/180);//底部开始画
2826
+ var yButton=0,xButton=0,bottom=0;for(var i=0;i<aryButton.length;++i){var item=aryButton[i];var size=item.Style.Size;var xButton=bottom-size-item.Style.MerginLeft;var font=size+'px '+item.Style.Family;var color=item.Style.Color;this.Canvas.fillStyle=color;this.Canvas.font=font;this.Canvas.textAlign="left";this.Canvas.textBaseline="middle";this.Canvas.fillText(item.Style.Text,xButton,0);var rtButton={Left:x-size/2,Right:x+size/2,Bottom:y,Width:size,Height:size+item.Style.MerginLeft};rtButton.Top=rtButton.Bottom-size-item.Style.MerginLeft;this.Buttons.push({ID:item.ID,Rect:rtButton});this.ToolbarCacheSize.RToolbar.Left=rtButton.Top;bottom=xButton;y=rtButton.Top;}this.Canvas.restore();}else{var right=border.RightEx-3;var left=border.Left;var yButton=border.Top+this.ChartBorder.TitleHeight/2;this.ToolbarCacheSize={RToolbar:{Right:right,Left:right}//右往左绘制
2825
2827
  };for(var i=0;i<aryButton.length;++i){var item=aryButton[i];var size=item.Style.Size;var xBotton=right-size-item.Style.MerginLeft;var font=size+'px '+item.Style.Family;var rtButton={Left:xBotton,Top:yButton-size/2,Right:xBotton+size+item.Style.MerginLeft,Bottom:yButton+size/2,Width:size+item.Style.MerginLeft,Height:size};var color=item.Style.Color;if(moveonPoint&&moveonPoint.X>=rtButton.Left&&moveonPoint.X<rtButton.Right&&moveonPoint.Y>=rtButton.Top&&moveonPoint.Y<=rtButton.Bottom){color=item.Style.MoveOnColor;if(mouseStatus)mouseStatus.MouseOnToolbar={Rect:rtButton,Item:item,Frame:this,Point:{X:moveonPoint.X,Y:moveonPoint.Y}};}this.Canvas.fillStyle=color;this.Canvas.font=font;this.Canvas.textAlign="left";this.Canvas.textBaseline="middle";this.Canvas.fillText(item.Style.Text,xBotton,yButton);this.Buttons.push({ID:item.ID,Rect:rtButton});this.ToolbarCacheSize.RToolbar.Left=rtButton.Left;right=xBotton;}}};this.DrawToolbarTooltip=function(mouseOnToolbar){if(!mouseOnToolbar)return;var border=this.GetBorder();var text=null;if(mouseOnToolbar.Item.TooltipText){text=mouseOnToolbar.Item.TooltipText;}else{var key='Toolbar-'+mouseOnToolbar.Item.ID;text=g_JSChartLocalization.GetText(key,0);}if(!text)return;var pixelRatio=GetDevicePixelRatio();var canvas=this.Canvas;if(this.GetExtraCanvas){var finder=this.GetExtraCanvas(JSChart.TooltipCursorCanvasKey);if(finder)canvas=finder.Canvas;}var xCenter=mouseOnToolbar.Rect.Left+mouseOnToolbar.Rect.Width/2;canvas.font=this.ButtonTooltip.Font;canvas.textAlign="left";canvas.textBaseline="bottom";var mergin=this.ButtonTooltip.Mergin;var textWidth=canvas.measureText(text).width+mergin.Left+mergin.Right;var textHeight=this.GetFontHeight();var bgHeight=textHeight+mergin.Top+mergin.Bottom;if(mouseOnToolbar.ID=="TitleButton"){var x=mouseOnToolbar.Point.X;var y=mouseOnToolbar.Point.Y+20;if(y+textHeight>border.ChartHeight)y=mouseOnToolbar.Point.Y-5-textHeight;}else if(JSCHART_BUTTON_ID.CLOSE_BEFOREOPEN_ID==mouseOnToolbar.Item.ID){var x=mouseOnToolbar.Rect.Right+5;var y=mouseOnToolbar.Rect.Top;}else if(JSCHART_BUTTON_ID.DRAW_PICTURE_DELETE==mouseOnToolbar.Item.ID||JSCHART_BUTTON_ID.DRAW_PICTURE_SETTING==mouseOnToolbar.Item.ID||mouseOnToolbar.Item.ID>=JSCHART_BUTTON_ID.DRAW_PICTURE_BUTTON_1&&mouseOnToolbar.Item.ID<=JSCHART_BUTTON_ID.DRAW_PICTURE_BUTTON_18){var x=mouseOnToolbar.Point.X;var y=mouseOnToolbar.Point.Y+20;if(x+textWidth>=border.ChartWidth)x=border.ChartWidth-textWidth-2;}else{var x=xCenter-textWidth/2;var y=border.Top-bgHeight;if(y<0)y=border.TopEx+1;if(x+textWidth>border.ChartWidth)x=border.ChartWidth-textWidth-2;}if(IFrameSplitOperator.IsNumber(this.ButtonTooltip.BorderRadius))//圆角
2826
2828
  {var roundRadius=this.ButtonTooltip.BorderRadius;canvas.beginPath();canvas.roundRect(ToFixedPoint(x),ToFixedPoint(y),ToFixedRect(textWidth),ToFixedRect(bgHeight),[roundRadius]);canvas.closePath();canvas.fillStyle=this.ButtonTooltip.ColorBG;canvas.fill();canvas.strokeStyle=this.ButtonTooltip.ColorBorder;canvas.stroke();canvas.fillStyle=this.ButtonTooltip.Color;canvas.fillText(text,x+mergin.Left,y+bgHeight-mergin.Bottom);}else{canvas.fillStyle=this.ButtonTooltip.ColorBG;canvas.fillRect(x,y,textWidth,bgHeight);//画一个背景色, 不然是一个黑的背景
2827
2829
  canvas.fillStyle=this.ButtonTooltip.Color;canvas.fillText(text,x+mergin.Left,y+bgHeight-mergin.Bottom);}};//isLimit 是否限制在当前坐标下
@@ -6587,10 +6589,11 @@ this.Canvas.fillRect(rtBG.Left,rtBG.Top,rtBG.Width,rtBG.Height);}this.Canvas.fil
6587
6589
  if(x+textWidth>right)break;if(this.OverlayIndexType.BGColor){this.Canvas.fillStyle=this.OverlayIndexType.BGColor;var rtBG={Left:x,Top:y-fontHeight/2,Width:textWidth,Height:fontHeight+lineSpace};//保存下标题的坐标
6588
6590
  this.Canvas.fillRect(rtBG.Left,rtBG.Top,rtBG.Width,rtBG.Height);}this.Canvas.fillStyle=item.Color;this.Canvas.fillText(text,x,y,textWidth);x+=textWidth;}}y+=fontHeight+lineSpace;if(y+fontHeight+lineSpace>=bottom)break;}}catch(err){_didIteratorError12=true;_iteratorError12=err;}finally{try{if(!_iteratorNormalCompletion12&&_iterator12.return){_iterator12.return();}}finally{if(_didIteratorError12){throw _iteratorError12;}}}};this.DrawOverlayIndex=function(left)//叠加指标标题
6589
6591
  {var bottom=this.Frame.ChartBorder.GetTop()+this.Frame.ChartBorder.TitleHeight/2;//上下居中显示
6590
- var right=this.Frame.ChartBorder.GetRight();if(this.Frame.IsHScreen===true){bottom=-this.Frame.ChartBorder.TitleHeight/2;right=this.Frame.ChartBorder.GetHeight();}if(left>right)return;var spaceWidth=5*GetDevicePixelRatio();var drawLeft=left;var indexCount=0;var _iteratorNormalCompletion13=true;var _didIteratorError13=false;var _iteratorError13=undefined;try{for(var _iterator13=(0,_getIterator3.default)(this.OverlayIndex),_step13;!(_iteratorNormalCompletion13=(_step13=_iterator13.next()).done);_iteratorNormalCompletion13=true){item=_step13.value;if(indexCount>0)left+=spaceWidth;var overlayItem=item[1];var overlayID=item[0];if(overlayItem.Title&&this.IsShowOverlayIndexName){this.Canvas.fillStyle=this.TitleColor;var textWidth=this.Canvas.measureText(overlayItem.Title).width+2;drawLeft=left;left+=textWidth;if(left>right)break;this.Canvas.fillText(overlayItem.Title,drawLeft,bottom,textWidth);if(this.IsSelectedChart(overlayID))this.DrawSelectedLine(drawLeft,bottom,textWidth);}for(var i in overlayItem.Data){var item=overlayItem.Data[i];if(!item||!item.Data||!item.Data.Data||!item.Name)continue;if(item.Data.Data.length<=0)continue;var value=null;var valueText=null;if(item.DataType=="StraightLine")//直线只有1个数据
6592
+ var right=this.Frame.ChartBorder.GetRight();if(this.Frame.IsHScreen===true){var border=this.Frame.ChartBorder.GetHScreenBorder();bottom=-this.Frame.ChartBorder.TitleHeight/2;right=this.Frame.ChartBorder.GetHeight();if(this.Frame.ToolbarCacheSize&&this.Frame.ToolbarCacheSize.RToolbar)right=this.Frame.ToolbarCacheSize.RToolbar.Left-2-border.Top;}else{if(this.Frame.ToolbarCacheSize&&this.Frame.ToolbarCacheSize.RToolbar)right=this.Frame.ToolbarCacheSize.RToolbar.Left-2;//右侧按钮宽度要去掉
6593
+ }if(left>right)return;var spaceWidth=5*GetDevicePixelRatio();var drawLeft=left;var indexCount=0;var _iteratorNormalCompletion13=true;var _didIteratorError13=false;var _iteratorError13=undefined;try{for(var _iterator13=(0,_getIterator3.default)(this.OverlayIndex),_step13;!(_iteratorNormalCompletion13=(_step13=_iterator13.next()).done);_iteratorNormalCompletion13=true){item=_step13.value;if(indexCount>0)left+=spaceWidth;var overlayItem=item[1];var overlayID=item[0];if(overlayItem.Title&&this.IsShowOverlayIndexName){this.Canvas.fillStyle=this.TitleColor;var textWidth=this.Canvas.measureText(overlayItem.Title).width+2;drawLeft=left;left+=textWidth;if(left>right)break;this.Canvas.fillText(overlayItem.Title,drawLeft,bottom,textWidth);if(this.IsSelectedChart(overlayID))this.DrawSelectedLine(drawLeft,bottom,textWidth);}for(var i in overlayItem.Data){var item=overlayItem.Data[i];if(!item||!item.Data||!item.Data.Data||!item.Name)continue;if(item.Data.Data.length<=0)continue;var value=null;var valueText=null;if(item.DataType=="StraightLine")//直线只有1个数据
6591
6594
  {value=item.Data.Data[0];valueText=this.FormatValue(value,item);}else{var index=Math.abs(this.CursorIndex-0.5);index=parseInt(index.toFixed(0));if(this.IsKLineFrame)index=this.CursorIndex;var dataIndex=item.Data.DataOffset+index;if(dataIndex>=item.Data.Data.length)dataIndex=item.Data.Data.length-1;if(dataIndex<0)continue;value=item.Data.Data[dataIndex];if(value==null)continue;if(item.DataType=="HistoryData-Vol"){value=value.Vol;valueText=this.FormatValue(value,item);}else if(item.DataType=="MultiReport"){valueText=this.FormatMultiReport(value,item);}else{valueText=this.FormatValue(value,item);}}this.Canvas.fillStyle=item.Color;var text=item.Name+":"+valueText;var textWidth=this.Canvas.measureText(text).width+2;//后空2个像素
6592
6595
  drawLeft=left;left+=textWidth;if(left>right)break;this.Canvas.fillText(text,drawLeft,bottom,textWidth);}if(left>right)break;++indexCount;}}catch(err){_didIteratorError13=true;_iteratorError13=err;}finally{try{if(!_iteratorNormalCompletion13&&_iterator13.return){_iterator13.return();}}finally{if(_didIteratorError13){throw _iteratorError13;}}}};this.HScreenDraw=function(){var border=this.Frame.ChartBorder.GetHScreenBorder();var xText=this.Frame.ChartBorder.GetRightTitle();var yText=border.TopEx;this.Canvas.translate(xText,yText);this.Canvas.rotate(90*Math.PI/180);var left=1;var bottom=-this.Frame.ChartBorder.TitleHeight/2;//上下居中显示
6593
- var right=this.Frame.ChartBorder.GetHeight();this.Canvas.textAlign="left";this.Canvas.textBaseline="middle";this.Canvas.font=this.Font;var pixelRatio=GetDevicePixelRatio();if(this.Title&&this.IsShowIndexName){var textWidth=this.Canvas.measureText(this.Title).width+2;if(this.IsDrawTitleBG){var title=this.Title;var textWidth=this.Canvas.measureText(title).width;var arrowWidth=0;if(this.IsShowNameArrow&&this.NameArrowConfig){arrowWidth=this.Canvas.measureText(this.NameArrowConfig.Symbol).width;if(IFrameSplitOperator.IsNumber(this.NameArrowConfig.Space))arrowWidth+=this.NameArrowConfig.Space;}var bgHeight=this.Canvas.measureText("擎").width+4*pixelRatio;var bgWidth=textWidth+arrowWidth+4*pixelRatio;this.TitleRect={Top:border.Top,Left:this.Frame.ChartBorder.GetRightTitle()+this.Frame.ChartBorder.TitleHeight/2-bgHeight/2,Width:bgHeight,Height:bgWidth};//保存下标题的坐标
6596
+ var right=this.Frame.ChartBorder.GetHeight();if(this.Frame.ToolbarCacheSize&&this.Frame.ToolbarCacheSize.RToolbar)right=this.Frame.ToolbarCacheSize.RToolbar.Left-2-border.Top;this.Canvas.textAlign="left";this.Canvas.textBaseline="middle";this.Canvas.font=this.Font;var pixelRatio=GetDevicePixelRatio();if(this.Title&&this.IsShowIndexName){var textWidth=this.Canvas.measureText(this.Title).width+2;if(this.IsDrawTitleBG){var title=this.Title;var textWidth=this.Canvas.measureText(title).width;var arrowWidth=0;if(this.IsShowNameArrow&&this.NameArrowConfig){arrowWidth=this.Canvas.measureText(this.NameArrowConfig.Symbol).width;if(IFrameSplitOperator.IsNumber(this.NameArrowConfig.Space))arrowWidth+=this.NameArrowConfig.Space;}var bgHeight=this.Canvas.measureText("擎").width+4*pixelRatio;var bgWidth=textWidth+arrowWidth+4*pixelRatio;this.TitleRect={Top:border.Top,Left:this.Frame.ChartBorder.GetRightTitle()+this.Frame.ChartBorder.TitleHeight/2-bgHeight/2,Width:bgHeight,Height:bgWidth};//保存下标题的坐标
6594
6597
  this.Canvas.fillStyle=this.BGColor;var drawRect={Left:left,Top:bottom-bgHeight/2,Width:bgWidth,Height:bgHeight};this.Canvas.fillRect(drawRect.Left,drawRect.Top,drawRect.Width,drawRect.Height);if(this.BGBorderColor){this.Canvas.strokeStyle=this.BGBorderColor;this.Canvas.strokeRect(ToFixedPoint(drawRect.Left),ToFixedPoint(drawRect.Top),ToFixedRect(drawRect.Width),ToFixedRect(drawRect.Height));}var xText=left+2*pixelRatio;this.Canvas.fillStyle=this.TitleColor;this.Canvas.fillText(title,xText,bottom);xText+=textWidth;if(this.IsShowNameArrow&&this.NameArrowConfig){if(IFrameSplitOperator.IsNumber(this.NameArrowConfig.Space))xText+=this.NameArrowConfig.Space;this.Canvas.fillStyle=this.NameArrowConfig.Color;this.Canvas.fillText(this.NameArrowConfig.Symbol,xText,bottom);}left+=bgWidth+2*pixelRatio;left+=this.TitleSpace;}else{this.Canvas.fillStyle=this.TitleColor;this.Canvas.fillText(this.Title,left,bottom);left+=textWidth;left+=this.TitleSpace;}}if(this.ArgumentsText&&this.IsShowIndexName){var textWidth=this.Canvas.measureText(this.ArgumentsText).width+2;this.Canvas.fillStyle=this.TitleColor;this.Canvas.fillText(this.ArgumentsText,left,bottom,textWidth);left+=textWidth;left+=this.TitleSpace;}var isShowLastData=this.IsShowLastData();var lockRect=this.Frame.GetLockRect();if(lockRect)//指标上锁区域不显示动态标题
6595
6598
  {var index=Math.abs(this.CursorIndex-0.5);if(this.IsKLineFrame)index=this.CursorIndex;var x=this.Frame.GetXFromIndex(index.toFixed(0));if(x>=lockRect.Top)return;if(isShowLastData)return;}for(var i in this.Data){var item=this.Data[i];var outText=this.GetTitleItem(item,isShowLastData);if(!outText)continue;var valueText=outText.Text;var aryText=outText.ArrayText;if(aryText){var text;for(var k=0;k<aryText.length;++k){var titleItem=aryText[k];if(titleItem.Name)text=titleItem.Name+":"+titleItem.Text;else text=titleItem.Text;var space=this.ParamSpace*GetDevicePixelRatio();var textWidth=this.Canvas.measureText(text).width+space;if(left+textWidth>right)break;this.Canvas.fillStyle=titleItem.Color;this.Canvas.fillText(text,left,bottom,textWidth);left+=textWidth;}}else{this.Canvas.fillStyle=item.Color;var text=valueText;if(item.Name){var dyTitle=this.GetDynamicOutName(item.Name);if(dyTitle)text=dyTitle+":"+valueText;else text=item.Name+":"+valueText;}var space=this.ParamSpace*GetDevicePixelRatio();var textWidth=this.Canvas.measureText(text).width+space;//后空2个像素
6596
6599
  if(left+textWidth>right)break;this.Canvas.fillText(text,left,bottom,textWidth);left+=textWidth;}}if(this.Explain)//说明信息
@@ -6855,7 +6858,7 @@ this.ShowPriceTextConfig={IsShow:[false,false,true],//[0]=left内 [1]=right内 [
6855
6858
  Font:[12*GetDevicePixelRatio()+'px \u5FAE\u8F6F\u96C5\u9ED1',12*GetDevicePixelRatio()+'px \u5FAE\u8F6F\u96C5\u9ED1']};this.LableInfo;//{ Position:2=右侧外部 }
6856
6859
  //内部变量
6857
6860
  this.ColseButtonSize=0;this.SettingButtonSize=0;this.ButtonBGWidth=0;this.VerticalButtonInfo={Width:0,Height:0};//垂直按钮信息
6858
- this.IsPointIn=this.IsPointIn_XYValue_Line;this.SetOption=function(option){if(this.Super_SetOption)this.Super_SetOption(option);if(option){if(option.GetLabelCallback){this.GetLabelCallback=option.GetLabelCallback;}if(IFrameSplitOperator.IsNumber(option.Precision))this.Precision=option.Precision;if(option.Font)this.Font=option.Font;if(option.ValueTextColor)this.ValueTextColor=option.ValueTextColor;if(option.ButtonBGColor)this.ButtonBGColor=option.ButtonBGColor;if(IFrameSplitOperator.IsNumber(option.ButtonPosition))this.ButtonPosition=option.ButtonPosition;if(IFrameSplitOperator.IsNumber(option.RightSpaceWidth))this.RightSpaceWidth=option.RightSpaceWidth;if(IFrameSplitOperator.IsBool(option.AlwaysShowLab))this.AlwaysShowLab=option.AlwaysShowLab;if(IFrameSplitOperator.IsNumber(option.TopOffset))this.TopOffset=option.TopOffset;if(option.Button){var item=option.Button;if(item.CloseIcon){this.Button.CloseIcon=CloneData(item.CloseIcon);if(!this.Button.CloseIcon.ID)this.Button.CloseIcon.ID=JSCHART_BUTTON_ID.DRAW_PICTURE_DELETE;}else if(item.CloseIcon===null){this.Button.CloseIcon=null;}if(item.SettingIcon){this.Button.SettingIcon=CloneData(item.SettingIcon);if(!this.Button.SettingIcon.ID)this.Button.SettingIcon.ID=JSCHART_BUTTON_ID.DRAW_PICTURE_SETTING;}else if(item.SettingIcon===null){this.Button.SettingIcon=null;}}if(option.ExtendData)this.ExtendData=option.ExtendData;if(IFrameSplitOperator.IsNonEmptyArray(option.IsShowPriceText)){for(var i=0;i<option.IsShowPriceText.length&&i<3;++i){var value=option.IsShowPriceText[i];if(IFrameSplitOperator.IsBool(value))this.ShowPriceTextConfig.IsShow[i]=value;}}if(option.TextMargin){var item=option.TextMargin;if(IFrameSplitOperator.IsNumber(item.Left))this.TextMargin.Left=item.Left;if(IFrameSplitOperator.IsNumber(item.Right))this.TextMargin.Right=item.Right;if(IFrameSplitOperator.IsNumber(item.Top))this.TextMargin.Top=item.Top;if(IFrameSplitOperator.IsNumber(item.Bottom))this.TextMargin.Bottom=item.Bottom;if(IFrameSplitOperator.IsNumber(item.YOffset))this.TextMargin.YOffset=item.YOffset;}if(option.PriceBGColor)this.PriceBGColor=option.PriceBGColor;}};this.ExportStorageData=function(){var storageData;if(this.Super_ExportStorageData){storageData=this.Super_ExportStorageData();if(this.Label)storageData.Label=this.Label;}return storageData;};/*
6861
+ this.IsPointIn=this.IsPointIn_XYValue_Line;this.SetOption=function(option){if(this.Super_SetOption)this.Super_SetOption(option);if(option){if(option.GetLabelCallback){this.GetLabelCallback=option.GetLabelCallback;}if(IFrameSplitOperator.IsNumber(option.Precision))this.Precision=option.Precision;if(option.Font)this.Font=option.Font;if(option.ValueTextColor)this.ValueTextColor=option.ValueTextColor;if(option.ButtonBGColor)this.ButtonBGColor=option.ButtonBGColor;if(IFrameSplitOperator.IsNumber(option.ButtonPosition))this.ButtonPosition=option.ButtonPosition;if(IFrameSplitOperator.IsNumber(option.RightSpaceWidth))this.RightSpaceWidth=option.RightSpaceWidth;if(IFrameSplitOperator.IsBool(option.AlwaysShowLab))this.AlwaysShowLab=option.AlwaysShowLab;if(IFrameSplitOperator.IsNumber(option.TopOffset))this.TopOffset=option.TopOffset;if(option.Button){var item=option.Button;if(item.CloseIcon){this.Button.CloseIcon=CloneData(item.CloseIcon);if(!this.Button.CloseIcon.ID)this.Button.CloseIcon.ID=JSCHART_BUTTON_ID.DRAW_PICTURE_DELETE;}else if(item.CloseIcon===null){this.Button.CloseIcon=null;}if(item.SettingIcon){this.Button.SettingIcon=CloneData(item.SettingIcon);if(!this.Button.SettingIcon.ID)this.Button.SettingIcon.ID=JSCHART_BUTTON_ID.DRAW_PICTURE_SETTING;}else if(item.SettingIcon===null){this.Button.SettingIcon=null;}}if(option.ExtendData)this.ExtendData=option.ExtendData;if(IFrameSplitOperator.IsNonEmptyArray(option.IsShowPriceText)){for(var i=0;i<option.IsShowPriceText.length&&i<3;++i){var value=option.IsShowPriceText[i];if(IFrameSplitOperator.IsBool(value))this.ShowPriceTextConfig.IsShow[i]=value;}}if(option.TextMargin){var item=option.TextMargin;if(IFrameSplitOperator.IsNumber(item.Left))this.TextMargin.Left=item.Left;if(IFrameSplitOperator.IsNumber(item.Right))this.TextMargin.Right=item.Right;if(IFrameSplitOperator.IsNumber(item.Top))this.TextMargin.Top=item.Top;if(IFrameSplitOperator.IsNumber(item.Bottom))this.TextMargin.Bottom=item.Bottom;if(IFrameSplitOperator.IsNumber(item.YOffset))this.TextMargin.YOffset=item.YOffset;}if(option.PriceBGColor)this.PriceBGColor=option.PriceBGColor;}};this.ExportStorageData=function(){var storageData;if(this.Super_ExportStorageData){storageData=this.Super_ExportStorageData();if(this.Label)storageData.Label=this.Label;if(IFrameSplitOperator.IsNumber(this.RightSpaceWidth))storageData.RightSpaceWidth=this.RightSpaceWidth;if(this.Button)storageData.Button=CloneData(this.Button);if(this.ButtonBGColor)storageData.ButtonBGColor=this.ButtonBGColor;}return storageData;};/*
6859
6862
  this.GetXYCoordinate=function()
6860
6863
  {
6861
6864
  if (this.IsFrameMinSize()) return null;
@@ -15634,7 +15637,7 @@ hisData.Symbol=message.symbol;}var stockObj={HQDataType:HQ_DATA_TYPE.KLINE_ID,St
15634
15637
  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);};}/********************************************************************************
15635
15638
  * 版本信息输出
15636
15639
  *
15637
- */var HQCHART_VERSION="1.1.15177";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();//把给外界调用的方法暴露出来
15640
+ */var HQCHART_VERSION="1.1.15183";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();//把给外界调用的方法暴露出来
15638
15641
  exports.default=(_jsChartInit$jsChartS={jsChartInit:JSChart.Init,jsChartStyle:JSChart.SetStyle,// IsIndexSymbol:IsIndexSymbol,
15639
15642
  // BaseIndex:BaseIndex,
15640
15643
  // ChartLine:ChartLine,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hqchart",
3
- "version": "1.1.15178",
3
+ "version": "1.1.15184",
4
4
  "description": "HQChart - H5, 微信小程序 沪深/港股/数字货币/期货/美股 K线图(kline),走势图,缩放,拖拽,十字光标,画图工具,截图,筹码图. 分析家语法,通达信语法,(麦语法),第3方数据对接",
5
5
  "main": "lib/main.js",
6
6
  "scripts": {
@@ -2909,6 +2909,8 @@ var JSCHART_EVENT_ID=
2909
2909
  ON_CORSSCURSOR_STATUS_CHANGE:179, //十字光标状态改变
2910
2910
 
2911
2911
  ON_BEFORE_DRAW_HLINE:180, //画图工具-水平线(ChartDrawPictureHorizontalLine) 绘图前
2912
+
2913
+ ON_HIDE_ALL_POP_DIV:181, //隐藏所有弹框div
2912
2914
  }
2913
2915
 
2914
2916
  var JSCHART_OPERATOR_ID=
@@ -3880,6 +3882,13 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
3880
3882
  if (this.DialogSelectRect) this.DialogSelectRect.Close();
3881
3883
  if (this.DialogSearchIndex) this.DialogSearchIndex.Close();
3882
3884
  if (this.DialogModifyIndexParam) this.DialogModifyIndexParam.Close();
3885
+
3886
+ var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_HIDE_ALL_POP_DIV);
3887
+ if (event && event.Callback)
3888
+ {
3889
+ var sendData={ };
3890
+ event.Callback(event, sendData, this);
3891
+ }
3883
3892
  }
3884
3893
 
3885
3894
 
@@ -10203,7 +10212,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
10203
10212
  var item=this.ChartDrawPicture[i];
10204
10213
  if (item.Guid==drawPicture.Guid || item==drawPicture)
10205
10214
  {
10206
- if (this.ChartDrawStorage) this.ChartDrawStorage.DeleteDrawData(drawPicture);
10215
+ if (this.ChartDrawStorage) this.ChartDrawStorage.DeleteDrawData(item);
10207
10216
  this.ChartDrawPicture.splice(i,1);
10208
10217
 
10209
10218
  if (this.SelectChartDrawPicture) //去掉选中
@@ -10214,7 +10223,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
10214
10223
 
10215
10224
  if (option && option.Draw==false) bDraw=false;
10216
10225
  if (bDraw) this.Draw();
10217
- if (this.DialogModifyDraw) this.DialogModifyDraw.OnClearChartDrawPicture(drawPicture);
10226
+ if (this.DialogModifyDraw) this.DialogModifyDraw.OnClearChartDrawPicture(item);
10218
10227
  break;
10219
10228
  }
10220
10229
  }
@@ -13877,6 +13886,8 @@ function AverageWidthFrame()
13877
13886
  var y=border.Bottom-3;
13878
13887
  var x=border.RightTitle+this.ChartBorder.TitleHeight/2;
13879
13888
 
13889
+ this.ToolbarCacheSize={ RToolbar:{ Right:y, Left:y }}; //相当于额 Top, Bottom
13890
+
13880
13891
  this.Canvas.save();
13881
13892
  this.Canvas.translate(x, y);
13882
13893
  this.Canvas.rotate(90 * Math.PI / 180);
@@ -13901,6 +13912,8 @@ function AverageWidthFrame()
13901
13912
  rtButton.Top=rtButton.Bottom-size-item.Style.MerginLeft;
13902
13913
  this.Buttons.push({ ID:item.ID, Rect:rtButton });
13903
13914
 
13915
+ this.ToolbarCacheSize.RToolbar.Left=rtButton.Top;
13916
+
13904
13917
  bottom=xButton;
13905
13918
  y=rtButton.Top;
13906
13919
  }
@@ -51248,6 +51261,7 @@ function RectSelectPaint()
51248
51261
  if (option.LineColor) this.LineColor=option.LineColor;
51249
51262
  if (option.AreaColor) this.AreaColor=option.AreaColor;
51250
51263
  if (IFrameSplitOperator.IsBool(option.SpaceReselected)) this.SpaceReselected=option.SpaceReselected;
51264
+
51251
51265
  if (option.ShowRangeText)
51252
51266
  {
51253
51267
  var item=option.ShowRangeText;
@@ -64129,9 +64143,16 @@ function DynamicChartTitlePainting()
64129
64143
  var right=this.Frame.ChartBorder.GetRight();
64130
64144
  if (this.Frame.IsHScreen===true)
64131
64145
  {
64146
+ var border=this.Frame.ChartBorder.GetHScreenBorder();
64132
64147
  bottom=-this.Frame.ChartBorder.TitleHeight/2;
64133
64148
  right=this.Frame.ChartBorder.GetHeight();
64149
+ if (this.Frame.ToolbarCacheSize && this.Frame.ToolbarCacheSize.RToolbar) right=this.Frame.ToolbarCacheSize.RToolbar.Left-2-border.Top;
64134
64150
  }
64151
+ else
64152
+ {
64153
+ if (this.Frame.ToolbarCacheSize && this.Frame.ToolbarCacheSize.RToolbar) right=this.Frame.ToolbarCacheSize.RToolbar.Left-2; //右侧按钮宽度要去掉
64154
+ }
64155
+
64135
64156
  if (left>right) return;
64136
64157
 
64137
64158
  var spaceWidth=5*GetDevicePixelRatio();
@@ -64221,6 +64242,7 @@ function DynamicChartTitlePainting()
64221
64242
  var left=1;
64222
64243
  var bottom=-this.Frame.ChartBorder.TitleHeight/2; //上下居中显示
64223
64244
  var right=this.Frame.ChartBorder.GetHeight();
64245
+ if (this.Frame.ToolbarCacheSize && this.Frame.ToolbarCacheSize.RToolbar) right=this.Frame.ToolbarCacheSize.RToolbar.Left-2-border.Top;
64224
64246
 
64225
64247
  this.Canvas.textAlign="left";
64226
64248
  this.Canvas.textBaseline="middle";
@@ -67651,6 +67673,9 @@ function ChartDrawHLine()
67651
67673
  {
67652
67674
  storageData=this.Super_ExportStorageData();
67653
67675
  if (this.Label) storageData.Label=this.Label;
67676
+ if (IFrameSplitOperator.IsNumber(this.RightSpaceWidth)) storageData.RightSpaceWidth=this.RightSpaceWidth;
67677
+ if (this.Button) storageData.Button=CloneData(this.Button);
67678
+ if (this.ButtonBGColor) storageData.ButtonBGColor=this.ButtonBGColor;
67654
67679
  }
67655
67680
 
67656
67681
  return storageData;
@@ -7005,6 +7005,8 @@ var JSCHART_EVENT_ID=
7005
7005
  ON_CORSSCURSOR_STATUS_CHANGE:179, //十字光标状态改变
7006
7006
 
7007
7007
  ON_BEFORE_DRAW_HLINE:180, //画图工具-水平线(ChartDrawPictureHorizontalLine) 绘图前
7008
+
7009
+ ON_HIDE_ALL_POP_DIV:181, //隐藏所有弹框div
7008
7010
  }
7009
7011
 
7010
7012
  var JSCHART_OPERATOR_ID=
@@ -7976,6 +7978,13 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
7976
7978
  if (this.DialogSelectRect) this.DialogSelectRect.Close();
7977
7979
  if (this.DialogSearchIndex) this.DialogSearchIndex.Close();
7978
7980
  if (this.DialogModifyIndexParam) this.DialogModifyIndexParam.Close();
7981
+
7982
+ var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_HIDE_ALL_POP_DIV);
7983
+ if (event && event.Callback)
7984
+ {
7985
+ var sendData={ };
7986
+ event.Callback(event, sendData, this);
7987
+ }
7979
7988
  }
7980
7989
 
7981
7990
 
@@ -14299,7 +14308,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
14299
14308
  var item=this.ChartDrawPicture[i];
14300
14309
  if (item.Guid==drawPicture.Guid || item==drawPicture)
14301
14310
  {
14302
- if (this.ChartDrawStorage) this.ChartDrawStorage.DeleteDrawData(drawPicture);
14311
+ if (this.ChartDrawStorage) this.ChartDrawStorage.DeleteDrawData(item);
14303
14312
  this.ChartDrawPicture.splice(i,1);
14304
14313
 
14305
14314
  if (this.SelectChartDrawPicture) //去掉选中
@@ -14310,7 +14319,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
14310
14319
 
14311
14320
  if (option && option.Draw==false) bDraw=false;
14312
14321
  if (bDraw) this.Draw();
14313
- if (this.DialogModifyDraw) this.DialogModifyDraw.OnClearChartDrawPicture(drawPicture);
14322
+ if (this.DialogModifyDraw) this.DialogModifyDraw.OnClearChartDrawPicture(item);
14314
14323
  break;
14315
14324
  }
14316
14325
  }
@@ -17973,6 +17982,8 @@ function AverageWidthFrame()
17973
17982
  var y=border.Bottom-3;
17974
17983
  var x=border.RightTitle+this.ChartBorder.TitleHeight/2;
17975
17984
 
17985
+ this.ToolbarCacheSize={ RToolbar:{ Right:y, Left:y }}; //相当于额 Top, Bottom
17986
+
17976
17987
  this.Canvas.save();
17977
17988
  this.Canvas.translate(x, y);
17978
17989
  this.Canvas.rotate(90 * Math.PI / 180);
@@ -17997,6 +18008,8 @@ function AverageWidthFrame()
17997
18008
  rtButton.Top=rtButton.Bottom-size-item.Style.MerginLeft;
17998
18009
  this.Buttons.push({ ID:item.ID, Rect:rtButton });
17999
18010
 
18011
+ this.ToolbarCacheSize.RToolbar.Left=rtButton.Top;
18012
+
18000
18013
  bottom=xButton;
18001
18014
  y=rtButton.Top;
18002
18015
  }
@@ -55344,6 +55357,7 @@ function RectSelectPaint()
55344
55357
  if (option.LineColor) this.LineColor=option.LineColor;
55345
55358
  if (option.AreaColor) this.AreaColor=option.AreaColor;
55346
55359
  if (IFrameSplitOperator.IsBool(option.SpaceReselected)) this.SpaceReselected=option.SpaceReselected;
55360
+
55347
55361
  if (option.ShowRangeText)
55348
55362
  {
55349
55363
  var item=option.ShowRangeText;
@@ -68225,9 +68239,16 @@ function DynamicChartTitlePainting()
68225
68239
  var right=this.Frame.ChartBorder.GetRight();
68226
68240
  if (this.Frame.IsHScreen===true)
68227
68241
  {
68242
+ var border=this.Frame.ChartBorder.GetHScreenBorder();
68228
68243
  bottom=-this.Frame.ChartBorder.TitleHeight/2;
68229
68244
  right=this.Frame.ChartBorder.GetHeight();
68245
+ if (this.Frame.ToolbarCacheSize && this.Frame.ToolbarCacheSize.RToolbar) right=this.Frame.ToolbarCacheSize.RToolbar.Left-2-border.Top;
68230
68246
  }
68247
+ else
68248
+ {
68249
+ if (this.Frame.ToolbarCacheSize && this.Frame.ToolbarCacheSize.RToolbar) right=this.Frame.ToolbarCacheSize.RToolbar.Left-2; //右侧按钮宽度要去掉
68250
+ }
68251
+
68231
68252
  if (left>right) return;
68232
68253
 
68233
68254
  var spaceWidth=5*GetDevicePixelRatio();
@@ -68317,6 +68338,7 @@ function DynamicChartTitlePainting()
68317
68338
  var left=1;
68318
68339
  var bottom=-this.Frame.ChartBorder.TitleHeight/2; //上下居中显示
68319
68340
  var right=this.Frame.ChartBorder.GetHeight();
68341
+ if (this.Frame.ToolbarCacheSize && this.Frame.ToolbarCacheSize.RToolbar) right=this.Frame.ToolbarCacheSize.RToolbar.Left-2-border.Top;
68320
68342
 
68321
68343
  this.Canvas.textAlign="left";
68322
68344
  this.Canvas.textBaseline="middle";
@@ -71747,6 +71769,9 @@ function ChartDrawHLine()
71747
71769
  {
71748
71770
  storageData=this.Super_ExportStorageData();
71749
71771
  if (this.Label) storageData.Label=this.Label;
71772
+ if (IFrameSplitOperator.IsNumber(this.RightSpaceWidth)) storageData.RightSpaceWidth=this.RightSpaceWidth;
71773
+ if (this.Button) storageData.Button=CloneData(this.Button);
71774
+ if (this.ButtonBGColor) storageData.ButtonBGColor=this.ButtonBGColor;
71750
71775
  }
71751
71776
 
71752
71777
  return storageData;
@@ -154139,7 +154164,7 @@ function ScrollBarBGChart()
154139
154164
 
154140
154165
 
154141
154166
 
154142
- var HQCHART_VERSION="1.1.15177";
154167
+ var HQCHART_VERSION="1.1.15183";
154143
154168
 
154144
154169
  function PrintHQChartVersion()
154145
154170
  {
@@ -5,7 +5,7 @@
5
5
 
6
6
 
7
7
 
8
- var HQCHART_VERSION="1.1.15177";
8
+ var HQCHART_VERSION="1.1.15183";
9
9
 
10
10
  function PrintHQChartVersion()
11
11
  {
@@ -7049,6 +7049,8 @@ var JSCHART_EVENT_ID=
7049
7049
  ON_CORSSCURSOR_STATUS_CHANGE:179, //十字光标状态改变
7050
7050
 
7051
7051
  ON_BEFORE_DRAW_HLINE:180, //画图工具-水平线(ChartDrawPictureHorizontalLine) 绘图前
7052
+
7053
+ ON_HIDE_ALL_POP_DIV:181, //隐藏所有弹框div
7052
7054
  }
7053
7055
 
7054
7056
  var JSCHART_OPERATOR_ID=
@@ -8020,6 +8022,13 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
8020
8022
  if (this.DialogSelectRect) this.DialogSelectRect.Close();
8021
8023
  if (this.DialogSearchIndex) this.DialogSearchIndex.Close();
8022
8024
  if (this.DialogModifyIndexParam) this.DialogModifyIndexParam.Close();
8025
+
8026
+ var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_HIDE_ALL_POP_DIV);
8027
+ if (event && event.Callback)
8028
+ {
8029
+ var sendData={ };
8030
+ event.Callback(event, sendData, this);
8031
+ }
8023
8032
  }
8024
8033
 
8025
8034
 
@@ -14343,7 +14352,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
14343
14352
  var item=this.ChartDrawPicture[i];
14344
14353
  if (item.Guid==drawPicture.Guid || item==drawPicture)
14345
14354
  {
14346
- if (this.ChartDrawStorage) this.ChartDrawStorage.DeleteDrawData(drawPicture);
14355
+ if (this.ChartDrawStorage) this.ChartDrawStorage.DeleteDrawData(item);
14347
14356
  this.ChartDrawPicture.splice(i,1);
14348
14357
 
14349
14358
  if (this.SelectChartDrawPicture) //去掉选中
@@ -14354,7 +14363,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
14354
14363
 
14355
14364
  if (option && option.Draw==false) bDraw=false;
14356
14365
  if (bDraw) this.Draw();
14357
- if (this.DialogModifyDraw) this.DialogModifyDraw.OnClearChartDrawPicture(drawPicture);
14366
+ if (this.DialogModifyDraw) this.DialogModifyDraw.OnClearChartDrawPicture(item);
14358
14367
  break;
14359
14368
  }
14360
14369
  }
@@ -18017,6 +18026,8 @@ function AverageWidthFrame()
18017
18026
  var y=border.Bottom-3;
18018
18027
  var x=border.RightTitle+this.ChartBorder.TitleHeight/2;
18019
18028
 
18029
+ this.ToolbarCacheSize={ RToolbar:{ Right:y, Left:y }}; //相当于额 Top, Bottom
18030
+
18020
18031
  this.Canvas.save();
18021
18032
  this.Canvas.translate(x, y);
18022
18033
  this.Canvas.rotate(90 * Math.PI / 180);
@@ -18041,6 +18052,8 @@ function AverageWidthFrame()
18041
18052
  rtButton.Top=rtButton.Bottom-size-item.Style.MerginLeft;
18042
18053
  this.Buttons.push({ ID:item.ID, Rect:rtButton });
18043
18054
 
18055
+ this.ToolbarCacheSize.RToolbar.Left=rtButton.Top;
18056
+
18044
18057
  bottom=xButton;
18045
18058
  y=rtButton.Top;
18046
18059
  }
@@ -55388,6 +55401,7 @@ function RectSelectPaint()
55388
55401
  if (option.LineColor) this.LineColor=option.LineColor;
55389
55402
  if (option.AreaColor) this.AreaColor=option.AreaColor;
55390
55403
  if (IFrameSplitOperator.IsBool(option.SpaceReselected)) this.SpaceReselected=option.SpaceReselected;
55404
+
55391
55405
  if (option.ShowRangeText)
55392
55406
  {
55393
55407
  var item=option.ShowRangeText;
@@ -68269,9 +68283,16 @@ function DynamicChartTitlePainting()
68269
68283
  var right=this.Frame.ChartBorder.GetRight();
68270
68284
  if (this.Frame.IsHScreen===true)
68271
68285
  {
68286
+ var border=this.Frame.ChartBorder.GetHScreenBorder();
68272
68287
  bottom=-this.Frame.ChartBorder.TitleHeight/2;
68273
68288
  right=this.Frame.ChartBorder.GetHeight();
68289
+ if (this.Frame.ToolbarCacheSize && this.Frame.ToolbarCacheSize.RToolbar) right=this.Frame.ToolbarCacheSize.RToolbar.Left-2-border.Top;
68274
68290
  }
68291
+ else
68292
+ {
68293
+ if (this.Frame.ToolbarCacheSize && this.Frame.ToolbarCacheSize.RToolbar) right=this.Frame.ToolbarCacheSize.RToolbar.Left-2; //右侧按钮宽度要去掉
68294
+ }
68295
+
68275
68296
  if (left>right) return;
68276
68297
 
68277
68298
  var spaceWidth=5*GetDevicePixelRatio();
@@ -68361,6 +68382,7 @@ function DynamicChartTitlePainting()
68361
68382
  var left=1;
68362
68383
  var bottom=-this.Frame.ChartBorder.TitleHeight/2; //上下居中显示
68363
68384
  var right=this.Frame.ChartBorder.GetHeight();
68385
+ if (this.Frame.ToolbarCacheSize && this.Frame.ToolbarCacheSize.RToolbar) right=this.Frame.ToolbarCacheSize.RToolbar.Left-2-border.Top;
68364
68386
 
68365
68387
  this.Canvas.textAlign="left";
68366
68388
  this.Canvas.textBaseline="middle";
@@ -71791,6 +71813,9 @@ function ChartDrawHLine()
71791
71813
  {
71792
71814
  storageData=this.Super_ExportStorageData();
71793
71815
  if (this.Label) storageData.Label=this.Label;
71816
+ if (IFrameSplitOperator.IsNumber(this.RightSpaceWidth)) storageData.RightSpaceWidth=this.RightSpaceWidth;
71817
+ if (this.Button) storageData.Button=CloneData(this.Button);
71818
+ if (this.ButtonBGColor) storageData.ButtonBGColor=this.ButtonBGColor;
71794
71819
  }
71795
71820
 
71796
71821
  return storageData;
@@ -166152,7 +166177,7 @@ function HQChartScriptWorker()
166152
166177
 
166153
166178
 
166154
166179
 
166155
- var HQCHART_VERSION="1.1.15177";
166180
+ var HQCHART_VERSION="1.1.15183";
166156
166181
 
166157
166182
  function PrintHQChartVersion()
166158
166183
  {