hqchart 1.1.15176 → 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.
package/lib/umychart.vue.js
CHANGED
|
@@ -1529,7 +1529,7 @@ this.StartAnimation=function(option){if(this.JSChartContainer&&typeof this.JSCha
|
|
|
1529
1529
|
this.AddEventCallback=function(obj){if(this.JSChartContainer&&typeof this.JSChartContainer.AddEventCallback=='function'){JSConsole.Chart.Log('[JSChart:AddEventCallback] ',obj);this.JSChartContainer.AddEventCallback(obj);}};//设置语言 'EN', 'CN'
|
|
1530
1530
|
this.SetLanguage=function(language){if(this.JSChartContainer&&typeof this.JSChartContainer.SetLanguage=='function'){JSConsole.Chart.Log('[JSChart:SetLanguage] ',language);this.JSChartContainer.SetLanguage(language);}};//切换指标模板
|
|
1531
1531
|
this.ChangeIndexTemplate=function(option){if(this.JSChartContainer&&typeof this.JSChartContainer.ChangeIndexTemplate=='function'){JSConsole.Chart.Log('[JSChart:ChangeIndexTemplate] ',option);this.JSChartContainer.ChangeIndexTemplate(option);}};//画图工具
|
|
1532
|
-
this.SetChartDrawOption=function(option){if(this.JSChartContainer&&typeof this.JSChartContainer.SetChartDrawOption=='function'){JSConsole.Chart.Log('[JSChart:SetChartDrawOption] ',option);this.JSChartContainer.SetChartDrawOption(option);}};this.CreateChartDrawPicture=function(name,option){if(this.JSChartContainer&&typeof this.JSChartContainer.CreateChartDrawPicture=='function'){JSConsole.Chart.Log('[JSChart:CreateChartDrawPicture] ',name);this.JSChartContainer.CreateChartDrawPicture(name,option);}};this.AddChartDrawPicture=function(obj){if(this.JSChartContainer&&typeof this.JSChartContainer.AddChartDrawPicture=='function'){JSConsole.Chart.Log('[JSChart:AddChartDrawPicture] ',obj);return this.JSChartContainer.AddChartDrawPicture(obj);}};//删除画图工具
|
|
1532
|
+
this.SetChartDrawOption=function(option){if(this.JSChartContainer&&typeof this.JSChartContainer.SetChartDrawOption=='function'){JSConsole.Chart.Log('[JSChart:SetChartDrawOption] ',option);this.JSChartContainer.SetChartDrawOption(option);}};this.CreateChartDrawPicture=function(name,option){if(this.JSChartContainer&&typeof this.JSChartContainer.CreateChartDrawPicture=='function'){JSConsole.Chart.Log('[JSChart:CreateChartDrawPicture] ',name);this.JSChartContainer.CreateChartDrawPicture(name,option);}};this.AddChartDrawPicture=function(obj,option){if(this.JSChartContainer&&typeof this.JSChartContainer.AddChartDrawPicture=='function'){JSConsole.Chart.Log('[JSChart:AddChartDrawPicture] ',obj);return this.JSChartContainer.AddChartDrawPicture(obj,option);}};//删除画图工具
|
|
1533
1533
|
this.ClearChartDrawPicture=function(drawPicture,option){if(this.JSChartContainer&&typeof this.JSChartContainer.ClearChartDrawPicture=='function'){//JSConsole.Chart.Log('[JSChart:ClearChartDrawPicture] ', drawPicture);
|
|
1534
1534
|
this.JSChartContainer.ClearChartDrawPicture(drawPicture,option);}};//复制一个画图
|
|
1535
1535
|
this.PasteChartDrawPicture=function(data,frameID,option){if(this.JSChartContainer&&typeof this.JSChartContainer.PasteChartDrawPicture=='function'){JSConsole.Chart.Log('[JSChart:PasteChartDrawPicture] ',data,frameID,option);return this.JSChartContainer.PasteChartDrawPicture(data,frameID,option);}};//重新加载配置
|
|
@@ -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
|
|
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(
|
|
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(
|
|
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.
|
|
2824
|
-
|
|
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();
|
|
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;
|
|
@@ -8625,9 +8628,10 @@ this.CreateChartDrawPicture=function(name,option,callback){var drawPicture=null;
|
|
|
8625
8628
|
{if(IChartDrawPicture.MapIonFont.has(name)){var iconItem=IChartDrawPicture.MapIonFont.get(name);drawPicture=new ChartDrawPictureIconFont();drawPicture.FontOption.Family=iconItem.Family;drawPicture.Text=iconItem.Text;if(iconItem.Color)drawPicture.LineColor=iconItem.Color;}}if(!drawPicture)return false;drawPicture.Canvas=this.Canvas;drawPicture.Status=0;drawPicture.Symbol=this.Symbol;drawPicture.Period=this.Period;drawPicture.Right=this.Right;drawPicture.Option=this.ChartDrawOption;drawPicture.HQChart=this;if(callback)drawPicture.FinishedCallback=callback;//完成通知上层回调
|
|
8626
8629
|
if(option)drawPicture.SetOption(option);var self=this;drawPicture.Update=function()//更新回调函数
|
|
8627
8630
|
{self.DrawDynamicInfo();};drawPicture.GetActiveDrawPicture=function(){return self.GetActiveDrawPicture();};this.CurrentChartDrawPicture=drawPicture;//JSConsole.Chart.Log("[KLineChartContainer::CreateChartDrawPicture] ", name,this.CurrentChartDrawPicture);
|
|
8628
|
-
return true;};this.AddChartDrawPicture=function(obj){if(!obj)return null;if(obj.FrameID<0||obj.FrameID>=this.Frame.SubFrame.length)return null;var self=this;var item=IChartDrawPicture.GetDrawPictureByClassName(obj.ClassName);if(!item)return null;var drawPicture=item.Create();drawPicture.Canvas=this.Canvas;drawPicture.Status=10;drawPicture.Frame=this.Frame.SubFrame[obj.FrameID].Frame;//绑定框架坐标
|
|
8631
|
+
return true;};this.AddChartDrawPicture=function(obj,option){if(!obj)return null;if(obj.FrameID<0||obj.FrameID>=this.Frame.SubFrame.length)return null;var self=this;var item=IChartDrawPicture.GetDrawPictureByClassName(obj.ClassName);if(!item)return null;var drawPicture=item.Create();drawPicture.Canvas=this.Canvas;drawPicture.Status=10;drawPicture.Frame=this.Frame.SubFrame[obj.FrameID].Frame;//绑定框架坐标
|
|
8629
8632
|
drawPicture.Symbol=this.Symbol;drawPicture.Period=this.Period;drawPicture.Right=this.Right;drawPicture.Option=this.ChartDrawOption;drawPicture.HQChart=this;if(obj.Value)drawPicture.Value=obj.Value;if(obj.Guid)drawPicture.Guid=obj.Guid;if(obj.CacheData)drawPicture.CacheData=obj.CacheData;//缓存数据
|
|
8630
|
-
if(drawPicture.ImportStorageData)drawPicture.ImportStorageData(obj);drawPicture.SetOption(obj);if(obj.EnableUpdateXValue)drawPicture.UpdateXValue();drawPicture.ValueToPoint();drawPicture.GetActiveDrawPicture=function(){return self.GetActiveDrawPicture();};if(drawPicture.ClassName==='ChartDrawPictureText')drawPicture.IsInitialized=true;this.ChartDrawPicture.push(drawPicture);
|
|
8633
|
+
if(drawPicture.ImportStorageData)drawPicture.ImportStorageData(obj);drawPicture.SetOption(obj);if(obj.EnableUpdateXValue)drawPicture.UpdateXValue();drawPicture.ValueToPoint();drawPicture.GetActiveDrawPicture=function(){return self.GetActiveDrawPicture();};if(drawPicture.ClassName==='ChartDrawPictureText')drawPicture.IsInitialized=true;this.ChartDrawPicture.push(drawPicture);if(option&&option.Save===true)//存盘
|
|
8634
|
+
{if(this.ChartDrawStorage)this.ChartDrawStorage.SaveDrawData(drawPicture);}this.DrawDynamicInfo();return drawPicture;};this.PasteChartDrawPicture=function(data,frameID,option){if(!data||!data.ClassName)return null;if(frameID<0||frameID>=this.Frame.SubFrame.length)return null;var item=IChartDrawPicture.GetDrawPictureByClassName(data.ClassName);if(!item)return null;var drawPicture=item.Create();if(!drawPicture)return null;var self=this;drawPicture.Canvas=this.Canvas;drawPicture.Status=10;drawPicture.Frame=this.Frame.SubFrame[frameID].Frame;//绑定框架坐标
|
|
8631
8635
|
drawPicture.Symbol=this.Symbol;drawPicture.Period=this.Period;drawPicture.Right=this.Right;drawPicture.Option=this.ChartDrawOption;drawPicture.GetActiveDrawPicture=function(){return self.GetActiveDrawPicture();};if(drawPicture.SetOption)drawPicture.SetOption(data);this.RandomDrawPictureValue(drawPicture,data);drawPicture.PointToValue();if(drawPicture.ClassName==='ChartDrawPictureText')drawPicture.IsInitialized=true;this.ChartDrawPicture.push(drawPicture);//存盘
|
|
8632
8636
|
if(this.ChartDrawStorage)this.ChartDrawStorage.SaveDrawData(drawPicture);this.DrawDynamicInfo();return drawPicture;};//随机生成画图的点
|
|
8633
8637
|
this.RandomDrawPictureValue=function(chart,data){if(!IFrameSplitOperator.IsNonEmptyArray(data.Value))return;var kData=this.GetKLineChart();if(!kData||!kData.Data||!IFrameSplitOperator.IsNumber(kData.Data.DataOffset)||kData.Data.DataOffset<0)return null;if(!IFrameSplitOperator.IsNonEmptyArray(kData.Data.Data))return null;var aryKData=kData.Data.Data;var startIndex=kData.Data.DataOffset;var endIndex=kData.Data.DataOffset+kData.ChartFrame.XPointCount-1;if(endIndex>=aryKData.length)endIndex=aryKData.length-1;var frameHeight=chart.Frame.ChartBorder.GetHeight();var max=chart.Frame.HorizontalMax;var min=chart.Frame.HorizontalMin;var y=chart.Frame.ChartBorder.GetBottomEx()-frameHeight*data.YFristScale;var range={Max:5,Min:2};var xRandomOffset=Math.floor(Math.random()*(range.Max-range.Min+1))+range.Min;var xValue=data.Value[0].XIndex+xRandomOffset;var firstPoint=null;chart.Value=[];for(var i=0;i<data.Value.length;++i){var item=data.Value[i];chart.Value[i]={XValue:xValue+item.XOffset};chart.Point[i]={Y:y+item.YOffset,X:chart.Frame.GetXFromIndex(xValue+item.XOffset,false)};}};//xStep,yStep 移动的偏移量
|
|
@@ -9530,8 +9534,9 @@ this.Draw();};this.CreateChartDrawPicture=function(name,option,callback){var dra
|
|
|
9530
9534
|
{if(IChartDrawPicture.MapIonFont.has(name)){var iconItem=IChartDrawPicture.MapIonFont.get(name);drawPicture=new ChartDrawPictureIconFont();drawPicture.FontOption.Family=iconItem.Family;drawPicture.Text=iconItem.Text;if(iconItem.Color)drawPicture.LineColor=iconItem.Color;}}if(!drawPicture)return false;drawPicture.Canvas=this.Canvas;drawPicture.Status=0;drawPicture.Symbol=this.Symbol;drawPicture.Period=888888888;drawPicture.Option=this.ChartDrawOption;drawPicture.HQChart=this;if(callback)drawPicture.FinishedCallback=callback;//完成通知上层回调
|
|
9531
9535
|
if(option)drawPicture.SetOption(option);var self=this;drawPicture.Update=function()//更新回调函数
|
|
9532
9536
|
{self.DrawDynamicInfo();};drawPicture.GetActiveDrawPicture=function(){return self.GetActiveDrawPicture();};this.CurrentChartDrawPicture=drawPicture;JSConsole.Chart.Log("[MinuteChartContainer::CreateChartDrawPicture] ",name,this.CurrentChartDrawPicture);return true;};//手动添加画线
|
|
9533
|
-
this.AddChartDrawPicture=function(obj){if(!obj)return null;if(obj.FrameID<0||obj.FrameID>=this.Frame.SubFrame.length)return null;var self=this;var item=IChartDrawPicture.GetDrawPictureByClassName(obj.ClassName);if(!item)return null;var drawPicture=item.Create();drawPicture.Canvas=this.Canvas;drawPicture.Status=10;drawPicture.Frame=this.Frame.SubFrame[obj.FrameID].Frame;//绑定框架坐标
|
|
9534
|
-
drawPicture.Symbol=this.Symbol;drawPicture.Period=888888888;drawPicture.HQChart=this;if(obj.Value)drawPicture.Value=obj.Value;if(obj.Guid)drawPicture.Guid=obj.Guid;if(drawPicture.ImportStorageData)drawPicture.ImportStorageData(obj);drawPicture.SetOption(obj);if(obj.EnableUpdateXValue)drawPicture.UpdateXValue();drawPicture.ValueToPoint();drawPicture.GetActiveDrawPicture=function(){return self.GetActiveDrawPicture();};this.ChartDrawPicture.push(drawPicture);if(
|
|
9537
|
+
this.AddChartDrawPicture=function(obj,option){if(!obj)return null;if(obj.FrameID<0||obj.FrameID>=this.Frame.SubFrame.length)return null;var self=this;var item=IChartDrawPicture.GetDrawPictureByClassName(obj.ClassName);if(!item)return null;var drawPicture=item.Create();drawPicture.Canvas=this.Canvas;drawPicture.Status=10;drawPicture.Frame=this.Frame.SubFrame[obj.FrameID].Frame;//绑定框架坐标
|
|
9538
|
+
drawPicture.Symbol=this.Symbol;drawPicture.Period=888888888;drawPicture.HQChart=this;if(obj.Value)drawPicture.Value=obj.Value;if(obj.Guid)drawPicture.Guid=obj.Guid;if(drawPicture.ImportStorageData)drawPicture.ImportStorageData(obj);drawPicture.SetOption(obj);if(obj.EnableUpdateXValue)drawPicture.UpdateXValue();drawPicture.ValueToPoint();drawPicture.GetActiveDrawPicture=function(){return self.GetActiveDrawPicture();};this.ChartDrawPicture.push(drawPicture);if(option&&option.Save)//存盘
|
|
9539
|
+
{if(this.ChartDrawStorage)this.ChartDrawStorage.SaveDrawData(drawPicture);}if(obj.Draw==true)this.DrawDynamicInfo();return drawPicture;};this.ReloadChartDrawPicture=function(){this.ChartDrawPicture=[];if(this.SelectChartDrawPicture)this.SelectChartDrawPicture.IsSelected=false;this.SelectChartDrawPicture=null;this.CurrentChartDrawPicture=null;this.MoveOnChartDrawPicture=null;if(this.ChartDrawStorage){this.ChartDrawStorageCache=this.ChartDrawStorage.GetDrawData({Symbol:this.Symbol,Period:888888888});}};this.CreateChartDrawPictureByStorage=function()//把缓存(this.ChartDrawStorageCache) 画图工具创建出来
|
|
9535
9540
|
{var _this43=this;if(!this.ChartDrawStorageCache||this.ChartDrawStorageCache.length<=0)return;var kData=this.GetKData();for(var i=0;i<this.ChartDrawStorageCache.length;++i){var item=this.ChartDrawStorageCache[i];if(item.FrameID<0||!this.Frame.SubFrame||this.Frame.SubFrame.length<item.FrameID)continue;var drawPicture=IChartDrawPicture.CreateChartDrawPicture(item);if(!drawPicture)continue;drawPicture.Canvas=this.Canvas;drawPicture.Status=10;drawPicture.HQChart=this;drawPicture.Frame=this.Frame.SubFrame[item.FrameID].Frame;//绑定框架坐标
|
|
9536
9541
|
if(drawPicture.ImportStorageData)drawPicture.ImportStorageData(item);drawPicture.ResetXValue();drawPicture.UpdateXValue();drawPicture.ValueToPoint();drawPicture.GetActiveDrawPicture=function(){return _this43.GetActiveDrawPicture();};this.ChartDrawPicture.push(drawPicture);}this.ChartDrawStorageCache=null;//清空缓存
|
|
9537
9542
|
};this.SetSizeChange=function(bChanged){this.Frame.SetSizeChage(bChanged);for(var i in this.ExtendChartPaint){var item=this.ExtendChartPaint[i];item.SizeChange=bChanged;}};this.SetSizeChage=this.SetSizeChange;//根据X坐标获取数据索引
|
|
@@ -15632,7 +15637,7 @@ hisData.Symbol=message.symbol;}var stockObj={HQDataType:HQ_DATA_TYPE.KLINE_ID,St
|
|
|
15632
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);};}/********************************************************************************
|
|
15633
15638
|
* 版本信息输出
|
|
15634
15639
|
*
|
|
15635
|
-
*/var HQCHART_VERSION="1.1.
|
|
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();//把给外界调用的方法暴露出来
|
|
15636
15641
|
exports.default=(_jsChartInit$jsChartS={jsChartInit:JSChart.Init,jsChartStyle:JSChart.SetStyle,// IsIndexSymbol:IsIndexSymbol,
|
|
15637
15642
|
// BaseIndex:BaseIndex,
|
|
15638
15643
|
// ChartLine:ChartLine,
|
package/package.json
CHANGED
package/src/jscommon/umychart.js
CHANGED
|
@@ -2328,12 +2328,12 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
2328
2328
|
}
|
|
2329
2329
|
}
|
|
2330
2330
|
|
|
2331
|
-
this.AddChartDrawPicture=function(obj)
|
|
2331
|
+
this.AddChartDrawPicture=function(obj, option)
|
|
2332
2332
|
{
|
|
2333
2333
|
if(this.JSChartContainer && typeof(this.JSChartContainer.AddChartDrawPicture)=='function')
|
|
2334
2334
|
{
|
|
2335
2335
|
JSConsole.Chart.Log('[JSChart:AddChartDrawPicture] ', obj);
|
|
2336
|
-
return this.JSChartContainer.AddChartDrawPicture(obj);
|
|
2336
|
+
return this.JSChartContainer.AddChartDrawPicture(obj, option);
|
|
2337
2337
|
}
|
|
2338
2338
|
}
|
|
2339
2339
|
|
|
@@ -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(
|
|
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(
|
|
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;
|
|
@@ -87626,7 +87651,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
87626
87651
|
return true;
|
|
87627
87652
|
}
|
|
87628
87653
|
|
|
87629
|
-
this.AddChartDrawPicture=function(obj)
|
|
87654
|
+
this.AddChartDrawPicture=function(obj, option)
|
|
87630
87655
|
{
|
|
87631
87656
|
if (!obj) return null;
|
|
87632
87657
|
if (obj.FrameID<0 || obj.FrameID>=this.Frame.SubFrame.length) return null;
|
|
@@ -87658,6 +87683,11 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
87658
87683
|
if (drawPicture.ClassName==='ChartDrawPictureText') drawPicture.IsInitialized=true;
|
|
87659
87684
|
this.ChartDrawPicture.push(drawPicture);
|
|
87660
87685
|
|
|
87686
|
+
if (option && option.Save===true) //存盘
|
|
87687
|
+
{
|
|
87688
|
+
if (this.ChartDrawStorage) this.ChartDrawStorage.SaveDrawData(drawPicture);
|
|
87689
|
+
}
|
|
87690
|
+
|
|
87661
87691
|
this.DrawDynamicInfo();
|
|
87662
87692
|
|
|
87663
87693
|
return drawPicture;
|
|
@@ -96040,7 +96070,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
96040
96070
|
}
|
|
96041
96071
|
|
|
96042
96072
|
//手动添加画线
|
|
96043
|
-
this.AddChartDrawPicture=function(obj)
|
|
96073
|
+
this.AddChartDrawPicture=function(obj, option)
|
|
96044
96074
|
{
|
|
96045
96075
|
if (!obj) return null;
|
|
96046
96076
|
if (obj.FrameID<0 || obj.FrameID>=this.Frame.SubFrame.length) return null;
|
|
@@ -96069,6 +96099,11 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
96069
96099
|
|
|
96070
96100
|
this.ChartDrawPicture.push(drawPicture);
|
|
96071
96101
|
|
|
96102
|
+
if (option && option.Save) //存盘
|
|
96103
|
+
{
|
|
96104
|
+
if (this.ChartDrawStorage) this.ChartDrawStorage.SaveDrawData(drawPicture);
|
|
96105
|
+
}
|
|
96106
|
+
|
|
96072
96107
|
if (obj.Draw==true) this.DrawDynamicInfo();
|
|
96073
96108
|
|
|
96074
96109
|
return drawPicture;
|
|
@@ -6424,12 +6424,12 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
6424
6424
|
}
|
|
6425
6425
|
}
|
|
6426
6426
|
|
|
6427
|
-
this.AddChartDrawPicture=function(obj)
|
|
6427
|
+
this.AddChartDrawPicture=function(obj, option)
|
|
6428
6428
|
{
|
|
6429
6429
|
if(this.JSChartContainer && typeof(this.JSChartContainer.AddChartDrawPicture)=='function')
|
|
6430
6430
|
{
|
|
6431
6431
|
JSConsole.Chart.Log('[JSChart:AddChartDrawPicture] ', obj);
|
|
6432
|
-
return this.JSChartContainer.AddChartDrawPicture(obj);
|
|
6432
|
+
return this.JSChartContainer.AddChartDrawPicture(obj, option);
|
|
6433
6433
|
}
|
|
6434
6434
|
}
|
|
6435
6435
|
|
|
@@ -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(
|
|
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(
|
|
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;
|
|
@@ -91722,7 +91747,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
91722
91747
|
return true;
|
|
91723
91748
|
}
|
|
91724
91749
|
|
|
91725
|
-
this.AddChartDrawPicture=function(obj)
|
|
91750
|
+
this.AddChartDrawPicture=function(obj, option)
|
|
91726
91751
|
{
|
|
91727
91752
|
if (!obj) return null;
|
|
91728
91753
|
if (obj.FrameID<0 || obj.FrameID>=this.Frame.SubFrame.length) return null;
|
|
@@ -91754,6 +91779,11 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
91754
91779
|
if (drawPicture.ClassName==='ChartDrawPictureText') drawPicture.IsInitialized=true;
|
|
91755
91780
|
this.ChartDrawPicture.push(drawPicture);
|
|
91756
91781
|
|
|
91782
|
+
if (option && option.Save===true) //存盘
|
|
91783
|
+
{
|
|
91784
|
+
if (this.ChartDrawStorage) this.ChartDrawStorage.SaveDrawData(drawPicture);
|
|
91785
|
+
}
|
|
91786
|
+
|
|
91757
91787
|
this.DrawDynamicInfo();
|
|
91758
91788
|
|
|
91759
91789
|
return drawPicture;
|
|
@@ -100136,7 +100166,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
100136
100166
|
}
|
|
100137
100167
|
|
|
100138
100168
|
//手动添加画线
|
|
100139
|
-
this.AddChartDrawPicture=function(obj)
|
|
100169
|
+
this.AddChartDrawPicture=function(obj, option)
|
|
100140
100170
|
{
|
|
100141
100171
|
if (!obj) return null;
|
|
100142
100172
|
if (obj.FrameID<0 || obj.FrameID>=this.Frame.SubFrame.length) return null;
|
|
@@ -100165,6 +100195,11 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
100165
100195
|
|
|
100166
100196
|
this.ChartDrawPicture.push(drawPicture);
|
|
100167
100197
|
|
|
100198
|
+
if (option && option.Save) //存盘
|
|
100199
|
+
{
|
|
100200
|
+
if (this.ChartDrawStorage) this.ChartDrawStorage.SaveDrawData(drawPicture);
|
|
100201
|
+
}
|
|
100202
|
+
|
|
100168
100203
|
if (obj.Draw==true) this.DrawDynamicInfo();
|
|
100169
100204
|
|
|
100170
100205
|
return drawPicture;
|
|
@@ -154129,7 +154164,7 @@ function ScrollBarBGChart()
|
|
|
154129
154164
|
|
|
154130
154165
|
|
|
154131
154166
|
|
|
154132
|
-
var HQCHART_VERSION="1.1.
|
|
154167
|
+
var HQCHART_VERSION="1.1.15183";
|
|
154133
154168
|
|
|
154134
154169
|
function PrintHQChartVersion()
|
|
154135
154170
|
{
|
|
@@ -6468,12 +6468,12 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
6468
6468
|
}
|
|
6469
6469
|
}
|
|
6470
6470
|
|
|
6471
|
-
this.AddChartDrawPicture=function(obj)
|
|
6471
|
+
this.AddChartDrawPicture=function(obj, option)
|
|
6472
6472
|
{
|
|
6473
6473
|
if(this.JSChartContainer && typeof(this.JSChartContainer.AddChartDrawPicture)=='function')
|
|
6474
6474
|
{
|
|
6475
6475
|
JSConsole.Chart.Log('[JSChart:AddChartDrawPicture] ', obj);
|
|
6476
|
-
return this.JSChartContainer.AddChartDrawPicture(obj);
|
|
6476
|
+
return this.JSChartContainer.AddChartDrawPicture(obj, option);
|
|
6477
6477
|
}
|
|
6478
6478
|
}
|
|
6479
6479
|
|
|
@@ -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(
|
|
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(
|
|
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;
|
|
@@ -91766,7 +91791,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
91766
91791
|
return true;
|
|
91767
91792
|
}
|
|
91768
91793
|
|
|
91769
|
-
this.AddChartDrawPicture=function(obj)
|
|
91794
|
+
this.AddChartDrawPicture=function(obj, option)
|
|
91770
91795
|
{
|
|
91771
91796
|
if (!obj) return null;
|
|
91772
91797
|
if (obj.FrameID<0 || obj.FrameID>=this.Frame.SubFrame.length) return null;
|
|
@@ -91798,6 +91823,11 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
91798
91823
|
if (drawPicture.ClassName==='ChartDrawPictureText') drawPicture.IsInitialized=true;
|
|
91799
91824
|
this.ChartDrawPicture.push(drawPicture);
|
|
91800
91825
|
|
|
91826
|
+
if (option && option.Save===true) //存盘
|
|
91827
|
+
{
|
|
91828
|
+
if (this.ChartDrawStorage) this.ChartDrawStorage.SaveDrawData(drawPicture);
|
|
91829
|
+
}
|
|
91830
|
+
|
|
91801
91831
|
this.DrawDynamicInfo();
|
|
91802
91832
|
|
|
91803
91833
|
return drawPicture;
|
|
@@ -100180,7 +100210,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
100180
100210
|
}
|
|
100181
100211
|
|
|
100182
100212
|
//手动添加画线
|
|
100183
|
-
this.AddChartDrawPicture=function(obj)
|
|
100213
|
+
this.AddChartDrawPicture=function(obj, option)
|
|
100184
100214
|
{
|
|
100185
100215
|
if (!obj) return null;
|
|
100186
100216
|
if (obj.FrameID<0 || obj.FrameID>=this.Frame.SubFrame.length) return null;
|
|
@@ -100209,6 +100239,11 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
100209
100239
|
|
|
100210
100240
|
this.ChartDrawPicture.push(drawPicture);
|
|
100211
100241
|
|
|
100242
|
+
if (option && option.Save) //存盘
|
|
100243
|
+
{
|
|
100244
|
+
if (this.ChartDrawStorage) this.ChartDrawStorage.SaveDrawData(drawPicture);
|
|
100245
|
+
}
|
|
100246
|
+
|
|
100212
100247
|
if (obj.Draw==true) this.DrawDynamicInfo();
|
|
100213
100248
|
|
|
100214
100249
|
return drawPicture;
|
|
@@ -166142,7 +166177,7 @@ function HQChartScriptWorker()
|
|
|
166142
166177
|
|
|
166143
166178
|
|
|
166144
166179
|
|
|
166145
|
-
var HQCHART_VERSION="1.1.
|
|
166180
|
+
var HQCHART_VERSION="1.1.15183";
|
|
166146
166181
|
|
|
166147
166182
|
function PrintHQChartVersion()
|
|
166148
166183
|
{
|