hqchart 1.1.12771 → 1.1.12774
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
|
@@ -1765,7 +1765,7 @@ var MoveStatus={X:x,Y:y,IsInClient:this.IsMouseOnClient(x,y)};this.LastMouseStat
|
|
|
1765
1765
|
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_MOUSE_MOVE);var titleChart=this.TitlePaint[0];if(event&&titleChart)titleChart.OnMouseMoveEvent=event;this.MoveOnPoint={X:x,Y:y};this.OnMouseMove(x,y,e);//this.LastMouseStatus.MoveOnPoint=null;
|
|
1766
1766
|
if(titleChart)titleChart.OnMouseMoveEvent=null;this.StartStopDisplayLatest();};this.IsMouseOnClient=function(x,y){var rect={Left:this.Frame.ChartBorder.GetLeft(),Top:this.Frame.ChartBorder.GetTop(),Width:this.Frame.ChartBorder.GetWidth(),Height:this.Frame.ChartBorder.GetHeight()};rect.Right=rect.Left+rect.Width;rect.Bottom=rect.Top+rect.Height;if(x>=rect.Left&&x<=rect.Right&&y>=rect.Top&&y<=rect.Bottom)return true;return false;};this.UIOnContextMenu=function(e){if(this.ChartSplashPaint&&this.ChartSplashPaint.IsEnableSplash==true)return;var x=e.clientX-this.UIElement.getBoundingClientRect().left;var y=e.clientY-this.UIElement.getBoundingClientRect().top;if(typeof this.OnRightMenu=='function')this.OnRightMenu(x,y,e);//右键菜单事件
|
|
1767
1767
|
return false;};this.UIOnDblClick=function(e){var pixelTatio=GetDevicePixelRatio();var x=(e.clientX-this.UIElement.getBoundingClientRect().left)*pixelTatio;var y=(e.clientY-this.UIElement.getBoundingClientRect().top)*pixelTatio;this.OnDoubleClick(x,y,e);};//是否在拖拽Y轴上
|
|
1768
|
-
this.TryYDrag=function(x,y){if(!this.EnableYDrag)return null;if(!this.EnableYDrag.Left&&!this.EnableYDrag.Right)return null;if(!this.Frame||!this.Frame.PtInFrameY)return null;var dragY=this.Frame.PtInFrameY(x,y);if(!dragY||dragY.Index<0
|
|
1768
|
+
this.TryYDrag=function(x,y){if(!this.EnableYDrag)return null;if(!this.EnableYDrag.Left&&!this.EnableYDrag.Right)return null;if(!this.Frame||!this.Frame.PtInFrameY)return null;var dragY=this.Frame.PtInFrameY(x,y);if(!dragY||dragY.Index<0)return null;if(dragY.IsOverlay===true){if(!dragY.Right||!this.EnableYDrag.Right)return null;if(this.Frame.IsEnableOverlayDragY(dragY.Index,dragY.OverlayIndex))return dragY;return null;}if(dragY.Left&&this.EnableYDrag.Left&&this.Frame.IsEnableDragY(dragY.Index)){return dragY;}if(dragY.Right&&this.EnableYDrag.Right&&this.Frame.IsEnableDragY(dragY.Index)){return dragY;}return null;};//是否可以上下拖拽
|
|
1769
1769
|
this.TryUpDownDrag=function(x,y){var windowIndex=this.Frame.PtInFrame(x,y);if(windowIndex<0)return null;var item=this.Frame.SubFrame[windowIndex];if(!item||!item.Frame)return null;var frame=item.Frame;if(!frame.YSplitOperator||!frame.YSplitOperator.FixedYMaxMin)return null;return{Index:windowIndex,X:x,Y:y};};this.TryRectSelectDrag=function(x,y){var paint=this.GetRectSelectPaint();if(!paint)return null;if(paint.GetPointCount()<=0)return null;var item=paint.PtInPaint(x,y);return{Item:item,X:x,Y:y};};this.TryClickCrossCursor=function(x,y,e){if(!this.ChartCorssCursor)return;var button=this.ChartCorssCursor.PtInButton(x,y);if(!button)return false;var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CLICK_CROSSCURSOR_RIGHT);if(event&&event.Callback){var sendData={Button:button,e:e};event.Callback(event,sendData,this);}return true;};this.TryClickButton=function(x,y,e){var button=this.Frame.PtInButtons(x,y);if(button&&this.ClickFrameButton){this.ClickFrameButton(button,e);return true;}button=this.PtInExtendChartButtons(x,y);if(button&&this.ClickExtendChartButton){this.ClickExtendChartButton(button,e);return true;}button=this.PtInDrawPictureButtons(x,y);if(button&&this.ClickDrawPictureButton){this.ClickDrawPictureButton(button,e);return true;}button=this.PtInTitleButtons(x,y);if(button&&this.ClickTitleButton){this.ClickTitleButton(button,e);return true;}return false;};this.TryMouseMove_CustomChartDrag=function(sendData){var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CUSTOM_DRAG_MOUSE_MOVE);if(!event||!event.Callback)return false;return event.Callback(event,sendData,this);};this.TryClick_CustomChartDrag=function(sendData){var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CUSTOM_DRAG_MOUSE_DOWN);if(!event||!event.Callback)return false;sendData.ChartDrag=null;sendData.Cusrsor=null;event.Callback(event,sendData,this);this.CustomChartDrag=sendData.ChartDrag;this.SetCursor(sendData);};this.TryDragMove_CustomChartDrag=function(sendData){var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CUSTOM_DRAG_DOC_MOUSE_MOVE);if(!event||!event.Callback)return;var e=sendData.e;var drag=sendData.Drag;if(Math.abs(drag.LastMove.Y-e.clientY)<2&&Math.abs(drag.LastMove.X-e.clientX)<2)return;if(event.Callback(event,sendData,this)){drag.LastMove.X=e.clientX;drag.LastMove.Y=e.clientY;}};this.TryMouseUp_CustomChartDrag=function(sendData){var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CUSTOM_DRAG_DOC_MOUSE_UP);if(!event||!event.Callback)return;event.Callback(event,sendData,this);};this.UIOnMouseDown=function(e){var _this7=this;this.MoveOnChartDrawPicture=null;if(this.ChartSplashPaint&&this.ChartSplashPaint.IsEnableSplash==true)return;this.ClickDownPoint={X:e.clientX,Y:e.clientY};this.IsOnTouch=true;this.BorderDrag=null;this.YDrag=null;this.UpDownDrag=null;this.RectSelectDrag=null;this.IndexChartDrag=null;this.CustomChartDrag=null;var pixelTatio=GetDevicePixelRatio();var x=(e.clientX-this.UIElement.getBoundingClientRect().left)*pixelTatio;var y=(e.clientY-this.UIElement.getBoundingClientRect().top)*pixelTatio;if(this.TryClickButton(x,y,e)){return;}var bDrawDynamicInfo=false;if(this.GlobalOption.SelectedBorder&&this.GlobalOption.SelectedBorder.Mode>=1){var item=this.GlobalOption.SelectedBorder;var frameId=this.Frame.PtInFrame(x,y);if(frameId>=0&&frameId!=item.SelFrame){item.SelFrame=frameId;bDrawDynamicInfo=true;}}if(this.TryClickCrossCursor(x,y,e)){return;}if(this.TryClickChartTooltipData&&this.TryClickChartTooltipData(x,y,e))//预留给外部点击图标什么用的
|
|
1770
1770
|
{return;}if(this.TryClickLock){//JSConsole.Chart.Log('[uielement.onmousedown] left, top ',e.clientX, e.clientY, this.getBoundingClientRect().left,this.getBoundingClientRect().top);
|
|
1771
1771
|
if(this.TryClickLock(x,y))return;}this.HideSelectRect();if(this.SelectRectRightMenu)this.SelectRectRightMenu.Hide();if(this.ChartPictureMenu)this.ChartPictureMenu.Hide();var paint=this.GetRectSelectPaint();if(paint&&paint.GetPointCount()>0){var item=paint.PtInPaint(x,y);if(item){if(item.Type==4){//this.UIElement.style.cursor="pointer";
|
|
@@ -2854,7 +2854,7 @@ this.FixedRightWidth={Main:60,Overlay:80};this.ZoomWindowsInfo=null;//附图指
|
|
|
2854
2854
|
this.ZoomStartWindowIndex=1;//允许缩放窗口起始位置
|
|
2855
2855
|
this.GetExtendChartByClassName;this.GetEventCallback;this.OnMoveFromeBorder=function(index,yMove){if(this.SubFrame.length<=0)return false;var topFrame=this.SubFrame[index];var bottomFrame=null;for(var i=index+1;i<this.SubFrame.length;++i){var item=this.SubFrame[i];if(item.Height>0){bottomFrame=item;break;}}if(!topFrame||!bottomFrame)return false;var bottomBackup=topFrame.Frame.ChartBorder.Bottom;var topBackup=bottomFrame.Frame.ChartBorder.Top;topFrame.Frame.ChartBorder.Bottom-=yMove;bottomFrame.Frame.ChartBorder.Top+=yMove;var height=topFrame.Frame.ChartBorder.GetHeightEx();var height2=bottomFrame.Frame.ChartBorder.GetHeightEx();//缩小的时候 小于最小高度 不处理
|
|
2856
2856
|
if(height<this.MinSubFrameHeight&&yMove<0||height2<this.MinSubFrameHeight&&yMove>0){topFrame.Frame.ChartBorder.Bottom=bottomBackup;bottomFrame.Frame.ChartBorder.Top=topBackup;return false;}return true;};this.ReDrawToolbar=function(){for(var i in this.SubFrame){this.SubFrame[i].Frame.ReDrawToolbar=true;}};this.SetFrameBorderSizeChange=function(){var firstFrame=this.SubFrame[0];if(!firstFrame||!firstFrame.Frame)return;var splitOper=firstFrame.Frame.YSplitOperator;if(!splitOper)return;if(splitOper.CoordinateType==2)//对数坐标 需要重新计算Y轴分割
|
|
2857
|
-
{firstFrame.Frame.XYSplit=true;}};this.CancelZoomUpDownFrameY=function(obj){var index=obj.Index;if(this.SubFrame.length<=0)return false;if(!this.SubFrame[index])return false;var subFrame=this.SubFrame[index];var frame=subFrame.Frame;var splitOper=frame.YSplitOperator;if(splitOper.FixedYMaxMin){splitOper.FixedYMaxMin=null;splitOper.EnableZoomUpDown=false;frame.XYSplit=true;for(var i in subFrame.OverlayIndex){var item=subFrame.OverlayIndex[i];if(item.Frame.IsShareY)item.Frame.XYSplit=true;}JSConsole.Chart.Log('[HQTradeFrame::CancelZoomUpDownFrameY]');return true;}return false;};this.OnZoomUpDownFrameY=function(obj,yMove){var index=obj.Index;if(this.SubFrame.length<=0)return false;if(!this.SubFrame[index])return false;var subFrame=this.SubFrame[index];var frame=subFrame.Frame;var top=frame.ChartBorder.GetTopEx();var bottom=frame.ChartBorder.GetBottomEx();var maxValue=frame.HorizontalMax;var minValue=frame.HorizontalMin;var moveStep=(maxValue-minValue)*Math.abs(yMove)/(bottom-top);var splitOper=frame.YSplitOperator;var newFixedYMaxMin={Max:maxValue,Min:minValue};if(obj.Position==1){var step=yMove>0?-moveStep:moveStep;newFixedYMaxMin.Max+=step;}else if(obj.Position==2){var step=yMove>0?-moveStep:moveStep;newFixedYMaxMin.Min+=step;}else if(obj.Position==0){var step=yMove>0?moveStep:-moveStep;newFixedYMaxMin.Max+=step;newFixedYMaxMin.Min-=step;}else{return false;}if(newFixedYMaxMin.Max>newFixedYMaxMin.Min){splitOper.FixedYMaxMin=newFixedYMaxMin;splitOper.EnableZoomUpDown=true;frame.XYSplit=true;for(var i=0;i<subFrame.OverlayIndex.length;++i){var item=subFrame.OverlayIndex[i];if(item.Frame.IsShareY)item.Frame.XYSplit=true;}JSConsole.Chart.Log('[HQTradeFrame::OnZoomUpDownFrameY] Max='+newFixedYMaxMin.Max+', Min='+newFixedYMaxMin.Min);return true;}return false;};this.OnUpDonwFrameY=function(obj,yMove){var index=obj.Index;if(this.SubFrame.length<=0)return false;if(!this.SubFrame[index])return false;var subFrame=this.SubFrame[index];var frame=subFrame.Frame;var top=frame.ChartBorder.GetTopEx();var bottom=frame.ChartBorder.GetBottomEx();var splitOper=frame.YSplitOperator;if(!splitOper)return false;var maxValue=frame.HorizontalMax;var minValue=frame.HorizontalMin;var moveStep=(maxValue-minValue)*Math.abs(yMove)/(bottom-top);var step=yMove>0?-moveStep:moveStep;var newFixedYMaxMin={Max:maxValue,Min:minValue};newFixedYMaxMin.Max-=step;newFixedYMaxMin.Min-=step;splitOper.FixedYMaxMin=newFixedYMaxMin;splitOper.EnableZoomUpDown=true;frame.XYSplit=true;for(var i in subFrame.OverlayIndex){var item=subFrame.OverlayIndex[i];if(item.Frame.IsShareY)item.Frame.XYSplit=true;}JSConsole.Chart.Log('[HQTradeFrame::OnUpDonwFrameY] Max='+newFixedYMaxMin.Max+', Min='+newFixedYMaxMin.Min+', yMove='+yMove+', moveStep='+moveStep);return true;};this.ClearUpDonwFrameYData=function(option)//清空上下拖拽的数据
|
|
2857
|
+
{firstFrame.Frame.XYSplit=true;}};this.CancelZoomUpDownFrameY=function(obj){var index=obj.Index;if(this.SubFrame.length<=0)return false;if(!this.SubFrame[index])return false;var subFrame=this.SubFrame[index];var frame=subFrame.Frame;if(obj.IsOverlay){var overlayItem=subFrame.OverlayIndex[obj.OverlayIndex];if(!overlayItem)return false;if(!overlayItem.Frame.IsShareY)frame=overlayItem.Frame;}var splitOper=frame.YSplitOperator;if(splitOper.FixedYMaxMin){splitOper.FixedYMaxMin=null;splitOper.EnableZoomUpDown=false;frame.XYSplit=true;for(var i in subFrame.OverlayIndex){var item=subFrame.OverlayIndex[i];if(item.Frame.IsShareY)item.Frame.XYSplit=true;}JSConsole.Chart.Log('[HQTradeFrame::CancelZoomUpDownFrameY]');return true;}return false;};this.OnZoomUpDownFrameY=function(obj,yMove){var index=obj.Index;if(this.SubFrame.length<=0)return false;if(!this.SubFrame[index])return false;var subFrame=this.SubFrame[index];var frame=subFrame.Frame;if(obj.IsOverlay){var overlayItem=subFrame.OverlayIndex[obj.OverlayIndex];if(!overlayItem)return false;if(!overlayItem.Frame.IsShareY)frame=overlayItem.Frame;}var top=frame.ChartBorder.GetTopEx();var bottom=frame.ChartBorder.GetBottomEx();var maxValue=frame.HorizontalMax;var minValue=frame.HorizontalMin;var moveStep=(maxValue-minValue)*Math.abs(yMove)/(bottom-top);var splitOper=frame.YSplitOperator;var newFixedYMaxMin={Max:maxValue,Min:minValue};if(obj.Position==1){var step=yMove>0?-moveStep:moveStep;newFixedYMaxMin.Max+=step;}else if(obj.Position==2){var step=yMove>0?-moveStep:moveStep;newFixedYMaxMin.Min+=step;}else if(obj.Position==0){var step=yMove>0?moveStep:-moveStep;newFixedYMaxMin.Max+=step;newFixedYMaxMin.Min-=step;}else{return false;}if(newFixedYMaxMin.Max>newFixedYMaxMin.Min){splitOper.FixedYMaxMin=newFixedYMaxMin;splitOper.EnableZoomUpDown=true;frame.XYSplit=true;for(var i=0;i<subFrame.OverlayIndex.length;++i){var item=subFrame.OverlayIndex[i];if(item.Frame.IsShareY)item.Frame.XYSplit=true;}JSConsole.Chart.Log('[HQTradeFrame::OnZoomUpDownFrameY] Max='+newFixedYMaxMin.Max+', Min='+newFixedYMaxMin.Min);return true;}return false;};this.OnUpDonwFrameY=function(obj,yMove){var index=obj.Index;if(this.SubFrame.length<=0)return false;if(!this.SubFrame[index])return false;var subFrame=this.SubFrame[index];var frame=subFrame.Frame;var top=frame.ChartBorder.GetTopEx();var bottom=frame.ChartBorder.GetBottomEx();var splitOper=frame.YSplitOperator;if(!splitOper)return false;var maxValue=frame.HorizontalMax;var minValue=frame.HorizontalMin;var moveStep=(maxValue-minValue)*Math.abs(yMove)/(bottom-top);var step=yMove>0?-moveStep:moveStep;var newFixedYMaxMin={Max:maxValue,Min:minValue};newFixedYMaxMin.Max-=step;newFixedYMaxMin.Min-=step;splitOper.FixedYMaxMin=newFixedYMaxMin;splitOper.EnableZoomUpDown=true;frame.XYSplit=true;for(var i in subFrame.OverlayIndex){var item=subFrame.OverlayIndex[i];if(item.Frame.IsShareY)item.Frame.XYSplit=true;}JSConsole.Chart.Log('[HQTradeFrame::OnUpDonwFrameY] Max='+newFixedYMaxMin.Max+', Min='+newFixedYMaxMin.Min+', yMove='+yMove+', moveStep='+moveStep);return true;};this.ClearUpDonwFrameYData=function(option)//清空上下拖拽的数据
|
|
2858
2858
|
{if(this.SubFrame.length<=0)return;if(option){var index=option.Index;if(index<0||index>=this.SubFrame.length)return;var item=this.SubFrame[index];if(!item||!item.Frame||!item.Frame.YSplitOperator)return;var splitOper=item.Frame.YSplitOperator;if(splitOper.EnableZoomUpDown==true)splitOper.FixedYMaxMin=null;}else{for(var i=0;i<this.SubFrame.length;++i){var item=this.SubFrame[i];if(!item||!item.Frame||!item.Frame.YSplitOperator)continue;var splitOper=item.Frame.YSplitOperator;if(splitOper.EnableZoomUpDown==true)splitOper.FixedYMaxMin=null;}}};this.ClearCoordinateText=function(option)//清空X,Y轴刻度文字, 线段保留
|
|
2859
2859
|
{for(var i=0;i<this.SubFrame.length;++i){var item=this.SubFrame[i];if(!item.Frame)continue;item.Frame.ClearCoordinateText(option);}};this.RestoreIndexWindows=function(){if(!this.ZoomWindowsInfo)return false;var subFrame=this.SubFrame[this.ZoomWindowsInfo.FrameID];for(var i=this.ZoomStartWindowIndex;i<this.ZoomWindowsInfo.Data.length;++i){var restoreItem=this.ZoomWindowsInfo.Data[i];var frameItem=this.SubFrame[i];frameItem.Height=restoreItem.Height;frameItem.Frame.IsMinSize=false;frameItem.Frame.ReDrawToolbar=true;frameItem.Frame.XSplitOperator.ShowText=restoreItem.ShowXText;frameItem.Frame.XYSplit=true;for(var j=0;j<frameItem.OverlayIndex.length;++j){var overlayItem=frameItem.OverlayIndex[j];overlayItem.Frame.IsMinSize=false;}}this.ZoomWindowsInfo=null;return true;};this.ZoomIndexWindow=function(frameID,option){var subFrame=this.SubFrame[frameID];if(!subFrame)return false;subFrame.Frame.ChartBorder.IsShowTitleOnly=false;if(this.ZoomWindowsInfo)//还原
|
|
2860
2860
|
{return this.RestoreIndexWindows();}else//放大
|
|
@@ -2897,7 +2897,7 @@ this.ResetXYSplit=function(){for(var _i in this.SubFrame){this.SubFrame[_i].Fram
|
|
|
2897
2897
|
this.ClearYCoordinateMaxMin=function(){for(var i=0;i<this.SubFrame.length;++i){var subItem=this.SubFrame[i];var frame=subItem.Frame;if(frame.YMaxMin){frame.YMaxMin.Max=null;frame.YMaxMin.Min=null;}}};this.SetLanguage=function(languageID){for(var _i3 in this.SubFrame){var item=this.SubFrame[_i3];if(item&&item.Frame){if(item.Frame.YSplitOperator)item.Frame.YSplitOperator.LanguageID=languageID;if(item.Frame.XSplitOperator)item.Frame.XSplitOperator.LanguageID=languageID;}}};this.GetCurrentPageSize=function()//获取当前页显示的数据个数
|
|
2898
2898
|
{if(this.SubFrame.length<=0)return null;var item=this.SubFrame[0];if(!item||!item.Frame)return null;return item.Frame.XPointCount;};this.OnSize=function(){var obj={};this.SubFrame[0].Frame.OnSize(obj);this.UpdateAllFrame();return obj;};this.SetDataWidth=function(dataWidth){var obj=this.SubFrame[0].Frame.SetDataWidth(dataWidth);this.UpdateAllFrame();return obj;};this.UpdateAllFrame=function(){var mainFrame=this.SubFrame[0].Frame;for(var i=0;i<this.SubFrame.length;++i){var item=this.SubFrame[i];if(i>0)//第1个窗口主坐标已经算好了
|
|
2899
2899
|
{item.Frame.XPointCount=mainFrame.XPointCount;item.Frame.ZoomIndex=mainFrame.ZoomIndex;item.Frame.DataWidth=mainFrame.DataWidth;item.Frame.DistanceWidth=mainFrame.DistanceWidth;item.Frame.LastCalculateStatus.Width=mainFrame.LastCalculateStatus.Width;item.Frame.LastCalculateStatus.XPointCount=mainFrame.LastCalculateStatus.XPointCount;}for(var j in item.OverlayIndex){var overlayItem=this.SubFrame[i].OverlayIndex[j];overlayItem.Frame.XPointCount=mainFrame.XPointCount;overlayItem.Frame.ZoomIndex=mainFrame.ZoomIndex;overlayItem.Frame.DataWidth=mainFrame.DataWidth;overlayItem.Frame.DistanceWidth=mainFrame.DistanceWidth;overlayItem.Frame.LastCalculateStatus.Width=mainFrame.LastCalculateStatus.Width;overlayItem.Frame.LastCalculateStatus.XPointCount=mainFrame.LastCalculateStatus.XPointCount;}}};//鼠标是否在边框上
|
|
2900
|
-
this.PtInFrameBorder=function(x,y){var height=this.DragBorderHeight;for(var i=0;i<this.SubFrame.length-1;++i){var item=this.SubFrame[i];if(item.Frame.Heigh<=0)continue;var bottom=item.Frame.ChartBorder.GetBottom();var left=item.Frame.ChartBorder.GetLeft();var right=item.Frame.ChartBorder.GetRight();item.Frame.Canvas.beginPath();item.Frame.Canvas.rect(left,bottom-height/2,right-left,height);if(item.Frame.Canvas.isPointInPath(x,y)){return{Index:i,Bottom:true};}}return null;};this.IsEnableDragY=function(index){if(!this.SubFrame)return false;var item=this.SubFrame[index];if(!item||!item.Frame||!item.Frame.YSplitOperator)return false;var split=item.Frame.YSplitOperator;if(typeof split.IsEnableDragY!='function')return false;return split.IsEnableDragY();};this.PtInFrameY=function(x,y){var rightExtendWith=0;if(this.GetExtendChartByClassName){var finder=this.GetExtendChartByClassName("StockChip");if(finder&&finder.Chart)rightExtendWith=finder.Chart.Width;}for(var i=0;i<this.SubFrame.length;++i){var item=this.SubFrame[i];if(item.Frame.Heigh<=0)continue;var rightWidth=item.Frame.ChartBorder.Right;rightWidth-=rightExtendWith;var border=item.Frame.ChartBorder.GetBorder();var bottom=border.Bottom;var top=border.TopTitle;var left=border.Left;var right=border.Right;var maxTopHegith=30;var barHegith=bottom-top;if(barHegith/3>maxTopHegith){var barTop=top+maxTopHegith;var barBottom=bottom-maxTopHegith;}else{var internal=barHegith/3;var barTop=top+internal;var barBottom=bottom-internal;}var position=0;if(y<barTop)position=1;else if(y>barBottom)position=2;if(rightWidth>=10){if(IFrameSplitOperator.IsNonEmptyArray(item.OverlayIndex)){var overlayItem=item.OverlayIndex[0];var rightOffset=overlayItem.Frame.RightOffset;item.Frame.Canvas.beginPath();item.Frame.Canvas.rect(right,top,rightOffset,bottom-top);if(item.Frame.Canvas.isPointInPath(x,y)){return{Index:i,Right:true,Left:false,Position:position,IsOverlay:false};//Position 1=上面 2 下面 0=中间(TODO)
|
|
2900
|
+
this.PtInFrameBorder=function(x,y){var height=this.DragBorderHeight;for(var i=0;i<this.SubFrame.length-1;++i){var item=this.SubFrame[i];if(item.Frame.Heigh<=0)continue;var bottom=item.Frame.ChartBorder.GetBottom();var left=item.Frame.ChartBorder.GetLeft();var right=item.Frame.ChartBorder.GetRight();item.Frame.Canvas.beginPath();item.Frame.Canvas.rect(left,bottom-height/2,right-left,height);if(item.Frame.Canvas.isPointInPath(x,y)){return{Index:i,Bottom:true};}}return null;};this.IsEnableDragY=function(index){if(!this.SubFrame)return false;var item=this.SubFrame[index];if(!item||!item.Frame||!item.Frame.YSplitOperator)return false;var split=item.Frame.YSplitOperator;if(typeof split.IsEnableDragY!='function')return false;return split.IsEnableDragY();};this.IsEnableOverlayDragY=function(index,overlayIndex){if(!this.SubFrame)return false;var item=this.SubFrame[index];var overlayItem=item.OverlayIndex[overlayIndex];if(!overlayItem||!overlayItem.Frame)return false;var split=overlayItem.Frame.YSplitOperator;if(overlayItem.Frame.IsShareY)split=overlayItem.Frame.MainFrame.YSplitOperator;if(!split||typeof split.IsEnableDragY!='function')return false;return split.IsEnableDragY();};this.PtInFrameY=function(x,y){var rightExtendWith=0;if(this.GetExtendChartByClassName){var finder=this.GetExtendChartByClassName("StockChip");if(finder&&finder.Chart)rightExtendWith=finder.Chart.Width;}for(var i=0;i<this.SubFrame.length;++i){var item=this.SubFrame[i];if(item.Frame.Heigh<=0)continue;var rightWidth=item.Frame.ChartBorder.Right;rightWidth-=rightExtendWith;var border=item.Frame.ChartBorder.GetBorder();var bottom=border.Bottom;var top=border.TopTitle;var left=border.Left;var right=border.Right;var maxTopHegith=30;var barHegith=bottom-top;if(barHegith/3>maxTopHegith){var barTop=top+maxTopHegith;var barBottom=bottom-maxTopHegith;}else{var internal=barHegith/3;var barTop=top+internal;var barBottom=bottom-internal;}var position=0;if(y<barTop)position=1;else if(y>barBottom)position=2;if(rightWidth>=10){if(IFrameSplitOperator.IsNonEmptyArray(item.OverlayIndex)){var overlayItem=item.OverlayIndex[0];var rightOffset=overlayItem.Frame.RightOffset;item.Frame.Canvas.beginPath();item.Frame.Canvas.rect(right,top,rightOffset,bottom-top);if(item.Frame.Canvas.isPointInPath(x,y)){return{Index:i,Right:true,Left:false,Position:position,IsOverlay:false};//Position 1=上面 2 下面 0=中间(TODO)
|
|
2901
2901
|
}var overlayRight=right+rightOffset;for(var j=0;j<item.OverlayIndex.length;++j){var overlayItem=item.OverlayIndex[j];if(!overlayItem.RightWidth||!IFrameSplitOperator.IsNumber(overlayItem.RightWidth.Width))continue;var overlayWidth=overlayItem.RightWidth.Width;item.Frame.Canvas.beginPath();item.Frame.Canvas.rect(overlayRight,top,overlayWidth,bottom-top);if(item.Frame.Canvas.isPointInPath(x,y)){return{Index:i,Right:true,Left:false,Position:position,IsOverlay:true,OverlayIndex:j};//Position 1=上面 2 下面 0=中间(TODO)
|
|
2902
2902
|
}overlayRight+=overlayWidth;}}else{item.Frame.Canvas.beginPath();item.Frame.Canvas.rect(right,top,rightWidth,bottom-top);if(item.Frame.Canvas.isPointInPath(x,y)){return{Index:i,Right:true,Left:false,Position:position,IsOverlay:false};//Position 1=上面 2 下面 0=中间(TODO)
|
|
2903
2903
|
}}}var leftWidth=item.Frame.ChartBorder.Left;if(leftWidth>=10){item.Frame.Canvas.beginPath();item.Frame.Canvas.rect(0,top,leftWidth,bottom-top);if(item.Frame.Canvas.isPointInPath(x,y)){return{Index:i,Right:false,Left:true,Position:position,IsOverlay:false};}}}return null;};this.SetDayCount=function(dayCount){this.ChartBorder.MultiDayMinute.Count=dayCount;for(var i=0;i<this.SubFrame.length;++i){var item=this.SubFrame[i];if(!item.Frame)continue;item.Frame.DayCount=dayCount;item.Frame.ChartBorder.MultiDayMinute.Count=dayCount;}};//设置多日分时宽度
|
|
@@ -7549,7 +7549,7 @@ this.UpdateWindowIndex=function(index){var bindData=new ChartData();bindData.Dat
|
|
|
7549
7549
|
this.UpdateFrameMaxMin();//调整坐标最大 最小值
|
|
7550
7550
|
this.Draw();};this.GetOverlayIndexByIdentify=function(identify){for(var i=0;i<this.Frame.SubFrame.length;++i){var item=this.Frame.SubFrame[i];if(!IFrameSplitOperator.IsNonEmptyArray(item.OverlayIndex))continue;for(var j=0;j<item.OverlayIndex.length;++j){var overlayItem=item.OverlayIndex[j];if(overlayItem.Identify===identify)return{OverlayItem:overlayItem,WindowIndex:i};}}return null;};this.RecvOverlayIndex=function(identify,data){var overlayIndex=this.GetOverlayIndexByIdentify(identify);if(overlayIndex==null){console.warn('[KLineChartContainer::RecvOverlayIndex] can\'t find overlay index. [identify='+identify+']');return;}if(!overlayIndex.Script)return;if(typeof overlayIndex.RecvSubscribeData!="function")return;if(!this.ChartPaint[0])return;var kData=this.ChartPaint[0].Data;if(!kData)return;overlayIndex.Script.RecvSubscribeData(data,this,overlayIndex.WindowIndex,kData);};//更新叠加指标
|
|
7551
7551
|
this.UpdateOverlayIndex=function(identify){var overlayIndex=this.GetOverlayIndexByIdentify(identify);if(overlayIndex==null){console.warn('[KLineChartContainer::UpdateOverlayIndex] can\'t find overlay index. [identify='+identify+']');return;}if(!this.ChartPaint[0])return;var kData=this.ChartPaint[0].Data;if(!kData)return;this.BindOverlayIndexData(overlayIndex.OverlayItem,overlayIndex.WindowIndex,kData);};//修改参数指标
|
|
7552
|
-
this.ChangeWindowIndexParam=function(index){this.WindowIndex[index].Index[0].Param+=1;this.WindowIndex[index].Index[1].Param+=1;this.UpdateWindowIndex(index);};this.OnDoubleClick=function(x,y,e){if(this.EnableYDrag&&(this.EnableYDrag.Left||this.EnableYDrag.Right)&&this.Frame&&this.Frame.PtInFrameY){var pixelTatio=GetDevicePixelRatio();var x=(e.clientX-this.UIElement.getBoundingClientRect().left)*pixelTatio;var y=(e.clientY-this.UIElement.getBoundingClientRect().top)*pixelTatio;var dragY=this.Frame.PtInFrameY(x,y);if(dragY&&dragY.Index>=0
|
|
7552
|
+
this.ChangeWindowIndexParam=function(index){this.WindowIndex[index].Index[0].Param+=1;this.WindowIndex[index].Index[1].Param+=1;this.UpdateWindowIndex(index);};this.OnDoubleClick=function(x,y,e){if(this.EnableYDrag&&(this.EnableYDrag.Left||this.EnableYDrag.Right)&&this.Frame&&this.Frame.PtInFrameY){var pixelTatio=GetDevicePixelRatio();var x=(e.clientX-this.UIElement.getBoundingClientRect().left)*pixelTatio;var y=(e.clientY-this.UIElement.getBoundingClientRect().top)*pixelTatio;var dragY=this.Frame.PtInFrameY(x,y);if(dragY&&dragY.Index>=0){this.CancelZoomUpDownFrameY(dragY);}}var selectedChart;//图形选中
|
|
7553
7553
|
if(this.SelectedChart.EnableSelected){selectedChart=this.PtInChart(x,y);}var dbClickInfo={SelectedChart:selectedChart};this.DBClickEvent(dbClickInfo,e);if(!selectedChart&&this.EnableZoomIndexWindow)//双击放大缩小
|
|
7554
7554
|
{var frameId=this.Frame.PtInFrame(x,y);JSConsole.Chart.Log("[KLineChartContainer::OnDoubleClick] frameId",frameId);if(frameId>=this.Frame.ZoomStartWindowIndex){if(this.ZoomIndexWindow(frameId,{X:x,Y:y})){this.Frame.SetSizeChage(true);this.Draw();return true;}}}var event=null;if(this.mapEvent.has(JSCHART_EVENT_ID.DBCLICK_KLINE))event=this.mapEvent.get(JSCHART_EVENT_ID.DBCLICK_KLINE);if(!this.MinuteDialog&&!event)return;var tooltip=new TooltipData();if(!this.PtInChartPaintTooltip(x,y,tooltip))return;if(!tooltip.Data)return;if(event){if(this.ClickChartTimer!=null)//清空单击定时器
|
|
7555
7555
|
{clearTimeout(this.ClickChartTimer);this.ClickChartTimer=null;}var data={Tooltip:tooltip,Stock:{Symbol:this.Symbol,Name:this.Name},X:e.clientX,Y:e.clientY};event.Callback(event,data,this);}if(this.MinuteDialog){e.data={Chart:this,Tooltip:tooltip};this.MinuteDialog.DoModal(e);}};this.CancelAutoUpdate=function()//关闭停止更新
|
|
@@ -12920,7 +12920,7 @@ hisData.Symbol=message.symbol;}var stockObj={HQDataType:HQ_DATA_TYPE.KLINE_ID,St
|
|
|
12920
12920
|
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);};}/********************************************************************************
|
|
12921
12921
|
* 版本信息输出
|
|
12922
12922
|
*
|
|
12923
|
-
*/var HQCHART_VERSION="1.1.
|
|
12923
|
+
*/var HQCHART_VERSION="1.1.12773";function PrintHQChartVersion(){var log='*************************************************************************************************************\n*\n* HQChart Ver: '+HQCHART_VERSION+' \n* \n* License: Apache License 2.0 \n* Source: https://github.com/jones2000/HQChart\n*\n*************************************************************************************************************\n';console.log(log);}PrintHQChartVersion();//把给外界调用的方法暴露出来
|
|
12924
12924
|
exports.default=(_jsChartInit$jsChartS={jsChartInit:JSChart.Init,jsChartStyle:JSChart.SetStyle,// IsIndexSymbol:IsIndexSymbol,
|
|
12925
12925
|
// BaseIndex:BaseIndex,
|
|
12926
12926
|
// ChartLine:ChartLine,
|
package/package.json
CHANGED
package/src/jscommon/umychart.js
CHANGED
|
@@ -3121,7 +3121,16 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
3121
3121
|
if (!this.Frame || !this.Frame.PtInFrameY) return null;
|
|
3122
3122
|
|
|
3123
3123
|
var dragY=this.Frame.PtInFrameY(x,y);
|
|
3124
|
-
if (!dragY || dragY.Index<0
|
|
3124
|
+
if (!dragY || dragY.Index<0 ) return null;
|
|
3125
|
+
|
|
3126
|
+
if (dragY.IsOverlay===true)
|
|
3127
|
+
{
|
|
3128
|
+
if (!dragY.Right || !this.EnableYDrag.Right) return null;
|
|
3129
|
+
|
|
3130
|
+
if (this.Frame.IsEnableOverlayDragY(dragY.Index, dragY.OverlayIndex)) return dragY;
|
|
3131
|
+
|
|
3132
|
+
return null;
|
|
3133
|
+
}
|
|
3125
3134
|
|
|
3126
3135
|
if (dragY.Left && this.EnableYDrag.Left && this.Frame.IsEnableDragY(dragY.Index))
|
|
3127
3136
|
{
|
|
@@ -16547,6 +16556,12 @@ function HQTradeFrame()
|
|
|
16547
16556
|
|
|
16548
16557
|
var subFrame=this.SubFrame[index];
|
|
16549
16558
|
var frame=subFrame.Frame;
|
|
16559
|
+
if (obj.IsOverlay)
|
|
16560
|
+
{
|
|
16561
|
+
var overlayItem=subFrame.OverlayIndex[obj.OverlayIndex];
|
|
16562
|
+
if (!overlayItem) return false;
|
|
16563
|
+
if (!overlayItem.Frame.IsShareY) frame=overlayItem.Frame;
|
|
16564
|
+
}
|
|
16550
16565
|
var splitOper=frame.YSplitOperator;
|
|
16551
16566
|
|
|
16552
16567
|
if (splitOper.FixedYMaxMin)
|
|
@@ -16575,6 +16590,13 @@ function HQTradeFrame()
|
|
|
16575
16590
|
|
|
16576
16591
|
var subFrame=this.SubFrame[index];
|
|
16577
16592
|
var frame=subFrame.Frame;
|
|
16593
|
+
if (obj.IsOverlay)
|
|
16594
|
+
{
|
|
16595
|
+
var overlayItem=subFrame.OverlayIndex[obj.OverlayIndex];
|
|
16596
|
+
if (!overlayItem) return false;
|
|
16597
|
+
if (!overlayItem.Frame.IsShareY) frame=overlayItem.Frame;
|
|
16598
|
+
}
|
|
16599
|
+
|
|
16578
16600
|
var top=frame.ChartBorder.GetTopEx();
|
|
16579
16601
|
var bottom=frame.ChartBorder.GetBottomEx();
|
|
16580
16602
|
|
|
@@ -17843,6 +17865,22 @@ function HQTradeFrame()
|
|
|
17843
17865
|
return split.IsEnableDragY();
|
|
17844
17866
|
}
|
|
17845
17867
|
|
|
17868
|
+
this.IsEnableOverlayDragY=function(index, overlayIndex)
|
|
17869
|
+
{
|
|
17870
|
+
if (!this.SubFrame) return false;
|
|
17871
|
+
var item=this.SubFrame[index];
|
|
17872
|
+
var overlayItem=item.OverlayIndex[overlayIndex];
|
|
17873
|
+
if (!overlayItem || !overlayItem.Frame) return false;
|
|
17874
|
+
|
|
17875
|
+
var split=overlayItem.Frame.YSplitOperator;
|
|
17876
|
+
if (overlayItem.Frame.IsShareY)
|
|
17877
|
+
split=overlayItem.Frame.MainFrame.YSplitOperator;
|
|
17878
|
+
|
|
17879
|
+
if (!split || typeof(split.IsEnableDragY)!='function') return false;
|
|
17880
|
+
|
|
17881
|
+
return split.IsEnableDragY();
|
|
17882
|
+
}
|
|
17883
|
+
|
|
17846
17884
|
this.PtInFrameY=function(x,y)
|
|
17847
17885
|
{
|
|
17848
17886
|
var rightExtendWith=0;
|
|
@@ -71171,7 +71209,7 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
71171
71209
|
var x = (e.clientX-this.UIElement.getBoundingClientRect().left)*pixelTatio;
|
|
71172
71210
|
var y = (e.clientY-this.UIElement.getBoundingClientRect().top)*pixelTatio;
|
|
71173
71211
|
var dragY=this.Frame.PtInFrameY(x,y);
|
|
71174
|
-
if (dragY && dragY.Index>=0
|
|
71212
|
+
if (dragY && dragY.Index>=0)
|
|
71175
71213
|
{
|
|
71176
71214
|
this.CancelZoomUpDownFrameY(dragY);
|
|
71177
71215
|
}
|
|
@@ -7265,7 +7265,16 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7265
7265
|
if (!this.Frame || !this.Frame.PtInFrameY) return null;
|
|
7266
7266
|
|
|
7267
7267
|
var dragY=this.Frame.PtInFrameY(x,y);
|
|
7268
|
-
if (!dragY || dragY.Index<0
|
|
7268
|
+
if (!dragY || dragY.Index<0 ) return null;
|
|
7269
|
+
|
|
7270
|
+
if (dragY.IsOverlay===true)
|
|
7271
|
+
{
|
|
7272
|
+
if (!dragY.Right || !this.EnableYDrag.Right) return null;
|
|
7273
|
+
|
|
7274
|
+
if (this.Frame.IsEnableOverlayDragY(dragY.Index, dragY.OverlayIndex)) return dragY;
|
|
7275
|
+
|
|
7276
|
+
return null;
|
|
7277
|
+
}
|
|
7269
7278
|
|
|
7270
7279
|
if (dragY.Left && this.EnableYDrag.Left && this.Frame.IsEnableDragY(dragY.Index))
|
|
7271
7280
|
{
|
|
@@ -20691,6 +20700,12 @@ function HQTradeFrame()
|
|
|
20691
20700
|
|
|
20692
20701
|
var subFrame=this.SubFrame[index];
|
|
20693
20702
|
var frame=subFrame.Frame;
|
|
20703
|
+
if (obj.IsOverlay)
|
|
20704
|
+
{
|
|
20705
|
+
var overlayItem=subFrame.OverlayIndex[obj.OverlayIndex];
|
|
20706
|
+
if (!overlayItem) return false;
|
|
20707
|
+
if (!overlayItem.Frame.IsShareY) frame=overlayItem.Frame;
|
|
20708
|
+
}
|
|
20694
20709
|
var splitOper=frame.YSplitOperator;
|
|
20695
20710
|
|
|
20696
20711
|
if (splitOper.FixedYMaxMin)
|
|
@@ -20719,6 +20734,13 @@ function HQTradeFrame()
|
|
|
20719
20734
|
|
|
20720
20735
|
var subFrame=this.SubFrame[index];
|
|
20721
20736
|
var frame=subFrame.Frame;
|
|
20737
|
+
if (obj.IsOverlay)
|
|
20738
|
+
{
|
|
20739
|
+
var overlayItem=subFrame.OverlayIndex[obj.OverlayIndex];
|
|
20740
|
+
if (!overlayItem) return false;
|
|
20741
|
+
if (!overlayItem.Frame.IsShareY) frame=overlayItem.Frame;
|
|
20742
|
+
}
|
|
20743
|
+
|
|
20722
20744
|
var top=frame.ChartBorder.GetTopEx();
|
|
20723
20745
|
var bottom=frame.ChartBorder.GetBottomEx();
|
|
20724
20746
|
|
|
@@ -21987,6 +22009,22 @@ function HQTradeFrame()
|
|
|
21987
22009
|
return split.IsEnableDragY();
|
|
21988
22010
|
}
|
|
21989
22011
|
|
|
22012
|
+
this.IsEnableOverlayDragY=function(index, overlayIndex)
|
|
22013
|
+
{
|
|
22014
|
+
if (!this.SubFrame) return false;
|
|
22015
|
+
var item=this.SubFrame[index];
|
|
22016
|
+
var overlayItem=item.OverlayIndex[overlayIndex];
|
|
22017
|
+
if (!overlayItem || !overlayItem.Frame) return false;
|
|
22018
|
+
|
|
22019
|
+
var split=overlayItem.Frame.YSplitOperator;
|
|
22020
|
+
if (overlayItem.Frame.IsShareY)
|
|
22021
|
+
split=overlayItem.Frame.MainFrame.YSplitOperator;
|
|
22022
|
+
|
|
22023
|
+
if (!split || typeof(split.IsEnableDragY)!='function') return false;
|
|
22024
|
+
|
|
22025
|
+
return split.IsEnableDragY();
|
|
22026
|
+
}
|
|
22027
|
+
|
|
21990
22028
|
this.PtInFrameY=function(x,y)
|
|
21991
22029
|
{
|
|
21992
22030
|
var rightExtendWith=0;
|
|
@@ -75315,7 +75353,7 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
75315
75353
|
var x = (e.clientX-this.UIElement.getBoundingClientRect().left)*pixelTatio;
|
|
75316
75354
|
var y = (e.clientY-this.UIElement.getBoundingClientRect().top)*pixelTatio;
|
|
75317
75355
|
var dragY=this.Frame.PtInFrameY(x,y);
|
|
75318
|
-
if (dragY && dragY.Index>=0
|
|
75356
|
+
if (dragY && dragY.Index>=0)
|
|
75319
75357
|
{
|
|
75320
75358
|
this.CancelZoomUpDownFrameY(dragY);
|
|
75321
75359
|
}
|
|
@@ -131277,7 +131315,7 @@ function ScrollBarBGChart()
|
|
|
131277
131315
|
|
|
131278
131316
|
|
|
131279
131317
|
|
|
131280
|
-
var HQCHART_VERSION="1.1.
|
|
131318
|
+
var HQCHART_VERSION="1.1.12773";
|
|
131281
131319
|
|
|
131282
131320
|
function PrintHQChartVersion()
|
|
131283
131321
|
{
|
|
@@ -7309,7 +7309,16 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7309
7309
|
if (!this.Frame || !this.Frame.PtInFrameY) return null;
|
|
7310
7310
|
|
|
7311
7311
|
var dragY=this.Frame.PtInFrameY(x,y);
|
|
7312
|
-
if (!dragY || dragY.Index<0
|
|
7312
|
+
if (!dragY || dragY.Index<0 ) return null;
|
|
7313
|
+
|
|
7314
|
+
if (dragY.IsOverlay===true)
|
|
7315
|
+
{
|
|
7316
|
+
if (!dragY.Right || !this.EnableYDrag.Right) return null;
|
|
7317
|
+
|
|
7318
|
+
if (this.Frame.IsEnableOverlayDragY(dragY.Index, dragY.OverlayIndex)) return dragY;
|
|
7319
|
+
|
|
7320
|
+
return null;
|
|
7321
|
+
}
|
|
7313
7322
|
|
|
7314
7323
|
if (dragY.Left && this.EnableYDrag.Left && this.Frame.IsEnableDragY(dragY.Index))
|
|
7315
7324
|
{
|
|
@@ -20735,6 +20744,12 @@ function HQTradeFrame()
|
|
|
20735
20744
|
|
|
20736
20745
|
var subFrame=this.SubFrame[index];
|
|
20737
20746
|
var frame=subFrame.Frame;
|
|
20747
|
+
if (obj.IsOverlay)
|
|
20748
|
+
{
|
|
20749
|
+
var overlayItem=subFrame.OverlayIndex[obj.OverlayIndex];
|
|
20750
|
+
if (!overlayItem) return false;
|
|
20751
|
+
if (!overlayItem.Frame.IsShareY) frame=overlayItem.Frame;
|
|
20752
|
+
}
|
|
20738
20753
|
var splitOper=frame.YSplitOperator;
|
|
20739
20754
|
|
|
20740
20755
|
if (splitOper.FixedYMaxMin)
|
|
@@ -20763,6 +20778,13 @@ function HQTradeFrame()
|
|
|
20763
20778
|
|
|
20764
20779
|
var subFrame=this.SubFrame[index];
|
|
20765
20780
|
var frame=subFrame.Frame;
|
|
20781
|
+
if (obj.IsOverlay)
|
|
20782
|
+
{
|
|
20783
|
+
var overlayItem=subFrame.OverlayIndex[obj.OverlayIndex];
|
|
20784
|
+
if (!overlayItem) return false;
|
|
20785
|
+
if (!overlayItem.Frame.IsShareY) frame=overlayItem.Frame;
|
|
20786
|
+
}
|
|
20787
|
+
|
|
20766
20788
|
var top=frame.ChartBorder.GetTopEx();
|
|
20767
20789
|
var bottom=frame.ChartBorder.GetBottomEx();
|
|
20768
20790
|
|
|
@@ -22031,6 +22053,22 @@ function HQTradeFrame()
|
|
|
22031
22053
|
return split.IsEnableDragY();
|
|
22032
22054
|
}
|
|
22033
22055
|
|
|
22056
|
+
this.IsEnableOverlayDragY=function(index, overlayIndex)
|
|
22057
|
+
{
|
|
22058
|
+
if (!this.SubFrame) return false;
|
|
22059
|
+
var item=this.SubFrame[index];
|
|
22060
|
+
var overlayItem=item.OverlayIndex[overlayIndex];
|
|
22061
|
+
if (!overlayItem || !overlayItem.Frame) return false;
|
|
22062
|
+
|
|
22063
|
+
var split=overlayItem.Frame.YSplitOperator;
|
|
22064
|
+
if (overlayItem.Frame.IsShareY)
|
|
22065
|
+
split=overlayItem.Frame.MainFrame.YSplitOperator;
|
|
22066
|
+
|
|
22067
|
+
if (!split || typeof(split.IsEnableDragY)!='function') return false;
|
|
22068
|
+
|
|
22069
|
+
return split.IsEnableDragY();
|
|
22070
|
+
}
|
|
22071
|
+
|
|
22034
22072
|
this.PtInFrameY=function(x,y)
|
|
22035
22073
|
{
|
|
22036
22074
|
var rightExtendWith=0;
|
|
@@ -75359,7 +75397,7 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
75359
75397
|
var x = (e.clientX-this.UIElement.getBoundingClientRect().left)*pixelTatio;
|
|
75360
75398
|
var y = (e.clientY-this.UIElement.getBoundingClientRect().top)*pixelTatio;
|
|
75361
75399
|
var dragY=this.Frame.PtInFrameY(x,y);
|
|
75362
|
-
if (dragY && dragY.Index>=0
|
|
75400
|
+
if (dragY && dragY.Index>=0)
|
|
75363
75401
|
{
|
|
75364
75402
|
this.CancelZoomUpDownFrameY(dragY);
|
|
75365
75403
|
}
|
|
@@ -131435,7 +131473,7 @@ function HQChartScriptWorker()
|
|
|
131435
131473
|
|
|
131436
131474
|
|
|
131437
131475
|
|
|
131438
|
-
var HQCHART_VERSION="1.1.
|
|
131476
|
+
var HQCHART_VERSION="1.1.12773";
|
|
131439
131477
|
|
|
131440
131478
|
function PrintHQChartVersion()
|
|
131441
131479
|
{
|