hqchart 1.1.12685 → 1.1.12687
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
|
@@ -1852,8 +1852,10 @@ if(this.CurrentChartDrawPicture){var drawPicture=this.CurrentChartDrawPicture;if
|
|
|
1852
1852
|
}else if(this.DragMode==1||isMoveCorssCursor==false)//数据左右拖拽
|
|
1853
1853
|
{if((moveUpDown>0&&moveSetp<=3||moveAngle<=this.TouchMoveMinAngle)&&this.EnableScrollUpDown==true){this.StopDragTimer();return;}if(moveSetp<5||moveAngle<=this.TouchMoveMinAngle){this.PreventTouchEvent(e);return;}if(this.EnableVerticalDrag){if(!this.VerticalDrag)return;if(!this.VerticalDrag.IsDrag)return;}var isLeft=true;if(drag.LastMove.X<touches[0].clientX)isLeft=false;//右移数据
|
|
1854
1854
|
var oneStepWidth=this.GetMoveOneStepWidth();if(moveSetp<oneStepWidth)return;if(this.DataMove(moveSetp,isLeft)){this.UpdataDataoffset();this.UpdatePointByCursorIndex();this.UpdateFrameMaxMin();this.ResetFrameXYSplit();this.Draw();this.OnKLinePageChange("OnTouchMove");}else{if(this.DragDownloadData)this.DragDownloadData();}drag.LastMove.X=touches[0].clientX;drag.LastMove.Y=touches[0].clientY;}}if(this.PhoneTouchInfo){this.PhoneTouchInfo.End.X=touches[0].clientX;this.PhoneTouchInfo.End.Y=touches[0].clientY;}}else if(this.IsPhonePinching(e)){if(this.DragMode==JSCHART_DRAG_ID.DISABLE_DRAG_ID)return;this.PreventTouchEvent(e);var phonePinch=this.PhonePinch;if(!phonePinch)return;phonePinch.Operator=null;if(this.EnableZoomUpDown&&this.EnableZoomUpDown.Touch===false)return;var yHeight=Math.abs(touches[0].pageY-touches[1].pageY);var yLastHeight=Math.abs(phonePinch.Last.Y-phonePinch.Last.Y2);var yStep=yHeight-yLastHeight;var xHeight=Math.abs(touches[0].pageX-touches[1].pageX);var xLastHeight=Math.abs(phonePinch.Last.X-phonePinch.Last.X2);var xStep=xHeight-xLastHeight;var minStep=this.ZoomStepPixel;if(Math.abs(yStep)<minStep&&Math.abs(xStep)<minStep)return;var step=yStep;if(Math.abs(yStep)<minStep)step=xStep;if(step>0)//放大
|
|
1855
|
-
{var cursorIndex={IsLockRight:this.IsZoomLockRight};cursorIndex.Index=parseInt(Math.abs(this.CursorIndex-0.5).toFixed(0));if(!this.Frame.ZoomUp(cursorIndex))return;phonePinch.Operator="ZoomUp";this.CursorIndex=cursorIndex.Index;this.UpdatePointByCursorIndex();this.UpdataDataoffset();this.UpdateFrameMaxMin()
|
|
1856
|
-
|
|
1855
|
+
{var cursorIndex={IsLockRight:this.IsZoomLockRight};cursorIndex.Index=parseInt(Math.abs(this.CursorIndex-0.5).toFixed(0));if(!this.Frame.ZoomUp(cursorIndex))return;phonePinch.Operator="ZoomUp";this.CursorIndex=cursorIndex.Index;this.UpdatePointByCursorIndex();this.UpdataDataoffset();this.UpdateFrameMaxMin();//this.ResetFrameXSplit();
|
|
1856
|
+
this.Draw();this.ShowTooltipByKeyDown();this.StopDragTimer();}else//缩小
|
|
1857
|
+
{var cursorIndex={IsLockRight:this.IsZoomLockRight};cursorIndex.Index=parseInt(Math.abs(this.CursorIndex-0.5).toFixed(0));if(!this.Frame.ZoomDown(cursorIndex))return;phonePinch.Operator="ZoomDown";this.CursorIndex=cursorIndex.Index;this.UpdataDataoffset();this.UpdatePointByCursorIndex();this.UpdateFrameMaxMin();//this.ResetFrameXSplit();
|
|
1858
|
+
this.Draw();this.ShowTooltipByKeyDown();this.StopDragTimer();}phonePinch.Last={X:touches[0].pageX,Y:touches[0].pageY,X2:touches[1].pageX,Y2:touches[1].pageY};}this.PreventTouchEvent(e);};this.OnTouchEnd=function(e){JSConsole.Chart.Log('[KLineChartContainer:OnTouchEnd]',e);if(this.ChartSplashPaint&&this.ChartSplashPaint.IsEnableSplash==true)return;var bClearDrawPicture=true;if(this.CurrentChartDrawPicture){var drawPicture=this.CurrentChartDrawPicture;if(drawPicture.Status==2||drawPicture.Status==1||drawPicture.Status==3){drawPicture.PointStatus=drawPicture.Status;if(this.FinishChartDrawPicturePoint())this.DrawDynamicInfo();else bClearDrawPicture=false;}else if(drawPicture.Status==20){if(this.FinishMoveChartDrawPicture())this.DrawDynamicInfo();}}if(this.EnableZoomIndexWindow){var time=Date.now();this.PhoneDBClick.AddTouchEnd(time);if(this.PhoneDBClick.IsVaildDBClick()){this.OnTouchDBClick(this.PhoneDBClick.Start);this.PhoneDBClick.Clear();}}this.IsOnTouch=false;this.VerticalDrag=null;if(bClearDrawPicture===true)this.CurrentChartDrawPicture=null;this.StopDragTimer();this.TouchEvent({EventID:JSCHART_EVENT_ID.ON_PHONE_TOUCH,FunctionName:"OnTouchEnd"},e);this.OnTouchFinished();this.TouchDrawCount=0;this.PhonePinch=null;};this.OnTouchDBClick=function(points){var pt=this.PointAbsoluteToRelative(points[0].X,points[0].Y,true);var x=pt.X,y=pt.Y;JSConsole.Chart.Log('[KLineChartContainer:OnTouchDBClick] Phone dbclick absolute ['+x+','+y+'], soruce ['+points[0].X+','+points[0].Y+']');var frameId=this.Frame.PtInFrame(x,y);JSConsole.Chart.Log("[KLineChartContainer::OnTouchDBClick] frameId",frameId);if(frameId>=this.Frame.ZoomStartWindowIndex){if(this.ZoomIndexWindow(frameId,{X:x,Y:y})){this.Frame.SetSizeChage(true);this.Draw();return true;}}};//手势事件
|
|
1857
1859
|
this.TouchEvent=function(obj,e){var eventID=obj.EventID;var event=this.GetEventCallback(eventID);if(!event||!event.Callback)return false;var drag=this.PhoneTouchInfo;if(!drag||!drag.Start||!drag.End)return false;var pixelTatio=GetDevicePixelRatio();var clientX=drag.End.X/pixelTatio;var clientY=drag.End.Y/pixelTatio;var x=drag.End.X-this.UIElement.getBoundingClientRect().left*pixelTatio;var y=drag.End.Y-this.UIElement.getBoundingClientRect().top*pixelTatio;var data={X:clientX,Y:clientY,FrameID:-1,FunctionName:obj.FunctionName,Drag:{Start:{X:drag.Start.X/pixelTatio,Y:drag.Start.Y/pixelTatio},End:{X:drag.End.X/pixelTatio,Y:drag.End.Y/pixelTatio}}};var isInClient=false;this.Canvas.beginPath();this.Canvas.rect(this.Frame.ChartBorder.GetLeft(),this.Frame.ChartBorder.GetTop(),this.Frame.ChartBorder.GetWidth(),this.Frame.ChartBorder.GetHeight());isInClient=this.Canvas.isPointInPath(x,y);if(isInClient){if(this.Frame&&this.Frame.IsHScreen){var yValueExtend={};var yValue=this.Frame.GetYData(x,yValueExtend);if(IFrameSplitOperator.IsNumber(yValueExtend.FrameID)&&yValueExtend.FrameID>=0){var xValue=this.Frame.GetXData(y);data.FrameID=yValueExtend.FrameID;data.Data={X:xValue,Y:yValue};}}else{var yValueExtend={};var yValue=this.Frame.GetYData(y,yValueExtend);if(IFrameSplitOperator.IsNumber(yValueExtend.FrameID)&&yValueExtend.FrameID>=0){var xValue=this.Frame.GetXData(x);data.FrameID=yValueExtend.FrameID;data.Data={X:xValue,Y:yValue};}}}event.Callback(event,data,this);return true;};this.MoveCorssCursor=function(point,e){var pixelTatio=GetDevicePixelRatio();var x=point.X-this.UIElement.getBoundingClientRect().left*pixelTatio;var y=point.Y-this.UIElement.getBoundingClientRect().top*pixelTatio;if(this.DragMode==JSCHART_DRAG_ID.CLICK_TOUCH_MODE_ID)this.TouchStatus.CorssCursorShow=true;//十字显示
|
|
1858
1860
|
this.OnMouseMove(x,y,e,true);};this.DrawEmpty=function(){if(this.UIElement.width<=0||this.UIElement.height<=0)return;this.Canvas.clearRect(0,0,this.UIElement.width,this.UIElement.height);if(this.Frame){this.Frame.ScreenImageData=null;this.Frame.Draw();}};this.PtInChart=function(x,y){var result=null;for(var i=0;i<this.ChartPaint.length;++i){var item=this.ChartPaint[i];if(!item.PtInChart)continue;if(item.IsHideScriptIndex())continue;result=item.PtInChart(x,y);if(result)return result;}for(var i=0;i<this.OverlayChartPaint.length;++i){var item=this.OverlayChartPaint[i];if(!item.PtInChart)continue;result=item.PtInChart(x,y);if(result)return result;}if(this.Frame.PtInOveralyChart){result=this.Frame.PtInOveralyChart(x,y);if(result)return result;}return null;};//绘制选中图形的状态
|
|
1859
1861
|
this.DrawSelectedStatus=function(){if(!this.SelectedChart.MoveOn.Identify&&!this.SelectedChart.Selected.Identify)return;for(var i=0;i<this.ChartPaint.length;++i){var item=this.ChartPaint[i];if(!item.Identify)continue;if(item.Identify!=this.SelectedChart.MoveOn.Identify&&item.Identify!=this.SelectedChart.Selected.Identify)continue;if(item.DrawSelectedStatus)item.DrawSelectedStatus();}for(var i=0;i<this.OverlayChartPaint.length;++i){var item=this.OverlayChartPaint[i];if(!item.Identify)continue;if(item.Identify!=this.SelectedChart.MoveOn.Identify&&item.Identify!=this.SelectedChart.Selected.Identify)continue;if(item.DrawSelectedStatus)item.DrawSelectedStatus();}for(var i=0;i<this.OverlayChartPaint.length;++i){var item=this.OverlayChartPaint[i];if(!item.Identify)continue;if(item.Identify!=this.SelectedChart.MoveOn.Identify&&item.Identify!=this.SelectedChart.Selected.Identify)continue;if(item.DrawSelectedStatus)item.DrawSelectedStatus();}if(this.Frame.DrawOveralySelectedStatus)this.Frame.DrawOveralySelectedStatus(this.SelectedChart);};this.SetCanvas=function(canvas){if(this.Frame){var subFrame=this.Frame.SubFrame;for(var i=0;i<subFrame.length;++i){var item=subFrame[i];item.Frame.Canvas=canvas;//框架
|
|
@@ -1979,7 +1981,7 @@ SingleOverlay:[]//独立坐标
|
|
|
1979
1981
|
item.OverlayFrame.push(overlayFrame);for(var k=0;k<overlayItem.ChartPaint.length;++k){var chart=overlayItem.ChartPaint[k];item.ChartPaint.push(chart);}}else{item.SingleOverlay.push(overlayItem);}}mapFrame.set(key,item);}for(var i=0;i<this.ChartPaint.length;++i){var chart=this.ChartPaint[i];var key=chart.ChartFrame.Identify;if(!mapFrame.has(key))continue;var finder=mapFrame.get(key);finder.ChartPaint.push(chart);}for(var i=0;i<this.OverlayChartPaint.length;++i){var chart=this.OverlayChartPaint[i];if(!chart.ChartFrame)continue;var key=chart.ChartFrame.Identify;if(!mapFrame.has(key))continue;var finder=mapFrame.get(key);finder.ChartPaint.push(chart);}var _iteratorNormalCompletion3=true;var _didIteratorError3=false;var _iteratorError3=undefined;try{for(var _iterator3=(0,_getIterator3.default)(mapFrame),_step3;!(_iteratorNormalCompletion3=(_step3=_iterator3.next()).done);_iteratorNormalCompletion3=true){var mapItem=_step3.value;var item=mapItem[1];var frame=item.Frame;//计算主框架最大最小
|
|
1980
1982
|
for(var i=0;i<item.ChartPaint.length;++i){var chart=item.ChartPaint[i];if(chart.IsShow==false)continue;//隐藏的图形不计算
|
|
1981
1983
|
if(chart.NotSupportMessage)continue;if(!chart.ChartFrame)continue;var range=chart.GetMaxMin();if(range==null||range.Max==null||range.Min==null)continue;if(item.Max==null||item.Max<range.Max)item.Max=range.Max;if(item.Min==null||item.Min>range.Min)item.Min=range.Min;}if(item.Frame.YSpecificMaxMin)//固定坐标
|
|
1982
|
-
{item.Min=item.Frame.YSpecificMaxMin.Max;item.Max=item.Frame.YSpecificMaxMin.Min;}if(!IFrameSplitOperator.IsNumber(frame.YMaxMin.Max)||frame.YMaxMin.Max!=item.Max){frame.YMaxMin.Max=item.Max;frame.XYSplit=true;}if(!IFrameSplitOperator.IsNumber(frame.YMaxMin.Min)||frame.YMaxMin.Min!=item.Min){frame.YMaxMin.Min=item.Min;frame.XYSplit=true;}if(frame.XYSplit){var max=10,min=0;if(item.Max!=null)max=item.Max;if(item.Min!=null)min=item.Min;frame.HorizontalMax=max;frame.HorizontalMin=min;}//共享Y轴叠加指标同步下坐标
|
|
1984
|
+
{item.Min=item.Frame.YSpecificMaxMin.Max;item.Max=item.Frame.YSpecificMaxMin.Min;}if(!IFrameSplitOperator.IsNumber(frame.YMaxMin.Max)||frame.YMaxMin.Max!=item.Max){frame.YMaxMin.Max=item.Max;frame.XYSplit=true;}if(!IFrameSplitOperator.IsNumber(frame.YMaxMin.Min)||frame.YMaxMin.Min!=item.Min){frame.YMaxMin.Min=item.Min;frame.XYSplit=true;}if(frame.XYSplit){var max=10,min=0;if(item.Max!=null)max=item.Max;if(item.Min!=null)min=item.Min;frame.HorizontalMax=max;frame.HorizontalMin=min;}else{frame.XSplit=true;}//共享Y轴叠加指标同步下坐标
|
|
1983
1985
|
for(var j=0;j<item.OverlayFrame.length;++j){item.OverlayFrame[j].XYSplit=true;}//独立坐标叠加指标
|
|
1984
1986
|
for(var i=0;i<item.SingleOverlay.length;++i){var overlayItem=item.SingleOverlay[i];overlayItem.UpdateFrameMaxMin();}}}catch(err){_didIteratorError3=true;_iteratorError3=err;}finally{try{if(!_iteratorNormalCompletion3&&_iterator3.return){_iterator3.return();}}finally{if(_didIteratorError3){throw _iteratorError3;}}}};this.UpdateFrameMaxMin=function(){this.UpdateFrameMaxMinV2();return;var frameMaxMinData=new Array();var chartPaint=new Array();for(var i=0;i<this.ChartPaint.length;++i){var item=this.ChartPaint[i];if(item.IsShow==false)continue;//隐藏的图形不计算
|
|
1985
1987
|
chartPaint.push(this.ChartPaint[i]);}for(var i=0;i<this.OverlayChartPaint.length;++i){chartPaint.push(this.OverlayChartPaint[i]);}var aryNotSupport=[];for(var i=0;i<chartPaint.length;++i){var paint=chartPaint[i];if(paint.NotSupportMessage){aryNotSupport.push(paint);continue;}var range=paint.GetMaxMin();if(range==null||range.Max==null||range.Min==null)continue;var frameItem=null;for(var j=0;j<frameMaxMinData.length;++j){if(frameMaxMinData[j].Frame==paint.ChartFrame){frameItem=frameMaxMinData[j];break;}}if(frameItem){if(frameItem.Range.Max<range.Max)frameItem.Range.Max=range.Max;if(frameItem.Range.Min>range.Min)frameItem.Range.Min=range.Min;}else{frameItem={OverlayFrame:[]};frameItem.Frame=paint.ChartFrame;frameItem.Range=range;frameMaxMinData.push(frameItem);}}//当前计算
|
|
@@ -6847,7 +6849,7 @@ this.GetKDataInfo=function(){if(!this.ChartPaint[0])return null;var chartKLine=t
|
|
|
6847
6849
|
{var id=obj.ID;if(id===JSCHART_OPERATOR_ID.OP_SCROLL_LEFT||id===JSCHART_OPERATOR_ID.OP_SCROLL_RIGHT)//左右移动 { Step:移动数据个数 }
|
|
6848
6850
|
{var isLeft=id===JSCHART_OPERATOR_ID.OP_SCROLL_LEFT?true:false;var step=1;if(obj.Step>0)step=obj.Step;var oneStepWidth=this.GetMoveOneStepWidth();if(this.DataMove(step*oneStepWidth,isLeft))//每次移动一个数据
|
|
6849
6851
|
{this.UpdataDataoffset();this.UpdatePointByCursorIndex();this.UpdateFrameMaxMin();this.ResetFrameXYSplit();this.Draw();}else{if(id===JSCHART_OPERATOR_ID.OP_SCROLL_RIGHT&&this.DragDownloadData)this.DragDownloadData();}}else if(id===JSCHART_OPERATOR_ID.OP_ZOOM_IN||id===JSCHART_OPERATOR_ID.OP_ZOOM_OUT)//缩放
|
|
6850
|
-
{var cursorIndex={};cursorIndex.Index=parseInt(Math.abs(this.CursorIndex-0.5).toFixed(0));if(id===JSCHART_OPERATOR_ID.OP_ZOOM_IN){if(!this.Frame.ZoomUp(cursorIndex))return;}else{if(!this.Frame.ZoomDown(cursorIndex))return;}this.CursorIndex=cursorIndex.Index;this.UpdataDataoffset();this.UpdatePointByCursorIndex();this.UpdateFrameMaxMin();this.Draw();}else if(id===JSCHART_OPERATOR_ID.OP_GOTO_HOME){var hisData=this.ChartOperator_Temp_GetHistroyData();;if(!hisData)return;//数据还没有到达
|
|
6852
|
+
{var cursorIndex={};cursorIndex.Index=parseInt(Math.abs(this.CursorIndex-0.5).toFixed(0));if(id===JSCHART_OPERATOR_ID.OP_ZOOM_IN){if(!this.Frame.ZoomUp(cursorIndex))return;}else{if(!this.Frame.ZoomDown(cursorIndex))return;}this.CursorIndex=cursorIndex.Index;this.UpdataDataoffset();this.UpdatePointByCursorIndex();this.UpdateFrameMaxMin();this.ResetFrameXSplit();this.Draw();}else if(id===JSCHART_OPERATOR_ID.OP_GOTO_HOME){var hisData=this.ChartOperator_Temp_GetHistroyData();;if(!hisData)return;//数据还没有到达
|
|
6851
6853
|
var showCount=this.Frame.SubFrame[0].Frame.XPointCount;//获取一屏显示的数据个数
|
|
6852
6854
|
showCount-=this.RightSpaceCount;var index=hisData.Data.length-showCount;hisData.DataOffset=index;this.CursorIndex=0;this.LastPoint.X=null;this.LastPoint.Y=null;JSConsole.Chart.Log('[KLineChartContainer::ChartOperator] OP_GOTO_HOME, dataOffset='+hisData.DataOffset+' CursorIndex='+this.CursorIndex+' PageSize='+showCount);this.ChartOperator_Temp_Update();}else if(id===JSCHART_OPERATOR_ID.OP_GOTO_END){var hisData=this.ChartOperator_Temp_GetHistroyData();if(!hisData)return;//数据还没有到达
|
|
6853
6855
|
hisData.DataOffset=0;this.CursorIndex=0;this.LastPoint.X=null;this.LastPoint.Y=null;JSConsole.Chart.Log('[KLineChartContainer::ChartOperator] OP_GOTO_END ');this.ChartOperator_Temp_Update();}else if(id==JSCHART_OPERATOR_ID.OP_LEFT_ZOOM_IN||id==JSCHART_OPERATOR_ID.OP_LEFT_ZOOM_OUT)//{ Step:增加/减少数量 } 左边增加/减少显示个数
|
|
@@ -6887,7 +6889,7 @@ var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_MOUSE_MOVE);var titleChart=t
|
|
|
6887
6889
|
this.ChartOperator_Temp_GetHistroyData=function(){var hisData=null;if(!this.Frame.Data)hisData=this.Frame.Data;else hisData=this.Frame.SubFrame[0].Frame.Data;if(!hisData)return null;//数据还没有到达
|
|
6888
6890
|
return hisData;};this.ChartOperator_Temp_Update=function(){this.UpdataDataoffset();//更新数据偏移
|
|
6889
6891
|
this.UpdateFrameMaxMin();//调整坐标最大 最小值
|
|
6890
|
-
this.Frame.SetSizeChage(true);this.Draw();this.UpdatePointByCursorIndex();//更新十字光标位子
|
|
6892
|
+
this.ResetFrameXSplit();this.Frame.SetSizeChage(true);this.Draw();this.UpdatePointByCursorIndex();//更新十字光标位子
|
|
6891
6893
|
};this.OnWheel=function(e){var _this16=this;JSConsole.Chart.Log('[KLineChartContainer::OnWheel]',e);if(this.ChartSplashPaint&&this.ChartSplashPaint.IsEnableSplash==true)return;var pixelTatio=GetDevicePixelRatio();var x=(e.clientX-this.UIElement.getBoundingClientRect().left)*pixelTatio;var y=(e.clientY-this.UIElement.getBoundingClientRect().top)*pixelTatio;var isInClient=false;this.Canvas.beginPath();this.Canvas.rect(this.Frame.ChartBorder.GetLeft(),this.Frame.ChartBorder.GetTop(),this.Frame.ChartBorder.GetWidth(),this.Frame.ChartBorder.GetHeight());isInClient=this.Canvas.isPointInPath(x,y);var wheelValue=e.wheelDelta;if(!IFrameSplitOperator.IsObjectExist(e.wheelDelta))wheelValue=e.deltaY*-0.01;var enableZoomUpDown=true;//是否允许缩放
|
|
6892
6894
|
if(this.EnableZoomUpDown&&this.EnableZoomUpDown.Wheel===false)enableZoomUpDown=false;if(this.SourceData&&this.SourceData.Data){if(isInClient&&wheelValue<0&&enableZoomUpDown)//缩小
|
|
6893
6895
|
{var cursorIndex={ZoomType:this.ZoomType,IsLockRight:this.IsZoomLockRight};cursorIndex.Index=parseInt(Math.abs(this.CursorIndex-0.5).toFixed(0));if(this.Frame.ZoomDown(cursorIndex,{ZoomDownloadDataCallback:function ZoomDownloadDataCallback(requestData){_this16.ZoomDownloadData(requestData);}})){this.CursorIndex=cursorIndex.Index;this.UpdataDataoffset();this.UpdatePointByCursorIndex();this.UpdateFrameMaxMin();this.ResetFrameXSplit();this.Draw();this.OnKLinePageChange("wheel");}}else if(isInClient&&wheelValue>0&&enableZoomUpDown)//放大
|
|
@@ -12844,7 +12846,7 @@ hisData.Symbol=message.symbol;}var stockObj={HQDataType:HQ_DATA_TYPE.KLINE_ID,St
|
|
|
12844
12846
|
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);};}/********************************************************************************
|
|
12845
12847
|
* 版本信息输出
|
|
12846
12848
|
*
|
|
12847
|
-
*/var HQCHART_VERSION="1.1.
|
|
12849
|
+
*/var HQCHART_VERSION="1.1.12686";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();//把给外界调用的方法暴露出来
|
|
12848
12850
|
exports.default=(_jsChartInit$jsChartS={jsChartInit:JSChart.Init,jsChartStyle:JSChart.SetStyle,// IsIndexSymbol:IsIndexSymbol,
|
|
12849
12851
|
// BaseIndex:BaseIndex,
|
|
12850
12852
|
// ChartLine:ChartLine,
|
package/package.json
CHANGED
package/src/jscommon/umychart.js
CHANGED
|
@@ -4630,6 +4630,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
4630
4630
|
this.UpdatePointByCursorIndex();
|
|
4631
4631
|
this.UpdataDataoffset();
|
|
4632
4632
|
this.UpdateFrameMaxMin();
|
|
4633
|
+
//this.ResetFrameXSplit();
|
|
4633
4634
|
this.Draw();
|
|
4634
4635
|
this.ShowTooltipByKeyDown();
|
|
4635
4636
|
this.StopDragTimer();
|
|
@@ -4644,6 +4645,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
4644
4645
|
this.UpdataDataoffset();
|
|
4645
4646
|
this.UpdatePointByCursorIndex();
|
|
4646
4647
|
this.UpdateFrameMaxMin();
|
|
4648
|
+
//this.ResetFrameXSplit();
|
|
4647
4649
|
this.Draw();
|
|
4648
4650
|
this.ShowTooltipByKeyDown();
|
|
4649
4651
|
this.StopDragTimer();
|
|
@@ -6790,6 +6792,10 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
6790
6792
|
frame.HorizontalMax=max;
|
|
6791
6793
|
frame.HorizontalMin=min;
|
|
6792
6794
|
}
|
|
6795
|
+
else
|
|
6796
|
+
{
|
|
6797
|
+
frame.XSplit=true;
|
|
6798
|
+
}
|
|
6793
6799
|
|
|
6794
6800
|
//共享Y轴叠加指标同步下坐标
|
|
6795
6801
|
for(var j=0;j<item.OverlayFrame.length;++j)
|
|
@@ -65052,6 +65058,7 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
65052
65058
|
this.UpdataDataoffset();
|
|
65053
65059
|
this.UpdatePointByCursorIndex();
|
|
65054
65060
|
this.UpdateFrameMaxMin();
|
|
65061
|
+
this.ResetFrameXSplit();
|
|
65055
65062
|
this.Draw();
|
|
65056
65063
|
}
|
|
65057
65064
|
else if (id===JSCHART_OPERATOR_ID.OP_GOTO_HOME)
|
|
@@ -65507,6 +65514,7 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
65507
65514
|
{
|
|
65508
65515
|
this.UpdataDataoffset(); //更新数据偏移
|
|
65509
65516
|
this.UpdateFrameMaxMin(); //调整坐标最大 最小值
|
|
65517
|
+
this.ResetFrameXSplit();
|
|
65510
65518
|
this.Frame.SetSizeChage(true);
|
|
65511
65519
|
this.Draw();
|
|
65512
65520
|
this.UpdatePointByCursorIndex(); //更新十字光标位子
|
|
@@ -8774,6 +8774,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
8774
8774
|
this.UpdatePointByCursorIndex();
|
|
8775
8775
|
this.UpdataDataoffset();
|
|
8776
8776
|
this.UpdateFrameMaxMin();
|
|
8777
|
+
//this.ResetFrameXSplit();
|
|
8777
8778
|
this.Draw();
|
|
8778
8779
|
this.ShowTooltipByKeyDown();
|
|
8779
8780
|
this.StopDragTimer();
|
|
@@ -8788,6 +8789,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
8788
8789
|
this.UpdataDataoffset();
|
|
8789
8790
|
this.UpdatePointByCursorIndex();
|
|
8790
8791
|
this.UpdateFrameMaxMin();
|
|
8792
|
+
//this.ResetFrameXSplit();
|
|
8791
8793
|
this.Draw();
|
|
8792
8794
|
this.ShowTooltipByKeyDown();
|
|
8793
8795
|
this.StopDragTimer();
|
|
@@ -10934,6 +10936,10 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
10934
10936
|
frame.HorizontalMax=max;
|
|
10935
10937
|
frame.HorizontalMin=min;
|
|
10936
10938
|
}
|
|
10939
|
+
else
|
|
10940
|
+
{
|
|
10941
|
+
frame.XSplit=true;
|
|
10942
|
+
}
|
|
10937
10943
|
|
|
10938
10944
|
//共享Y轴叠加指标同步下坐标
|
|
10939
10945
|
for(var j=0;j<item.OverlayFrame.length;++j)
|
|
@@ -69196,6 +69202,7 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
69196
69202
|
this.UpdataDataoffset();
|
|
69197
69203
|
this.UpdatePointByCursorIndex();
|
|
69198
69204
|
this.UpdateFrameMaxMin();
|
|
69205
|
+
this.ResetFrameXSplit();
|
|
69199
69206
|
this.Draw();
|
|
69200
69207
|
}
|
|
69201
69208
|
else if (id===JSCHART_OPERATOR_ID.OP_GOTO_HOME)
|
|
@@ -69651,6 +69658,7 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
69651
69658
|
{
|
|
69652
69659
|
this.UpdataDataoffset(); //更新数据偏移
|
|
69653
69660
|
this.UpdateFrameMaxMin(); //调整坐标最大 最小值
|
|
69661
|
+
this.ResetFrameXSplit();
|
|
69654
69662
|
this.Frame.SetSizeChage(true);
|
|
69655
69663
|
this.Draw();
|
|
69656
69664
|
this.UpdatePointByCursorIndex(); //更新十字光标位子
|
|
@@ -130566,7 +130574,7 @@ function ScrollBarBGChart()
|
|
|
130566
130574
|
|
|
130567
130575
|
|
|
130568
130576
|
|
|
130569
|
-
var HQCHART_VERSION="1.1.
|
|
130577
|
+
var HQCHART_VERSION="1.1.12686";
|
|
130570
130578
|
|
|
130571
130579
|
function PrintHQChartVersion()
|
|
130572
130580
|
{
|
|
@@ -8818,6 +8818,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
8818
8818
|
this.UpdatePointByCursorIndex();
|
|
8819
8819
|
this.UpdataDataoffset();
|
|
8820
8820
|
this.UpdateFrameMaxMin();
|
|
8821
|
+
//this.ResetFrameXSplit();
|
|
8821
8822
|
this.Draw();
|
|
8822
8823
|
this.ShowTooltipByKeyDown();
|
|
8823
8824
|
this.StopDragTimer();
|
|
@@ -8832,6 +8833,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
8832
8833
|
this.UpdataDataoffset();
|
|
8833
8834
|
this.UpdatePointByCursorIndex();
|
|
8834
8835
|
this.UpdateFrameMaxMin();
|
|
8836
|
+
//this.ResetFrameXSplit();
|
|
8835
8837
|
this.Draw();
|
|
8836
8838
|
this.ShowTooltipByKeyDown();
|
|
8837
8839
|
this.StopDragTimer();
|
|
@@ -10978,6 +10980,10 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
10978
10980
|
frame.HorizontalMax=max;
|
|
10979
10981
|
frame.HorizontalMin=min;
|
|
10980
10982
|
}
|
|
10983
|
+
else
|
|
10984
|
+
{
|
|
10985
|
+
frame.XSplit=true;
|
|
10986
|
+
}
|
|
10981
10987
|
|
|
10982
10988
|
//共享Y轴叠加指标同步下坐标
|
|
10983
10989
|
for(var j=0;j<item.OverlayFrame.length;++j)
|
|
@@ -69240,6 +69246,7 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
69240
69246
|
this.UpdataDataoffset();
|
|
69241
69247
|
this.UpdatePointByCursorIndex();
|
|
69242
69248
|
this.UpdateFrameMaxMin();
|
|
69249
|
+
this.ResetFrameXSplit();
|
|
69243
69250
|
this.Draw();
|
|
69244
69251
|
}
|
|
69245
69252
|
else if (id===JSCHART_OPERATOR_ID.OP_GOTO_HOME)
|
|
@@ -69695,6 +69702,7 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
69695
69702
|
{
|
|
69696
69703
|
this.UpdataDataoffset(); //更新数据偏移
|
|
69697
69704
|
this.UpdateFrameMaxMin(); //调整坐标最大 最小值
|
|
69705
|
+
this.ResetFrameXSplit();
|
|
69698
69706
|
this.Frame.SetSizeChage(true);
|
|
69699
69707
|
this.Draw();
|
|
69700
69708
|
this.UpdatePointByCursorIndex(); //更新十字光标位子
|
|
@@ -130724,7 +130732,7 @@ function HQChartScriptWorker()
|
|
|
130724
130732
|
|
|
130725
130733
|
|
|
130726
130734
|
|
|
130727
|
-
var HQCHART_VERSION="1.1.
|
|
130735
|
+
var HQCHART_VERSION="1.1.12686";
|
|
130728
130736
|
|
|
130729
130737
|
function PrintHQChartVersion()
|
|
130730
130738
|
{
|