hqchart 1.1.14688 → 1.1.14696

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.
@@ -1467,7 +1467,7 @@ ON_CLICK_REPORT_HEADER:51,//单击表头
1467
1467
  ON_RCLICK_REPORT_HEADER:52,//右键点击表头
1468
1468
  ON_REPORT_LOCAL_SORT:53,//报价列表本地排序
1469
1469
  ON_DRAW_REPORT_NAME_COLOR:54,//报价列表股票名称列颜色
1470
- ON_DRAW_CUSTOM_TEXT:55,//报价列表自定义列
1470
+ ON_DRAW_CUSTOM_TEXT:55,//报价列表自定义列(废弃)
1471
1471
  ON_CLICK_REPORT_TAB:56,//报价列表标签点击
1472
1472
  ON_CLICK_REPORT_TABMENU:57,//报价列表标签菜单点击
1473
1473
  ON_DRAW_REPORT_FIXEDROW_TEXT:58,//报价列表固定行绘制
@@ -1541,7 +1541,8 @@ ON_FORMAT_KLINE_FLOAT_TOOLTIP:161,//格式化k线浮动框显示文字
1541
1541
  ON_FORMAT_KLINE_INFO_FLOAT_TOOLTIP:162,//格式化信息地雷显示文字
1542
1542
  SEARCH_DIALOG_ON_CLICK_INDEX:163,//切换指标-指标对话框
1543
1543
  ON_CALCULATE_CHIP_DATA:164,//计算筹码数据 (筹码图用)
1544
- ON_CLICK_DEAL_ROW:165,ON_RCLICK_DEAL_ROW:166,ON_DBCLICK_DEAL_ROW:167,ON_FORMAT_OVERLAY_INDEX_OUT_TEXT:168//格式化叠指标标题
1544
+ ON_CLICK_DEAL_ROW:165,ON_RCLICK_DEAL_ROW:166,ON_DBCLICK_DEAL_ROW:167,ON_FORMAT_OVERLAY_INDEX_OUT_TEXT:168,//格式化叠指标标题
1545
+ ON_TOUCH_FAST_SLIDE:169//快速滑动
1545
1546
  };var JSCHART_OPERATOR_ID={OP_SCROLL_LEFT:1,//往左移动
1546
1547
  OP_SCROLL_RIGHT:2,//往右移动
1547
1548
  OP_ZOOM_OUT:3,//缩小
@@ -1698,6 +1699,7 @@ this.TooltipCache={Type:null,IsShow:false,X:null,Y:null,Data:null,InnerHTML:null
1698
1699
  this.FrameSplitData=new _map2.default();this.FrameSplitData.set("double",new SplitData());this.FrameSplitData.set("price",new PriceSplitData());//事件回调
1699
1700
  this.mapEvent=new _map2.default();//通知外部调用 key:JSCHART_EVENT_ID value:{Callback:回调,}
1700
1701
  this.PhonePinch=null;//手机双指操作信息
1702
+ this.TouchDrag=null;//手势拖动操作信息
1701
1703
  this.IsOnTouch=false;//是否再操作数据
1702
1704
  this.TouchDrawCount=0;//手势绘制次数
1703
1705
  this.DisableMouse=false;//禁止鼠标事件
@@ -1741,6 +1743,7 @@ this.RestoreFocusTimer=null;//恢复焦点定时器
1741
1743
  this.PreventRightMenu={Timer:null,Enable:false,Delay:2000};//阻止右键菜单
1742
1744
  //SecondKeyID 1=shiftKey 2=ctrlKey 3=altKey
1743
1745
  this.AryHotKey=[];//热键 { KeyID:87, SecondKeyID:1, CMD:JSCHART_MENU_ID.CMD_FULLSCREEN_SUMMARY_ID, Args:null, Description:"Alt+W 全屏区间统计" },
1746
+ this.FastSlideConfig={MinDistance:500,MinSpeed:3,MaxTime:250};//快速滑动配置 MinDistance=最小的距离 MinSpeed=最小速度 MaxTime=最大间隔时间(ms)
1744
1747
  this.RestoreFocus=function(delay){var _this4=this;var value=1000;if(IFrameSplitOperator.IsNumber(delay))value=delay;this.ClearRestoreFocusTimer();this.RestoreFocusTimer=setTimeout(function(){_this4.SetFocus();},value);};this.ClearRestoreFocusTimer=function(){if(this.RestoreFocusTimer){clearTimeout(this.RestoreFocusTimer);this.RestoreFocusTimer=null;}};this.GetVolUnit=function()//成交量单位
1745
1748
  {var upperSymbol=this.Symbol?this.Symbol.toUpperCase():null;var unit=MARKET_SUFFIX_NAME.GetVolUnit(upperSymbol);return unit;};this.ClearStockCache=function(){this.StockCache.Data=null;this.BuySellData.AryBuy=null;this.BuySellData.ArySell=null;};this.InitalPopMenu=function()//初始化弹出窗口
1746
1749
  {if(this.JSPopMenu)return;this.JSPopMenu=new JSPopMenu();//内置菜单
@@ -1874,11 +1877,11 @@ for(var i=0;i<e.touches.length;++i){var item=e.touches[i];if(isForceLandscape){t
1874
1877
  {var touchCount=e.touches.length;return touchCount==1;};this.StopDragTimer=function(){if(IFrameSplitOperator.IsNumber(this.DragTimer)){clearTimeout(this.DragTimer);this.DragTimer=null;this.IsPress=false;}};this.GetMoveAngle=function(pt,pt2)//计算角度
1875
1878
  {var xMove=Math.abs(pt.X-pt2.X);var yMove=Math.abs(pt.Y-pt2.Y);var angle=Math.atan(xMove/yMove)*180/Math.PI;return angle;};//手机拖拽
1876
1879
  uielement.ontouchstart=function(e){_this6.OnTouchStart(e);};uielement.ontouchmove=function(e){_this6.OnTouchMove(e);};uielement.ontouchend=function(e){_this6.OnTouchEnd(e);};this.AddPhoneDBClickInfo=function(x,y,time){var item={X:x,Y:y,Time:time};this.PhoneDBClickInfo.Start.push(item);};this.ClearPhoneDBClickInfo=function(){this.PhoneDBClickInfo.Start=[];};this.IsShortPhoneClick=function(x,y,time){};this.TryPhoneClickButton=function(x,y,e){if(this.TryClickLock||this.TryClickIndexTitle)//指标枷锁区域 , 指标标题点击
1877
- {if(this.TryClickLock&&this.TryClickLock(x,y))return true;if(this.TryClickIndexTitle&&this.TryClickIndexTitle(x,y))return true;}if(this.ClickFrameButton){var button=this.Frame.PtInButtons(x,y);if(button){this.ClickFrameButton(button,e);return true;}}button=this.PtInExtendChartButtons(x,y);if(button&&this.ClickExtendChartButton){this.ClickExtendChartButton(button,e);return true;}return false;};this.OnTouchStart=function(e){if(this.ChartSplashPaint&&this.ChartSplashPaint.IsEnableSplash==true)return;this.IsPress=false;this.IsOnTouch=true;this.TouchDrawCount=0;this.PhonePinch=null;this.StopDragTimer();var isSingleTouch=this.IsSingleTouch(e);if(this.EnableScrollUpDown==false||!isSingleTouch||//多点触屏
1880
+ {if(this.TryClickLock&&this.TryClickLock(x,y))return true;if(this.TryClickIndexTitle&&this.TryClickIndexTitle(x,y))return true;}if(this.ClickFrameButton){var button=this.Frame.PtInButtons(x,y);if(button){this.ClickFrameButton(button,e);return true;}}button=this.PtInExtendChartButtons(x,y);if(button&&this.ClickExtendChartButton){this.ClickExtendChartButton(button,e);return true;}return false;};this.OnTouchStart=function(e){if(this.ChartSplashPaint&&this.ChartSplashPaint.IsEnableSplash==true)return;this.IsPress=false;this.IsOnTouch=true;this.TouchDrawCount=0;this.PhonePinch=null;this.TouchDrag=null;this.StopDragTimer();var isSingleTouch=this.IsSingleTouch(e);if(this.EnableScrollUpDown==false||!isSingleTouch||//多点触屏
1878
1881
  this.DragMode==JSCHART_DRAG_ID.CLICK_TOUCH_MODE_ID&&this.TouchStatus.CorssCursorShow==true)//十字光标显示,不能滚动页面
1879
- {if(e.cancelable)e.preventDefault();}if(this.IsPhoneDragging(e)){var touches=this.GetToucheData(e,this.IsForceLandscape);var pt=this.PointAbsoluteToRelative(touches[0].clientX,touches[0].clientY,true);if(this.TryPhoneClickButton(pt.X,pt.Y,e))return;if(this.EnableVerticalDrag){this.VerticalDrag={IsDrag:false};if(this.Frame.PtInFrameVertical(pt.X,pt.Y))this.VerticalDrag.IsDrag=true;}var bStartTimer=true;if(this.ChartDrawOption.IsLockScreen){bStartTimer=false;}else if(this.DragMode==JSCHART_DRAG_ID.CLICK_TOUCH_MODE_ID){if(this.TouchStatus.CorssCursorShow==true)bStartTimer=false;}else if(this.DragMode==JSCHART_DRAG_ID.DISABLE_DRAG_ID){bStartTimer=false;}else{if(!isSingleTouch)bStartTimer=false;}if(this.VerticalDrag)bStartTimer=false;if(this.EnableClickModel&&this.ClickModel.IsShowCorssCursor==true)bStartTimer=false;var drag={"Click":{},"LastMove":{}//最后移动的位置
1880
- };//var touches=this.GetToucheData(e,this.IsForceLandscape);
1881
- drag.Click.X=touches[0].clientX;drag.Click.Y=touches[0].clientY;drag.LastMove.X=touches[0].clientX;drag.LastMove.Y=touches[0].clientY;this.MouseDrag=drag;var drawPictureActive=this.GetActiveDrawPicture();//上一次选中的
1882
+ {if(e.cancelable)e.preventDefault();}if(this.IsPhoneDragging(e)){var touches=this.GetToucheData(e,this.IsForceLandscape);var pt=this.PointAbsoluteToRelative(touches[0].clientX,touches[0].clientY,true);if(this.TryPhoneClickButton(pt.X,pt.Y,e))return;if(this.EnableVerticalDrag){this.VerticalDrag={IsDrag:false};if(this.Frame.PtInFrameVertical(pt.X,pt.Y))this.VerticalDrag.IsDrag=true;}var bStartTimer=true;if(this.ChartDrawOption.IsLockScreen){bStartTimer=false;}else if(this.DragMode==JSCHART_DRAG_ID.CLICK_TOUCH_MODE_ID){if(this.TouchStatus.CorssCursorShow==true)bStartTimer=false;}else if(this.DragMode==JSCHART_DRAG_ID.DISABLE_DRAG_ID){bStartTimer=false;}else{if(!isSingleTouch)bStartTimer=false;}if(this.VerticalDrag)bStartTimer=false;if(this.EnableClickModel&&this.ClickModel.IsShowCorssCursor==true)bStartTimer=false;var drag={Click:{},LastMove:{},StartTime:Date.now()};//LastMove 最后移动的位置
1883
+ var touchDrag={Click:{},LastMove:{},StartTime:Date.now()};//var touches=this.GetToucheData(e,this.IsForceLandscape);
1884
+ drag.Click.X=touches[0].clientX;drag.Click.Y=touches[0].clientY;drag.LastMove.X=touches[0].clientX;drag.LastMove.Y=touches[0].clientY;this.MouseDrag=drag;touchDrag.Click.X=touches[0].clientX;touchDrag.Click.Y=touches[0].clientY;touchDrag.LastMove.X=touches[0].clientX;touchDrag.LastMove.Y=touches[0].clientY;this.TouchDrag=touchDrag;var drawPictureActive=this.GetActiveDrawPicture();//上一次选中的
1882
1885
  var selectedChart={Chart:this.SelectedChart.Selected.Chart,Identify:this.SelectedChart.Selected.Identify};//上一次选中的图形
1883
1886
  this.PhoneTouchInfo={Start:{X:touches[0].clientX,Y:touches[0].clientY},End:{X:touches[0].clientX,Y:touches[0].clientY}};if(this.SelectChartDrawPicture)this.SelectChartDrawPicture.IsSelected=false;this.SelectChartDrawPicture=null;var isDrawPictrue=false;if(this.CurrentChartDrawPicture)//画图工具模式
1884
1887
  {var drawPicture=this.CurrentChartDrawPicture;if(drawPicture.Status==2)this.SetChartDrawPictureThirdPoint(drag.Click.X,drag.Click.Y,true);else{this.SetChartDrawPictureFirstPoint(drag.Click.X,drag.Click.Y,true);//只有1个点 直接完成
@@ -1890,7 +1893,7 @@ var self=this;this.DragTimer=setTimeout(function(){self.IsPress=true;if(drag.Cli
1890
1893
  if(self.EnableClickModel===true)self.ClickModel.IsShowCorssCursor=true;self.MoveCorssCursor(drag.Click,e);//移动十字光标
1891
1894
  }},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)
1892
1895
  }else if(this.VerticalDrag){if(!this.VerticalDrag.IsDrag)this.MoveCorssCursor(drag.Click,e);//没有点击X轴, 就显示十字光标
1893
- }else if(this.IsClickShowCorssCursor){this.MoveCorssCursor(drag.Click,e);}this.TouchEvent({EventID:JSCHART_EVENT_ID.ON_PHONE_TOUCH,FunctionName:"OnTouchStart"},e);var drawType=0;if(drawPictureActive.Select.Guid!=null){if(drawPictureActive.Select.Guid&&drawPictureActive.Select.Chart)drawType=1;}if(drawType==1)this.Draw();}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计算
1896
+ }else if(this.IsClickShowCorssCursor){this.MoveCorssCursor(drag.Click,e);}this.TouchEvent({EventID:JSCHART_EVENT_ID.ON_PHONE_TOUCH,FunctionName:"OnTouchStart"},e);var drawType=0;if(drawPictureActive.Select.Guid!=null){if(drawPictureActive.Select.Guid&&drawPictureActive.Select.Chart)drawType=1;}if(drawType==1)this.Draw();}else if(this.IsPhonePinching(e)){var phonePinch={Start:{},Last:{},StartTime:Date.now()};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计算
1894
1897
  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;//是否移动十字光标
1895
1898
  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}`);
1896
1899
  if(this.CurrentChartDrawPicture&&this.CurrentChartDrawPicture.EnableMove===true){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)//画图工具移动
@@ -1898,11 +1901,11 @@ if(this.CurrentChartDrawPicture&&this.CurrentChartDrawPicture.EnableMove===true)
1898
1901
  {var mouseDrag=this.MouseDrag;this.MouseDrag=null;this.MoveCorssCursor(drag.Click,e);//移动十字光标
1899
1902
  }else if(this.DragMode==1||isMoveCorssCursor==false)//数据左右拖拽
1900
1903
  {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;//右移数据
1901
- 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)//放大
1904
+ 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;}if(this.TouchDrag){var touchDrag=this.TouchDrag;touchDrag.LastMove.X=touches[0].clientX;touchDrag.LastMove.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)//放大
1902
1905
  {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();
1903
1906
  this.Draw();this.ShowTooltipByKeyDown();this.StopDragTimer();}else//缩小
1904
1907
  {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();
1905
- 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;}}};//手势事件
1908
+ 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;this.FastSlideEvent();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.TouchDrag=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;}}};//手势事件
1906
1909
  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;//十字显示
1907
1910
  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;};//绘制选中图形的状态
1908
1911
  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;//框架
@@ -2373,7 +2376,8 @@ AryMenu:aryMenu,Command:command,e:e,PreventDefault:false};if(bMinuteChart)sendDa
2373
2376
  event.Callback(event,sendData,this);aryMenu=sendData.AryMenu;command=sendData.Command;if(sendData.PreventDefault){this.Draw();return;}}if(command){this.ExecuteMenuCommand(command.ID,command.Args);}else if(aryMenu){this.PopupSelectRectMenuV3(aryMenu,data,e);}this.Draw();}};this.MoveCorssCursorUp=function(step){if(!IFrameSplitOperator.IsNumber(this.LastPoint.Y))return;var border=this.Frame.ChartBorder.GetBorder();var top=border.TopEx;if(this.LastPoint.Y-step<=top)return;this.LastPoint.Y-=step;this.DrawDynamicInfo();};this.MoveCorssCursorDown=function(step){if(!IFrameSplitOperator.IsNumber(this.LastPoint.Y))return;var border=this.Frame.ChartBorder.GetBorder();var border=this.Frame.ChartBorder.GetBorder();var bottom=border.BottomEx;if(this.LastPoint.Y+step>=bottom)return;this.LastPoint.Y+=step;this.DrawDynamicInfo();};//整屏区间统计
2374
2377
  this.FullScreenSummary=function(){var kData=this.GetKData();if(!kData||!IFrameSplitOperator.IsNonEmptyArray(kData.Data))return false;var paint=this.GetRectSelectPaint();if(!paint)return false;var xPointcount=0;if(this.Frame.XPointCount)xPointcount=this.Frame.XPointCount;else xPointcount=this.Frame.SubFrame[0].Frame.XPointCount;if(!IFrameSplitOperator.IsPlusNumber(xPointcount))return false;var startIndex=kData.DataOffset;var endIndex=startIndex+xPointcount;this.UpdateSelectRect(startIndex,endIndex);var selectData=paint.GetSelectRectData();var border=this.Frame.SubFrame[0].Frame.GetBorder();var data={X:border.ChartWidth/2,Y:border.ChartHeight/2,SelectData:selectData,//区间选择的数据
2375
2378
  RectSelectPaint:paint//区间选择背景
2376
- };var e={data:data};if(this.DialogSelectRect)this.DrawSelectRectDialog(e);return true;};}function GetDevicePixelRatio(){if(typeof window=='undefined')return 1;return window.devicePixelRatio||1;}function GetFontHeight(context,font,word){if(!context)return null;if(font)context.font=font;var text='擎';if(IFrameSplitOperator.IsString(word))text=word;var fontInfo=context.measureText(text);var textHeight=fontInfo.fontBoundingBoxAscent+fontInfo.fontBoundingBoxDescent;if(!IFrameSplitOperator.IsNumber(textHeight))textHeight=fontInfo.width+2*GetDevicePixelRatio();return textHeight;}function IsPhoneWeb(){var userAgentInfo=navigator.userAgent;var Agents=new Array("Android","iPhone","SymbianOS","Windows Phone","iPad","iPod");for(var v=0;v<Agents.length;v++){if(userAgentInfo.indexOf(Agents[v])>0)return true;}return false;}function OnKeyDown(e)//键盘事件
2379
+ };var e={data:data};if(this.DialogSelectRect)this.DrawSelectRectDialog(e);return true;};//快速滑动
2380
+ this.FastSlideEvent=function(){if(!this.TouchDrag)return false;if(!this.FastSlideConfig)return false;var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_TOUCH_FAST_SLIDE);if(!event||!event.Callback)return false;var config=this.FastSlideConfig;var drag=this.TouchDrag;var time=Date.now();var spanTime=time-drag.StartTime;if(spanTime>config.MaxTime)return false;if(!drag.Click||!drag.LastMove)return false;var xStart=drag.Click.X;var xEnd=drag.LastMove.X;if(!IFrameSplitOperator.IsNumber(xStart)||!IFrameSplitOperator.IsNumber(xEnd))return false;var distance=xEnd-xStart;var speed=Math.abs(distance)/spanTime;JSConsole.Chart.Log('[JSChartContainer:FastSlideEvent] speed='+speed+', distance='+distance+', spanTime='+spanTime);if(Math.abs(distance)<config.MinDistance)return false;if(speed<config.MinSpeed)return false;var sendData={Speed:speed,Distance:distance,IsLeft:distance<0?true:false};event.Callback(event,sendData,this);return true;};}function GetDevicePixelRatio(){if(typeof window=='undefined')return 1;return window.devicePixelRatio||1;}function GetFontHeight(context,font,word){if(!context)return null;if(font)context.font=font;var text='擎';if(IFrameSplitOperator.IsString(word))text=word;var fontInfo=context.measureText(text);var textHeight=fontInfo.fontBoundingBoxAscent+fontInfo.fontBoundingBoxDescent;if(!IFrameSplitOperator.IsNumber(textHeight))textHeight=fontInfo.width+2*GetDevicePixelRatio();return textHeight;}function IsPhoneWeb(){var userAgentInfo=navigator.userAgent;var Agents=new Array("Android","iPhone","SymbianOS","Windows Phone","iPad","iPod");for(var v=0;v<Agents.length;v++){if(userAgentInfo.indexOf(Agents[v])>0)return true;}return false;}function OnKeyDown(e)//键盘事件
2377
2381
  {if(this.JSChartContainer&&this.JSChartContainer.OnKeyDown)this.JSChartContainer.OnKeyDown(e);}function OnWheel(e)//上下滚动事件
2378
2382
  {if(this.JSChartContainer&&this.JSChartContainer.OnWheel)this.JSChartContainer.OnWheel(e);}function ToFixed(number,precision){var b=1;if(isNaN(number))return number;if(number<0)b=-1;var multiplier=Math.pow(10,precision);var value=Math.round(Math.abs(number)*multiplier)/multiplier*b;if(/^(\d+(?:\.\d+)?)(e)([\-]?\d+)$/.test(value))var s=value.toFixed2(precision);else var s=value.toString();var rs=s.indexOf('.');if(rs<0&&precision>0){rs=s.length;s+='.';}while(s.length<=rs+precision){s+='0';}return s;}function IsRectOverlap(rt,rt2){if(Math.max(rt.Left,rt2.Left)<Math.min(rt.Right,rt2.Right)&&Math.max(rt.Top,rt2.Top)<Math.min(rt.Bottom,rt2.Bottom))return true;return false;}//获取文字高度和宽度
2379
2383
  function GetTextSize(canvas,text,option){var data=canvas.measureText(text);var height=Math.abs(Math.abs(data.fontBoundingBoxAscent)+Math.abs(data.fontBoundingBoxDescent));var textBaseline=canvas.textBaseline;if(textBaseline=="top")height=data.fontBoundingBoxDescent;else if(textBaseline=="bottom")height=data.fontBoundingBoxAscent;var result={Width:data.width,Height:height};return result;}Number.prototype.toFixed2=Number.prototype.toFixed;//备份下老的
@@ -8513,26 +8517,26 @@ this.PtInClient_V2=function(x,y){this.Canvas.beginPath();if(this.Frame.IsHScreen
8513
8517
  {for(var i=0;i<border.DayBorder.length;++i){var client=border.DayBorder[i];this.Canvas.beginPath();this.Canvas.rect(client.LeftEx,border.TopEx,client.RightEx-client.LeftEx,border.BottomEx-border.TopEx);if(this.Canvas.isPointInPath(x,y))return 100+i;//盘前
8514
8518
  this.Canvas.beginPath();this.Canvas.rect(client.Left,border.TopEx,client.LeftEx-client.Left,border.BottomEx-border.TopEx);if(this.Canvas.isPointInPath(x,y))return 200+i;//盘后
8515
8519
  this.Canvas.beginPath();this.Canvas.rect(client.RightEx,border.TopEx,client.Right-client.RightEx,border.BottomEx-border.TopEx);if(this.Canvas.isPointInPath(x,y))return 300+i;}return-2;}this.Canvas.rect(border.LeftEx,border.Top,border.RightEx-border.LeftEx,border.Bottom-border.Top);}if(this.Canvas.isPointInPath(x,y))return 1;if(this.Frame.ChartBorder.LeftExtendWidth>10){this.Canvas.beginPath();if(this.Frame.IsHScreen===true){this.Canvas.rect(border.Left,border.Top,border.Right-border.Left,border.TopEx-border.Top);}else{this.Canvas.rect(border.Left,border.Top,border.LeftEx-border.Left,border.Bottom-border.Top);}if(this.Canvas.isPointInPath(x,y))return 2;}if(this.Frame.ChartBorder.RightExtendWidth>10){this.Canvas.beginPath();if(this.Frame.IsHScreen===true){this.Canvas.rect(border.Left,border.BottomEx,border.Right-border.Left,border.Bottom-border.BottomEx);}else{this.Canvas.rect(border.RightEx,border.Top,border.Right-border.RightEx,border.Bottom-border.Top);}if(this.Canvas.isPointInPath(x,y))return 3;}return-1;};//手势
8516
- this.OnTouchStart=function(e){var _this28=this;if(this.DragMode==0)return;if(this.ChartSplashPaint&&this.ChartSplashPaint.IsEnableSplash==true)return;this.IsPress=false;this.IsOnTouch=true;this.TouchDrawCount=0;this.PhonePinch=null;this.StopDragTimer();if(this.EnableScrollUpDown==false)e.preventDefault();//上下拖动图形不能阻止事件
8517
- if(this.IsPhoneDragging(e)){var drag={Click:{},LastMove:{}};//LastMove=最后移动的位置
8518
- var touches=this.GetToucheData(e,this.IsForceLandscape);var pt=this.PointAbsoluteToRelative(touches[0].clientX,touches[0].clientY,true);if(this.TryClickLock||this.TryClickIndexTitle)//指标枷锁区域 , 指标标题点击
8519
- {var x=pt.X;var y=pt.Y;if(this.TryClickLock&&this.TryClickLock(x,y))return;if(this.TryClickIndexTitle&&this.TryClickIndexTitle(x,y))return;}if(this.ClickFrameButton){var button=this.Frame.PtInButtons(pt.X,pt.Y);if(button){this.ClickFrameButton(button,e);return;}}drag.Click.X=touches[0].clientX;drag.Click.Y=touches[0].clientY;drag.LastMove.X=touches[0].clientX;drag.LastMove.Y=touches[0].clientY;var self=this;var T_ShowCorssCursor=function T_ShowCorssCursor()//临时函数(Temp_) T_开头
8520
+ this.OnTouchStart=function(e){var _this28=this;if(this.DragMode==0)return;if(this.ChartSplashPaint&&this.ChartSplashPaint.IsEnableSplash==true)return;this.IsPress=false;this.IsOnTouch=true;this.TouchDrawCount=0;this.PhonePinch=null;this.TouchDrag=null;this.StopDragTimer();if(this.EnableScrollUpDown==false)e.preventDefault();//上下拖动图形不能阻止事件
8521
+ if(this.IsPhoneDragging(e)){var drag={Click:{},LastMove:{},StartTime:Date.now()};//LastMove=最后移动的位置 StartTime=开始时间
8522
+ var touchDrag={Click:{},LastMove:{},StartTime:Date.now()};var touches=this.GetToucheData(e,this.IsForceLandscape);var pt=this.PointAbsoluteToRelative(touches[0].clientX,touches[0].clientY,true);if(this.TryClickLock||this.TryClickIndexTitle)//指标枷锁区域 , 指标标题点击
8523
+ {var x=pt.X;var y=pt.Y;if(this.TryClickLock&&this.TryClickLock(x,y))return;if(this.TryClickIndexTitle&&this.TryClickIndexTitle(x,y))return;}if(this.ClickFrameButton){var button=this.Frame.PtInButtons(pt.X,pt.Y);if(button){this.ClickFrameButton(button,e);return;}}drag.Click.X=touches[0].clientX;drag.Click.Y=touches[0].clientY;drag.LastMove.X=touches[0].clientX;drag.LastMove.Y=touches[0].clientY;touchDrag.Click.X=touches[0].clientX;touchDrag.Click.Y=touches[0].clientY;touchDrag.LastMove.X=touches[0].clientX;touchDrag.LastMove.Y=touches[0].clientY;var self=this;var T_ShowCorssCursor=function T_ShowCorssCursor()//临时函数(Temp_) T_开头
8520
8524
  {if(self.ChartCorssCursor.IsShow===true)//移动十字光标
8521
8525
  {var pt=self.PointAbsoluteToRelative(drag.Click.X,drag.Click.Y,true);var x=pt.X;var y=pt.Y;self.OnMouseMove(x,y,e);}};if(this.ChartDrawOption.IsLockScreen){this.MouseDrag=drag;if(this.SelectChartDrawPicture)this.SelectChartDrawPicture.IsSelected=false;this.SelectChartDrawPicture=null;if(this.CurrentChartDrawPicture)//画图工具模式
8522
8526
  {var drawPicture=this.CurrentChartDrawPicture;if(drawPicture.Status==2)this.SetChartDrawPictureThirdPoint(drag.Click.X,drag.Click.Y,true);else{this.SetChartDrawPictureFirstPoint(drag.Click.X,drag.Click.Y,true);//只有1个点 直接完成
8523
8527
  if(this.FinishChartDrawPicturePoint())this.DrawDynamicInfo({Corss:false,Tooltip:false});}if(e.cancelable)e.preventDefault();return;}else{var drawPictrueData={};var pixelTatio=GetDevicePixelRatio();//鼠标移动坐标是原始坐标 需要乘以放大倍速
8524
8528
  drawPictrueData.X=touches[0].clientX-uielement.getBoundingClientRect().left;drawPictrueData.Y=touches[0].clientY-uielement.getBoundingClientRect().top;if(this.GetChartDrawPictureByPoint(drawPictrueData)){if(drawPictrueData.ChartDrawPicture.EnableMove==true)drawPictrueData.ChartDrawPicture.Status=20;drawPictrueData.ChartDrawPicture.ValueToPoint();drawPictrueData.ChartDrawPicture.MovePointIndex=drawPictrueData.PointIndex;drawPictrueData.ChartDrawPicture.IsSelected=true;this.CurrentChartDrawPicture=drawPictrueData.ChartDrawPicture;this.SelectChartDrawPicture=drawPictrueData.ChartDrawPicture;var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CLICK_DRAWPICTURE);//选中画图工具事件
8525
- if(event&&event.Callback){var sendData={DrawPicture:drawPictrueData.ChartDrawPicture};event.Callback(event,sendData,this);}if(e.cancelable)e.preventDefault();return;}}}else{if(this.EnableScrollUpDown==true){this.DragTimer=setTimeout(function(){self.IsPress=true;if(drag.Click.X==drag.LastMove.X&&drag.Click.Y==drag.LastMove.Y){var mouseDrag=self.MouseDrag;self.MouseDrag=null;T_ShowCorssCursor();self.PreventTouchEvent(e);}},800);}this.MouseDrag=drag;this.PhoneTouchInfo={Start:{X:touches[0].clientX,Y:touches[0].clientY},End:{X:touches[0].clientX,Y:touches[0].clientY}};this.SelectChartDrawPicture=null;var bStartTimer=true;//长按计时开始
8529
+ if(event&&event.Callback){var sendData={DrawPicture:drawPictrueData.ChartDrawPicture};event.Callback(event,sendData,this);}if(e.cancelable)e.preventDefault();return;}}}else{if(this.EnableScrollUpDown==true){this.DragTimer=setTimeout(function(){self.IsPress=true;if(drag.Click.X==drag.LastMove.X&&drag.Click.Y==drag.LastMove.Y){var mouseDrag=self.MouseDrag;self.MouseDrag=null;T_ShowCorssCursor();self.PreventTouchEvent(e);}},800);}this.MouseDrag=drag;this.TouchDrag=touchDrag;this.PhoneTouchInfo={Start:{X:touches[0].clientX,Y:touches[0].clientY},End:{X:touches[0].clientX,Y:touches[0].clientY}};this.SelectChartDrawPicture=null;var bStartTimer=true;//长按计时开始
8526
8530
  if(this.EnableClickModel){if(this.ClickModel.IsShowCorssCursor==true)bStartTimer=false;else bStartTimer=true;}if(bStartTimer){this.StopDragTimer();this.DragTimer=setTimeout(function(){_this28.IsPress=true;if(drag.Click.X==drag.LastMove.X&&drag.Click.Y==drag.LastMove.Y)//手指没有移动,出现十字光标
8527
8531
  {_this28.MouseDrag=null;//移动十字光标
8528
8532
  var x=drag.Click.X;var y=drag.Click.Y;if(_this28.EnableClickModel===true)_this28.ClickModel.IsShowCorssCursor=true;self.MoveCorssCursor(drag.Click,e);//移动十字光标
8529
8533
  }},this.PressTime);}else if(!this.EnableClickModel){if(this.EnableScrollUpDown==false)T_ShowCorssCursor();//移动十字光标
8530
- else if(this.IsClickShowCorssCursor)T_ShowCorssCursor();}}if(this.EnableZoomIndexWindow){this.PhoneDBClick.AddTouchStart(touches[0].clientX,touches[0].clientY,Date.now());JSConsole.Chart.Log("[MinuteChartContainer::OnTouchStart] PhoneDBClick ",this.PhoneDBClick);}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){var pixelTatio=GetDevicePixelRatio();var x=touches[0].clientX-uielement.getBoundingClientRect().left*pixelTatio;var y=touches[0].clientY-uielement.getBoundingClientRect().top*pixelTatio;this.OnMouseMove(x,y,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);if(this.CurrentChartDrawPicture&&this.CurrentChartDrawPicture.EnableMove===true){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)//画图工具移动
8534
+ else if(this.IsClickShowCorssCursor)T_ShowCorssCursor();}}if(this.EnableZoomIndexWindow){this.PhoneDBClick.AddTouchStart(touches[0].clientX,touches[0].clientY,Date.now());JSConsole.Chart.Log("[MinuteChartContainer::OnTouchStart] PhoneDBClick ",this.PhoneDBClick);}this.TouchEvent({EventID:JSCHART_EVENT_ID.ON_PHONE_TOUCH,FunctionName:"OnTouchStart"},e);}else if(this.IsPhonePinching(e)){var phonePinch={Start:{},Last:{},StartTime:Date.now()};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){var pixelTatio=GetDevicePixelRatio();var x=touches[0].clientX-uielement.getBoundingClientRect().left*pixelTatio;var y=touches[0].clientY-uielement.getBoundingClientRect().top*pixelTatio;this.OnMouseMove(x,y,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);if(this.CurrentChartDrawPicture&&this.CurrentChartDrawPicture.EnableMove===true){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)//画图工具移动
8531
8535
  {if(moveSetp<5&&moveUpDown<5)return;if(this.MoveChartDrawPicture(touches[0].clientX-drag.LastMove.X,touches[0].clientY-drag.LastMove.Y,true)){this.DrawDynamicInfo();}}drag.LastMove.X=touches[0].clientX;drag.LastMove.Y=touches[0].clientY;}else if(this.EnableClickModel&&this.ClickModel.IsShowCorssCursor===false){//点击模式 十字光标隐藏 不做任何操作
8532
8536
  }else{//上下滚动
8533
- if((moveUpDown>0&&moveSetp<=3||moveAngle<=this.TouchMoveMinAngle)&&this.EnableScrollUpDown==true){this.StopDragTimer();return;}this.PreventTouchEvent(e);this.MouseDrag=null;var pixelTatio=GetDevicePixelRatio();var x=touches[0].clientX-uielement.getBoundingClientRect().left*pixelTatio;var y=touches[0].clientY-uielement.getBoundingClientRect().top*pixelTatio;this.OnMouseMove(x,y,e);}}if(this.PhoneTouchInfo){this.PhoneTouchInfo.End.X=touches[0].clientX;this.PhoneTouchInfo.End.Y=touches[0].clientY;}}else if(this.IsPhonePinching(e)){this.PreventTouchEvent(e);var phonePinch=this.PhonePinch;if(!phonePinch)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(xStep)>minStep){var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_MINUTE_TOUCH_ZOOM);if(event&&event.Callback){var data={XStep:xStep,YStep:yStep,PreventDefault:false};event.Callback(event,data,this);if(data.PreventDefault){this.PhonePinch=null;this.StopDragTimer();return;}}}phonePinch.Last={"X":touches[0].pageX,"Y":touches[0].pageY,"X2":touches[1].pageX,"Y2":touches[1].pageY};}if(this.EnableScrollUpDown==false){e.preventDefault();}else{if(drag==null){this.PreventTouchEvent(e);//十字光标出来了,阻止消息
8537
+ if((moveUpDown>0&&moveSetp<=3||moveAngle<=this.TouchMoveMinAngle)&&this.EnableScrollUpDown==true){this.StopDragTimer();return;}this.PreventTouchEvent(e);this.MouseDrag=null;var pixelTatio=GetDevicePixelRatio();var x=touches[0].clientX-uielement.getBoundingClientRect().left*pixelTatio;var y=touches[0].clientY-uielement.getBoundingClientRect().top*pixelTatio;this.OnMouseMove(x,y,e);}}if(this.PhoneTouchInfo){this.PhoneTouchInfo.End.X=touches[0].clientX;this.PhoneTouchInfo.End.Y=touches[0].clientY;}if(this.TouchDrag){var touchDrag=this.TouchDrag;touchDrag.LastMove.X=touches[0].clientX;touchDrag.LastMove.Y=touches[0].clientY;}}else if(this.IsPhonePinching(e)){this.PreventTouchEvent(e);var phonePinch=this.PhonePinch;if(!phonePinch)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(xStep)>minStep){var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_MINUTE_TOUCH_ZOOM);if(event&&event.Callback){var data={XStep:xStep,YStep:yStep,PreventDefault:false};event.Callback(event,data,this);if(data.PreventDefault){this.PhonePinch=null;this.StopDragTimer();return;}}}phonePinch.Last={"X":touches[0].pageX,"Y":touches[0].pageY,"X2":touches[1].pageX,"Y2":touches[1].pageY};}if(this.EnableScrollUpDown==false){e.preventDefault();}else{if(drag==null){this.PreventTouchEvent(e);//十字光标出来了,阻止消息
8534
8538
  }else{this.StopDragTimer();//上下推动图片,停止定时器,消息传递下去
8535
- }}};this.OnTouchEnd=function(e){JSConsole.Chart.Log('[MinuteChartContainer::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.StopDragTimer();this.TouchEvent({EventID:JSCHART_EVENT_ID.ON_PHONE_TOUCH,FunctionName:"OnTouchEnd"},e);this.OnTouchFinished();this.TouchDrawCount=0;};//键盘左右移动十字光标
8539
+ }}};this.OnTouchEnd=function(e){JSConsole.Chart.Log('[MinuteChartContainer::OnTouchEnd]',e);if(this.ChartSplashPaint&&this.ChartSplashPaint.IsEnableSplash==true)return;this.FastSlideEvent();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.StopDragTimer();this.TouchEvent({EventID:JSCHART_EVENT_ID.ON_PHONE_TOUCH,FunctionName:"OnTouchEnd"},e);this.OnTouchFinished();this.TouchDrawCount=0;this.TouchDrag=null;};//键盘左右移动十字光标
8536
8540
  this.OnKeyDown=function(e){this.StopDisplayLatest();if(this.ChartSplashPaint&&this.ChartSplashPaint.IsEnableSplash==true)return;var keyID=e.keyCode?e.keyCode:e.which;//回调事件
8537
8541
  var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_KEYDOWN);if(event&&event.Callback){var sendData={e:e,KeyID:keyID,PreventDefault:false};event.Callback(event,sendData,this);if(sendData.PreventDefault)return;}var draw=false;if(this.ChartCorssCursor&&this.ChartCorssCursor.OnKeyDown)//十字光标 隐藏显示
8538
8542
  {var sendData={e:e,KeyID:keyID,Draw:false,PreventDefault:false};this.ChartCorssCursor.OnKeyDown(sendData);draw=sendData.Draw;}if(this.OnHotKeyDown(keyID,e)){//不让滚动条滚动
@@ -9168,7 +9172,7 @@ this.OnTouchStart=function(e){if(this.ChartSplashPaint&&this.ChartSplashPaint.Is
9168
9172
  return;
9169
9173
  }
9170
9174
  }
9171
- */if(this.EnableVerticalDrag){this.VerticalDrag={IsDrag:false};if(this.Frame.PtInFrameVertical(pt.X,pt.Y))this.VerticalDrag.IsDrag=true;}var bStartTimer=true;if(this.ChartDrawOption.IsLockScreen){bStartTimer=false;}else if(this.DragMode==JSCHART_DRAG_ID.CLICK_TOUCH_MODE_ID){if(this.TouchStatus.CorssCursorShow==true)bStartTimer=false;}else if(this.DragMode==JSCHART_DRAG_ID.DISABLE_DRAG_ID){bStartTimer=false;}else{if(!isSingleTouch)bStartTimer=false;}if(this.VerticalDrag)bStartTimer=false;var drag={Click:{},LastMove:{}};//LastMove=最后移动的位置
9175
+ */if(this.EnableVerticalDrag){this.VerticalDrag={IsDrag:false};if(this.Frame.PtInFrameVertical(pt.X,pt.Y))this.VerticalDrag.IsDrag=true;}var bStartTimer=true;if(this.ChartDrawOption.IsLockScreen){bStartTimer=false;}else if(this.DragMode==JSCHART_DRAG_ID.CLICK_TOUCH_MODE_ID){if(this.TouchStatus.CorssCursorShow==true)bStartTimer=false;}else if(this.DragMode==JSCHART_DRAG_ID.DISABLE_DRAG_ID){bStartTimer=false;}else{if(!isSingleTouch)bStartTimer=false;}if(this.VerticalDrag)bStartTimer=false;var drag={Click:{},LastMove:{},StartTime:Date.now()};//LastMove=最后移动的位置
9172
9176
  //var touches=this.GetToucheData(e,false);
9173
9177
  drag.Click.X=touches[0].clientX;drag.Click.Y=touches[0].clientY;drag.LastMove.X=touches[0].clientX;drag.LastMove.Y=touches[0].clientY;this.MouseDrag=drag;this.PhoneTouchInfo={Start:{X:touches[0].clientX,Y:touches[0].clientY},End:{X:touches[0].clientX,Y:touches[0].clientY}};if(this.SelectChartDrawPicture)this.SelectChartDrawPicture.IsSelected=false;this.SelectChartDrawPicture=null;if(this.CurrentChartDrawPicture)//画图工具模式
9174
9178
  {var drawPicture=this.CurrentChartDrawPicture;if(drawPicture.Status==2)this.SetChartDrawPictureThirdPoint(drag.Click.X,drag.Click.Y,true);else{this.SetChartDrawPictureFirstPoint(drag.Click.X,drag.Click.Y,true);//只有1个点 直接完成
@@ -9178,7 +9182,7 @@ if(event&&event.Callback){var sendData={DrawPicture:drawPictrueData.ChartDrawPic
9178
9182
  {var self=this;this.DragTimer=setTimeout(function(){self.IsPress=false;if(drag.Click.X==drag.LastMove.X&&drag.Click.Y==drag.LastMove.Y)//手指没有移动,出现十字光标
9179
9183
  {var mouseDrag=self.MouseDrag;self.MouseDrag=null;self.MoveCorssCursor(drag.Click,e);//移动十字光标
9180
9184
  }},self.PressTime);}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.VerticalDrag){if(!this.VerticalDrag.IsDrag)this.MoveCorssCursor(drag.Click,e);//没有点击X轴, 就显示十字光标
9181
- }else if(this.IsClickShowCorssCursor){this.MoveCorssCursor(drag.Click,e);}}else if(this.IsPhonePinching(e)){var phonePinch={"Start":{},"Last":{}};var touches=this.GetToucheData(e,false);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;//if (this.ChartDrawOption.IsLockScreen) this.PhonePinch=null; //锁屏禁止缩放
9185
+ }else if(this.IsClickShowCorssCursor){this.MoveCorssCursor(drag.Click,e);}}else if(this.IsPhonePinching(e)){var phonePinch={Start:{},Last:{},StartTime:Date.now()};var touches=this.GetToucheData(e,false);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;//if (this.ChartDrawOption.IsLockScreen) this.PhonePinch=null; //锁屏禁止缩放
9182
9186
  }this.TouchEvent({EventID:JSCHART_EVENT_ID.ON_PHONE_TOUCH,FunctionName:"OnTouchStart"},e);};this.OnTouchMove=function(e){if(this.ChartSplashPaint&&this.ChartSplashPaint.IsEnableSplash==true)return;if(e.cancelable)e.preventDefault();var touches=this.GetToucheData(e,false);if(this.IsPhoneDragging(e)){var drag=this.MouseDrag;if(drag==null){if(!this.ChartDrawOption.IsLockScreen)this.MoveCorssCursor({X:touches[0].clientX,Y:touches[0].clientY},e);}else{var moveSetp=Math.abs(drag.LastMove.Y-touches[0].clientY);var moveUpDown=Math.abs(drag.LastMove.X-touches[0].clientX);var isMoveCorssCursor=this.DragMode==JSCHART_DRAG_ID.CLICK_TOUCH_MODE_ID&&this.TouchStatus.CorssCursorShow==true;//是否移动十字光标
9183
9187
  if(this.VerticalDrag){if(this.VerticalDrag.IsDrag===true)isMoveCorssCursor=false;else isMoveCorssCursor=true;}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)//画图工具移动
9184
9188
  {if(moveSetp<5&&moveUpDown<5)return;if(this.MoveChartDrawPicture(touches[0].clientX-drag.LastMove.X,touches[0].clientY-drag.LastMove.Y,true)){this.DrawDynamicInfo();}}drag.LastMove.X=touches[0].clientX;drag.LastMove.Y=touches[0].clientY;}else if(isMoveCorssCursor)//点击模式下 十字光标显示 左右移动十字光标
@@ -13397,7 +13401,7 @@ if(stock&&stock.NameEx){var nameEx=stock.NameEx;drawInfo.Text=this.TextEllipsis(
13397
13401
  if(stock){this.DrawLimitPriceBorder(stock.Open,stock,left,top,column.Width);this.GetPriceDrawInfo(stock.Open,stock,data,drawInfo,{LimitBG:true});}this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.HIGH_ID){//如果行情最高价为涨停价,则对内容加灰框
13398
13402
  if(stock){this.DrawLimitPriceBorder(stock.High,stock,left,top,column.Width);this.GetPriceDrawInfo(stock.High,stock,data,drawInfo,{LimitBG:true});}this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.LOW_ID){//如果行情最低价为跌停价,则对内容加灰框
13399
13403
  if(stock){this.DrawLimitPriceBorder(stock.Low,stock,left,top,column.Width);this.GetPriceDrawInfo(stock.Low,stock,data,drawInfo,{LimitBG:true});}this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.YCLOSE_ID){if(stock)this.GetPriceDrawInfo(stock.YClose,stock,data,drawInfo);this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.BUY_PRICE_ID){if(stock)this.GetPriceDrawInfo(stock.BuyPrice,stock,data,drawInfo);this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.FUTURES_CLOSE_ID||column.Type==REPORT_COLUMN_ID.FUTURES_YCLOSE_ID){var fieldName=MAP_COLUMN_FIELD.get(column.Type);if(stock&&IFrameSplitOperator.IsNumber(stock[fieldName])){var value=stock[fieldName];this.GetPriceDrawInfo(value,stock,data,drawInfo);}this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.SELL_PRICE_ID){if(stock)this.GetPriceDrawInfo(stock.SellPrice,stock,data,drawInfo);this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.AVERAGE_PRICE_ID){if(stock)this.GetPriceDrawInfo(stock.AvPrice,stock,data,drawInfo);this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.EXCHANGE_RATE_ID){if(stock&&IFrameSplitOperator.IsNumber(stock.Exchange))drawInfo.Text=stock.Exchange.toFixed(2);this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.BUY_VOL_ID){if(stock&&IFrameSplitOperator.IsNumber(stock.BuyVol))drawInfo.Text=this.FormatVolString(stock.BuyVol);this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.SELL_VOL_ID){if(stock&&IFrameSplitOperator.IsNumber(stock.SellVol))drawInfo.Text=this.FormatVolString(stock.SellVol);this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.VOL_ID){if(stock&&IFrameSplitOperator.IsNumber(stock.Vol))drawInfo.Text=this.FormatVolString(stock.Vol);this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.VOL_IN_ID){if(stock&&IFrameSplitOperator.IsNumber(stock.VolIn))drawInfo.Text=this.FormatVolString(stock.VolIn);this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.VOL_OUT_ID){if(stock&&IFrameSplitOperator.IsNumber(stock.VolOut))drawInfo.Text=this.FormatVolString(stock.VolOut);this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.TOTAL_SHARES_ID){if(stock&&IFrameSplitOperator.IsNumber(stock.TotalShares))drawInfo.Text=this.FormatVolString(stock.TotalShares);this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.OUTSTANDING_SHARES_ID){if(stock&&IFrameSplitOperator.IsNumber(stock.OutShares))drawInfo.Text=this.FormatVolString(stock.OutShares);this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.CIRC_MARKET_VALUE_ID||column.Type==REPORT_COLUMN_ID.MARKET_VALUE_ID||column.Type==REPORT_COLUMN_ID.AMOUNT_ID){var fieldName=MAP_COLUMN_FIELD.get(column.Type);if(stock&&IFrameSplitOperator.IsNumber(stock[fieldName]))drawInfo.Text=this.FormatVolString(stock[fieldName]);this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.INCREASE_ID||column.Type==REPORT_COLUMN_ID.AMPLITUDE_ID||column.Type==REPORT_COLUMN_ID.UPDOWN_ID||column.Type==REPORT_COLUMN_ID.RISING_SPEED_1M_ID||column.Type==REPORT_COLUMN_ID.RISING_SPEED_3M_ID||column.Type==REPORT_COLUMN_ID.RISING_SPEED_5M_ID||column.Type==REPORT_COLUMN_ID.RISING_SPEED_10M_ID||column.Type==REPORT_COLUMN_ID.RISING_SPEED_15M_ID){var fieldName=MAP_COLUMN_FIELD.get(column.Type);if(stock&&IFrameSplitOperator.IsNumber(stock[fieldName])){var value=stock[fieldName];drawInfo.Text=value.toFixed(2);drawInfo.TextColor=this.GetUpDownColor(value,0);}this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.FUTURES_POSITION_ID||column.Type==REPORT_COLUMN_ID.FUTURES_OPEN_POSITION_ID||column.Type==REPORT_COLUMN_ID.FUTURES_CLOSE_POSITION_ID){//持仓量原始值输出
13400
- var fieldName=MAP_COLUMN_FIELD.get(column.Type);if(stock&&IFrameSplitOperator.IsNumber(stock[fieldName])){var value=stock[fieldName];drawInfo.Text=value.toFixed(0);}this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_STRING_TEXT_ID){this.GetCustomStringDrawInfo(data,column,drawInfo);}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_NUMBER_TEXT_ID){this.GetCustomNumberDrawInfo(data,column,drawInfo);}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_DATETIME_TEXT_ID){this.GetCustomDateTimeDrawInfo(data,column,drawInfo);}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_ICON_ID){this.GetCustomIconDrawInfo(data,column,drawInfo);}else if(column.Type==REPORT_COLUMN_ID.CLOSE_LINE_ID){var rtItem={Left:left,Top:top,Width:column.Width,Height:this.RowHeight};rtItem.Right=rtItem.Left+rtItem.Width;rtItem.Bottom=rtItem.Top+rtItem.Height;if(stock)this.DrawLine(stock.CloseLine,column,rtItem);}else if(column.Type==REPORT_COLUMN_ID.KLINE_ID){var rtItem={Left:left,Top:top,Width:column.Width,Height:this.RowHeight};rtItem.Right=rtItem.Left+rtItem.Width;rtItem.Bottom=rtItem.Top+rtItem.Height;this.DrawKLine(stock.KLine,column,rtItem,data);}else if(column.Type==REPORT_COLUMN_ID.TIME_ID){this.FormaTimeDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.DATE_ID){this.FormaDateDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.CHECKBOX_ID){rtItem={Left:left,Top:top,Width:column.Width,Height:this.RowHeight};rtItem.Right=rtItem.Left+rtItem.Width;rtItem.Bottom=rtItem.Top+rtItem.Height;drawInfo.Rect=rtItem;drawInfo.Checked=false;drawInfo.Enable=true;drawInfo.CheckBox=this.CheckBoxConfig;drawInfo.Data=stock;if(stock&&IFrameSplitOperator.IsBool(stock.Checked))drawInfo.Checked=stock.Checked;}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_CHECKBOX_ID){rtItem={Left:left,Top:top,Width:column.Width,Height:this.RowHeight};rtItem.Right=rtItem.Left+rtItem.Width;rtItem.Bottom=rtItem.Top+rtItem.Height;drawInfo.Rect=rtItem;this.GetCustomCheckBoxDrawInfo(data,column,drawInfo);}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_BUTTON_ID){rtItem={Left:left,Top:top,Width:column.Width,Height:this.RowHeight};rtItem.Right=rtItem.Left+rtItem.Width;rtItem.Bottom=rtItem.Top+rtItem.Height;drawInfo.Rect=rtItem;this.GetCustomButtonDrawInfo(data,column,drawInfo);}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_PROGRESS_ID){rtItem={Left:left,Top:top,Width:column.Width,Height:this.RowHeight};rtItem.Right=rtItem.Left+rtItem.Width;rtItem.Bottom=rtItem.Top+rtItem.Height;drawInfo.Rect=rtItem;this.GetCustomProgressBarDrawInfo(data,column,drawInfo);}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_LINK_ID){this.GetCustomLinkDrawInfo(data,column,drawInfo);}else if(this.IsReserveNumber(column.Type)){this.FormatReserveNumber(column,stock,drawInfo);this.FormatDrawInfoEvent(stock,data,column,drawInfo);}else if(this.IsReserveString(column.Type)){this.FormatReserveString(column,stock,drawInfo);this.FormatDrawInfoEvent(stock,data,column,drawInfo);}else if(this.IsReserveProgressBarColumn(column.Type)){this.FormatReserveProgressBar(column,stock,drawInfo);}else if(this.IsReserveButtonColumn(column.Type)){this.FormatReserveButton(column,stock,drawInfo);}else if(column.Type==REPORT_COLUMN_ID.MULTI_LINE_CONTAINER){if(IFrameSplitOperator.IsNonEmptyArray(column.AryField)){var yBottom=rtItem.Bottom-this.ItemMergin.Bottom-(column.AryField.length-1)*this.ItemFontHeight;var rtText={Left:left+this.ItemMergin.Left,Width:textWidth,Height:this.ItemFontHeight,Bottom:yBottom};rtText.Right=rtText.Left+rtText.Width;rtText.Top=rtText.Bottom-rtText.Height;for(var k=0;k<column.AryField.length;++k){drawInfo.Text=null;var subItem=column.AryField[k];this.BuildSubCellTextData(subItem,column,stock,drawInfo,data);this.DrawSubCellText(drawInfo,column,rtText);rtText.Bottom+=this.ItemFontHeight;rtText.Top+=this.ItemFontHeight;}}}//拖拽行颜色
13404
+ var fieldName=MAP_COLUMN_FIELD.get(column.Type);if(stock&&IFrameSplitOperator.IsNumber(stock[fieldName])){var value=stock[fieldName];drawInfo.Text=value.toFixed(0);}this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_STRING_TEXT_ID){this.GetCustomStringDrawInfo(data,column,drawInfo);}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_NUMBER_TEXT_ID){this.GetCustomNumberDrawInfo(data,column,drawInfo);this.FormatDrawInfoEvent(stock,data,column,drawInfo);}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_DATETIME_TEXT_ID){this.GetCustomDateTimeDrawInfo(data,column,drawInfo);this.FormatDrawInfoEvent(stock,data,column,drawInfo);}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_ICON_ID){this.GetCustomIconDrawInfo(data,column,drawInfo);}else if(column.Type==REPORT_COLUMN_ID.CLOSE_LINE_ID){var rtItem={Left:left,Top:top,Width:column.Width,Height:this.RowHeight};rtItem.Right=rtItem.Left+rtItem.Width;rtItem.Bottom=rtItem.Top+rtItem.Height;if(stock)this.DrawLine(stock.CloseLine,column,rtItem);}else if(column.Type==REPORT_COLUMN_ID.KLINE_ID){var rtItem={Left:left,Top:top,Width:column.Width,Height:this.RowHeight};rtItem.Right=rtItem.Left+rtItem.Width;rtItem.Bottom=rtItem.Top+rtItem.Height;this.DrawKLine(stock.KLine,column,rtItem,data);}else if(column.Type==REPORT_COLUMN_ID.TIME_ID){this.FormaTimeDrawInfo(column,stock,drawInfo,data);this.FormatDrawInfoEvent(stock,data,column,drawInfo);}else if(column.Type==REPORT_COLUMN_ID.DATE_ID){this.FormaDateDrawInfo(column,stock,drawInfo,data);this.FormatDrawInfoEvent(stock,data,column,drawInfo);}else if(column.Type==REPORT_COLUMN_ID.CHECKBOX_ID){rtItem={Left:left,Top:top,Width:column.Width,Height:this.RowHeight};rtItem.Right=rtItem.Left+rtItem.Width;rtItem.Bottom=rtItem.Top+rtItem.Height;drawInfo.Rect=rtItem;drawInfo.Checked=false;drawInfo.Enable=true;drawInfo.CheckBox=this.CheckBoxConfig;drawInfo.Data=stock;if(stock&&IFrameSplitOperator.IsBool(stock.Checked))drawInfo.Checked=stock.Checked;}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_CHECKBOX_ID){rtItem={Left:left,Top:top,Width:column.Width,Height:this.RowHeight};rtItem.Right=rtItem.Left+rtItem.Width;rtItem.Bottom=rtItem.Top+rtItem.Height;drawInfo.Rect=rtItem;this.GetCustomCheckBoxDrawInfo(data,column,drawInfo);}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_BUTTON_ID){rtItem={Left:left,Top:top,Width:column.Width,Height:this.RowHeight};rtItem.Right=rtItem.Left+rtItem.Width;rtItem.Bottom=rtItem.Top+rtItem.Height;drawInfo.Rect=rtItem;this.GetCustomButtonDrawInfo(data,column,drawInfo);}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_PROGRESS_ID){rtItem={Left:left,Top:top,Width:column.Width,Height:this.RowHeight};rtItem.Right=rtItem.Left+rtItem.Width;rtItem.Bottom=rtItem.Top+rtItem.Height;drawInfo.Rect=rtItem;this.GetCustomProgressBarDrawInfo(data,column,drawInfo);}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_LINK_ID){this.GetCustomLinkDrawInfo(data,column,drawInfo);}else if(this.IsReserveNumber(column.Type)){this.FormatReserveNumber(column,stock,drawInfo);this.FormatDrawInfoEvent(stock,data,column,drawInfo);}else if(this.IsReserveString(column.Type)){this.FormatReserveString(column,stock,drawInfo);this.FormatDrawInfoEvent(stock,data,column,drawInfo);}else if(this.IsReserveProgressBarColumn(column.Type)){this.FormatReserveProgressBar(column,stock,drawInfo);}else if(this.IsReserveButtonColumn(column.Type)){this.FormatReserveButton(column,stock,drawInfo);}else if(column.Type==REPORT_COLUMN_ID.MULTI_LINE_CONTAINER){if(IFrameSplitOperator.IsNonEmptyArray(column.AryField)){var yBottom=rtItem.Bottom-this.ItemMergin.Bottom-(column.AryField.length-1)*this.ItemFontHeight;var rtText={Left:left+this.ItemMergin.Left,Width:textWidth,Height:this.ItemFontHeight,Bottom:yBottom};rtText.Right=rtText.Left+rtText.Width;rtText.Top=rtText.Bottom-rtText.Height;for(var k=0;k<column.AryField.length;++k){drawInfo.Text=null;var subItem=column.AryField[k];this.BuildSubCellTextData(subItem,column,stock,drawInfo,data);this.DrawSubCellText(drawInfo,column,rtText);rtText.Bottom+=this.ItemFontHeight;rtText.Top+=this.ItemFontHeight;}}}//拖拽行颜色
13401
13405
  if(rowType==3)drawInfo.TextColor=this.DragRowTextColor;if(drawInfo.Symbol){this.DrawItemTextEx(drawInfo,x,top,textWidth);}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_ICON_ID){this.DrawIconItem(drawInfo,x,top,textWidth);}else if(column.Type==REPORT_COLUMN_ID.CHECKBOX_ID||column.Type==REPORT_COLUMN_ID.CUSTOM_CHECKBOX_ID){this.DrawCheckbox(drawInfo,left,top,itemWidth);}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_BUTTON_ID||this.IsReserveButtonColumn(column.Type)){this.DrawButton(drawInfo,left,top,itemWidth);}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_PROGRESS_ID||this.IsReserveProgressBarColumn(column.Type)){this.DrawProgressBar(drawInfo,left,top,itemWidth);}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_LINK_ID){this.DrawLinkText(drawInfo,x,top,textWidth);}else if(column.Type==REPORT_COLUMN_ID.MULTI_LINE_CONTAINER){}else{if(data.FlashBG&&data.FlashBG.Data&&column.ID!=undefined){if(data.FlashBG.Data.has(column.ID)){var flashItem=data.FlashBG.Data.get(column.ID);var drawBG={Rect:drawInfo.Rect,BGColor:flashItem.Color};--flashItem.Count;this.DrawItemBG(drawBG);if(this.GlobalOption)++this.GlobalOption.FlashBGCount;}}this.DrawItemBG(drawInfo);if(column.Type==REPORT_COLUMN_ID.CUSTOM_STRING_TEXT_ID||this.IsReserveString(column.Type))this.DrawCustomText(drawInfo,column,x,top,textWidth);else this.DrawItemText(drawInfo.Text,drawInfo.TextColor,drawInfo.TextAlign,x,top,textWidth,drawInfo.BGColor);}//tooltip提示
13402
13406
  if(drawInfo.Tooltip){//Type:1=数据截断
13403
13407
  var tooltipData={Rect:rtItem,Stock:stock,Index:index,Column:column,RowType:rowType,Type:drawInfo.Tooltip.Type,Data:drawInfo.Tooltip.Data};this.TooltipRect.push(tooltipData);}else if(column.ChartTooltip&&column.ChartTooltip.Enable&&IFrameSplitOperator.IsNumber(column.ChartTooltip.Type))//Type 20分时图 21K线图
@@ -13406,12 +13410,9 @@ var tooltipData={Rect:rtItem,Stock:stock,Index:index,Column:column,RowType:rowTy
13406
13410
  this.Canvas.clip();//数据截断提示信息
13407
13411
  drawInfo.Tooltip={Type:1,Data:{AryText:[{Text:drawInfo.Text}]}};}this.Canvas.textBaseline="bottom";this.Canvas.fillStyle=drawInfo.TextColor;this.Canvas.fillText(text,x,top+this.RowHeight-this.ItemMergin.Bottom);if(bClip)this.Canvas.restore();};this.DrawSymbolName=function(data,column,left,top,rowType){var stock=data.Stock;var symbol=IFrameSplitOperator.RemoveMarketSuffix(data.Symbol);var name;if(stock){symbol=stock.Symbol;name=stock.Name;}if(!symbol&&!name)return;var y=top+this.ItemMergin.Top+this.ItemNameHeight;var textLeft=left+this.ItemMergin.Left;var x=textLeft;var width=column.Width-this.ItemMergin.Left-this.ItemMergin.Right;var textAlign=column.TextAlign;if(textAlign=='center'){x=textLeft+width/2;this.Canvas.textAlign="center";}else if(textAlign=='right'){x=textLeft+width-2;this.Canvas.textAlign="right";}else{x+=2;this.Canvas.textAlign="left";}var textColor=this.GetNameColor(column,symbol,rowType);var text=name;if(text){this.Canvas.textBaseline="bottom";this.Canvas.fillStyle=textColor;this.Canvas.font=this.ItemNameFont;text=this.TextEllipsis(text,width,column.MaxText);if(text)this.Canvas.fillText(text,x,y);}text=symbol;if(text){this.Canvas.textBaseline="bottom";this.Canvas.font=this.ItemSymbolFont;this.Canvas.fillStyle=textColor;this.Canvas.fillText(text,x,y+this.ItemSymbolHeight);}this.Canvas.font=this.ItemFont;//还原字体
13408
13412
  };this.DrawSymbolNameV2=function(data,column,left,top,rowType){var stock=data.Stock;var symbol=IFrameSplitOperator.RemoveMarketSuffix(data.Symbol);var name;if(stock){symbol=stock.Symbol;name=stock.Name;}if(!symbol&&!name)return;var y=top+this.ItemMergin.Top+this.ItemNameHeight;var textLeft=left+this.ItemMergin.Left;var x=textLeft;var width=column.Width-this.ItemMergin.Left-this.ItemMergin.Right;var textAlign=column.TextAlign;if(textAlign=='center'){x=textLeft+width/2;this.Canvas.textAlign="center";}else if(textAlign=='right'){x=textLeft+width-2;this.Canvas.textAlign="right";}else{x+=2;this.Canvas.textAlign="left";}this.Canvas.textBaseline="bottom";var textColor=column.TextColor;var text=name;if(text){this.Canvas.fillStyle=textColor;this.Canvas.font=this.NameSymbolFont.Name;text=this.TextEllipsis(text,width,column.MaxText);if(text){this.Canvas.fillText(text,x,y);var textWidth=this.Canvas.measureText(text).width;var space=2;if(IFrameSplitOperator.IsNumber(column.Space))space=column.Space;x+=textWidth+space;}}var textColor=column.TextColor2;text=symbol;if(text){this.Canvas.font=this.NameSymbolFont.Symbol;this.Canvas.fillStyle=textColor;this.Canvas.fillText(text,x,y);}this.Canvas.font=this.ItemFont;//还原字体
13409
- };this.DrawLimitPriceBorder=function(value,stock,left,top,itemWidth){if(!IFrameSplitOperator.IsNumber(value)||!stock)return;var bDraw=false;if(IFrameSplitOperator.IsNumber(stock.LimitHigh)){if(value>=stock.LimitHigh)bDraw=true;}if(IFrameSplitOperator.IsNumber(stock.LimitLow)){if(value<=stock.LimitLow)bDraw=true;}if(!bDraw)return;var x=left+this.ItemMergin.Left+this.LimitMergin.Left;var width=itemWidth-this.ItemMergin.Left-this.ItemMergin.Right-this.LimitMergin.Left-this.LimitMergin.Right;var y=top+this.ItemMergin.Top+this.LimitMergin.Top;var height=this.RowHeight-this.ItemMergin.Top-this.ItemMergin.Bottom-this.LimitMergin.Top-this.LimitMergin.Bottom;this.Canvas.strokeStyle=this.LimitBorderColor;this.Canvas.strokeRect(ToFixedPoint(x),ToFixedPoint(y),ToFixedRect(width),ToFixedRect(height));};this.GetExtendData=function(data,column){if(IFrameSplitOperator.IsNumber(column.DataIndex)){if(!data.Stock||!data.Stock.ExtendData)return null;if(column.DataIndex<0)return;return data.Stock.ExtendData[column.DataIndex];}if(IFrameSplitOperator.IsNumber(column.BlockIndex)){if(!data.Block)return;if(column.BlockIndex<0)return;return data.Block[column.BlockIndex];}return null;};this.GetCustomStringDrawInfo=function(data,column,drawInfo){var value=this.GetExtendData(data,column);if(column.IsDrawCallback)//外部处理输出格式
13410
- {this.GetCustomTextDrawInfo(column,data.Symbol,value,drawInfo,data);return;}if(!IFrameSplitOperator.IsString(value))return;drawInfo.Text=value;};this.GetCustomNumberDrawInfo=function(data,column,drawInfo){var value=this.GetExtendData(data,column);if(column.IsDrawCallback)//外部处理输出格式
13411
- {this.GetCustomTextDrawInfo(column,data.Symbol,value,drawInfo,data);return;}if(!IFrameSplitOperator.IsNumber(value))return;//格式化输出
13413
+ };this.DrawLimitPriceBorder=function(value,stock,left,top,itemWidth){if(!IFrameSplitOperator.IsNumber(value)||!stock)return;var bDraw=false;if(IFrameSplitOperator.IsNumber(stock.LimitHigh)){if(value>=stock.LimitHigh)bDraw=true;}if(IFrameSplitOperator.IsNumber(stock.LimitLow)){if(value<=stock.LimitLow)bDraw=true;}if(!bDraw)return;var x=left+this.ItemMergin.Left+this.LimitMergin.Left;var width=itemWidth-this.ItemMergin.Left-this.ItemMergin.Right-this.LimitMergin.Left-this.LimitMergin.Right;var y=top+this.ItemMergin.Top+this.LimitMergin.Top;var height=this.RowHeight-this.ItemMergin.Top-this.ItemMergin.Bottom-this.LimitMergin.Top-this.LimitMergin.Bottom;this.Canvas.strokeStyle=this.LimitBorderColor;this.Canvas.strokeRect(ToFixedPoint(x),ToFixedPoint(y),ToFixedRect(width),ToFixedRect(height));};this.GetExtendData=function(data,column){if(IFrameSplitOperator.IsNumber(column.DataIndex)){if(!data.Stock||!data.Stock.ExtendData)return null;if(column.DataIndex<0)return;return data.Stock.ExtendData[column.DataIndex];}if(IFrameSplitOperator.IsNumber(column.BlockIndex)){if(!data.Block)return;if(column.BlockIndex<0)return;return data.Block[column.BlockIndex];}return null;};this.GetCustomStringDrawInfo=function(data,column,drawInfo){var value=this.GetExtendData(data,column);if(!IFrameSplitOperator.IsString(value))return;drawInfo.Text=value;};this.GetCustomNumberDrawInfo=function(data,column,drawInfo){var value=this.GetExtendData(data,column);if(!IFrameSplitOperator.IsNumber(value))return;//格式化输出
13412
13414
  switch(column.FormatType){case 1:drawInfo.Text=value.toFixed(column.Decimal);break;case 2:drawInfo.Text=IFrameSplitOperator.FormatValueThousandsString(value,column.Decimal);break;case 3:drawInfo.Text=this.FormatVolString(value);break;default:drawInfo.Text=IFrameSplitOperator.FormatValueString(value,column.Decimal);break;}//颜色
13413
- switch(column.ColorType){case 1:drawInfo.TextColor=this.GetUpDownColor(value,0);break;case 2:if(!IFrameSplitOperator.IsNumber(data.Stock.YClose))drawInfo.TextColor=this.UnchagneColor;else drawInfo.TextColor=this.GetUpDownColor(value,data.Stock.YClose);break;default:break;}};this.GetCustomDateTimeDrawInfo=function(data,column,drawInfo){var value=this.GetExtendData(data,column);if(!IFrameSplitOperator.IsNumber(value))return;if(column.IsDrawCallback)//外部处理输出格式
13414
- {this.GetCustomTextDrawInfo(column,data.Symbol,value,drawInfo,data);return;}if(column.ValueType==0){if(column.FormatType==1)drawInfo.Text=IFrameSplitOperator.FormatDateString(value,"YYYY/MM/DD");else drawInfo.Text=IFrameSplitOperator.FormatDateString(value);}};this.GetCustomIconDrawInfo=function(data,column,drawInfo){if(column.IsDrawCallback)//外部处理输出格式
13415
+ switch(column.ColorType){case 1:drawInfo.TextColor=this.GetUpDownColor(value,0);break;case 2:if(!IFrameSplitOperator.IsNumber(data.Stock.YClose))drawInfo.TextColor=this.UnchagneColor;else drawInfo.TextColor=this.GetUpDownColor(value,data.Stock.YClose);break;default:break;}};this.GetCustomDateTimeDrawInfo=function(data,column,drawInfo){var value=this.GetExtendData(data,column);if(!IFrameSplitOperator.IsNumber(value))return;if(column.ValueType==0){if(column.FormatType==1)drawInfo.Text=IFrameSplitOperator.FormatDateString(value,"YYYY/MM/DD");else drawInfo.Text=IFrameSplitOperator.FormatDateString(value);}};this.GetCustomIconDrawInfo=function(data,column,drawInfo){if(column.IsDrawCallback)//外部处理输出格式
13415
13416
  {this.GetCustomIconData(column,data.Symbol,drawInfo,data);return;}};this.GetCustomCheckBoxDrawInfo=function(data,column,drawInfo){var checkData=this.GetExtendData(data,column);if(!checkData)return;if(!IFrameSplitOperator.IsBool(checkData.Checked))return;drawInfo.Checked=checkData.Checked;drawInfo.Enable=true;drawInfo.Data=checkData;if(IFrameSplitOperator.IsBool(checkData.DisableCheckBox))drawInfo.Enable=!checkData.DisableCheckBox;drawInfo.CheckBox=column.CheckBox;};this.GetCustomButtonDrawInfo=function(data,column,drawInfo){var buttonData=this.GetExtendData(data,column);if(!buttonData)return;drawInfo.Text=buttonData.Title;drawInfo.Button=column.Button;drawInfo.Font=column.Button.Font;drawInfo.Enable=true;drawInfo.Data=buttonData;if(IFrameSplitOperator.IsBool(buttonData.Enable))drawInfo.Enable=buttonData.Enable;};this.GetCustomProgressBarDrawInfo=function(data,column,drawInfo){var barData=this.GetExtendData(data,column);if(!barData)return;drawInfo.Text=barData.Title;drawInfo.ProgressBar=column.ProgressBar;drawInfo.Enable=true;drawInfo.Value=barData.Value;//占比
13416
13417
  drawInfo.Data=barData;if(IFrameSplitOperator.IsBool(barData.Enable))drawInfo.Enable=barData.Enable;if(barData.TextColor)drawInfo.TextColor=barData.TextColor;if(barData.BarColor)drawInfo.BarColor=barData.BarColor;if(barData.BGColor)drawInfo.BGColor=barData.BGColor;};this.GetCustomLinkDrawInfo=function(data,column,drawInfo){var linkData=this.GetExtendData(data,column);if(!linkData)return;drawInfo.Text=linkData.Title;drawInfo.Link=column.Link;drawInfo.Enable=true;drawInfo.Data=linkData;drawInfo.MaxText=column.MaxText;if(IFrameSplitOperator.IsBool(linkData.Enable))drawInfo.Enable=linkData.Enable;if(linkData.TextColor)drawInfo.TextColor=linkData.TextColor;};this.FormatReserveNumber=function(column,data,drawInfo){if(column.DefaultText)drawInfo.Text=column.DefaultText;var fieldName=MAP_COLUMN_FIELD.get(column.Type);if(!data||!fieldName)return;var value=data[fieldName];if(!IFrameSplitOperator.IsNumber(value))return;if(IFrameSplitOperator.IsNumber(column.ColorType)){if(column.ColorType==1){drawInfo.TextColor=this.GetUpDownColor(value,0);}else if(column.ColorType==2){drawInfo.TextColor=this.GetUpDownColorV2(value,0);}}var text=value.toFixed(column.FloatPrecision);if(column.Format&&IFrameSplitOperator.IsNumber(column.Format.Type)){var format=column.Format;switch(format.Type){case 1://原始数据
13417
13418
  text=value.toFixed(column.FloatPrecision);break;case 2://千分位分割
@@ -13448,8 +13449,7 @@ this.DrawKLine=function(klineData,column,rtItem,data){if(column.IsDrawCallback)/
13448
13449
  {this.DrawKBarItem(item,dataWidth,this.KLineConfig.UpColor,1,xLeft,xRight,yLow,yHigh,yOpen,yClose);}else if(item.Open>item.Close)//阴线
13449
13450
  {this.DrawKBarItem(item,dataWidth,this.KLineConfig.DownColor,0,xLeft,xRight,yLow,yHigh,yOpen,yClose);}else//平线
13450
13451
  {this.DrawKBarItem(item,dataWidth,this.KLineConfig.UnchagneColor,0,xLeft,xRight,yLow,yHigh,yOpen,yClose);}}};this.DrawKBarItem=function(data,dataWidth,barColor,drawType,left,right,yLow,yHigh,yOpen,yClose){var isEmptyBar=false;if(drawType==1)isEmptyBar=true;var yBarTop=Math.min(yOpen,yClose);var yBarBottom=Math.max(yOpen,yClose);var barTopValue=Math.max(data.Open,data.Close);var barBottomValue=Math.min(data.Open,data.Close);this.Canvas.fillStyle=barColor;this.Canvas.strokeStyle=barColor;var x=left+(right-left)/2;if(isEmptyBar){if(dataWidth%2!=0)dataWidth-=1;}if(dataWidth>=4){if(data.High>barTopValue){this.Canvas.beginPath();var xBar=x;if(isEmptyBar)xBar=left+dataWidth/2;this.Canvas.moveTo(ToFixedPoint(xBar),ToFixedPoint(yBarTop));this.Canvas.lineTo(ToFixedPoint(xBar),ToFixedPoint(yHigh));this.Canvas.stroke();}if(Math.abs(yBarBottom-yBarTop)<1){this.Canvas.fillRect(ToFixedRect(left),ToFixedRect(yBarTop),ToFixedRect(dataWidth),1);//高度小于1,统一使用高度1
13451
- }else{if(isEmptyBar){this.Canvas.beginPath();this.Canvas.rect(ToFixedPoint(left),ToFixedPoint(yBarTop),ToFixedRect(dataWidth),ToFixedRect(yBarBottom-yBarTop));this.Canvas.stroke();}else{this.Canvas.fillRect(ToFixedRect(left),ToFixedRect(yBarTop),ToFixedRect(dataWidth),ToFixedRect(yBarBottom-yBarTop));}}if(data.Low<barBottomValue){this.Canvas.beginPath();var xBar=x;if(isEmptyBar)xBar=left+dataWidth/2;this.Canvas.moveTo(ToFixedPoint(xBar),ToFixedPoint(yBarBottom));this.Canvas.lineTo(ToFixedPoint(xBar),ToFixedPoint(yLow));this.Canvas.stroke();}}else{}};this.SetFillStyle=function(color,x0,y0,x1,y1){if(Array.isArray(color)){var gradient=this.Canvas.createLinearGradient(x0,y0,x1,y1);var offset=1/color.length;for(var i in color){gradient.addColorStop(i*offset,color[i]);}this.Canvas.fillStyle=gradient;}else{this.Canvas.fillStyle=color;}};//外部配置显示格式 颜色 对齐方式
13452
- this.GetCustomTextDrawInfo=function(columnInfo,symbol,value,drawInfo,data){var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_DRAW_CUSTOM_TEXT);if(!event||!event.Callback)return false;var sendData={Symbol:symbol,Column:columnInfo,Value:value,Data:data,Out:{Text:null,TextColor:null,TextAlign:null}};event.Callback(event,sendData,this);if(sendData.Out.Text)drawInfo.Text=sendData.Out.Text;if(sendData.Out.TextColor)drawInfo.TextColor=sendData.Out.TextColor;if(sendData.Out.TextAlign)drawInfo.TextAlign=sendData.Out.TextAlign;if(sendData.Out.BGColor)drawInfo.BGColor=sendData.Out.BGColor;return true;};this.FormatDrawInfo=function(column,stock,drawInfo,data){if(!column.IsDrawCallback)return false;var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_REPORT_FORMAT_DRAW_INFO);if(!event||!event.Callback)return false;var sendData={Stock:stock,Column:column,Data:data,DrawInfo:drawInfo};event.Callback(event,sendData,this);};this.GetFixedRowTextDrawInfo=function(rowIndex,colIndex,columnInfo,drawInfo){var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_DRAW_REPORT_FIXEDROW_TEXT);if(!event||!event.Callback)return false;var sendData={RowIndex:rowIndex,ColIndex:colIndex,Column:columnInfo,Data:this.FixedRowData,Out:{Text:null,TextColor:null,TextAlign:null}};event.Callback(event,sendData,this);if(sendData.Out.Text)drawInfo.Text=sendData.Out.Text;if(sendData.Out.TextColor)drawInfo.TextColor=sendData.Out.TextColor;if(sendData.Out.TextAlign)drawInfo.TextAlign=sendData.Out.TextAlign;return true;};this.GetVolColor=function(colunmInfo,data){var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_DRAW_DEAL_VOL_COLOR);if(event&&event.Callback){var sendData={Data:data,TextColor:null};event.Callback(event,sendData,this);if(sendData.TextColor)return sendData.TextColor;}return colunmInfo.TextColor;};//获取股票名称颜色
13452
+ }else{if(isEmptyBar){this.Canvas.beginPath();this.Canvas.rect(ToFixedPoint(left),ToFixedPoint(yBarTop),ToFixedRect(dataWidth),ToFixedRect(yBarBottom-yBarTop));this.Canvas.stroke();}else{this.Canvas.fillRect(ToFixedRect(left),ToFixedRect(yBarTop),ToFixedRect(dataWidth),ToFixedRect(yBarBottom-yBarTop));}}if(data.Low<barBottomValue){this.Canvas.beginPath();var xBar=x;if(isEmptyBar)xBar=left+dataWidth/2;this.Canvas.moveTo(ToFixedPoint(xBar),ToFixedPoint(yBarBottom));this.Canvas.lineTo(ToFixedPoint(xBar),ToFixedPoint(yLow));this.Canvas.stroke();}}else{}};this.SetFillStyle=function(color,x0,y0,x1,y1){if(Array.isArray(color)){var gradient=this.Canvas.createLinearGradient(x0,y0,x1,y1);var offset=1/color.length;for(var i in color){gradient.addColorStop(i*offset,color[i]);}this.Canvas.fillStyle=gradient;}else{this.Canvas.fillStyle=color;}};this.FormatDrawInfo=function(column,stock,drawInfo,data){this.FormatDrawInfoEvent(stock,data,column,drawInfo);};this.GetFixedRowTextDrawInfo=function(rowIndex,colIndex,columnInfo,drawInfo){var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_DRAW_REPORT_FIXEDROW_TEXT);if(!event||!event.Callback)return false;var sendData={RowIndex:rowIndex,ColIndex:colIndex,Column:columnInfo,Data:this.FixedRowData,Out:{Text:null,TextColor:null,TextAlign:null}};event.Callback(event,sendData,this);if(sendData.Out.Text)drawInfo.Text=sendData.Out.Text;if(sendData.Out.TextColor)drawInfo.TextColor=sendData.Out.TextColor;if(sendData.Out.TextAlign)drawInfo.TextAlign=sendData.Out.TextAlign;return true;};this.GetVolColor=function(colunmInfo,data){var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_DRAW_DEAL_VOL_COLOR);if(event&&event.Callback){var sendData={Data:data,TextColor:null};event.Callback(event,sendData,this);if(sendData.TextColor)return sendData.TextColor;}return colunmInfo.TextColor;};//获取股票名称颜色
13453
13453
  this.GetNameColor=function(colunmInfo,symbol,rowType){var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_DRAW_REPORT_NAME_COLOR);if(event&&event.Callback){var sendData={Symbol:symbol,TextColor:null,RowType:rowType};event.Callback(event,sendData,this);if(sendData.TextColor)return sendData.TextColor;}return colunmInfo.TextColor;};this.GetFontHeight=function(font,word){return GetFontHeight(this.Canvas,font,word);};this.OnMouseDown=function(x,y,e)//Type: 1=tab 4=固定行 2=行 3=表头 5=右侧滚动条
13454
13454
  {if(!this.Data)return null;if(this.Tab){var tab=this.Tab.OnMouseDown(x,y,e);if(tab)return{Type:1,Tab:tab};//底部工具栏
13455
13455
  }if(this.VScrollbar){var item=this.VScrollbar.OnMouseDown(x,y,e);if(item)return{Type:5,VScrollbar:item};//右侧滚动条
@@ -14773,7 +14773,7 @@ hisData.Symbol=message.symbol;}var stockObj={HQDataType:HQ_DATA_TYPE.KLINE_ID,St
14773
14773
  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);};}/********************************************************************************
14774
14774
  * 版本信息输出
14775
14775
  *
14776
- */var HQCHART_VERSION="1.1.14687";function PrintHQChartVersion(){var logo='\n\n*************************************************************************************************************************************************************************** \n* \n* :%@@- \n* :@@@@- \n* =@@@@ :#@@@ .:+#@@@#=: :=*@@@@@@#+-. *@@@@. \n* :@@@@@ .@@@@@ .#@@@@@@@@@@@- +@@@@@@@@@@@@@+ @@@@@ -%@@* \n* +@@@@% #@@@@# *@@@@@@@@@@@@@@%. =@@@@@@@@@@@@@@@- @@@@@ -@@@@+ \n* %@@@@* @@@@@+ .%@@@@@@@@@@@@@@@@%: #@@@@@@@@@@@@@@@% @@@@# *@@@@= \n* @@@@@= @@@@@- .%@@@@@@@*++*%@@@@@@% .%@@@@@@@%*+==+**= -@@@@+ #@@@@- \n* @@@@@. @@@@@. #@@@@@%= =@@@@@@* %@@@@@@#: *@@@@- :::. .-+*###+: ::: .+##+: -%%@@@@@%%%% \n* .@@@@@ .@@@@@. +@@@@@% .@@@@@@ *@@@@@@: %@@@@: +@@@@@%. :%@@@@@@@@@@: *@@@ :@@@@@* @@@@@@@@@@@@ \n* :@@@@@ :@@@@@ @@@@@% :@@@@@+ @@@@@@: %@@@@-@@@@@@@@@. @@@@@@@@@@@@@. :@@@%-@@@@@@.:@@@@@@@@@@@# \n* -@@@@% -@@@@@ =@@@@@. %@@@@% %@@@@@- %@@@@@@@@@@@@@@* %@@@@@@@@@@@@+ -@@@@@@@@@@# -@@@@@@@@@@@. \n* +@@@@%=========#@@@@% @@@@@# :@@@@@ .@@@@@% @@@@@@@@%@@@@@@@ -%+:. .#@@@@* +@@@@@@@%%@. .::+@@@@#:: \n* #@@@@@@@@@@@@@@@@@@@# .@@@@@ .@@@@@ :@@@@@. @@@@@@#. #@@@@@. -@@@@* #@@@@@@: *@@@@+ \n* %@@@@@@@@@@@@@@@@@@@+ :@@@@@ .@@@@@ -@@@@@ @@@@@+ @@@@@. :@@@@* @@@@@% #@@@@- \n* @@@@@@@@@@@@@@@@@@@@: :@@@@% :@@@@@ +@@@@% -@@@@+ @@@@@ -@@@@+ @@@@@. @@@@@. \n* .@@@@@@@@@@@@@@@@@@@@ :@@@@% -@@@@% *@@@@% #@@@@. @@@@@ .=*#%%%@@@@@= :@@@@# @@@@@. \n* -@@@@@:::::::::=@@@@@ :@@@@@ @@@@@* +@@@@% @@@@@ @@@@% -#@@@@@@@@@@@@: -@@@@* @@@@@ \n* =@@@@% =@@@@% .@@@@@ :@@@@@. -@@@@% @@@@@ .@@@@* +@@@@@@@@@@@@@@. =@@@@+ .@@@@@ \n* +@@@@# +@@@@# @@@@@# %@@@@% :@@@@@ .@@@@% =@@@@= -@@@@@*-:..%@@@@ +@@@@= :@@@@# \n* *@@@@* *@@@@* +@@@@@: #@@@@@+ .@@@@@@ :@@@@% *@@@@- @@@@@. @@@@% #@@@@: =@@@@+ \n* %@@@@= %@@@@+ @@@@@@- .%@@@@@# #@@@@@# :@@@@% #@@@@: @@@@% @@@@* %@@@@. #@@@@- \n* @@@@@- @@@@@= =@@@@@@#=...-*@@@@@@@: @@@@@@%=. :+**. :@@@@* %@@@@. .@@@@* *@@@@= @@@@@ %@@@@+ \n* .@@@@@: .@@@@@: *@@@@@@@@@@@@@@@@@@@# =@@@@@@@@%%%@@@@@@ +@@@@- @@@@@ .@@@@@: :%@@@@@- .@@@@% %@@@@@*+- \n* :@@@@@ :@@@@@ +@@@@@@@@@@@@@@@@@@@# =@@@@@@@@@@@@@@@@% %@@@@ @@@@@ @@@@@@@@@@@@@@@: -@@@@* *@@@@@@@@- \n* =@@@@@ -@@@@@ :@@@@@@@@@@@@@@@@@@@# :@@@@@@@@@@@@@@@% @@@@@ %@@@% #@@@@@@@@@#@@@@. +@@@@- .@@@@@@@@# \n* *@@@@# =@@@@% :#@@@@@@@#: :@@@@@= =@@@@@@@@@@@+. @@@@@ :@@@+ *@@@@@@@- %@@@ *@@@= =@@@@@@@* \n* =++++- -++++= .:::. .=*+: :-=+++=:. ****= .=+. .-++=: :+++ -+=: .-=+=:. \n* \n* \n* HQChart \n* Ver: '+HQCHART_VERSION+' \n* License: Apache License 2.0 \n* Source: https://github.com/jones2000/HQChart\n*\n************************************************************************************************************************************************************************** \n ';console.log(logo);}PrintHQChartVersion();//把给外界调用的方法暴露出来
14776
+ */var HQCHART_VERSION="1.1.14696";function PrintHQChartVersion(){var logo='\n\n*************************************************************************************************************************************************************************** \n* \n* :%@@- \n* :@@@@- \n* =@@@@ :#@@@ .:+#@@@#=: :=*@@@@@@#+-. *@@@@. \n* :@@@@@ .@@@@@ .#@@@@@@@@@@@- +@@@@@@@@@@@@@+ @@@@@ -%@@* \n* +@@@@% #@@@@# *@@@@@@@@@@@@@@%. =@@@@@@@@@@@@@@@- @@@@@ -@@@@+ \n* %@@@@* @@@@@+ .%@@@@@@@@@@@@@@@@%: #@@@@@@@@@@@@@@@% @@@@# *@@@@= \n* @@@@@= @@@@@- .%@@@@@@@*++*%@@@@@@% .%@@@@@@@%*+==+**= -@@@@+ #@@@@- \n* @@@@@. @@@@@. #@@@@@%= =@@@@@@* %@@@@@@#: *@@@@- :::. .-+*###+: ::: .+##+: -%%@@@@@%%%% \n* .@@@@@ .@@@@@. +@@@@@% .@@@@@@ *@@@@@@: %@@@@: +@@@@@%. :%@@@@@@@@@@: *@@@ :@@@@@* @@@@@@@@@@@@ \n* :@@@@@ :@@@@@ @@@@@% :@@@@@+ @@@@@@: %@@@@-@@@@@@@@@. @@@@@@@@@@@@@. :@@@%-@@@@@@.:@@@@@@@@@@@# \n* -@@@@% -@@@@@ =@@@@@. %@@@@% %@@@@@- %@@@@@@@@@@@@@@* %@@@@@@@@@@@@+ -@@@@@@@@@@# -@@@@@@@@@@@. \n* +@@@@%=========#@@@@% @@@@@# :@@@@@ .@@@@@% @@@@@@@@%@@@@@@@ -%+:. .#@@@@* +@@@@@@@%%@. .::+@@@@#:: \n* #@@@@@@@@@@@@@@@@@@@# .@@@@@ .@@@@@ :@@@@@. @@@@@@#. #@@@@@. -@@@@* #@@@@@@: *@@@@+ \n* %@@@@@@@@@@@@@@@@@@@+ :@@@@@ .@@@@@ -@@@@@ @@@@@+ @@@@@. :@@@@* @@@@@% #@@@@- \n* @@@@@@@@@@@@@@@@@@@@: :@@@@% :@@@@@ +@@@@% -@@@@+ @@@@@ -@@@@+ @@@@@. @@@@@. \n* .@@@@@@@@@@@@@@@@@@@@ :@@@@% -@@@@% *@@@@% #@@@@. @@@@@ .=*#%%%@@@@@= :@@@@# @@@@@. \n* -@@@@@:::::::::=@@@@@ :@@@@@ @@@@@* +@@@@% @@@@@ @@@@% -#@@@@@@@@@@@@: -@@@@* @@@@@ \n* =@@@@% =@@@@% .@@@@@ :@@@@@. -@@@@% @@@@@ .@@@@* +@@@@@@@@@@@@@@. =@@@@+ .@@@@@ \n* +@@@@# +@@@@# @@@@@# %@@@@% :@@@@@ .@@@@% =@@@@= -@@@@@*-:..%@@@@ +@@@@= :@@@@# \n* *@@@@* *@@@@* +@@@@@: #@@@@@+ .@@@@@@ :@@@@% *@@@@- @@@@@. @@@@% #@@@@: =@@@@+ \n* %@@@@= %@@@@+ @@@@@@- .%@@@@@# #@@@@@# :@@@@% #@@@@: @@@@% @@@@* %@@@@. #@@@@- \n* @@@@@- @@@@@= =@@@@@@#=...-*@@@@@@@: @@@@@@%=. :+**. :@@@@* %@@@@. .@@@@* *@@@@= @@@@@ %@@@@+ \n* .@@@@@: .@@@@@: *@@@@@@@@@@@@@@@@@@@# =@@@@@@@@%%%@@@@@@ +@@@@- @@@@@ .@@@@@: :%@@@@@- .@@@@% %@@@@@*+- \n* :@@@@@ :@@@@@ +@@@@@@@@@@@@@@@@@@@# =@@@@@@@@@@@@@@@@% %@@@@ @@@@@ @@@@@@@@@@@@@@@: -@@@@* *@@@@@@@@- \n* =@@@@@ -@@@@@ :@@@@@@@@@@@@@@@@@@@# :@@@@@@@@@@@@@@@% @@@@@ %@@@% #@@@@@@@@@#@@@@. +@@@@- .@@@@@@@@# \n* *@@@@# =@@@@% :#@@@@@@@#: :@@@@@= =@@@@@@@@@@@+. @@@@@ :@@@+ *@@@@@@@- %@@@ *@@@= =@@@@@@@* \n* =++++- -++++= .:::. .=*+: :-=+++=:. ****= .=+. .-++=: :+++ -+=: .-=+=:. \n* \n* \n* HQChart \n* Ver: '+HQCHART_VERSION+' \n* License: Apache License 2.0 \n* Source: https://github.com/jones2000/HQChart\n*\n************************************************************************************************************************************************************************** \n ';console.log(logo);}PrintHQChartVersion();//把给外界调用的方法暴露出来
14777
14777
  exports.default=(_jsChartInit$jsChartS={jsChartInit:JSChart.Init,jsChartStyle:JSChart.SetStyle,// IsIndexSymbol:IsIndexSymbol,
14778
14778
  // BaseIndex:BaseIndex,
14779
14779
  // ChartLine:ChartLine,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hqchart",
3
- "version": "1.1.14688",
3
+ "version": "1.1.14696",
4
4
  "description": "HQChart - H5, 微信小程序 沪深/港股/数字货币/期货/美股 K线图(kline),走势图,缩放,拖拽,十字光标,画图工具,截图,筹码图. 分析家语法,通达信语法,(麦语法),第3方数据对接",
5
5
  "main": "lib/main.js",
6
6
  "scripts": {
@@ -55776,7 +55776,7 @@ HQData.Minute_RequestMinuteData=function(data, callback)
55776
55776
  }
55777
55777
  */
55778
55778
 
55779
- //stockItem.minute.length=50;
55779
+ stockItem.minute.length=50;
55780
55780
 
55781
55781
  var hqchartData={code:0, stock:[stockItem] };
55782
55782