hqchart 1.1.15178 → 1.1.15187
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 +17 -12
- package/package.json +1 -1
- package/src/jscommon/umychart.NetworkFilterTest.js +34 -1
- package/src/jscommon/umychart.js +40 -4
- package/src/jscommon/umychart.testdata.js +34 -1
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +41 -5
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.NetworkFilterTest.vue.js +34 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +41 -5
package/lib/umychart.vue.js
CHANGED
|
@@ -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;};//获取多个扩展画法
|
|
@@ -2505,7 +2506,9 @@ paint.PreventClose=false;paint.ClearPoint();paint.PreventClose=oldPreventClose;/
|
|
|
2505
2506
|
}return paint.SetPoint(kItem,{DataIndex:index});};this.MoveRectSelectPoint=function(obj){var paint=this.GetRectSelectPaint();if(!paint)return false;if(!this.ChartPaint[0]||!this.ChartPaint[0].Data)return false;var kData=this.ChartPaint[0].Data;if(!this.Frame.SubFrame[0])return false;var subFrame=this.Frame.SubFrame[0].Frame;if(!subFrame)false;var pixelTatio=GetDevicePixelRatio();var x=(obj.X-uielement.getBoundingClientRect().left)*pixelTatio;var index=subFrame.GetXData(x);index=parseInt(index.toFixed(0));var dataIndex=index+kData.DataOffset;if(dataIndex>=kData.Data.length)dataIndex=kData.Data.length-1;var item=kData.Data[dataIndex];JSConsole.Chart.Log("[KLineChartContainer::MoveRectSelectPoint] point, item",obj.PointIndex,item);if(!paint.SetPoint(item,{Index:obj.PointIndex,DataIndex:dataIndex}))return false;var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_DRAG_SELECT_RECT);if(event){var selectData=paint.GetSelectRectData();var data={X:obj.X,Y:obj.Y,SelectData:selectData,RectSelectPaint:paint};event.Callback(event,data,this);}if(this.IsShowSelectRectDialog())//区间统计
|
|
2506
2507
|
{var selectData=paint.GetSelectRectData();var data={Chart:this,X:obj.X,Y:obj.Y,SelectData:selectData,//区间选择的数据
|
|
2507
2508
|
RectSelectPaint:paint//区间选择背景
|
|
2508
|
-
};var e={data:data};this.DrawSelectRectDialog(e);}return true;};this.MoveSubRectSelect=function(obj){var paint=this.GetRectSelectPaint();if(!paint)return false;if(!paint.MoveSubRect(obj.Step,obj.IsLeft))return false;var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_DRAG_SUB_SELECT_RECT);if(event){var subRectData={Start:paint.SubClient.FirstPoint,End:paint.SubClient.SecondPoint};var data={X:obj.X,Y:obj.Y,SubRectSelectData:subRectData,RectSelectPaint:paint};event.Callback(event,data,this);}return true;};this.ClearRectSelect=function(bEnforce){var paint=this.GetRectSelectPaint();if(!paint)return false;if(bEnforce)paint.PreventClose
|
|
2509
|
+
};var e={data:data};this.DrawSelectRectDialog(e);}return true;};this.MoveSubRectSelect=function(obj){var paint=this.GetRectSelectPaint();if(!paint)return false;if(!paint.MoveSubRect(obj.Step,obj.IsLeft))return false;var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_DRAG_SUB_SELECT_RECT);if(event){var subRectData={Start:paint.SubClient.FirstPoint,End:paint.SubClient.SecondPoint};var data={X:obj.X,Y:obj.Y,SubRectSelectData:subRectData,RectSelectPaint:paint};event.Callback(event,data,this);}return true;};this.ClearRectSelect=function(bEnforce){var paint=this.GetRectSelectPaint();if(!paint)return false;if(bEnforce){var oldPreventClose=paint.PreventClose;//备份下
|
|
2510
|
+
paint.PreventClose=false;var result=paint.ClearPoint();paint.PreventClose=oldPreventClose;//还原
|
|
2511
|
+
return result;}else{return paint.ClearPoint();}};//删除指定窗口的所有叠加指标
|
|
2509
2512
|
this.DeleteWindowsOverlayIndex=function(windowIndex){if(!IFrameSplitOperator.IsNumber(windowIndex))return;if(windowIndex<0||windowIndex>=this.Frame.SubFrame.length)return;var subFrame=this.Frame.SubFrame[windowIndex];if(!IFrameSplitOperator.IsNonEmptyArray(subFrame.OverlayIndex))return;var aryIndexID=[];for(var i=0;i<subFrame.OverlayIndex.length;++i){var overlayItem=subFrame.OverlayIndex[i];aryIndexID.push(overlayItem.Identify);for(var j=0;j<overlayItem.ChartPaint.length;++j)//图形销毁事件
|
|
2510
2513
|
{var overlayChart=overlayItem.ChartPaint[j];if(overlayChart&&overlayChart.OnDestroy)overlayChart.OnDestroy();}overlayItem.ChartPaint=[];}subFrame.OverlayIndex=[];var titlePaint=this.TitlePaint[windowIndex+1];for(var i=0;i<aryIndexID.length;++i){var identify=aryIndexID[i];if(titlePaint.OverlayIndex.has(identify))titlePaint.OverlayIndex.delete(identify);if(titlePaint.OverlayDynamicTitle.has(identify))titlePaint.OverlayDynamicTitle.delete(identify);}};//删除叠加指标, 没有重绘
|
|
2511
2514
|
this.DeleteOverlayIndex=function(identify,windowIndex){var findIndex=null;if(IFrameSplitOperator.IsNumber(windowIndex)){if(windowIndex>=0&&windowIndex<this.Frame.SubFrame.length){var item=this.Frame.SubFrame[windowIndex];for(var j=0;j<item.OverlayIndex.length;++j){var overlayItem=item.OverlayIndex[j];if(overlayItem.Identify===identify){for(var k=0;k<overlayItem.ChartPaint.length;++k)//图形销毁事件
|
|
@@ -2820,8 +2823,9 @@ this.XLineExtend;//[0]=底部 { Mode:1, Color: } Mode=1 分割线 Mode=2短
|
|
|
2820
2823
|
this.FrameData={SubFrameItem:null};//窗口框架信息
|
|
2821
2824
|
//画图工具刻度
|
|
2822
2825
|
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
|
-
|
|
2826
|
+
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
|
|
2827
|
+
this.Canvas.save();this.Canvas.translate(x,y);this.Canvas.rotate(90*Math.PI/180);//底部开始画
|
|
2828
|
+
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
2829
|
};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
2830
|
{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
2831
|
canvas.fillStyle=this.ButtonTooltip.Color;canvas.fillText(text,x+mergin.Left,y+bgHeight-mergin.Bottom);}};//isLimit 是否限制在当前坐标下
|
|
@@ -5409,7 +5413,7 @@ this.ShowRangeText={Enable:false,Position:0,//0顶部 1=中间 2=底部
|
|
|
5409
5413
|
Font:g_JSChartResource.RectSelect.RangeTextFont,Color:g_JSChartResource.RectSelect.RangeTextColor,BGColor:g_JSChartResource.RectSelect.RangeTextBGColor,SubPosition:0,SubFont:g_JSChartResource.RectSelect.RangeTextSubFont,SubColor:g_JSChartResource.RectSelect.RangeTextSubColor,SubBGColor:g_JSChartResource.RectSelect.RangeTextSubBGColor};this.BorderCache;this.IsOnlyOnePoint=false;//空格选中区间,单点模式
|
|
5410
5414
|
this.IsFullFrame=false;//区间选择包含子窗口
|
|
5411
5415
|
//设置参数接口
|
|
5412
|
-
this.SetOption=function(option){if(option){if(option.LineColor)this.LineColor=option.LineColor;if(option.AreaColor)this.AreaColor=option.AreaColor;if(IFrameSplitOperator.IsBool(option.SpaceReselected))this.SpaceReselected=option.SpaceReselected;if(option.ShowRangeText){var item=option.ShowRangeText;if(IFrameSplitOperator.IsBool(item.Enable))this.ShowRangeText.Enable=item.Enable;if(IFrameSplitOperator.IsNumber(item.Position))this.ShowRangeText.Position=item.Position;if(IFrameSplitOperator.IsNumber(item.SubPosition))this.ShowRangeText.SubPosition=item.SubPosition;}if(option.Mark){var item=option.Mark;if(IFrameSplitOperator.IsBool(item.IsShow))this.MarkConfig.IsShow=item.IsShow;if(item.Position){if(IFrameSplitOperator.IsNumber(item.Position.Index))this.MarkConfig.Position.Index=item.Position.Index;if(item.Position.Top)this.MarkConfig.Position.Top=item.Position.Top;}}}};this.ReloadResource=function(resource){this.LineColor=g_JSChartResource.RectSelect.LineColor;//竖线
|
|
5416
|
+
this.SetOption=function(option){if(option){if(option.LineColor)this.LineColor=option.LineColor;if(option.AreaColor)this.AreaColor=option.AreaColor;if(IFrameSplitOperator.IsBool(option.SpaceReselected))this.SpaceReselected=option.SpaceReselected;if(IFrameSplitOperator.IsBool(option.PreventClose))this.PreventClose=option.PreventClose;if(option.ShowRangeText){var item=option.ShowRangeText;if(IFrameSplitOperator.IsBool(item.Enable))this.ShowRangeText.Enable=item.Enable;if(IFrameSplitOperator.IsNumber(item.Position))this.ShowRangeText.Position=item.Position;if(IFrameSplitOperator.IsNumber(item.SubPosition))this.ShowRangeText.SubPosition=item.SubPosition;}if(option.Mark){var item=option.Mark;if(IFrameSplitOperator.IsBool(item.IsShow))this.MarkConfig.IsShow=item.IsShow;if(item.Position){if(IFrameSplitOperator.IsNumber(item.Position.Index))this.MarkConfig.Position.Index=item.Position.Index;if(item.Position.Top)this.MarkConfig.Position.Top=item.Position.Top;}}}};this.ReloadResource=function(resource){this.LineColor=g_JSChartResource.RectSelect.LineColor;//竖线
|
|
5413
5417
|
this.LineWidth=g_JSChartResource.RectSelect.LineWidth;this.LineDotted=g_JSChartResource.RectSelect.LineDotted;this.AreaColor=g_JSChartResource.RectSelect.AreaColor;//面积
|
|
5414
5418
|
this.ShowRangeText.Font=g_JSChartResource.RectSelect.RangeTextFont;this.ShowRangeText.Color=g_JSChartResource.RectSelect.RangeTextColor;this.ShowRangeText.BGColor=g_JSChartResource.RectSelect.RangeTextBGColor;};this.IsMinuteChart=function(){var className=this.HQChart.ClassName;var isMinuteChart=className=="MinuteChartContainer"||className=="MinuteChartHScreenContainer"?true:false;return isMinuteChart;};this.GetKData=function(){if(!this.HQChart)return null;var isMinuteChart=this.IsMinuteChart();var data=null;if(isMinuteChart){if(!this.HQChart.SourceData)return null;data=this.HQChart.SourceData;}else{if(!this.HQChart.ChartPaint[0])return null;data=this.HQChart.ChartPaint[0].Data;if(!data)return null;}return data;};this.GetPointCount=function(){var count=0;if(this.FirstPoint)++count;if(this.SecondPoint)++count;return count;};this.DateToNumber=function(value,isMinuteChart){if(isMinuteChart){if(IFrameSplitOperator.IsNumber(value.Date))return value.Date*10000+value.Time;else return value.Time;}else{var period=this.HQChart.Period;if(ChartData.IsDayPeriod(period,true))return value.Date;//YYYYMMDD
|
|
5415
5419
|
else if(ChartData.IsMinutePeriod(period,true))return value.Date*10000+value.Time;//YYYYMMDDHHMM
|
|
@@ -6587,10 +6591,11 @@ this.Canvas.fillRect(rtBG.Left,rtBG.Top,rtBG.Width,rtBG.Height);}this.Canvas.fil
|
|
|
6587
6591
|
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
6592
|
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
6593
|
{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();
|
|
6594
|
+
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;//右侧按钮宽度要去掉
|
|
6595
|
+
}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
6596
|
{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
6597
|
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};//保存下标题的坐标
|
|
6598
|
+
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
6599
|
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
6600
|
{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
6601
|
if(left+textWidth>right)break;this.Canvas.fillText(text,left,bottom,textWidth);left+=textWidth;}}if(this.Explain)//说明信息
|
|
@@ -6855,7 +6860,7 @@ this.ShowPriceTextConfig={IsShow:[false,false,true],//[0]=left内 [1]=right内 [
|
|
|
6855
6860
|
Font:[12*GetDevicePixelRatio()+'px \u5FAE\u8F6F\u96C5\u9ED1',12*GetDevicePixelRatio()+'px \u5FAE\u8F6F\u96C5\u9ED1']};this.LableInfo;//{ Position:2=右侧外部 }
|
|
6856
6861
|
//内部变量
|
|
6857
6862
|
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;};/*
|
|
6863
|
+
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
6864
|
this.GetXYCoordinate=function()
|
|
6860
6865
|
{
|
|
6861
6866
|
if (this.IsFrameMinSize()) return null;
|
|
@@ -15634,7 +15639,7 @@ hisData.Symbol=message.symbol;}var stockObj={HQDataType:HQ_DATA_TYPE.KLINE_ID,St
|
|
|
15634
15639
|
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
15640
|
* 版本信息输出
|
|
15636
15641
|
*
|
|
15637
|
-
*/var HQCHART_VERSION="1.1.
|
|
15642
|
+
*/var HQCHART_VERSION="1.1.15186";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
15643
|
exports.default=(_jsChartInit$jsChartS={jsChartInit:JSChart.Init,jsChartStyle:JSChart.SetStyle,// IsIndexSymbol:IsIndexSymbol,
|
|
15639
15644
|
// BaseIndex:BaseIndex,
|
|
15640
15645
|
// ChartLine:ChartLine,
|
package/package.json
CHANGED
|
@@ -55865,7 +55865,7 @@ HQData.Minute_RequestMinuteData=function(data, callback)
|
|
|
55865
55865
|
}
|
|
55866
55866
|
|
|
55867
55867
|
//盘中
|
|
55868
|
-
|
|
55868
|
+
stockItem.minute.length=50;
|
|
55869
55869
|
//测试用 这里可以修改数据
|
|
55870
55870
|
//var lastItem=srcStock.minute[srcStock.minute.length-1];
|
|
55871
55871
|
//lastItem.price+=Math.ceil(Math.random()*10)/1000*lastItem.price;
|
|
@@ -56477,6 +56477,7 @@ HQData.Minute_RequestHistoryMinuteData=function(data, callback)
|
|
|
56477
56477
|
dayItem.BuySellData={ AryBuy:aryBuy, ArySell:arySell };
|
|
56478
56478
|
}
|
|
56479
56479
|
|
|
56480
|
+
aryDay[0].minute.length=20;
|
|
56480
56481
|
var hqchartData={code:0, data:aryDay, name:symbol, symbol: symbol};
|
|
56481
56482
|
|
|
56482
56483
|
//hqchartData.data[0].minute.length=45;
|
|
@@ -56836,6 +56837,23 @@ HQData.CustomFunction_RequestData=function(data, callback)
|
|
|
56836
56837
|
hqchartData.Data.push({ Date:kItem.Date, Time:kItem.Time, Value:kItem.Vol/3 });
|
|
56837
56838
|
}
|
|
56838
56839
|
}
|
|
56840
|
+
else if (funcName=="FUNC_ALPHA")
|
|
56841
|
+
{
|
|
56842
|
+
//模拟下载alpha系数序列
|
|
56843
|
+
setTimeout(()=>
|
|
56844
|
+
{
|
|
56845
|
+
var kData=data.Self.Data;
|
|
56846
|
+
var hqchartData={ DataType:2, Data:[] };
|
|
56847
|
+
for(var i=0;i<kData.Data.length;++i)
|
|
56848
|
+
{
|
|
56849
|
+
var kItem=kData.Data[i];
|
|
56850
|
+
hqchartData.Data.push({ Date:kItem.Date, Time:kItem.Time, Value:HQData.GetRandomTestData(0,100)/100 });
|
|
56851
|
+
}
|
|
56852
|
+
callback(hqchartData);
|
|
56853
|
+
},300);
|
|
56854
|
+
|
|
56855
|
+
return;
|
|
56856
|
+
}
|
|
56839
56857
|
else
|
|
56840
56858
|
{
|
|
56841
56859
|
var error= `函数'${funcName}' 没有对接数据. [HQData.CustomFunction_RequestData]`;
|
|
@@ -56845,6 +56863,21 @@ HQData.CustomFunction_RequestData=function(data, callback)
|
|
|
56845
56863
|
callback(hqchartData);
|
|
56846
56864
|
}
|
|
56847
56865
|
|
|
56866
|
+
//ALPHA:FUNC_ALPHA(L);
|
|
56867
|
+
HQData.FUNC_ALPHA=function(obj)
|
|
56868
|
+
{
|
|
56869
|
+
console.log("[HQData::FuncAlpha] obj=", obj);
|
|
56870
|
+
var aryValue=obj.Args[0]; //参数
|
|
56871
|
+
var aryAlpha=obj.DownloadData; //下载数据
|
|
56872
|
+
var aryData=[];
|
|
56873
|
+
for(var i=0; i<aryValue.length; ++i)
|
|
56874
|
+
{
|
|
56875
|
+
aryData.push(aryValue[i]*aryAlpha[i]);
|
|
56876
|
+
}
|
|
56877
|
+
|
|
56878
|
+
return { Out:aryData };
|
|
56879
|
+
}
|
|
56880
|
+
|
|
56848
56881
|
HQData.CustomVarData_RequestData=function(data, callback)
|
|
56849
56882
|
{
|
|
56850
56883
|
data.PreventDefault=true;
|
package/src/jscommon/umychart.js
CHANGED
|
@@ -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
|
}
|
|
@@ -10803,8 +10812,18 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
10803
10812
|
{
|
|
10804
10813
|
var paint=this.GetRectSelectPaint();
|
|
10805
10814
|
if (!paint) return false;
|
|
10806
|
-
if (bEnforce)
|
|
10807
|
-
|
|
10815
|
+
if (bEnforce)
|
|
10816
|
+
{
|
|
10817
|
+
var oldPreventClose=paint.PreventClose; //备份下
|
|
10818
|
+
paint.PreventClose=false;
|
|
10819
|
+
var result=paint.ClearPoint();
|
|
10820
|
+
paint.PreventClose=oldPreventClose; //还原
|
|
10821
|
+
return result;
|
|
10822
|
+
}
|
|
10823
|
+
else
|
|
10824
|
+
{
|
|
10825
|
+
return paint.ClearPoint();
|
|
10826
|
+
}
|
|
10808
10827
|
}
|
|
10809
10828
|
|
|
10810
10829
|
//删除指定窗口的所有叠加指标
|
|
@@ -13877,6 +13896,8 @@ function AverageWidthFrame()
|
|
|
13877
13896
|
var y=border.Bottom-3;
|
|
13878
13897
|
var x=border.RightTitle+this.ChartBorder.TitleHeight/2;
|
|
13879
13898
|
|
|
13899
|
+
this.ToolbarCacheSize={ RToolbar:{ Right:y, Left:y }}; //相当于额 Top, Bottom
|
|
13900
|
+
|
|
13880
13901
|
this.Canvas.save();
|
|
13881
13902
|
this.Canvas.translate(x, y);
|
|
13882
13903
|
this.Canvas.rotate(90 * Math.PI / 180);
|
|
@@ -13901,6 +13922,8 @@ function AverageWidthFrame()
|
|
|
13901
13922
|
rtButton.Top=rtButton.Bottom-size-item.Style.MerginLeft;
|
|
13902
13923
|
this.Buttons.push({ ID:item.ID, Rect:rtButton });
|
|
13903
13924
|
|
|
13925
|
+
this.ToolbarCacheSize.RToolbar.Left=rtButton.Top;
|
|
13926
|
+
|
|
13904
13927
|
bottom=xButton;
|
|
13905
13928
|
y=rtButton.Top;
|
|
13906
13929
|
}
|
|
@@ -51248,6 +51271,8 @@ function RectSelectPaint()
|
|
|
51248
51271
|
if (option.LineColor) this.LineColor=option.LineColor;
|
|
51249
51272
|
if (option.AreaColor) this.AreaColor=option.AreaColor;
|
|
51250
51273
|
if (IFrameSplitOperator.IsBool(option.SpaceReselected)) this.SpaceReselected=option.SpaceReselected;
|
|
51274
|
+
if (IFrameSplitOperator.IsBool(option.PreventClose)) this.PreventClose=option.PreventClose;
|
|
51275
|
+
|
|
51251
51276
|
if (option.ShowRangeText)
|
|
51252
51277
|
{
|
|
51253
51278
|
var item=option.ShowRangeText;
|
|
@@ -64129,9 +64154,16 @@ function DynamicChartTitlePainting()
|
|
|
64129
64154
|
var right=this.Frame.ChartBorder.GetRight();
|
|
64130
64155
|
if (this.Frame.IsHScreen===true)
|
|
64131
64156
|
{
|
|
64157
|
+
var border=this.Frame.ChartBorder.GetHScreenBorder();
|
|
64132
64158
|
bottom=-this.Frame.ChartBorder.TitleHeight/2;
|
|
64133
64159
|
right=this.Frame.ChartBorder.GetHeight();
|
|
64160
|
+
if (this.Frame.ToolbarCacheSize && this.Frame.ToolbarCacheSize.RToolbar) right=this.Frame.ToolbarCacheSize.RToolbar.Left-2-border.Top;
|
|
64161
|
+
}
|
|
64162
|
+
else
|
|
64163
|
+
{
|
|
64164
|
+
if (this.Frame.ToolbarCacheSize && this.Frame.ToolbarCacheSize.RToolbar) right=this.Frame.ToolbarCacheSize.RToolbar.Left-2; //右侧按钮宽度要去掉
|
|
64134
64165
|
}
|
|
64166
|
+
|
|
64135
64167
|
if (left>right) return;
|
|
64136
64168
|
|
|
64137
64169
|
var spaceWidth=5*GetDevicePixelRatio();
|
|
@@ -64221,6 +64253,7 @@ function DynamicChartTitlePainting()
|
|
|
64221
64253
|
var left=1;
|
|
64222
64254
|
var bottom=-this.Frame.ChartBorder.TitleHeight/2; //上下居中显示
|
|
64223
64255
|
var right=this.Frame.ChartBorder.GetHeight();
|
|
64256
|
+
if (this.Frame.ToolbarCacheSize && this.Frame.ToolbarCacheSize.RToolbar) right=this.Frame.ToolbarCacheSize.RToolbar.Left-2-border.Top;
|
|
64224
64257
|
|
|
64225
64258
|
this.Canvas.textAlign="left";
|
|
64226
64259
|
this.Canvas.textBaseline="middle";
|
|
@@ -67651,6 +67684,9 @@ function ChartDrawHLine()
|
|
|
67651
67684
|
{
|
|
67652
67685
|
storageData=this.Super_ExportStorageData();
|
|
67653
67686
|
if (this.Label) storageData.Label=this.Label;
|
|
67687
|
+
if (IFrameSplitOperator.IsNumber(this.RightSpaceWidth)) storageData.RightSpaceWidth=this.RightSpaceWidth;
|
|
67688
|
+
if (this.Button) storageData.Button=CloneData(this.Button);
|
|
67689
|
+
if (this.ButtonBGColor) storageData.ButtonBGColor=this.ButtonBGColor;
|
|
67654
67690
|
}
|
|
67655
67691
|
|
|
67656
67692
|
return storageData;
|
|
@@ -351,7 +351,7 @@ HQData.Minute_RequestMinuteData=function(data, callback)
|
|
|
351
351
|
}
|
|
352
352
|
|
|
353
353
|
//盘中
|
|
354
|
-
|
|
354
|
+
stockItem.minute.length=50;
|
|
355
355
|
//测试用 这里可以修改数据
|
|
356
356
|
//var lastItem=srcStock.minute[srcStock.minute.length-1];
|
|
357
357
|
//lastItem.price+=Math.ceil(Math.random()*10)/1000*lastItem.price;
|
|
@@ -963,6 +963,7 @@ HQData.Minute_RequestHistoryMinuteData=function(data, callback)
|
|
|
963
963
|
dayItem.BuySellData={ AryBuy:aryBuy, ArySell:arySell };
|
|
964
964
|
}
|
|
965
965
|
|
|
966
|
+
aryDay[0].minute.length=20;
|
|
966
967
|
var hqchartData={code:0, data:aryDay, name:symbol, symbol: symbol};
|
|
967
968
|
|
|
968
969
|
//hqchartData.data[0].minute.length=45;
|
|
@@ -1322,6 +1323,23 @@ HQData.CustomFunction_RequestData=function(data, callback)
|
|
|
1322
1323
|
hqchartData.Data.push({ Date:kItem.Date, Time:kItem.Time, Value:kItem.Vol/3 });
|
|
1323
1324
|
}
|
|
1324
1325
|
}
|
|
1326
|
+
else if (funcName=="FUNC_ALPHA")
|
|
1327
|
+
{
|
|
1328
|
+
//模拟下载alpha系数序列
|
|
1329
|
+
setTimeout(()=>
|
|
1330
|
+
{
|
|
1331
|
+
var kData=data.Self.Data;
|
|
1332
|
+
var hqchartData={ DataType:2, Data:[] };
|
|
1333
|
+
for(var i=0;i<kData.Data.length;++i)
|
|
1334
|
+
{
|
|
1335
|
+
var kItem=kData.Data[i];
|
|
1336
|
+
hqchartData.Data.push({ Date:kItem.Date, Time:kItem.Time, Value:HQData.GetRandomTestData(0,100)/100 });
|
|
1337
|
+
}
|
|
1338
|
+
callback(hqchartData);
|
|
1339
|
+
},300);
|
|
1340
|
+
|
|
1341
|
+
return;
|
|
1342
|
+
}
|
|
1325
1343
|
else
|
|
1326
1344
|
{
|
|
1327
1345
|
var error= `函数'${funcName}' 没有对接数据. [HQData.CustomFunction_RequestData]`;
|
|
@@ -1331,6 +1349,21 @@ HQData.CustomFunction_RequestData=function(data, callback)
|
|
|
1331
1349
|
callback(hqchartData);
|
|
1332
1350
|
}
|
|
1333
1351
|
|
|
1352
|
+
//ALPHA:FUNC_ALPHA(L);
|
|
1353
|
+
HQData.FUNC_ALPHA=function(obj)
|
|
1354
|
+
{
|
|
1355
|
+
console.log("[HQData::FuncAlpha] obj=", obj);
|
|
1356
|
+
var aryValue=obj.Args[0]; //参数
|
|
1357
|
+
var aryAlpha=obj.DownloadData; //下载数据
|
|
1358
|
+
var aryData=[];
|
|
1359
|
+
for(var i=0; i<aryValue.length; ++i)
|
|
1360
|
+
{
|
|
1361
|
+
aryData.push(aryValue[i]*aryAlpha[i]);
|
|
1362
|
+
}
|
|
1363
|
+
|
|
1364
|
+
return { Out:aryData };
|
|
1365
|
+
}
|
|
1366
|
+
|
|
1334
1367
|
HQData.CustomVarData_RequestData=function(data, callback)
|
|
1335
1368
|
{
|
|
1336
1369
|
data.PreventDefault=true;
|
|
@@ -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
|
}
|
|
@@ -14899,8 +14908,18 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
14899
14908
|
{
|
|
14900
14909
|
var paint=this.GetRectSelectPaint();
|
|
14901
14910
|
if (!paint) return false;
|
|
14902
|
-
if (bEnforce)
|
|
14903
|
-
|
|
14911
|
+
if (bEnforce)
|
|
14912
|
+
{
|
|
14913
|
+
var oldPreventClose=paint.PreventClose; //备份下
|
|
14914
|
+
paint.PreventClose=false;
|
|
14915
|
+
var result=paint.ClearPoint();
|
|
14916
|
+
paint.PreventClose=oldPreventClose; //还原
|
|
14917
|
+
return result;
|
|
14918
|
+
}
|
|
14919
|
+
else
|
|
14920
|
+
{
|
|
14921
|
+
return paint.ClearPoint();
|
|
14922
|
+
}
|
|
14904
14923
|
}
|
|
14905
14924
|
|
|
14906
14925
|
//删除指定窗口的所有叠加指标
|
|
@@ -17973,6 +17992,8 @@ function AverageWidthFrame()
|
|
|
17973
17992
|
var y=border.Bottom-3;
|
|
17974
17993
|
var x=border.RightTitle+this.ChartBorder.TitleHeight/2;
|
|
17975
17994
|
|
|
17995
|
+
this.ToolbarCacheSize={ RToolbar:{ Right:y, Left:y }}; //相当于额 Top, Bottom
|
|
17996
|
+
|
|
17976
17997
|
this.Canvas.save();
|
|
17977
17998
|
this.Canvas.translate(x, y);
|
|
17978
17999
|
this.Canvas.rotate(90 * Math.PI / 180);
|
|
@@ -17997,6 +18018,8 @@ function AverageWidthFrame()
|
|
|
17997
18018
|
rtButton.Top=rtButton.Bottom-size-item.Style.MerginLeft;
|
|
17998
18019
|
this.Buttons.push({ ID:item.ID, Rect:rtButton });
|
|
17999
18020
|
|
|
18021
|
+
this.ToolbarCacheSize.RToolbar.Left=rtButton.Top;
|
|
18022
|
+
|
|
18000
18023
|
bottom=xButton;
|
|
18001
18024
|
y=rtButton.Top;
|
|
18002
18025
|
}
|
|
@@ -55344,6 +55367,8 @@ function RectSelectPaint()
|
|
|
55344
55367
|
if (option.LineColor) this.LineColor=option.LineColor;
|
|
55345
55368
|
if (option.AreaColor) this.AreaColor=option.AreaColor;
|
|
55346
55369
|
if (IFrameSplitOperator.IsBool(option.SpaceReselected)) this.SpaceReselected=option.SpaceReselected;
|
|
55370
|
+
if (IFrameSplitOperator.IsBool(option.PreventClose)) this.PreventClose=option.PreventClose;
|
|
55371
|
+
|
|
55347
55372
|
if (option.ShowRangeText)
|
|
55348
55373
|
{
|
|
55349
55374
|
var item=option.ShowRangeText;
|
|
@@ -68225,9 +68250,16 @@ function DynamicChartTitlePainting()
|
|
|
68225
68250
|
var right=this.Frame.ChartBorder.GetRight();
|
|
68226
68251
|
if (this.Frame.IsHScreen===true)
|
|
68227
68252
|
{
|
|
68253
|
+
var border=this.Frame.ChartBorder.GetHScreenBorder();
|
|
68228
68254
|
bottom=-this.Frame.ChartBorder.TitleHeight/2;
|
|
68229
68255
|
right=this.Frame.ChartBorder.GetHeight();
|
|
68256
|
+
if (this.Frame.ToolbarCacheSize && this.Frame.ToolbarCacheSize.RToolbar) right=this.Frame.ToolbarCacheSize.RToolbar.Left-2-border.Top;
|
|
68257
|
+
}
|
|
68258
|
+
else
|
|
68259
|
+
{
|
|
68260
|
+
if (this.Frame.ToolbarCacheSize && this.Frame.ToolbarCacheSize.RToolbar) right=this.Frame.ToolbarCacheSize.RToolbar.Left-2; //右侧按钮宽度要去掉
|
|
68230
68261
|
}
|
|
68262
|
+
|
|
68231
68263
|
if (left>right) return;
|
|
68232
68264
|
|
|
68233
68265
|
var spaceWidth=5*GetDevicePixelRatio();
|
|
@@ -68317,6 +68349,7 @@ function DynamicChartTitlePainting()
|
|
|
68317
68349
|
var left=1;
|
|
68318
68350
|
var bottom=-this.Frame.ChartBorder.TitleHeight/2; //上下居中显示
|
|
68319
68351
|
var right=this.Frame.ChartBorder.GetHeight();
|
|
68352
|
+
if (this.Frame.ToolbarCacheSize && this.Frame.ToolbarCacheSize.RToolbar) right=this.Frame.ToolbarCacheSize.RToolbar.Left-2-border.Top;
|
|
68320
68353
|
|
|
68321
68354
|
this.Canvas.textAlign="left";
|
|
68322
68355
|
this.Canvas.textBaseline="middle";
|
|
@@ -71747,6 +71780,9 @@ function ChartDrawHLine()
|
|
|
71747
71780
|
{
|
|
71748
71781
|
storageData=this.Super_ExportStorageData();
|
|
71749
71782
|
if (this.Label) storageData.Label=this.Label;
|
|
71783
|
+
if (IFrameSplitOperator.IsNumber(this.RightSpaceWidth)) storageData.RightSpaceWidth=this.RightSpaceWidth;
|
|
71784
|
+
if (this.Button) storageData.Button=CloneData(this.Button);
|
|
71785
|
+
if (this.ButtonBGColor) storageData.ButtonBGColor=this.ButtonBGColor;
|
|
71750
71786
|
}
|
|
71751
71787
|
|
|
71752
71788
|
return storageData;
|
|
@@ -154139,7 +154175,7 @@ function ScrollBarBGChart()
|
|
|
154139
154175
|
|
|
154140
154176
|
|
|
154141
154177
|
|
|
154142
|
-
var HQCHART_VERSION="1.1.
|
|
154178
|
+
var HQCHART_VERSION="1.1.15186";
|
|
154143
154179
|
|
|
154144
154180
|
function PrintHQChartVersion()
|
|
154145
154181
|
{
|
|
@@ -55883,7 +55883,7 @@ HQData.Minute_RequestMinuteData=function(data, callback)
|
|
|
55883
55883
|
}
|
|
55884
55884
|
|
|
55885
55885
|
//盘中
|
|
55886
|
-
|
|
55886
|
+
stockItem.minute.length=50;
|
|
55887
55887
|
//测试用 这里可以修改数据
|
|
55888
55888
|
//var lastItem=srcStock.minute[srcStock.minute.length-1];
|
|
55889
55889
|
//lastItem.price+=Math.ceil(Math.random()*10)/1000*lastItem.price;
|
|
@@ -56495,6 +56495,7 @@ HQData.Minute_RequestHistoryMinuteData=function(data, callback)
|
|
|
56495
56495
|
dayItem.BuySellData={ AryBuy:aryBuy, ArySell:arySell };
|
|
56496
56496
|
}
|
|
56497
56497
|
|
|
56498
|
+
aryDay[0].minute.length=20;
|
|
56498
56499
|
var hqchartData={code:0, data:aryDay, name:symbol, symbol: symbol};
|
|
56499
56500
|
|
|
56500
56501
|
//hqchartData.data[0].minute.length=45;
|
|
@@ -56854,6 +56855,23 @@ HQData.CustomFunction_RequestData=function(data, callback)
|
|
|
56854
56855
|
hqchartData.Data.push({ Date:kItem.Date, Time:kItem.Time, Value:kItem.Vol/3 });
|
|
56855
56856
|
}
|
|
56856
56857
|
}
|
|
56858
|
+
else if (funcName=="FUNC_ALPHA")
|
|
56859
|
+
{
|
|
56860
|
+
//模拟下载alpha系数序列
|
|
56861
|
+
setTimeout(()=>
|
|
56862
|
+
{
|
|
56863
|
+
var kData=data.Self.Data;
|
|
56864
|
+
var hqchartData={ DataType:2, Data:[] };
|
|
56865
|
+
for(var i=0;i<kData.Data.length;++i)
|
|
56866
|
+
{
|
|
56867
|
+
var kItem=kData.Data[i];
|
|
56868
|
+
hqchartData.Data.push({ Date:kItem.Date, Time:kItem.Time, Value:HQData.GetRandomTestData(0,100)/100 });
|
|
56869
|
+
}
|
|
56870
|
+
callback(hqchartData);
|
|
56871
|
+
},300);
|
|
56872
|
+
|
|
56873
|
+
return;
|
|
56874
|
+
}
|
|
56857
56875
|
else
|
|
56858
56876
|
{
|
|
56859
56877
|
var error= `函数'${funcName}' 没有对接数据. [HQData.CustomFunction_RequestData]`;
|
|
@@ -56863,6 +56881,21 @@ HQData.CustomFunction_RequestData=function(data, callback)
|
|
|
56863
56881
|
callback(hqchartData);
|
|
56864
56882
|
}
|
|
56865
56883
|
|
|
56884
|
+
//ALPHA:FUNC_ALPHA(L);
|
|
56885
|
+
HQData.FUNC_ALPHA=function(obj)
|
|
56886
|
+
{
|
|
56887
|
+
console.log("[HQData::FuncAlpha] obj=", obj);
|
|
56888
|
+
var aryValue=obj.Args[0]; //参数
|
|
56889
|
+
var aryAlpha=obj.DownloadData; //下载数据
|
|
56890
|
+
var aryData=[];
|
|
56891
|
+
for(var i=0; i<aryValue.length; ++i)
|
|
56892
|
+
{
|
|
56893
|
+
aryData.push(aryValue[i]*aryAlpha[i]);
|
|
56894
|
+
}
|
|
56895
|
+
|
|
56896
|
+
return { Out:aryData };
|
|
56897
|
+
}
|
|
56898
|
+
|
|
56866
56899
|
HQData.CustomVarData_RequestData=function(data, callback)
|
|
56867
56900
|
{
|
|
56868
56901
|
data.PreventDefault=true;
|
|
@@ -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
|
}
|
|
@@ -14943,8 +14952,18 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
14943
14952
|
{
|
|
14944
14953
|
var paint=this.GetRectSelectPaint();
|
|
14945
14954
|
if (!paint) return false;
|
|
14946
|
-
if (bEnforce)
|
|
14947
|
-
|
|
14955
|
+
if (bEnforce)
|
|
14956
|
+
{
|
|
14957
|
+
var oldPreventClose=paint.PreventClose; //备份下
|
|
14958
|
+
paint.PreventClose=false;
|
|
14959
|
+
var result=paint.ClearPoint();
|
|
14960
|
+
paint.PreventClose=oldPreventClose; //还原
|
|
14961
|
+
return result;
|
|
14962
|
+
}
|
|
14963
|
+
else
|
|
14964
|
+
{
|
|
14965
|
+
return paint.ClearPoint();
|
|
14966
|
+
}
|
|
14948
14967
|
}
|
|
14949
14968
|
|
|
14950
14969
|
//删除指定窗口的所有叠加指标
|
|
@@ -18017,6 +18036,8 @@ function AverageWidthFrame()
|
|
|
18017
18036
|
var y=border.Bottom-3;
|
|
18018
18037
|
var x=border.RightTitle+this.ChartBorder.TitleHeight/2;
|
|
18019
18038
|
|
|
18039
|
+
this.ToolbarCacheSize={ RToolbar:{ Right:y, Left:y }}; //相当于额 Top, Bottom
|
|
18040
|
+
|
|
18020
18041
|
this.Canvas.save();
|
|
18021
18042
|
this.Canvas.translate(x, y);
|
|
18022
18043
|
this.Canvas.rotate(90 * Math.PI / 180);
|
|
@@ -18041,6 +18062,8 @@ function AverageWidthFrame()
|
|
|
18041
18062
|
rtButton.Top=rtButton.Bottom-size-item.Style.MerginLeft;
|
|
18042
18063
|
this.Buttons.push({ ID:item.ID, Rect:rtButton });
|
|
18043
18064
|
|
|
18065
|
+
this.ToolbarCacheSize.RToolbar.Left=rtButton.Top;
|
|
18066
|
+
|
|
18044
18067
|
bottom=xButton;
|
|
18045
18068
|
y=rtButton.Top;
|
|
18046
18069
|
}
|
|
@@ -55388,6 +55411,8 @@ function RectSelectPaint()
|
|
|
55388
55411
|
if (option.LineColor) this.LineColor=option.LineColor;
|
|
55389
55412
|
if (option.AreaColor) this.AreaColor=option.AreaColor;
|
|
55390
55413
|
if (IFrameSplitOperator.IsBool(option.SpaceReselected)) this.SpaceReselected=option.SpaceReselected;
|
|
55414
|
+
if (IFrameSplitOperator.IsBool(option.PreventClose)) this.PreventClose=option.PreventClose;
|
|
55415
|
+
|
|
55391
55416
|
if (option.ShowRangeText)
|
|
55392
55417
|
{
|
|
55393
55418
|
var item=option.ShowRangeText;
|
|
@@ -68269,9 +68294,16 @@ function DynamicChartTitlePainting()
|
|
|
68269
68294
|
var right=this.Frame.ChartBorder.GetRight();
|
|
68270
68295
|
if (this.Frame.IsHScreen===true)
|
|
68271
68296
|
{
|
|
68297
|
+
var border=this.Frame.ChartBorder.GetHScreenBorder();
|
|
68272
68298
|
bottom=-this.Frame.ChartBorder.TitleHeight/2;
|
|
68273
68299
|
right=this.Frame.ChartBorder.GetHeight();
|
|
68300
|
+
if (this.Frame.ToolbarCacheSize && this.Frame.ToolbarCacheSize.RToolbar) right=this.Frame.ToolbarCacheSize.RToolbar.Left-2-border.Top;
|
|
68301
|
+
}
|
|
68302
|
+
else
|
|
68303
|
+
{
|
|
68304
|
+
if (this.Frame.ToolbarCacheSize && this.Frame.ToolbarCacheSize.RToolbar) right=this.Frame.ToolbarCacheSize.RToolbar.Left-2; //右侧按钮宽度要去掉
|
|
68274
68305
|
}
|
|
68306
|
+
|
|
68275
68307
|
if (left>right) return;
|
|
68276
68308
|
|
|
68277
68309
|
var spaceWidth=5*GetDevicePixelRatio();
|
|
@@ -68361,6 +68393,7 @@ function DynamicChartTitlePainting()
|
|
|
68361
68393
|
var left=1;
|
|
68362
68394
|
var bottom=-this.Frame.ChartBorder.TitleHeight/2; //上下居中显示
|
|
68363
68395
|
var right=this.Frame.ChartBorder.GetHeight();
|
|
68396
|
+
if (this.Frame.ToolbarCacheSize && this.Frame.ToolbarCacheSize.RToolbar) right=this.Frame.ToolbarCacheSize.RToolbar.Left-2-border.Top;
|
|
68364
68397
|
|
|
68365
68398
|
this.Canvas.textAlign="left";
|
|
68366
68399
|
this.Canvas.textBaseline="middle";
|
|
@@ -71791,6 +71824,9 @@ function ChartDrawHLine()
|
|
|
71791
71824
|
{
|
|
71792
71825
|
storageData=this.Super_ExportStorageData();
|
|
71793
71826
|
if (this.Label) storageData.Label=this.Label;
|
|
71827
|
+
if (IFrameSplitOperator.IsNumber(this.RightSpaceWidth)) storageData.RightSpaceWidth=this.RightSpaceWidth;
|
|
71828
|
+
if (this.Button) storageData.Button=CloneData(this.Button);
|
|
71829
|
+
if (this.ButtonBGColor) storageData.ButtonBGColor=this.ButtonBGColor;
|
|
71794
71830
|
}
|
|
71795
71831
|
|
|
71796
71832
|
return storageData;
|
|
@@ -166152,7 +166188,7 @@ function HQChartScriptWorker()
|
|
|
166152
166188
|
|
|
166153
166189
|
|
|
166154
166190
|
|
|
166155
|
-
var HQCHART_VERSION="1.1.
|
|
166191
|
+
var HQCHART_VERSION="1.1.15186";
|
|
166156
166192
|
|
|
166157
166193
|
function PrintHQChartVersion()
|
|
166158
166194
|
{
|