hqchart 1.1.12767 → 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.
@@ -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||dragY.IsOverlay==true)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;};//是否可以上下拖拽
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";
@@ -1790,7 +1790,9 @@ var bDraw=false;if(drawPictureActive.Select.Guid&&drawPictureActive.Select.Chart
1790
1790
  this.SelectChartDrawPicture.DragInfo={Click:{X:e.clientX,Y:e.clientY}};}else{this.CurrentChartDrawPicture=null;this.SelectChartDrawPicture=null;}var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CLICK_DRAWPICTURE);//选中画图工具事件
1791
1791
  if(event&&event.Callback){var sendData={DrawPicture:drawPictrueData.ChartDrawPicture};event.Callback(event,sendData,this);}else{this.OnSelectChartPicture(drawPictrueData.ChartDrawPicture);//选中画图工具事件
1792
1792
  }}else{if(this.ClickChartTimer!=null){clearTimeout(this.ClickChartTimer);this.ClickChartTimer=null;}var self=this;var ptClick={X:this.ClickDownPoint.X,Y:this.ClickDownPoint.Y};this.ClickChartTimer=setTimeout(function(){self.TryClickPaintEvent(JSCHART_EVENT_ID.ON_CLICK_CHART_PAINT,ptClick,e);},250);var bSelectedChartChanged=false;if(this.SelectedChart.EnableSelected){var selectChart=this.PtInChart(x,y);if(selectChart){if(this.SelectedChart.Selected.Identify!=selectChart.Identify){this.SelectedChart.Selected.Identify=selectChart.Identify;this.SelectedChart.Selected.Chart=selectChart.Chart;bSelectedChartChanged=true;}if(this.EnableIndexChartDrag){this.IndexChartDrag={SelectedChart:selectChart,LastMove:{X:x,Y:y},Click:{X:x,Y:y}};this.IndexChartDrag.Info=this.GetSelectedChartInfo(selectChart);if(this.IndexChartDrag.Info)this.IndexChartDrag.Info.FrameID=this.Frame.PtInFrame(x,y);}}else{if(this.SelectedChart.Selected.Identify){this.SelectedChart.Selected.Identify=null;this.SelectedChart.Selected.Chart=null;bSelectedChartChanged=true;}}}else{if(this.SelectedChart.Selected.Identify){this.SelectedChart.Selected.Identify=null;bSelectedChartChanged=true;}}if(drawPictureActive.Select.Guid!=null&&this.SelectChartDrawPicture==null||bSelectedChartChanged){var drawType=0;if(drawPictureActive.Select.Guid&&drawPictureActive.Select.Chart&&drawPictureActive.Select.Chart.IsDrawMain)drawType=1;if(bSelectedChartChanged){var chart=selectedChart.Chart;if(chart&&chart.SetSelectedStatus){chart.SetSelectedStatus(0);drawType=1;}chart=this.SelectedChart.Selected.Chart;if(chart&&chart.SetSelectedStatus){chart.SetSelectedStatus(1);drawType=1;}}if(drawType==1)this.Draw();else this.DrawDynamicInfo();}else if(bDrawDynamicInfo){this.DrawDynamicInfo();}}}document.onmousemove=function(e){_this7.DocOnMouseMove(e);};document.onmouseup=function(e){_this7.DocOnMouseUp(e);};};this.DocOnMouseMove=function(e){//加载数据中,禁用鼠标事件
1793
- if(this.ChartSplashPaint&&this.IsEnableSplash==true)return;var drag=this.MouseDrag;if(!drag)return;var moveSetp=Math.abs(drag.LastMove.X-e.clientX);var moveSetpY=Math.abs(drag.LastMove.Y-e.clientY);var isDragSelectRect=this.RectSelectDrag&&this.RectSelectDrag.Index>=0;var isDragSubSelectRect=this.RectSelectDrag&&this.RectSelectDrag.Type==4;if(drag.CurrentMove){drag.CurrentMove.X=e.clientX;drag.CurrentMove.Y=e.clientY;}if(this.BorderDrag&&this.BorderDrag.Index>=0){if(Math.abs(drag.LastMove.Y-e.clientY)<5)return;var yMove=e.clientY-drag.LastMove.Y;this.OnMoveFromeBorder(this.BorderDrag.Index,yMove);drag.LastMove.X=e.clientX;drag.LastMove.Y=e.clientY;}else if(this.YDrag&&this.YDrag.Index>=0){if(moveSetpY<5)return;var yMove=e.clientY-drag.LastMove.Y;//this.UIElement.style.cursor="n-resize";
1793
+ if(this.ChartSplashPaint&&this.IsEnableSplash==true)return;var drag=this.MouseDrag;if(!drag)return;var moveSetp=Math.abs(drag.LastMove.X-e.clientX);var moveSetpY=Math.abs(drag.LastMove.Y-e.clientY);var isDragSelectRect=this.RectSelectDrag&&this.RectSelectDrag.Index>=0;var isDragSubSelectRect=this.RectSelectDrag&&this.RectSelectDrag.Type==4;if(drag.CurrentMove){drag.CurrentMove.X=e.clientX;drag.CurrentMove.Y=e.clientY;}if(this.BorderDrag&&this.BorderDrag.Index>=0)//边框拖动
1794
+ {if(Math.abs(drag.LastMove.Y-e.clientY)<5)return;var yMove=e.clientY-drag.LastMove.Y;this.OnMoveFromeBorder(this.BorderDrag.Index,yMove);drag.LastMove.X=e.clientX;drag.LastMove.Y=e.clientY;}else if(this.YDrag&&this.YDrag.Index>=0)//Y轴缩放
1795
+ {if(moveSetpY<5)return;var yMove=e.clientY-drag.LastMove.Y;//this.UIElement.style.cursor="n-resize";
1794
1796
  JSConsole.Chart.Log("[JSChartContainer::DocOnMouseMove] YDrag ",this.YDrag,yMove);this.OnZoomUpDownFrameY(this.YDrag,yMove);drag.LastMove.X=e.clientX;drag.LastMove.Y=e.clientY;}else if(this.IndexChartDrag&&this.IndexChartDrag.SelectedChart){if(Math.abs(drag.LastMove.Y-e.clientY)<2&&Math.abs(drag.LastMove.X-e.clientX)<2)return;var chartMove=this.GetExtendChartByClassName("DragMovePaint");if(chartMove&&chartMove.Chart){var pixelTatio=GetDevicePixelRatio();var x=(e.clientX-this.UIElement.getBoundingClientRect().left)*pixelTatio;var y=(e.clientY-this.UIElement.getBoundingClientRect().top)*pixelTatio;chartMove.Chart.Point={X:x,Y:y};chartMove.Chart.IsShow=true;chartMove.Chart.Info=this.IndexChartDrag.Info;this.DrawDynamicInfo();}this.IndexChartDrag.LastMove.X=x;this.IndexChartDrag.LastMove.Y=y;drag.LastMove.X=e.clientX;drag.LastMove.Y=e.clientY;}else if(this.CustomChartDrag){var pixelTatio=GetDevicePixelRatio();var x=(e.clientX-this.UIElement.getBoundingClientRect().left)*pixelTatio;var y=(e.clientY-this.UIElement.getBoundingClientRect().top)*pixelTatio;var sendData={X:x,Y:y,e:e,ChartDrag:this.CustomChartDrag,Drag:drag};this.TryDragMove_CustomChartDrag(sendData);}else if(this.CurrentChartDrawPicture){var drawPicture=this.CurrentChartDrawPicture;if(drawPicture.Status==1||drawPicture.Status==2){if(Math.abs(drag.LastMove.X-e.clientX)<5&&Math.abs(drag.LastMove.Y-e.clientY)<5)return;if(this.SetChartDrawPictureSecondPoint(e.clientX,e.clientY)){this.DrawDynamicInfo();}}else if(drawPicture.Status==3){if(this.SetChartDrawPictureThirdPoint(e.clientX,e.clientY)){this.DrawDynamicInfo();}}else if(drawPicture.Status==20)//画图工具移动
1795
1797
  {if(Math.abs(drag.LastMove.X-e.clientX)<5&&Math.abs(drag.LastMove.Y-e.clientY)<1)return;if(this.SelectChartDrawPicture){if(this.SelectChartDrawPicture.EnableCtrlMove){if(!e.ctrlKey)return;}}if(this.SelectChartDrawPicture&&this.SelectChartDrawPicture.DragInfo)this.SelectChartDrawPicture.DragInfo.Move={X:e.clientX,Y:e.client};if(this.MoveChartDrawPicture(e.clientX-drag.LastMove.X,e.clientY-drag.LastMove.Y,false,drag)){this.DrawDynamicInfo();}}drag.LastMove.X=e.clientX;drag.LastMove.Y=e.clientY;}else if(this.DragMode==1||isDragSelectRect||isDragSubSelectRect)//数据上下左右拖拽
1796
1798
  {this.OnDragMode_One({X:moveSetp,Y:moveSetpY},e);}else if(this.DragMode==2)//区间选择
@@ -2580,9 +2582,10 @@ this.Buttons=[];this.CloseButton=CloneData(g_JSChartResource.Buttons.CloseOverla
2580
2582
  this.TitleColor=g_JSChartResource.OverlayFrame.TitleColor;this.TitleFont=g_JSChartResource.OverlayFrame.TitleFont;}};this.Draw=function(){this.Buttons=[];if(this.ChartBorder.IsShowTitleOnly)return;this.SplitXYCoordinate();if(this.IsShow){this.DrawVertical();this.DrawHorizontal();this.DrawTitle();}this.SizeChange=false;this.XYSplit=false;this.XSplit=false;};//Y轴刻度线 x坐标
2581
2583
  this.GetXHorizontal=function(){var border=this.ChartBorder.GetBorder();var x=border.Right;x+=this.RightOffset;if(this.Style==1){}else{x+=this.BlankWidth;}return x;};this.GetHorizontalWidth=function(){var width=null;if(this.YRightTextInfo&&IFrameSplitOperator.IsNumber(this.TextWidthIndex))width=this.YRightTextInfo.AryOverlayWidth[this.TextWidthIndex];return width;};this.DrawTitle=function()//画标题
2582
2584
  {if(!this.IsShowTitle)return;if(!this.Title)return;var border=this.ChartBorder.GetBorder();var top=this.ChartBorder.GetTopTitle();var bottom=border.Bottom;var xText=this.GetXHorizontal();var leftLine=null,rightLine=null;if(IFrameSplitOperator.IsNonEmptyArray(this.YLineExtend)){rightLine=this.YLineExtend[1];leftLine=this.YLineExtend[0];}if(this.Style==1){this.Canvas.textBaseline="bottom";if(rightLine&&rightLine.Width>0)xText+=rightLine.Width+1;else xText+=1;}else{this.Canvas.textBaseline="top";if(leftLine&&leftLine.Width>0)xText-=leftLine.Width;else xText-=2;}var yText=top+(bottom-top)/2;this.Canvas.fillStyle=this.TitleColor;this.Canvas.font=this.TitleFont;this.Canvas.textAlign="center";this.Canvas.save();this.Canvas.translate(xText,yText);this.Canvas.rotate(90*Math.PI/180);this.Canvas.fillText(this.Title,0,0);this.Canvas.restore();};this.GetScaleTextWidth=function(){if(!this.IsShow)return null;var border=this.ChartBorder.GetBorder();var pixelTatio=GetDevicePixelRatio();//获取设备的分辨率
2583
- if(this.IsHScreen){var borderBottom=this.ChartBorder.Bottom;var isDrawRight=borderBottom>10*pixelTatio&&this.IsShowYText[1]===true&&this.YTextPosition[1]!=2;}else{var borderRight=this.ChartBorder.Right;var isDrawRight=borderRight>10&&this.IsShowYText[1]===true&&this.YTextPosition[1]!=2;}if(!isDrawRight)return null;var width={Left:null,Right:0};for(var i=0;i<this.HorizontalInfo.length;++i){var textWidth=null;var item=this.HorizontalInfo[i];if(!item)continue;if(item.Message[1]!=null&&isDrawRight){if(item.Font!=null)this.Canvas.font=item.Font;textWidth=this.Canvas.measureText(item.Message[1]).width;if(this.YTextPadding&&IFrameSplitOperator.IsNumber(this.YTextPadding[1]))textWidth+=this.YTextPadding[1];if(width.Right<textWidth)width.Right=textWidth;}}if(IFrameSplitOperator.IsNonEmptyArray(this.YLineExtend)){var line=this.YLineExtend[1];if(line&&line.Width>0)width.Right+=line.Width;}return{TextWidth:width};};//分割x,y轴坐标信息
2585
+ if(this.IsHScreen){var borderBottom=this.ChartBorder.Bottom;var isDrawRight=borderBottom>10*pixelTatio&&this.IsShowYText[1]===true&&this.YTextPosition[1]!=2;}else{var borderRight=this.ChartBorder.Right;var isDrawRight=borderRight>10&&this.IsShowYText[1]===true&&this.YTextPosition[1]!=2;}if(!isDrawRight)return null;var width={Left:null,Right:0};for(var i=0;i<this.HorizontalInfo.length;++i){var textWidth=null;var item=this.HorizontalInfo[i];if(!item)continue;if(item.Message[1]!=null&&isDrawRight){if(item.Font!=null)this.Canvas.font=item.Font;textWidth=this.Canvas.measureText(item.Message[1]).width;if(this.YTextPadding&&IFrameSplitOperator.IsNumber(this.YTextPadding[1]))textWidth+=this.YTextPadding[1];if(width.Right<textWidth)width.Right=textWidth;}}if(IFrameSplitOperator.IsNonEmptyArray(this.YLineExtend)){var line=this.YLineExtend[1];if(line&&line.Width>0)width.Right+=line.Width;}return{TextWidth:width};};//同步主图坐标
2586
+ this.SyncMainHorizontalInfo=function(){if(!this.MainFrame)return false;if(this.MainFrame.YMaxMin){this.YMaxMin.Max=this.MainFrame.YMaxMin.Max;this.YMaxMin.Min=this.MainFrame.YMaxMin.Min;}this.HorizontalMax=this.MainFrame.HorizontalMax;this.HorizontalMin=this.MainFrame.HorizontalMin;this.HorizontalInfo=[];for(var i=0;i<this.MainFrame.HorizontalInfo.length;++i){var item=this.MainFrame.HorizontalInfo[i];this.HorizontalInfo.push(item);}this.CoordinateType=this.MainFrame.CoordinateType;return true;};//分割x,y轴坐标信息
2584
2587
  this.SplitXYCoordinate=function(){if(this.XYSplit==false)return;if(this.IsShareY)//和主图指标共享Y轴坐标
2585
- {this.HorizontalMax=this.MainFrame.HorizontalMax;this.HorizontalMin=this.MainFrame.HorizontalMin;this.HorizontalInfo=[];for(var i in this.MainFrame.HorizontalInfo){var item=this.MainFrame.HorizontalInfo[i];this.HorizontalInfo.push(item);}this.CoordinateType=this.MainFrame.CoordinateType;}else//独立Y轴坐标
2588
+ {this.SyncMainHorizontalInfo();}else//独立Y轴坐标
2586
2589
  {if(this.YSplitOperator!=null)this.YSplitOperator.Operator();}// if (this.XSplitOperator!=null) this.XSplitOperator.Operator(); 子坐标和主坐标X轴一致 所以不用计算
2587
2590
  };//画Y轴
2588
2591
  this.DrawHorizontal=function(){var border=this.ChartBorder.GetBorder();var left=border.Left;var right=border.Right;var bottom=border.Bottom;var top=this.ChartBorder.GetTopTitle();var borderRight=this.ChartBorder.Right;right+=this.RightOffset;var xLine=this.GetXHorizontal();if(IFrameSplitOperator.IsNumber(this.BlankWidth))right+=this.BlankWidth;var rightExtendText=null;//右侧文字设置
@@ -2834,7 +2837,8 @@ this.DrawHorizontal=function(){}/*
2834
2837
  this.UpdateFrameMaxMin=function()//调整坐标最大 最小值
2835
2838
  {var value={Max:null,Min:null};if(this.Frame.IsShareY)//共享Y轴坐标
2836
2839
  {this.Frame.XYSplit=true;return;}if(this.Frame.YSpecificMaxMin)//固定坐标
2837
- {value.Max=this.Frame.YSpecificMaxMin.Max;value.Min=this.Frame.YSpecificMaxMin.Min;}else{for(var i in this.ChartPaint){var paint=this.ChartPaint[i];var range=paint.GetMaxMin();if(IFrameSplitOperator.IsNumber(range.Max)){if(value.Max==null||value.Max<range.Max)value.Max=range.Max;}if(IFrameSplitOperator.IsNumber(range.Min)){if(value.Min==null||value.Min>range.Min)value.Min=range.Min;}}}if(value.Max!=null&&value.Min!=null){this.Frame.HorizontalMax=value.Max;this.Frame.HorizontalMin=value.Min;this.Frame.XYSplit=true;}};}//行情框架
2840
+ {value.Max=this.Frame.YSpecificMaxMin.Max;value.Min=this.Frame.YSpecificMaxMin.Min;}else{for(var i=0;i<this.ChartPaint.length;++i){var paint=this.ChartPaint[i];if(paint.IsShow==false)continue;//隐藏的图形不计算
2841
+ var range=paint.GetMaxMin();if(range==null||range.Max==null||range.Min==null)continue;if(IFrameSplitOperator.IsNumber(range.Max)){if(value.Max==null||value.Max<range.Max)value.Max=range.Max;}if(IFrameSplitOperator.IsNumber(range.Min)){if(value.Min==null||value.Min>range.Min)value.Min=range.Min;}}}if(!IFrameSplitOperator.IsNumber(this.Frame.YMaxMin.Max)||this.Frame.YMaxMin.Max!=value.Max){this.Frame.YMaxMin.Max=value.Max;this.Frame.XYSplit=true;}if(!IFrameSplitOperator.IsNumber(this.Frame.YMaxMin.Min)||this.Frame.YMaxMin.Min!=value.Min){this.Frame.YMaxMin.Min=value.Min;this.Frame.XYSplit=true;}if(this.Frame.XYSplit){var max=10,min=0;if(value.Max!=null)max=value.Max;if(value.Min!=null)min=value.Min;this.Frame.HorizontalMax=max;this.Frame.HorizontalMin=min;}else{this.Frame.XYSplit=true;}};}//行情框架
2838
2842
  function HQTradeFrame(){this.SubFrame=new Array();//SubFrameItem 数组
2839
2843
  this.SizeChange=true;//大小是否改变
2840
2844
  this.ChartBorder;this.Canvas;//画布
@@ -2850,7 +2854,7 @@ this.FixedRightWidth={Main:60,Overlay:80};this.ZoomWindowsInfo=null;//附图指
2850
2854
  this.ZoomStartWindowIndex=1;//允许缩放窗口起始位置
2851
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();//缩小的时候 小于最小高度 不处理
2852
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轴分割
2853
- {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 in subFrame.OverlayIndex){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)//清空上下拖拽的数据
2854
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轴刻度文字, 线段保留
2855
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)//还原
2856
2860
  {return this.RestoreIndexWindows();}else//放大
@@ -2865,8 +2869,11 @@ var minValue=frame.HorizontalMin;frame.YSplitOperator.Operator();var value=frame
2865
2869
  //frame.HorizontalMax=maxValue;
2866
2870
  //frame.HorizontalMin=minValue;
2867
2871
  if(value&&value.TextWidth){var widthItem=value.TextWidth;if(IFrameSplitOperator.IsNumber(widthItem.Left)){if(width.Left==null||width.Left<widthItem.Left)width.Left=widthItem.Left;}if(IFrameSplitOperator.IsNumber(widthItem.Right)){if(width.Right==null||width.Right<widthItem.Right)width.Right=widthItem.Right;}}//右侧叠加指标
2868
- if(IFrameSplitOperator.IsNonEmptyArray(item.OverlayIndex)){for(var j=0,k=0;j<item.OverlayIndex.length;++j){var overlayItem=item.OverlayIndex[j];if(!overlayItem.Frame)continue;var maxValue=overlayItem.Frame.HorizontalMax;//最大最小要还原
2869
- var minValue=overlayItem.Frame.HorizontalMin;overlayItem.Frame.YSplitOperator.Operator();var value=overlayItem.Frame.GetScaleTextWidth();overlayItem.Frame.HorizontalMax=maxValue;overlayItem.Frame.HorizontalMin=minValue;overlayItem.RightWidth={Index:-1,Width:0};if(!value||!value.TextWidth)continue;var widthItem=value.TextWidth;if(!IFrameSplitOperator.IsNumber(widthItem.Right))continue;overlayItem.RightWidth.Index=k;overlayItem.RightWidth.Width=widthItem.Right;if(aryOverlayWidth[k]){aryOverlayWidth[k][i]=overlayItem.RightWidth;}else{aryOverlayWidth[k]=[];aryOverlayWidth[k][i]=overlayItem.RightWidth;}++k;}}}var overlayWidth=[];for(var i=0;i<aryOverlayWidth.length;++i){var colItem=aryOverlayWidth[i];var max=0;for(var j=0;j<colItem.length;++j){if(!colItem[j])continue;var item=colItem[j].Width;if(max<item)max=item;}if(max>0)max+=this.OverlayBlankWidth;for(var j=0;j<colItem.length;++j){if(!colItem[j])continue;colItem[j].Width=max;}overlayWidth[i]=max;}for(var i=0;i<overlayWidth.length;++i){var value=overlayWidth[i];if(!IFrameSplitOperator.IsNumber(value))continue;width.OverlayRight+=value;}width.AryOverlayWidth=overlayWidth;return width;};this.IsFrameXYSplit=function(){for(var i in this.SubFrame){var item=this.SubFrame[i];if(item.Frame.XYSplit)return true;for(var j=0;j<item.OverlayIndex.length;++j){var overlayItem=item.OverlayIndex[j];if(overlayItem.Frame.XYSplit)return true;}}return false;};this.Draw=function(option){if(this.SizeChange===true){this.CalculateChartBorder();}var isSplash=false;//是否过场动画
2872
+ if(IFrameSplitOperator.IsNonEmptyArray(item.OverlayIndex)){for(var j=0,k=0;j<item.OverlayIndex.length;++j){var overlayItem=item.OverlayIndex[j];if(!overlayItem.Frame)continue;if(overlayItem.Frame.IsShareY){if(overlayItem.Frame.SyncMainHorizontalInfo)overlayItem.Frame.SyncMainHorizontalInfo();var value=overlayItem.Frame.GetScaleTextWidth();}else{var maxValue=overlayItem.Frame.HorizontalMax;//最大最小要还原
2873
+ var minValue=overlayItem.Frame.HorizontalMin;overlayItem.Frame.YSplitOperator.Operator();var value=overlayItem.Frame.GetScaleTextWidth();//数据原始范围存储在YMaxMin, 不需要还原HorizontalMax,HorizontalMin
2874
+ //overlayItem.Frame.HorizontalMax=maxValue;
2875
+ //overlayItem.Frame.HorizontalMin=minValue;
2876
+ }overlayItem.RightWidth={Index:-1,Width:0};if(!value||!value.TextWidth)continue;var widthItem=value.TextWidth;if(!IFrameSplitOperator.IsNumber(widthItem.Right))continue;overlayItem.RightWidth.Index=k;overlayItem.RightWidth.Width=widthItem.Right;if(aryOverlayWidth[k]){aryOverlayWidth[k][i]=overlayItem.RightWidth;}else{aryOverlayWidth[k]=[];aryOverlayWidth[k][i]=overlayItem.RightWidth;}++k;}}}var overlayWidth=[];for(var i=0;i<aryOverlayWidth.length;++i){var colItem=aryOverlayWidth[i];var max=0;for(var j=0;j<colItem.length;++j){if(!colItem[j])continue;var item=colItem[j].Width;if(max<item)max=item;}if(max>0)max+=this.OverlayBlankWidth;for(var j=0;j<colItem.length;++j){if(!colItem[j])continue;colItem[j].Width=max;}overlayWidth[i]=max;}for(var i=0;i<overlayWidth.length;++i){var value=overlayWidth[i];if(!IFrameSplitOperator.IsNumber(value))continue;width.OverlayRight+=value;}width.AryOverlayWidth=overlayWidth;return width;};this.IsFrameXYSplit=function(){for(var i in this.SubFrame){var item=this.SubFrame[i];if(item.Frame.XYSplit)return true;for(var j=0;j<item.OverlayIndex.length;++j){var overlayItem=item.OverlayIndex[j];if(overlayItem.Frame.XYSplit)return true;}}return false;};this.Draw=function(option){if(this.SizeChange===true){this.CalculateChartBorder();}var isSplash=false;//是否过场动画
2870
2877
  if(option&&option.IsEnableSplash===true)isSplash=true;if(isSplash==false&&(this.AutoLeftBorder||this.AutoRightBorder)&&this.IsFrameXYSplit()){this.AutoRightOverlayWidth=[];var textWidth=this.GetScaleTextWidth();var bSizeChange=false;if(IFrameSplitOperator.IsNumber(textWidth.Left)&&this.AutoLeftBorder){var blank=0;if(IFrameSplitOperator.IsNumber(this.AutoLeftBorder.Blank))blank=this.AutoLeftBorder.Blank;var value=textWidth.Left+blank;if(IFrameSplitOperator.IsNumber(this.AutoLeftBorder.MinWidth)){if(this.AutoLeftBorder.MinWidth>value)value=this.AutoLeftBorder.MinWidth;}if(this.IsHScreen)this.ChartBorder.Top=value;else this.ChartBorder.Left=value;for(var i=0;i<this.SubFrame.length;++i){var item=this.SubFrame[i];if(this.IsHScreen)item.Frame.ChartBorder.Top=value;else item.Frame.ChartBorder.Left=value;}}if(IFrameSplitOperator.IsNumber(textWidth.Right)){if(this.AutoRightBorder)//自动调整右侧间距
2871
2878
  {var rightTextInfo={};var blank=0;if(IFrameSplitOperator.IsNumber(this.AutoRightBorder.Blank))blank=this.AutoRightBorder.Blank;var value=textWidth.Right+blank;if(IFrameSplitOperator.IsNumber(this.AutoRightBorder.MinWidth)){if(this.AutoRightBorder.MinWidth>value)value=this.AutoRightBorder.MinWidth;}this.AuotRightWidth=value;rightTextInfo.MainTextWidth=value;//主图坐标宽度
2872
2879
  if(IFrameSplitOperator.IsNonEmptyArray(textWidth.AryOverlayWidth))rightTextInfo.AryOverlayWidth=textWidth.AryOverlayWidth;if(IFrameSplitOperator.IsPlusNumber(textWidth.OverlayRight)){this.AuotRightWidth=value;value+=textWidth.OverlayRight;}if(this.GetExtendChartRightWidth){var extendWidth=this.GetExtendChartRightWidth();if(this.GetExtendChartByClassName){var finder=this.GetExtendChartByClassName("StockChip");if(finder&&finder.Chart){finder.Chart.Left=value;}}value+=extendWidth;}if(this.IsHScreen){if(this.ChartBorder.Bottom!=value)bSizeChange=true;this.ChartBorder.Bottom=value;}else{if(this.ChartBorder.Right!=value)bSizeChange=true;this.ChartBorder.Right=value;}for(var i=0;i<this.SubFrame.length;++i){var item=this.SubFrame[i];if(this.IsHScreen)item.Frame.ChartBorder.Bottom=value;else item.Frame.ChartBorder.Right=value;item.Frame.ReDrawToolbar=true;item.Frame.YRightTextInfo=rightTextInfo;for(var j=0;j<item.OverlayIndex.length;++j){var overlayItem=item.OverlayIndex[j];overlayItem.Frame.YRightTextInfo=rightTextInfo;}}}else{var rightTextInfo={};rightTextInfo.MainTextWidth=this.FixedRightWidth.Main;if(textWidth.OverlayRight==0)//无叠加直接最右边
@@ -2890,7 +2897,7 @@ this.ResetXYSplit=function(){for(var _i in this.SubFrame){this.SubFrame[_i].Fram
2890
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()//获取当前页显示的数据个数
2891
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个窗口主坐标已经算好了
2892
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;}}};//鼠标是否在边框上
2893
- 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)
2894
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)
2895
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)
2896
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;}};//设置多日分时宽度
@@ -7542,7 +7549,7 @@ this.UpdateWindowIndex=function(index){var bindData=new ChartData();bindData.Dat
7542
7549
  this.UpdateFrameMaxMin();//调整坐标最大 最小值
7543
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);};//更新叠加指标
7544
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);};//修改参数指标
7545
- 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&&dragY.IsOverlay==false){this.CancelZoomUpDownFrameY(dragY);}}var selectedChart;//图形选中
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;//图形选中
7546
7553
  if(this.SelectedChart.EnableSelected){selectedChart=this.PtInChart(x,y);}var dbClickInfo={SelectedChart:selectedChart};this.DBClickEvent(dbClickInfo,e);if(!selectedChart&&this.EnableZoomIndexWindow)//双击放大缩小
7547
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)//清空单击定时器
7548
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()//关闭停止更新
@@ -12913,7 +12920,7 @@ hisData.Symbol=message.symbol;}var stockObj={HQDataType:HQ_DATA_TYPE.KLINE_ID,St
12913
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);};}/********************************************************************************
12914
12921
  * 版本信息输出
12915
12922
  *
12916
- */var HQCHART_VERSION="1.1.12765";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();//把给外界调用的方法暴露出来
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();//把给外界调用的方法暴露出来
12917
12924
  exports.default=(_jsChartInit$jsChartS={jsChartInit:JSChart.Init,jsChartStyle:JSChart.SetStyle,// IsIndexSymbol:IsIndexSymbol,
12918
12925
  // BaseIndex:BaseIndex,
12919
12926
  // ChartLine:ChartLine,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hqchart",
3
- "version": "1.1.12767",
3
+ "version": "1.1.12774",
4
4
  "description": "stock chart",
5
5
  "main": "lib/main.js",
6
6
  "scripts": {
@@ -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 || dragY.IsOverlay==true) return null;
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
  {
@@ -3595,7 +3604,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
3595
3604
  drag.CurrentMove.Y=e.clientY;
3596
3605
  }
3597
3606
 
3598
- if (this.BorderDrag && this.BorderDrag.Index>=0)
3607
+ if (this.BorderDrag && this.BorderDrag.Index>=0) //边框拖动
3599
3608
  {
3600
3609
  if(Math.abs(drag.LastMove.Y-e.clientY)<5) return;
3601
3610
 
@@ -3606,7 +3615,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
3606
3615
  drag.LastMove.X=e.clientX;
3607
3616
  drag.LastMove.Y=e.clientY;
3608
3617
  }
3609
- else if (this.YDrag && this.YDrag.Index>=0)
3618
+ else if (this.YDrag && this.YDrag.Index>=0) //Y轴缩放
3610
3619
  {
3611
3620
  if(moveSetpY<5) return;
3612
3621
 
@@ -14964,6 +14973,7 @@ function OverlayKLineFrame()
14964
14973
  {
14965
14974
  this.Buttons=[];
14966
14975
  if (this.ChartBorder.IsShowTitleOnly) return;
14976
+
14967
14977
  this.SplitXYCoordinate();
14968
14978
 
14969
14979
  if (this.IsShow)
@@ -15094,6 +15104,31 @@ function OverlayKLineFrame()
15094
15104
  return { TextWidth:width };
15095
15105
  }
15096
15106
 
15107
+ //同步主图坐标
15108
+ this.SyncMainHorizontalInfo=function()
15109
+ {
15110
+ if (!this.MainFrame) return false;
15111
+
15112
+ if (this.MainFrame.YMaxMin)
15113
+ {
15114
+ this.YMaxMin.Max=this.MainFrame.YMaxMin.Max;
15115
+ this.YMaxMin.Min=this.MainFrame.YMaxMin.Min;
15116
+ }
15117
+
15118
+ this.HorizontalMax=this.MainFrame.HorizontalMax;
15119
+ this.HorizontalMin=this.MainFrame.HorizontalMin;
15120
+ this.HorizontalInfo=[];
15121
+ for(var i=0;i<this.MainFrame.HorizontalInfo.length; ++i)
15122
+ {
15123
+ var item=this.MainFrame.HorizontalInfo[i];
15124
+ this.HorizontalInfo.push(item);
15125
+ }
15126
+
15127
+ this.CoordinateType=this.MainFrame.CoordinateType;
15128
+
15129
+ return true;
15130
+ }
15131
+
15097
15132
  //分割x,y轴坐标信息
15098
15133
  this.SplitXYCoordinate=function()
15099
15134
  {
@@ -15101,16 +15136,7 @@ function OverlayKLineFrame()
15101
15136
 
15102
15137
  if (this.IsShareY) //和主图指标共享Y轴坐标
15103
15138
  {
15104
- this.HorizontalMax=this.MainFrame.HorizontalMax;
15105
- this.HorizontalMin=this.MainFrame.HorizontalMin;
15106
- this.HorizontalInfo=[];
15107
- for(var i in this.MainFrame.HorizontalInfo)
15108
- {
15109
- var item=this.MainFrame.HorizontalInfo[i];
15110
- this.HorizontalInfo.push(item);
15111
- }
15112
-
15113
- this.CoordinateType=this.MainFrame.CoordinateType;
15139
+ this.SyncMainHorizontalInfo();
15114
15140
  }
15115
15141
  else //独立Y轴坐标
15116
15142
  {
@@ -16388,10 +16414,12 @@ function OverlayIndexItem()
16388
16414
  }
16389
16415
  else
16390
16416
  {
16391
- for(var i in this.ChartPaint)
16417
+ for(var i=0;i<this.ChartPaint.length;++i)
16392
16418
  {
16393
16419
  var paint=this.ChartPaint[i];
16420
+ if (paint.IsShow==false) continue; //隐藏的图形不计算
16394
16421
  var range=paint.GetMaxMin();
16422
+ if (range==null || range.Max==null || range.Min==null) continue;
16395
16423
 
16396
16424
  if (IFrameSplitOperator.IsNumber(range.Max))
16397
16425
  {
@@ -16405,10 +16433,29 @@ function OverlayIndexItem()
16405
16433
  }
16406
16434
  }
16407
16435
 
16408
- if (value.Max!=null && value.Min!=null)
16436
+ if (!IFrameSplitOperator.IsNumber(this.Frame.YMaxMin.Max) || this.Frame.YMaxMin.Max!=value.Max)
16437
+ {
16438
+ this.Frame.YMaxMin.Max=value.Max;
16439
+ this.Frame.XYSplit=true;
16440
+ }
16441
+
16442
+ if (!IFrameSplitOperator.IsNumber(this.Frame.YMaxMin.Min) || this.Frame.YMaxMin.Min!=value.Min)
16443
+ {
16444
+ this.Frame.YMaxMin.Min=value.Min;
16445
+ this.Frame.XYSplit=true;
16446
+ }
16447
+
16448
+ if (this.Frame.XYSplit)
16449
+ {
16450
+ var max=10, min=0;
16451
+ if (value.Max!=null) max=value.Max;
16452
+ if (value.Min!=null) min=value.Min;
16453
+
16454
+ this.Frame.HorizontalMax=max;
16455
+ this.Frame.HorizontalMin=min;
16456
+ }
16457
+ else
16409
16458
  {
16410
- this.Frame.HorizontalMax=value.Max;
16411
- this.Frame.HorizontalMin=value.Min;
16412
16459
  this.Frame.XYSplit=true;
16413
16460
  }
16414
16461
  }
@@ -16509,6 +16556,12 @@ function HQTradeFrame()
16509
16556
 
16510
16557
  var subFrame=this.SubFrame[index];
16511
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
+ }
16512
16565
  var splitOper=frame.YSplitOperator;
16513
16566
 
16514
16567
  if (splitOper.FixedYMaxMin)
@@ -16537,6 +16590,13 @@ function HQTradeFrame()
16537
16590
 
16538
16591
  var subFrame=this.SubFrame[index];
16539
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
+
16540
16600
  var top=frame.ChartBorder.GetTopEx();
16541
16601
  var bottom=frame.ChartBorder.GetBottomEx();
16542
16602
 
@@ -16575,7 +16635,7 @@ function HQTradeFrame()
16575
16635
  splitOper.EnableZoomUpDown=true;
16576
16636
  frame.XYSplit=true;
16577
16637
 
16578
- for(var i in subFrame.OverlayIndex)
16638
+ for(var i=0;i<subFrame.OverlayIndex.length;++i)
16579
16639
  {
16580
16640
  var item=subFrame.OverlayIndex[i];
16581
16641
  if (item.Frame.IsShareY) item.Frame.XYSplit=true;
@@ -16939,14 +16999,25 @@ function HQTradeFrame()
16939
16999
  var overlayItem=item.OverlayIndex[j];
16940
17000
  if (!overlayItem.Frame) continue;
16941
17001
 
16942
- var maxValue=overlayItem.Frame.HorizontalMax; //最大最小要还原
16943
- var minValue=overlayItem.Frame.HorizontalMin;
17002
+ if (overlayItem.Frame.IsShareY)
17003
+ {
17004
+ if (overlayItem.Frame.SyncMainHorizontalInfo)
17005
+ overlayItem.Frame.SyncMainHorizontalInfo();
16944
17006
 
16945
- overlayItem.Frame.YSplitOperator.Operator();
16946
- var value=overlayItem.Frame.GetScaleTextWidth();
16947
-
16948
- overlayItem.Frame.HorizontalMax=maxValue;
16949
- overlayItem.Frame.HorizontalMin=minValue;
17007
+ var value=overlayItem.Frame.GetScaleTextWidth();
17008
+ }
17009
+ else
17010
+ {
17011
+ var maxValue=overlayItem.Frame.HorizontalMax; //最大最小要还原
17012
+ var minValue=overlayItem.Frame.HorizontalMin;
17013
+
17014
+ overlayItem.Frame.YSplitOperator.Operator();
17015
+ var value=overlayItem.Frame.GetScaleTextWidth();
17016
+
17017
+ //数据原始范围存储在YMaxMin, 不需要还原HorizontalMax,HorizontalMin
17018
+ //overlayItem.Frame.HorizontalMax=maxValue;
17019
+ //overlayItem.Frame.HorizontalMin=minValue;
17020
+ }
16950
17021
 
16951
17022
  overlayItem.RightWidth={ Index:-1, Width:0 };
16952
17023
  if (!value || !value.TextWidth) continue;
@@ -17794,6 +17865,22 @@ function HQTradeFrame()
17794
17865
  return split.IsEnableDragY();
17795
17866
  }
17796
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
+
17797
17884
  this.PtInFrameY=function(x,y)
17798
17885
  {
17799
17886
  var rightExtendWith=0;
@@ -71122,7 +71209,7 @@ function KLineChartContainer(uielement,OffscreenElement)
71122
71209
  var x = (e.clientX-this.UIElement.getBoundingClientRect().left)*pixelTatio;
71123
71210
  var y = (e.clientY-this.UIElement.getBoundingClientRect().top)*pixelTatio;
71124
71211
  var dragY=this.Frame.PtInFrameY(x,y);
71125
- if (dragY && dragY.Index>=0 && dragY.IsOverlay==false)
71212
+ if (dragY && dragY.Index>=0)
71126
71213
  {
71127
71214
  this.CancelZoomUpDownFrameY(dragY);
71128
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 || dragY.IsOverlay==true) return null;
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
  {
@@ -7739,7 +7748,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
7739
7748
  drag.CurrentMove.Y=e.clientY;
7740
7749
  }
7741
7750
 
7742
- if (this.BorderDrag && this.BorderDrag.Index>=0)
7751
+ if (this.BorderDrag && this.BorderDrag.Index>=0) //边框拖动
7743
7752
  {
7744
7753
  if(Math.abs(drag.LastMove.Y-e.clientY)<5) return;
7745
7754
 
@@ -7750,7 +7759,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
7750
7759
  drag.LastMove.X=e.clientX;
7751
7760
  drag.LastMove.Y=e.clientY;
7752
7761
  }
7753
- else if (this.YDrag && this.YDrag.Index>=0)
7762
+ else if (this.YDrag && this.YDrag.Index>=0) //Y轴缩放
7754
7763
  {
7755
7764
  if(moveSetpY<5) return;
7756
7765
 
@@ -19108,6 +19117,7 @@ function OverlayKLineFrame()
19108
19117
  {
19109
19118
  this.Buttons=[];
19110
19119
  if (this.ChartBorder.IsShowTitleOnly) return;
19120
+
19111
19121
  this.SplitXYCoordinate();
19112
19122
 
19113
19123
  if (this.IsShow)
@@ -19238,6 +19248,31 @@ function OverlayKLineFrame()
19238
19248
  return { TextWidth:width };
19239
19249
  }
19240
19250
 
19251
+ //同步主图坐标
19252
+ this.SyncMainHorizontalInfo=function()
19253
+ {
19254
+ if (!this.MainFrame) return false;
19255
+
19256
+ if (this.MainFrame.YMaxMin)
19257
+ {
19258
+ this.YMaxMin.Max=this.MainFrame.YMaxMin.Max;
19259
+ this.YMaxMin.Min=this.MainFrame.YMaxMin.Min;
19260
+ }
19261
+
19262
+ this.HorizontalMax=this.MainFrame.HorizontalMax;
19263
+ this.HorizontalMin=this.MainFrame.HorizontalMin;
19264
+ this.HorizontalInfo=[];
19265
+ for(var i=0;i<this.MainFrame.HorizontalInfo.length; ++i)
19266
+ {
19267
+ var item=this.MainFrame.HorizontalInfo[i];
19268
+ this.HorizontalInfo.push(item);
19269
+ }
19270
+
19271
+ this.CoordinateType=this.MainFrame.CoordinateType;
19272
+
19273
+ return true;
19274
+ }
19275
+
19241
19276
  //分割x,y轴坐标信息
19242
19277
  this.SplitXYCoordinate=function()
19243
19278
  {
@@ -19245,16 +19280,7 @@ function OverlayKLineFrame()
19245
19280
 
19246
19281
  if (this.IsShareY) //和主图指标共享Y轴坐标
19247
19282
  {
19248
- this.HorizontalMax=this.MainFrame.HorizontalMax;
19249
- this.HorizontalMin=this.MainFrame.HorizontalMin;
19250
- this.HorizontalInfo=[];
19251
- for(var i in this.MainFrame.HorizontalInfo)
19252
- {
19253
- var item=this.MainFrame.HorizontalInfo[i];
19254
- this.HorizontalInfo.push(item);
19255
- }
19256
-
19257
- this.CoordinateType=this.MainFrame.CoordinateType;
19283
+ this.SyncMainHorizontalInfo();
19258
19284
  }
19259
19285
  else //独立Y轴坐标
19260
19286
  {
@@ -20532,10 +20558,12 @@ function OverlayIndexItem()
20532
20558
  }
20533
20559
  else
20534
20560
  {
20535
- for(var i in this.ChartPaint)
20561
+ for(var i=0;i<this.ChartPaint.length;++i)
20536
20562
  {
20537
20563
  var paint=this.ChartPaint[i];
20564
+ if (paint.IsShow==false) continue; //隐藏的图形不计算
20538
20565
  var range=paint.GetMaxMin();
20566
+ if (range==null || range.Max==null || range.Min==null) continue;
20539
20567
 
20540
20568
  if (IFrameSplitOperator.IsNumber(range.Max))
20541
20569
  {
@@ -20549,10 +20577,29 @@ function OverlayIndexItem()
20549
20577
  }
20550
20578
  }
20551
20579
 
20552
- if (value.Max!=null && value.Min!=null)
20580
+ if (!IFrameSplitOperator.IsNumber(this.Frame.YMaxMin.Max) || this.Frame.YMaxMin.Max!=value.Max)
20581
+ {
20582
+ this.Frame.YMaxMin.Max=value.Max;
20583
+ this.Frame.XYSplit=true;
20584
+ }
20585
+
20586
+ if (!IFrameSplitOperator.IsNumber(this.Frame.YMaxMin.Min) || this.Frame.YMaxMin.Min!=value.Min)
20587
+ {
20588
+ this.Frame.YMaxMin.Min=value.Min;
20589
+ this.Frame.XYSplit=true;
20590
+ }
20591
+
20592
+ if (this.Frame.XYSplit)
20593
+ {
20594
+ var max=10, min=0;
20595
+ if (value.Max!=null) max=value.Max;
20596
+ if (value.Min!=null) min=value.Min;
20597
+
20598
+ this.Frame.HorizontalMax=max;
20599
+ this.Frame.HorizontalMin=min;
20600
+ }
20601
+ else
20553
20602
  {
20554
- this.Frame.HorizontalMax=value.Max;
20555
- this.Frame.HorizontalMin=value.Min;
20556
20603
  this.Frame.XYSplit=true;
20557
20604
  }
20558
20605
  }
@@ -20653,6 +20700,12 @@ function HQTradeFrame()
20653
20700
 
20654
20701
  var subFrame=this.SubFrame[index];
20655
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
+ }
20656
20709
  var splitOper=frame.YSplitOperator;
20657
20710
 
20658
20711
  if (splitOper.FixedYMaxMin)
@@ -20681,6 +20734,13 @@ function HQTradeFrame()
20681
20734
 
20682
20735
  var subFrame=this.SubFrame[index];
20683
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
+
20684
20744
  var top=frame.ChartBorder.GetTopEx();
20685
20745
  var bottom=frame.ChartBorder.GetBottomEx();
20686
20746
 
@@ -20719,7 +20779,7 @@ function HQTradeFrame()
20719
20779
  splitOper.EnableZoomUpDown=true;
20720
20780
  frame.XYSplit=true;
20721
20781
 
20722
- for(var i in subFrame.OverlayIndex)
20782
+ for(var i=0;i<subFrame.OverlayIndex.length;++i)
20723
20783
  {
20724
20784
  var item=subFrame.OverlayIndex[i];
20725
20785
  if (item.Frame.IsShareY) item.Frame.XYSplit=true;
@@ -21083,14 +21143,25 @@ function HQTradeFrame()
21083
21143
  var overlayItem=item.OverlayIndex[j];
21084
21144
  if (!overlayItem.Frame) continue;
21085
21145
 
21086
- var maxValue=overlayItem.Frame.HorizontalMax; //最大最小要还原
21087
- var minValue=overlayItem.Frame.HorizontalMin;
21146
+ if (overlayItem.Frame.IsShareY)
21147
+ {
21148
+ if (overlayItem.Frame.SyncMainHorizontalInfo)
21149
+ overlayItem.Frame.SyncMainHorizontalInfo();
21088
21150
 
21089
- overlayItem.Frame.YSplitOperator.Operator();
21090
- var value=overlayItem.Frame.GetScaleTextWidth();
21091
-
21092
- overlayItem.Frame.HorizontalMax=maxValue;
21093
- overlayItem.Frame.HorizontalMin=minValue;
21151
+ var value=overlayItem.Frame.GetScaleTextWidth();
21152
+ }
21153
+ else
21154
+ {
21155
+ var maxValue=overlayItem.Frame.HorizontalMax; //最大最小要还原
21156
+ var minValue=overlayItem.Frame.HorizontalMin;
21157
+
21158
+ overlayItem.Frame.YSplitOperator.Operator();
21159
+ var value=overlayItem.Frame.GetScaleTextWidth();
21160
+
21161
+ //数据原始范围存储在YMaxMin, 不需要还原HorizontalMax,HorizontalMin
21162
+ //overlayItem.Frame.HorizontalMax=maxValue;
21163
+ //overlayItem.Frame.HorizontalMin=minValue;
21164
+ }
21094
21165
 
21095
21166
  overlayItem.RightWidth={ Index:-1, Width:0 };
21096
21167
  if (!value || !value.TextWidth) continue;
@@ -21938,6 +22009,22 @@ function HQTradeFrame()
21938
22009
  return split.IsEnableDragY();
21939
22010
  }
21940
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
+
21941
22028
  this.PtInFrameY=function(x,y)
21942
22029
  {
21943
22030
  var rightExtendWith=0;
@@ -75266,7 +75353,7 @@ function KLineChartContainer(uielement,OffscreenElement)
75266
75353
  var x = (e.clientX-this.UIElement.getBoundingClientRect().left)*pixelTatio;
75267
75354
  var y = (e.clientY-this.UIElement.getBoundingClientRect().top)*pixelTatio;
75268
75355
  var dragY=this.Frame.PtInFrameY(x,y);
75269
- if (dragY && dragY.Index>=0 && dragY.IsOverlay==false)
75356
+ if (dragY && dragY.Index>=0)
75270
75357
  {
75271
75358
  this.CancelZoomUpDownFrameY(dragY);
75272
75359
  }
@@ -131228,7 +131315,7 @@ function ScrollBarBGChart()
131228
131315
 
131229
131316
 
131230
131317
 
131231
- var HQCHART_VERSION="1.1.12765";
131318
+ var HQCHART_VERSION="1.1.12773";
131232
131319
 
131233
131320
  function PrintHQChartVersion()
131234
131321
  {
@@ -5,7 +5,7 @@
5
5
 
6
6
 
7
7
 
8
- var HQCHART_VERSION="1.1.12765";
8
+ var HQCHART_VERSION="1.1.12773";
9
9
 
10
10
  function PrintHQChartVersion()
11
11
  {
@@ -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 || dragY.IsOverlay==true) return null;
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
  {
@@ -7783,7 +7792,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
7783
7792
  drag.CurrentMove.Y=e.clientY;
7784
7793
  }
7785
7794
 
7786
- if (this.BorderDrag && this.BorderDrag.Index>=0)
7795
+ if (this.BorderDrag && this.BorderDrag.Index>=0) //边框拖动
7787
7796
  {
7788
7797
  if(Math.abs(drag.LastMove.Y-e.clientY)<5) return;
7789
7798
 
@@ -7794,7 +7803,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
7794
7803
  drag.LastMove.X=e.clientX;
7795
7804
  drag.LastMove.Y=e.clientY;
7796
7805
  }
7797
- else if (this.YDrag && this.YDrag.Index>=0)
7806
+ else if (this.YDrag && this.YDrag.Index>=0) //Y轴缩放
7798
7807
  {
7799
7808
  if(moveSetpY<5) return;
7800
7809
 
@@ -19152,6 +19161,7 @@ function OverlayKLineFrame()
19152
19161
  {
19153
19162
  this.Buttons=[];
19154
19163
  if (this.ChartBorder.IsShowTitleOnly) return;
19164
+
19155
19165
  this.SplitXYCoordinate();
19156
19166
 
19157
19167
  if (this.IsShow)
@@ -19282,6 +19292,31 @@ function OverlayKLineFrame()
19282
19292
  return { TextWidth:width };
19283
19293
  }
19284
19294
 
19295
+ //同步主图坐标
19296
+ this.SyncMainHorizontalInfo=function()
19297
+ {
19298
+ if (!this.MainFrame) return false;
19299
+
19300
+ if (this.MainFrame.YMaxMin)
19301
+ {
19302
+ this.YMaxMin.Max=this.MainFrame.YMaxMin.Max;
19303
+ this.YMaxMin.Min=this.MainFrame.YMaxMin.Min;
19304
+ }
19305
+
19306
+ this.HorizontalMax=this.MainFrame.HorizontalMax;
19307
+ this.HorizontalMin=this.MainFrame.HorizontalMin;
19308
+ this.HorizontalInfo=[];
19309
+ for(var i=0;i<this.MainFrame.HorizontalInfo.length; ++i)
19310
+ {
19311
+ var item=this.MainFrame.HorizontalInfo[i];
19312
+ this.HorizontalInfo.push(item);
19313
+ }
19314
+
19315
+ this.CoordinateType=this.MainFrame.CoordinateType;
19316
+
19317
+ return true;
19318
+ }
19319
+
19285
19320
  //分割x,y轴坐标信息
19286
19321
  this.SplitXYCoordinate=function()
19287
19322
  {
@@ -19289,16 +19324,7 @@ function OverlayKLineFrame()
19289
19324
 
19290
19325
  if (this.IsShareY) //和主图指标共享Y轴坐标
19291
19326
  {
19292
- this.HorizontalMax=this.MainFrame.HorizontalMax;
19293
- this.HorizontalMin=this.MainFrame.HorizontalMin;
19294
- this.HorizontalInfo=[];
19295
- for(var i in this.MainFrame.HorizontalInfo)
19296
- {
19297
- var item=this.MainFrame.HorizontalInfo[i];
19298
- this.HorizontalInfo.push(item);
19299
- }
19300
-
19301
- this.CoordinateType=this.MainFrame.CoordinateType;
19327
+ this.SyncMainHorizontalInfo();
19302
19328
  }
19303
19329
  else //独立Y轴坐标
19304
19330
  {
@@ -20576,10 +20602,12 @@ function OverlayIndexItem()
20576
20602
  }
20577
20603
  else
20578
20604
  {
20579
- for(var i in this.ChartPaint)
20605
+ for(var i=0;i<this.ChartPaint.length;++i)
20580
20606
  {
20581
20607
  var paint=this.ChartPaint[i];
20608
+ if (paint.IsShow==false) continue; //隐藏的图形不计算
20582
20609
  var range=paint.GetMaxMin();
20610
+ if (range==null || range.Max==null || range.Min==null) continue;
20583
20611
 
20584
20612
  if (IFrameSplitOperator.IsNumber(range.Max))
20585
20613
  {
@@ -20593,10 +20621,29 @@ function OverlayIndexItem()
20593
20621
  }
20594
20622
  }
20595
20623
 
20596
- if (value.Max!=null && value.Min!=null)
20624
+ if (!IFrameSplitOperator.IsNumber(this.Frame.YMaxMin.Max) || this.Frame.YMaxMin.Max!=value.Max)
20625
+ {
20626
+ this.Frame.YMaxMin.Max=value.Max;
20627
+ this.Frame.XYSplit=true;
20628
+ }
20629
+
20630
+ if (!IFrameSplitOperator.IsNumber(this.Frame.YMaxMin.Min) || this.Frame.YMaxMin.Min!=value.Min)
20631
+ {
20632
+ this.Frame.YMaxMin.Min=value.Min;
20633
+ this.Frame.XYSplit=true;
20634
+ }
20635
+
20636
+ if (this.Frame.XYSplit)
20637
+ {
20638
+ var max=10, min=0;
20639
+ if (value.Max!=null) max=value.Max;
20640
+ if (value.Min!=null) min=value.Min;
20641
+
20642
+ this.Frame.HorizontalMax=max;
20643
+ this.Frame.HorizontalMin=min;
20644
+ }
20645
+ else
20597
20646
  {
20598
- this.Frame.HorizontalMax=value.Max;
20599
- this.Frame.HorizontalMin=value.Min;
20600
20647
  this.Frame.XYSplit=true;
20601
20648
  }
20602
20649
  }
@@ -20697,6 +20744,12 @@ function HQTradeFrame()
20697
20744
 
20698
20745
  var subFrame=this.SubFrame[index];
20699
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
+ }
20700
20753
  var splitOper=frame.YSplitOperator;
20701
20754
 
20702
20755
  if (splitOper.FixedYMaxMin)
@@ -20725,6 +20778,13 @@ function HQTradeFrame()
20725
20778
 
20726
20779
  var subFrame=this.SubFrame[index];
20727
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
+
20728
20788
  var top=frame.ChartBorder.GetTopEx();
20729
20789
  var bottom=frame.ChartBorder.GetBottomEx();
20730
20790
 
@@ -20763,7 +20823,7 @@ function HQTradeFrame()
20763
20823
  splitOper.EnableZoomUpDown=true;
20764
20824
  frame.XYSplit=true;
20765
20825
 
20766
- for(var i in subFrame.OverlayIndex)
20826
+ for(var i=0;i<subFrame.OverlayIndex.length;++i)
20767
20827
  {
20768
20828
  var item=subFrame.OverlayIndex[i];
20769
20829
  if (item.Frame.IsShareY) item.Frame.XYSplit=true;
@@ -21127,14 +21187,25 @@ function HQTradeFrame()
21127
21187
  var overlayItem=item.OverlayIndex[j];
21128
21188
  if (!overlayItem.Frame) continue;
21129
21189
 
21130
- var maxValue=overlayItem.Frame.HorizontalMax; //最大最小要还原
21131
- var minValue=overlayItem.Frame.HorizontalMin;
21190
+ if (overlayItem.Frame.IsShareY)
21191
+ {
21192
+ if (overlayItem.Frame.SyncMainHorizontalInfo)
21193
+ overlayItem.Frame.SyncMainHorizontalInfo();
21132
21194
 
21133
- overlayItem.Frame.YSplitOperator.Operator();
21134
- var value=overlayItem.Frame.GetScaleTextWidth();
21135
-
21136
- overlayItem.Frame.HorizontalMax=maxValue;
21137
- overlayItem.Frame.HorizontalMin=minValue;
21195
+ var value=overlayItem.Frame.GetScaleTextWidth();
21196
+ }
21197
+ else
21198
+ {
21199
+ var maxValue=overlayItem.Frame.HorizontalMax; //最大最小要还原
21200
+ var minValue=overlayItem.Frame.HorizontalMin;
21201
+
21202
+ overlayItem.Frame.YSplitOperator.Operator();
21203
+ var value=overlayItem.Frame.GetScaleTextWidth();
21204
+
21205
+ //数据原始范围存储在YMaxMin, 不需要还原HorizontalMax,HorizontalMin
21206
+ //overlayItem.Frame.HorizontalMax=maxValue;
21207
+ //overlayItem.Frame.HorizontalMin=minValue;
21208
+ }
21138
21209
 
21139
21210
  overlayItem.RightWidth={ Index:-1, Width:0 };
21140
21211
  if (!value || !value.TextWidth) continue;
@@ -21982,6 +22053,22 @@ function HQTradeFrame()
21982
22053
  return split.IsEnableDragY();
21983
22054
  }
21984
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
+
21985
22072
  this.PtInFrameY=function(x,y)
21986
22073
  {
21987
22074
  var rightExtendWith=0;
@@ -75310,7 +75397,7 @@ function KLineChartContainer(uielement,OffscreenElement)
75310
75397
  var x = (e.clientX-this.UIElement.getBoundingClientRect().left)*pixelTatio;
75311
75398
  var y = (e.clientY-this.UIElement.getBoundingClientRect().top)*pixelTatio;
75312
75399
  var dragY=this.Frame.PtInFrameY(x,y);
75313
- if (dragY && dragY.Index>=0 && dragY.IsOverlay==false)
75400
+ if (dragY && dragY.Index>=0)
75314
75401
  {
75315
75402
  this.CancelZoomUpDownFrameY(dragY);
75316
75403
  }
@@ -131386,7 +131473,7 @@ function HQChartScriptWorker()
131386
131473
 
131387
131474
 
131388
131475
 
131389
- var HQCHART_VERSION="1.1.12765";
131476
+ var HQCHART_VERSION="1.1.12773";
131390
131477
 
131391
131478
  function PrintHQChartVersion()
131392
131479
  {