hqchart 1.1.12575 → 1.1.12580

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.
@@ -1686,6 +1686,7 @@ uielement.parentNode.appendChild(this.SelectRect);//区间选择右键菜单
1686
1686
  this.SelectRectRightMenu;//坐标轴风格方法 double-更加数值型分割 price-更加股票价格分割
1687
1687
  this.FrameSplitData=new _map2.default();this.FrameSplitData.set("double",new SplitData());this.FrameSplitData.set("price",new PriceSplitData());//事件回调
1688
1688
  this.mapEvent=new _map2.default();//通知外部调用 key:JSCHART_EVENT_ID value:{Callback:回调,}
1689
+ this.PhonePinch=null;//手机双指操作信息
1689
1690
  this.IsOnTouch=false;//是否再操作数据
1690
1691
  this.TouchDrawCount=0;//手势绘制次数
1691
1692
  this.DisableMouse=false;//禁止鼠标事件
@@ -1811,7 +1812,7 @@ var self=this;this.DragTimer=setTimeout(function(){if(drag.Click.X==drag.LastMov
1811
1812
  if(self.EnableClickModel===true)self.ClickModel.IsShowCorssCursor=true;self.MoveCorssCursor(drag.Click,e);//移动十字光标
1812
1813
  }},self.PressTime);}if(this.EnableZoomIndexWindow){this.PhoneDBClick.AddTouchStart(touches[0].clientX,touches[0].clientY,Date.now());JSConsole.Chart.Log("[JSChartContainer::OnTouchStart] PhoneDBClick ",this.PhoneDBClick);}if(this.ChartDrawOption.IsLockScreen){this.MouseDrag=null;}else if(this.DragMode==JSCHART_DRAG_ID.CLICK_TOUCH_MODE_ID){}else if(this.DragMode==JSCHART_DRAG_ID.DISABLE_DRAG_ID){this.MouseDrag=null;this.MoveCorssCursor(drag.Click,e);}else if(this.EnableClickModel){//if (this.ClickModel.IsShowCorssCursor===true) this.MoveCorssCursor(drag.Click,e)
1813
1814
  }else if(this.VerticalDrag){if(!this.VerticalDrag.IsDrag)this.MoveCorssCursor(drag.Click,e);//没有点击X轴, 就显示十字光标
1814
- }else if(this.IsClickShowCorssCursor){this.MoveCorssCursor(drag.Click,e);}this.TouchEvent({EventID:JSCHART_EVENT_ID.ON_PHONE_TOUCH,FunctionName:"OnTouchStart"},e);}else if(this.IsPhonePinching(e)){var phonePinch={"Start":{},"Last":{}};var touches=this.GetToucheData(e,this.IsForceLandscape);phonePinch.Start={"X":touches[0].pageX,"Y":touches[0].pageY,"X2":touches[1].pageX,"Y2":touches[1].pageY};phonePinch.Last={"X":touches[0].pageX,"Y":touches[0].pageY,"X2":touches[1].pageX,"Y2":touches[1].pageY};this.PhonePinch=phonePinch;this.SelectChartDrawPicture=null;}};this.OnTouchMove=function(e){if(this.ChartSplashPaint&&this.ChartSplashPaint.IsEnableSplash==true)return;var touches=this.GetToucheData(e,this.IsForceLandscape);if(this.IsPhoneDragging(e)){var drag=this.MouseDrag;if(drag==null){if(this.IsForceLandscape)y=uielement.getBoundingClientRect().width-touches[0].clientY;//强制横屏Y计算
1815
+ }else if(this.IsClickShowCorssCursor){this.MoveCorssCursor(drag.Click,e);}this.TouchEvent({EventID:JSCHART_EVENT_ID.ON_PHONE_TOUCH,FunctionName:"OnTouchStart"},e);}else if(this.IsPhonePinching(e)){var phonePinch={"Start":{},"Last":{}};var touches=this.GetToucheData(e,this.IsForceLandscape);phonePinch.Start={X:touches[0].pageX,Y:touches[0].pageY,X2:touches[1].pageX,Y2:touches[1].pageY};phonePinch.Last={X:touches[0].pageX,Y:touches[0].pageY,X2:touches[1].pageX,Y2:touches[1].pageY};this.PhonePinch=phonePinch;this.SelectChartDrawPicture=null;}};this.OnTouchMove=function(e){if(this.ChartSplashPaint&&this.ChartSplashPaint.IsEnableSplash==true)return;var touches=this.GetToucheData(e,this.IsForceLandscape);if(this.IsPhoneDragging(e)){var drag=this.MouseDrag;if(drag==null){if(this.IsForceLandscape)y=uielement.getBoundingClientRect().width-touches[0].clientY;//强制横屏Y计算
1815
1816
  if(!this.ChartDrawOption.IsLockScreen)this.MoveCorssCursor({X:touches[0].clientX,Y:touches[0].clientY},e);}else{var moveAngle=this.GetMoveAngle(drag.LastMove,{X:touches[0].clientX,Y:touches[0].clientY});var moveSetp=Math.abs(drag.LastMove.X-touches[0].clientX);var moveUpDown=Math.abs(drag.LastMove.Y-touches[0].clientY);moveSetp=parseInt(moveSetp);var isMoveCorssCursor=this.DragMode==JSCHART_DRAG_ID.CLICK_TOUCH_MODE_ID&&this.TouchStatus.CorssCursorShow==true;//是否移动十字光标
1816
1817
  if(this.VerticalDrag){if(this.VerticalDrag.IsDrag===true)isMoveCorssCursor=false;else isMoveCorssCursor=true;}if(this.EnableClickModel){if(this.ClickModel.IsShowCorssCursor===true)isMoveCorssCursor=true;else isMoveCorssCursor=false;}//JSConsole.Chart.Log(`[JSChartContainer::OnTouchMove] moveAngle=${moveAngle} , moveUpDown=${moveUpDown}, moveSetp=${moveSetp}`);
1817
1818
  if(this.CurrentChartDrawPicture){var drawPicture=this.CurrentChartDrawPicture;if(drawPicture.Status==1||drawPicture.Status==2){if(moveSetp<5&&moveUpDown<5)return;if(this.SetChartDrawPictureSecondPoint(touches[0].clientX,touches[0].clientY,true)){this.DrawDynamicInfo();}}else if(drawPicture.Status==3){if(this.SetChartDrawPictureThirdPoint(touches[0].clientX,touches[0].clientY,true)){this.DrawDynamicInfo();}}else if(drawPicture.Status==20)//画图工具移动
@@ -1819,9 +1820,9 @@ if(this.CurrentChartDrawPicture){var drawPicture=this.CurrentChartDrawPicture;if
1819
1820
  {var mouseDrag=this.MouseDrag;this.MouseDrag=null;this.MoveCorssCursor(drag.Click,e);//移动十字光标
1820
1821
  }else if(this.DragMode==1||isMoveCorssCursor==false)//数据左右拖拽
1821
1822
  {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;//右移数据
1822
- 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;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)//放大
1823
- {var cursorIndex={IsLockRight:this.IsZoomLockRight};cursorIndex.Index=parseInt(Math.abs(this.CursorIndex-0.5).toFixed(0));if(!this.Frame.ZoomUp(cursorIndex))return;this.CursorIndex=cursorIndex.Index;this.UpdatePointByCursorIndex();this.UpdataDataoffset();this.UpdateFrameMaxMin();this.Draw();this.ShowTooltipByKeyDown();this.StopDragTimer();}else//缩小
1824
- {var cursorIndex={IsLockRight:this.IsZoomLockRight};cursorIndex.Index=parseInt(Math.abs(this.CursorIndex-0.5).toFixed(0));if(!this.Frame.ZoomDown(cursorIndex))return;this.CursorIndex=cursorIndex.Index;this.UpdataDataoffset();this.UpdatePointByCursorIndex();this.UpdateFrameMaxMin();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.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;}}};//手势事件
1823
+ 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)//放大
1824
+ {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.Draw();this.ShowTooltipByKeyDown();this.StopDragTimer();}else//缩小
1825
+ {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.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;}}};//手势事件
1825
1826
  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;//十字显示
1826
1827
  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;};//绘制选中图形的状态
1827
1828
  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;//框架
@@ -12658,7 +12659,7 @@ function HQChartScriptWorker(){this.Create=function(){var _this60=this;addEventL
12658
12659
  hisData.Symbol=message.symbol;}var stockObj={HQDataType:HQ_DATA_TYPE.KLINE_ID,Stock:{Symbol:message.Symbol},Request:{MaxDataCount:500,MaxMinuteDayCount:5},Period:message.Period,Right:message.Right,Data:hisData};if(IFrameSplitOperator.IsNumber(message.HQDataType))stockObj.HQDataType=message.HQDataType;indexConsole.ExecuteScript(stockObj);};this.OnRecvMessage=function(message){var data=message.data;if(!data)return;if(data.ID==JSCHART_WORKER_MESSAGE_ID.EXECUTE_SCRIPT){if(!IFrameSplitOperator.IsNonEmptyArray(data.AryIndex))return;for(var i=0;i<data.AryIndex.length;++i){var item=data.AryIndex[i];this.ExecuteScript(item,data);}}};this.OnExecuteFinish=function(data,indexInfo,jsExectute){var message={Data:data,IndexInfo:indexInfo,ID:JSCHART_WORKER_MESSAGE_ID.FINISH_EXECUTE_SCRIPT};postMessage(message);};this.OnExecuteError=function(error,indexInfo){var message={IndexInfo:indexInfo,ID:JSCHART_WORKER_MESSAGE_ID.ERROR_EXECUTE_SCRIPT,Error:error};postMessage(message);};}/********************************************************************************
12659
12660
  * 版本信息输出
12660
12661
  *
12661
- */var HQCHART_VERSION="1.1.12573";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();//把给外界调用的方法暴露出来
12662
+ */var HQCHART_VERSION="1.1.12579";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();//把给外界调用的方法暴露出来
12662
12663
  exports.default=(_jsChartInit$jsChartS={jsChartInit:JSChart.Init,jsChartStyle:JSChart.SetStyle,// IsIndexSymbol:IsIndexSymbol,
12663
12664
  // BaseIndex:BaseIndex,
12664
12665
  // ChartLine:ChartLine,
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "hqchart",
3
3
  "description": "stock chart",
4
4
  "author": "jones2000",
5
- "version": "1.1.12575",
5
+ "version": "1.1.12580",
6
6
  "main": "lib/main.js",
7
7
  "private": false,
8
8
  "license": "Apache License 2.0",
@@ -2793,6 +2793,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
2793
2793
  //事件回调
2794
2794
  this.mapEvent=new Map(); //通知外部调用 key:JSCHART_EVENT_ID value:{Callback:回调,}
2795
2795
 
2796
+ this.PhonePinch=null; //手机双指操作信息
2796
2797
  this.IsOnTouch = false; //是否再操作数据
2797
2798
  this.TouchDrawCount = 0; //手势绘制次数
2798
2799
  this.DisableMouse=false; //禁止鼠标事件
@@ -4446,8 +4447,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
4446
4447
 
4447
4448
  var touches=this.GetToucheData(e,this.IsForceLandscape);
4448
4449
 
4449
- phonePinch.Start={"X":touches[0].pageX,"Y":touches[0].pageY,"X2":touches[1].pageX,"Y2":touches[1].pageY};
4450
- phonePinch.Last={"X":touches[0].pageX,"Y":touches[0].pageY,"X2":touches[1].pageX,"Y2":touches[1].pageY};
4450
+ phonePinch.Start={X:touches[0].pageX, Y:touches[0].pageY, X2:touches[1].pageX, Y2:touches[1].pageY};
4451
+ phonePinch.Last={X:touches[0].pageX, Y:touches[0].pageY, X2:touches[1].pageX, Y2:touches[1].pageY};
4451
4452
 
4452
4453
  this.PhonePinch=phonePinch;
4453
4454
  this.SelectChartDrawPicture=null;
@@ -4586,6 +4587,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
4586
4587
  var phonePinch=this.PhonePinch;
4587
4588
  if (!phonePinch) return;
4588
4589
 
4590
+ phonePinch.Operator=null;
4589
4591
  if (this.EnableZoomUpDown && this.EnableZoomUpDown.Touch===false) return;
4590
4592
 
4591
4593
  var yHeight=Math.abs(touches[0].pageY-touches[1].pageY);
@@ -4605,6 +4607,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
4605
4607
  var cursorIndex={ IsLockRight:this.IsZoomLockRight };
4606
4608
  cursorIndex.Index=parseInt(Math.abs(this.CursorIndex-0.5).toFixed(0));
4607
4609
  if (!this.Frame.ZoomUp(cursorIndex)) return;
4610
+ phonePinch.Operator="ZoomUp";
4608
4611
  this.CursorIndex=cursorIndex.Index;
4609
4612
  this.UpdatePointByCursorIndex();
4610
4613
  this.UpdataDataoffset();
@@ -4618,6 +4621,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
4618
4621
  var cursorIndex={ IsLockRight:this.IsZoomLockRight };
4619
4622
  cursorIndex.Index=parseInt(Math.abs(this.CursorIndex-0.5).toFixed(0));
4620
4623
  if (!this.Frame.ZoomDown(cursorIndex)) return;
4624
+ phonePinch.Operator="ZoomDown";
4621
4625
  this.CursorIndex=cursorIndex.Index;
4622
4626
  this.UpdataDataoffset();
4623
4627
  this.UpdatePointByCursorIndex();
@@ -4627,7 +4631,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
4627
4631
  this.StopDragTimer();
4628
4632
  }
4629
4633
 
4630
- phonePinch.Last={"X":touches[0].pageX,"Y":touches[0].pageY,"X2":touches[1].pageX,"Y2":touches[1].pageY};
4634
+ phonePinch.Last={ X:touches[0].pageX, Y:touches[0].pageY, X2:touches[1].pageX, Y2:touches[1].pageY };
4631
4635
  }
4632
4636
 
4633
4637
  this.PreventTouchEvent(e);
@@ -4675,6 +4679,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
4675
4679
  this.TouchEvent({ EventID:JSCHART_EVENT_ID.ON_PHONE_TOUCH, FunctionName:"OnTouchEnd"}, e);
4676
4680
  this.OnTouchFinished();
4677
4681
  this.TouchDrawCount=0;
4682
+ this.PhonePinch=null;
4678
4683
  }
4679
4684
 
4680
4685
  this.OnTouchDBClick=function(points)
@@ -6873,6 +6873,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
6873
6873
  //事件回调
6874
6874
  this.mapEvent=new Map(); //通知外部调用 key:JSCHART_EVENT_ID value:{Callback:回调,}
6875
6875
 
6876
+ this.PhonePinch=null; //手机双指操作信息
6876
6877
  this.IsOnTouch = false; //是否再操作数据
6877
6878
  this.TouchDrawCount = 0; //手势绘制次数
6878
6879
  this.DisableMouse=false; //禁止鼠标事件
@@ -8526,8 +8527,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
8526
8527
 
8527
8528
  var touches=this.GetToucheData(e,this.IsForceLandscape);
8528
8529
 
8529
- phonePinch.Start={"X":touches[0].pageX,"Y":touches[0].pageY,"X2":touches[1].pageX,"Y2":touches[1].pageY};
8530
- phonePinch.Last={"X":touches[0].pageX,"Y":touches[0].pageY,"X2":touches[1].pageX,"Y2":touches[1].pageY};
8530
+ phonePinch.Start={X:touches[0].pageX, Y:touches[0].pageY, X2:touches[1].pageX, Y2:touches[1].pageY};
8531
+ phonePinch.Last={X:touches[0].pageX, Y:touches[0].pageY, X2:touches[1].pageX, Y2:touches[1].pageY};
8531
8532
 
8532
8533
  this.PhonePinch=phonePinch;
8533
8534
  this.SelectChartDrawPicture=null;
@@ -8666,6 +8667,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
8666
8667
  var phonePinch=this.PhonePinch;
8667
8668
  if (!phonePinch) return;
8668
8669
 
8670
+ phonePinch.Operator=null;
8669
8671
  if (this.EnableZoomUpDown && this.EnableZoomUpDown.Touch===false) return;
8670
8672
 
8671
8673
  var yHeight=Math.abs(touches[0].pageY-touches[1].pageY);
@@ -8685,6 +8687,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
8685
8687
  var cursorIndex={ IsLockRight:this.IsZoomLockRight };
8686
8688
  cursorIndex.Index=parseInt(Math.abs(this.CursorIndex-0.5).toFixed(0));
8687
8689
  if (!this.Frame.ZoomUp(cursorIndex)) return;
8690
+ phonePinch.Operator="ZoomUp";
8688
8691
  this.CursorIndex=cursorIndex.Index;
8689
8692
  this.UpdatePointByCursorIndex();
8690
8693
  this.UpdataDataoffset();
@@ -8698,6 +8701,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
8698
8701
  var cursorIndex={ IsLockRight:this.IsZoomLockRight };
8699
8702
  cursorIndex.Index=parseInt(Math.abs(this.CursorIndex-0.5).toFixed(0));
8700
8703
  if (!this.Frame.ZoomDown(cursorIndex)) return;
8704
+ phonePinch.Operator="ZoomDown";
8701
8705
  this.CursorIndex=cursorIndex.Index;
8702
8706
  this.UpdataDataoffset();
8703
8707
  this.UpdatePointByCursorIndex();
@@ -8707,7 +8711,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
8707
8711
  this.StopDragTimer();
8708
8712
  }
8709
8713
 
8710
- phonePinch.Last={"X":touches[0].pageX,"Y":touches[0].pageY,"X2":touches[1].pageX,"Y2":touches[1].pageY};
8714
+ phonePinch.Last={ X:touches[0].pageX, Y:touches[0].pageY, X2:touches[1].pageX, Y2:touches[1].pageY };
8711
8715
  }
8712
8716
 
8713
8717
  this.PreventTouchEvent(e);
@@ -8755,6 +8759,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
8755
8759
  this.TouchEvent({ EventID:JSCHART_EVENT_ID.ON_PHONE_TOUCH, FunctionName:"OnTouchEnd"}, e);
8756
8760
  this.OnTouchFinished();
8757
8761
  this.TouchDrawCount=0;
8762
+ this.PhonePinch=null;
8758
8763
  }
8759
8764
 
8760
8765
  this.OnTouchDBClick=function(points)
@@ -129478,7 +129483,7 @@ function ScrollBarBGChart()
129478
129483
 
129479
129484
 
129480
129485
 
129481
- var HQCHART_VERSION="1.1.12573";
129486
+ var HQCHART_VERSION="1.1.12579";
129482
129487
 
129483
129488
  function PrintHQChartVersion()
129484
129489
  {
@@ -5,7 +5,7 @@
5
5
 
6
6
 
7
7
 
8
- var HQCHART_VERSION="1.1.12573";
8
+ var HQCHART_VERSION="1.1.12579";
9
9
 
10
10
  function PrintHQChartVersion()
11
11
  {
@@ -6917,6 +6917,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
6917
6917
  //事件回调
6918
6918
  this.mapEvent=new Map(); //通知外部调用 key:JSCHART_EVENT_ID value:{Callback:回调,}
6919
6919
 
6920
+ this.PhonePinch=null; //手机双指操作信息
6920
6921
  this.IsOnTouch = false; //是否再操作数据
6921
6922
  this.TouchDrawCount = 0; //手势绘制次数
6922
6923
  this.DisableMouse=false; //禁止鼠标事件
@@ -8570,8 +8571,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
8570
8571
 
8571
8572
  var touches=this.GetToucheData(e,this.IsForceLandscape);
8572
8573
 
8573
- phonePinch.Start={"X":touches[0].pageX,"Y":touches[0].pageY,"X2":touches[1].pageX,"Y2":touches[1].pageY};
8574
- phonePinch.Last={"X":touches[0].pageX,"Y":touches[0].pageY,"X2":touches[1].pageX,"Y2":touches[1].pageY};
8574
+ phonePinch.Start={X:touches[0].pageX, Y:touches[0].pageY, X2:touches[1].pageX, Y2:touches[1].pageY};
8575
+ phonePinch.Last={X:touches[0].pageX, Y:touches[0].pageY, X2:touches[1].pageX, Y2:touches[1].pageY};
8575
8576
 
8576
8577
  this.PhonePinch=phonePinch;
8577
8578
  this.SelectChartDrawPicture=null;
@@ -8710,6 +8711,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
8710
8711
  var phonePinch=this.PhonePinch;
8711
8712
  if (!phonePinch) return;
8712
8713
 
8714
+ phonePinch.Operator=null;
8713
8715
  if (this.EnableZoomUpDown && this.EnableZoomUpDown.Touch===false) return;
8714
8716
 
8715
8717
  var yHeight=Math.abs(touches[0].pageY-touches[1].pageY);
@@ -8729,6 +8731,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
8729
8731
  var cursorIndex={ IsLockRight:this.IsZoomLockRight };
8730
8732
  cursorIndex.Index=parseInt(Math.abs(this.CursorIndex-0.5).toFixed(0));
8731
8733
  if (!this.Frame.ZoomUp(cursorIndex)) return;
8734
+ phonePinch.Operator="ZoomUp";
8732
8735
  this.CursorIndex=cursorIndex.Index;
8733
8736
  this.UpdatePointByCursorIndex();
8734
8737
  this.UpdataDataoffset();
@@ -8742,6 +8745,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
8742
8745
  var cursorIndex={ IsLockRight:this.IsZoomLockRight };
8743
8746
  cursorIndex.Index=parseInt(Math.abs(this.CursorIndex-0.5).toFixed(0));
8744
8747
  if (!this.Frame.ZoomDown(cursorIndex)) return;
8748
+ phonePinch.Operator="ZoomDown";
8745
8749
  this.CursorIndex=cursorIndex.Index;
8746
8750
  this.UpdataDataoffset();
8747
8751
  this.UpdatePointByCursorIndex();
@@ -8751,7 +8755,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
8751
8755
  this.StopDragTimer();
8752
8756
  }
8753
8757
 
8754
- phonePinch.Last={"X":touches[0].pageX,"Y":touches[0].pageY,"X2":touches[1].pageX,"Y2":touches[1].pageY};
8758
+ phonePinch.Last={ X:touches[0].pageX, Y:touches[0].pageY, X2:touches[1].pageX, Y2:touches[1].pageY };
8755
8759
  }
8756
8760
 
8757
8761
  this.PreventTouchEvent(e);
@@ -8799,6 +8803,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
8799
8803
  this.TouchEvent({ EventID:JSCHART_EVENT_ID.ON_PHONE_TOUCH, FunctionName:"OnTouchEnd"}, e);
8800
8804
  this.OnTouchFinished();
8801
8805
  this.TouchDrawCount=0;
8806
+ this.PhonePinch=null;
8802
8807
  }
8803
8808
 
8804
8809
  this.OnTouchDBClick=function(points)
@@ -129631,7 +129636,7 @@ function HQChartScriptWorker()
129631
129636
 
129632
129637
 
129633
129638
 
129634
- var HQCHART_VERSION="1.1.12573";
129639
+ var HQCHART_VERSION="1.1.12579";
129635
129640
 
129636
129641
  function PrintHQChartVersion()
129637
129642
  {
@@ -5,7 +5,7 @@
5
5
 
6
6
 
7
7
 
8
- var HQCHART_VERSION="1.1.12544";
8
+ var HQCHART_VERSION="1.1.12578";
9
9
 
10
10
  function PrintHQChartVersion()
11
11
  {
@@ -1517,6 +1517,7 @@ function JSChartContainer(uielement)
1517
1517
 
1518
1518
  this.UpdateUICallback; //数据到达通知前端
1519
1519
  this.IsOnTouch = false; //当前是否正式手势操作
1520
+ this.PhonePinch=null; //双指操作信息
1520
1521
  this.IsFullDraw=false; //是否使用重绘模式 (可能会卡)
1521
1522
 
1522
1523
  this.LanguageID = JSCHART_LANGUAGE_ID.LANGUAGE_CHINESE_ID;
@@ -1798,8 +1799,8 @@ function JSChartContainer(uielement)
1798
1799
  {
1799
1800
  var phonePinch = { "Start": {}, "Last": {} };
1800
1801
  var touches = this.GetToucheData(e, jsChart.IsForceLandscape);
1801
- phonePinch.Start = { "X": touches[0].pageX, "Y": touches[0].pageY, "X2": touches[1].pageX, "Y2": touches[1].pageY };
1802
- phonePinch.Last = { "X": touches[0].pageX, "Y": touches[0].pageY, "X2": touches[1].pageX, "Y2": touches[1].pageY };
1802
+ phonePinch.Start = { X: touches[0].pageX, Y: touches[0].pageY, X2: touches[1].pageX, Y2: touches[1].pageY };
1803
+ phonePinch.Last = { X: touches[0].pageX, Y: touches[0].pageY, X2: touches[1].pageX, Y2: touches[1].pageY };
1803
1804
  jsChart.PhonePinch = phonePinch;
1804
1805
  }
1805
1806
  }
@@ -1921,6 +1922,7 @@ function JSChartContainer(uielement)
1921
1922
  var cursorIndex = { IsLockRight:this.IsZoomLockRight };
1922
1923
  cursorIndex.Index = parseInt(Math.abs(jsChart.CursorIndex - 0.5).toFixed(0));
1923
1924
  if (!jsChart.Frame.ZoomUp(cursorIndex)) return;
1925
+ phonePinch.Operator="ZoomUp";
1924
1926
  jsChart.CursorIndex = cursorIndex.Index;
1925
1927
  jsChart.UpdatePointByCursorIndex();
1926
1928
  jsChart.UpdataDataoffset();
@@ -1933,6 +1935,7 @@ function JSChartContainer(uielement)
1933
1935
  var cursorIndex = { IsLockRight:this.IsZoomLockRight };
1934
1936
  cursorIndex.Index = parseInt(Math.abs(jsChart.CursorIndex - 0.5).toFixed(0));
1935
1937
  if (!jsChart.Frame.ZoomDown(cursorIndex)) return;
1938
+ phonePinch.Operator="ZoomDown";
1936
1939
  jsChart.CursorIndex = cursorIndex.Index;
1937
1940
  jsChart.UpdataDataoffset();
1938
1941
  jsChart.UpdatePointByCursorIndex();
@@ -1941,7 +1944,7 @@ function JSChartContainer(uielement)
1941
1944
  jsChart.Draw();
1942
1945
  }
1943
1946
 
1944
- phonePinch.Last = { "X": touches[0].pageX, "Y": touches[0].pageY, "X2": touches[1].pageX, "Y2": touches[1].pageY };
1947
+ phonePinch.Last = { X: touches[0].pageX, Y: touches[0].pageY, X2: touches[1].pageX, Y2: touches[1].pageY };
1945
1948
  }
1946
1949
  }
1947
1950
 
@@ -1968,6 +1971,7 @@ function JSChartContainer(uielement)
1968
1971
  this.TouchEvent({ EventID:JSCHART_EVENT_ID.ON_PHONE_TOUCH, FunctionName:"OnTouchEnd"}, e);
1969
1972
  this.OnTouchFinished();
1970
1973
  this.TouchDrawCount=0;
1974
+ this.PhonePinch=null;
1971
1975
  }
1972
1976
 
1973
1977
  this.OnTouchFinished=function()