hqchart 1.1.14154 → 1.1.14165

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.
@@ -8334,7 +8334,8 @@ this.TitlePaint[0].Symbol=this.Symbol;this.TitlePaint[0].Name=this.Name;this.Tit
8334
8334
  this.ChartCorssCursor.StringFormatX.BeforeOpenData=this.BeforeOpenData;this.ChartCorssCursor.StringFormatX.AfterCloseData=this.AfterCloseData;this.ChartCorssCursor.StringFormatX.MultiDayBeforeOpenData=multiBeforeOpenData;this.ChartCorssCursor.StringFormatX.MultiDayAfterCloseData=multiAfterCloseData;this.ChartCorssCursor.StringFormatX.DayOffset=this.DayOffset;;if(this.ChartCorssCursor.CallAcutionXOperator){this.ChartCorssCursor.CallAcutionXOperator.BeforeOpenData=this.BeforeOpenData;this.ChartCorssCursor.CallAcutionXOperator.AfterCloseData=this.AfterCloseData;this.ChartCorssCursor.CallAcutionXOperator.MultiDayBeforeOpenData=multiBeforeOpenData;this.ChartCorssCursor.CallAcutionXOperator.MultiDayAfterCloseData=multiAfterCloseData;this.ChartCorssCursor.CallAcutionXOperator.DayOffset=this.DayOffset;}}if(this.ExtendChartPaint[0]){this.ExtendChartPaint[0].Symbol=this.Symbol;this.ExtendChartPaint[0].Name=this.Name;}for(var i=0;i<this.OverlayChartPaint.length;++i){var item=this.OverlayChartPaint[i];item.MainData=minuteData;//绑定主图数据
8335
8335
  }};//绑定分钟叠加指标数据(持仓量)
8336
8336
  this.BindOverlayPositionData=function(minuteData,yClose){var _this33=this;if(this.Frame.SubFrame.length<2)return;var chart=null;var frame=null;var subFrame=this.Frame.SubFrame[1];//第2个窗口
8337
- var overlayFrame=null;for(var i=0;i<subFrame.OverlayIndex.length;++i){var item=subFrame.OverlayIndex[i];if(item.Identify=='Position_Line_Frame'){overlayFrame=item;break;}}if(!overlayFrame){overlayFrame=new OverlayIndexItem();overlayFrame.Identify='Position_Line_Frame';if(this.ClassName=="MinuteChartContainer")frame=new OverlayMinuteFrame();else frame=new OverlayMinuteHScreenFrame();frame.Canvas=this.Canvas;frame.MainFrame=subFrame.Frame;frame.ChartBorder=subFrame.Frame.ChartBorder;frame.GlobalOption=this.GlobalOption;overlayFrame.Frame=frame;frame.YSplitOperator=new FrameSplitY();frame.YSplitOperator.LanguageID=this.LanguageID;frame.YSplitOperator.FrameSplitData=this.FrameSplitData.get('double');frame.YSplitOperator.Frame=frame;frame.YSplitOperator.ChartBorder=frame.ChartBorder;frame.YSplitOperator.SplitCount=subFrame.Frame.YSplitOperator.SplitCount;frame.YSplitOperator.GetEventCallback=function(id){return _this33.GetEventCallback(id);};frame.YSplitOperator.OverlayIdentify=overlayFrame.Identify;var chart=new ChartMinutePositionLine();chart.Canvas=this.Canvas;chart.Name='Position-Line';chart.ChartBorder=frame.ChartBorder;chart.ChartFrame=frame;chart.Identify=overlayFrame.Identify;chart.Color=g_JSChartResource.Minute.PositionColor;overlayFrame.ChartPaint.push(chart);subFrame.OverlayIndex.push(overlayFrame);subFrame.Frame.RightFrame=frame;//右边坐标绑定到主坐标上
8337
+ var overlayFrame=null;for(var i=0;i<subFrame.OverlayIndex.length;++i){var item=subFrame.OverlayIndex[i];if(item.Identify=='Position_Line_Frame'){overlayFrame=item;break;}}if(!overlayFrame){overlayFrame=new OverlayIndexItem();overlayFrame.Identify='Position_Line_Frame';if(this.ClassName=="MinuteChartContainer")frame=new OverlayMinuteFrame();else frame=new OverlayMinuteHScreenFrame();frame.Canvas=this.Canvas;frame.MainFrame=subFrame.Frame;frame.ChartBorder=subFrame.Frame.ChartBorder;frame.GlobalOption=this.GlobalOption;overlayFrame.Frame=frame;frame.YSplitOperator=new FrameSplitY();frame.YSplitOperator.LanguageID=this.LanguageID;frame.YSplitOperator.FrameSplitData=this.FrameSplitData.get('double');frame.YSplitOperator.Frame=frame;frame.YSplitOperator.ChartBorder=frame.ChartBorder;frame.YSplitOperator.SplitCount=subFrame.Frame.YSplitOperator.SplitCount;frame.YSplitOperator.GetEventCallback=function(id){return _this33.GetEventCallback(id);};frame.YSplitOperator.OverlayIdentify=overlayFrame.Identify;frame.YSplitOperator.FloatPrecision=0;//持仓量 整数
8338
+ var chart=new ChartMinutePositionLine();chart.Canvas=this.Canvas;chart.Name='Position-Line';chart.ChartBorder=frame.ChartBorder;chart.ChartFrame=frame;chart.Identify=overlayFrame.Identify;chart.Color=g_JSChartResource.Minute.PositionColor;overlayFrame.ChartPaint.push(chart);subFrame.OverlayIndex.push(overlayFrame);subFrame.Frame.RightFrame=frame;//右边坐标绑定到主坐标上
8338
8339
  }else{frame=overlayFrame.Frame;for(var i=0;i<overlayFrame.ChartPaint.length;++i){var item=overlayFrame.ChartPaint[i];if(item.Name=='Position-Line'){chart=item;break;}}if(!chart)//图形不存在就创建一个
8339
8340
  {chart=new ChartMinutePositionLine();chart.Canvas=this.Canvas;chart.Name='Position-Line';chart.ChartBorder=frame.ChartBorder;chart.ChartFrame=frame;chart.Identify=overlayFrame.Identify;chart.Color=g_JSChartResource.Minute.PositionColor;overlayFrame.ChartPaint.push(chart);}}var xPointCouont=this.Frame.SubFrame[0].Frame.XPointCount;frame.XPointCount=xPointCouont;subFrame.Frame.IsShowPositionTitle=true;var bindData=new ChartData();bindData.Data=minuteData.GetPosition();chart.Data=bindData;};this.ClearBindOverlayPositionData=function(){if(this.Frame.SubFrame.length<2)return;var subFrame=this.Frame.SubFrame[1];//第2个窗口
8340
8341
  subFrame.Frame.RightFrame=null;subFrame.Frame.IsShowPositionTitle=false;for(var i in subFrame.OverlayIndex){var item=subFrame.OverlayIndex[i];if(item.Identify=='Position_Line_Frame'){subFrame.OverlayIndex.splice(i,1);break;}}};this.GetOverlayIndexByIdentify=function(identify){for(var i=0;i<this.Frame.SubFrame.length;++i){var item=this.Frame.SubFrame[i];if(!IFrameSplitOperator.IsNonEmptyArray(item.OverlayIndex))continue;for(var j=0;j<item.OverlayIndex.length;++j){var overlayItem=item.OverlayIndex[j];if(overlayItem.Identify===identify)return{OverlayItem:overlayItem,WindowIndex:i};}}return null;};this.RecvOverlayIndex=function(identify,data){var overlayIndex=this.GetOverlayIndexByIdentify(identify);if(overlayIndex==null){console.warn('[MinuteChartContainer::RecvOverlayIndex] can\'t find overlay index. [identify='+identify+']');return;}if(!overlayIndex.Script)return;if(typeof overlayIndex.RecvSubscribeData!="function")return;var bindData=this.SourceData;if(!bindData)return;overlayIndex.Script.RecvSubscribeData(data,this,overlayIndex.WindowIndex,bindData);};//更新叠加指标
@@ -11877,7 +11878,7 @@ UpBarColor:"rgb(238,21,21)",//上涨
11877
11878
  DownBarColor:"rgb(25,158,0)",//下跌
11878
11879
  UnchagneBarColor:"rgb(228,228,228)",//平盘
11879
11880
  EmptyBarBGColor:'rgb(0,0,0)',//空心柱子背景色
11880
- SplashScreen:{BGColor:"rgba(112,128,144,0.5)",TextColor:"rgb(230,230,230)"},HLCArea:{HighLineColor:'rgb(238,21,21)',LowLineColor:"rgb(25,158,0)",CloseLineColor:"rgb(156,156,156)",LineWidth:2*GetDevicePixelRatio(),UpAreaColor:"rgba(238,21,21, 0.3)",DownAreaColor:"rgba(25,158,0, 0.3)"},Minute:{VolBarColor:null,PriceColor:"rgb(25,180,231)",AreaPriceColor:"rgba(63,158,255,.3)",AvPriceColor:"rgb(255,236,0)",PositionColor:'rgb(218,165,32)',VolTitleColor:"rgb(190,190,190)",Before:{BGColor:"rgba(105,105,105,0.5)",AvPriceColor:'rgb(248,248,255)',//均线
11881
+ SplashScreen:{BGColor:"rgba(112,128,144,0.5)",TextColor:"rgb(230,230,230)"},HLCArea:{HighLineColor:'rgb(238,21,21)',LowLineColor:"rgb(25,158,0)",CloseLineColor:"rgb(156,156,156)",LineWidth:2*GetDevicePixelRatio(),UpAreaColor:"rgba(238,21,21, 0.3)",DownAreaColor:"rgba(25,158,0, 0.3)"},Minute:{VolBarColor:null,PriceColor:"rgb(25,180,231)",AreaPriceColor:"rgba(63,158,255,.3)",AvPriceColor:"rgb(255,236,0)",PositionColor:'rgb(201, 9, 224)',VolTitleColor:"rgb(190,190,190)",Before:{BGColor:"rgba(105,105,105,0.5)",AvPriceColor:'rgb(248,248,255)',//均线
11881
11882
  CloseIcon:{MoveOnColor:"rgb(255,255,255)",Color:"rgb(156,156,156)"}},After:{BGColor:"rgba(105,105,105,0.5)",AvPriceColor:'rgb(248,248,255)'//均线
11882
11883
  },NightDay:{NightBGColor:"rgb(22,22,22)",Font:12*GetDevicePixelRatio()+'px \u5FAE\u8F6F\u96C5\u9ED1',Day:{Color:"rgb(153,153,153)",BGColor:"rgb(51,51,51)",BorderColor:"rgb(51,51,51)",Margin:{Left:5,Top:2,Bottom:2,Right:5}},Night:{Color:"rgb(153,153,153)",BGColor:"rgb(51,51,51)",BorderColor:"rgb(51,51,51)",Margin:{Left:5,Top:2,Bottom:2,Right:5}}}},PopMinuteChart:{BGColor:"rgba(0,0,0,0.85)",BorderColor:"rgb(230,230,230)"},DefaultTextColor:"rgb(101,104,112)",DefaultTextFont:14*GetDevicePixelRatio()+'px 微软雅黑',TitleFont:13*GetDevicePixelRatio()+'px 微软雅黑',//标题字体(动态标题 K线及指标的动态信息字体)
11883
11884
  IndexTitleColor:"rgb(190, 190 ,190)",//指标名字颜色
@@ -12445,11 +12446,11 @@ var frequency=this.AutoUpdateFrequency;if(marketStatus==1)//盘前
12445
12446
  this.AddEventCallback=function(object){if(!object||!object.event||!object.callback)return;var data={Callback:object.callback,Source:object};this.mapEvent.set(object.event,data);};this.RemoveEventCallback=function(eventid){if(!this.mapEvent.has(eventid))return;this.mapEvent.delete(eventid);};this.GetEventCallback=function(id)//获取事件回调
12446
12447
  {if(!this.mapEvent.has(id))return null;var item=this.mapEvent.get(id);return item;};this.OnSize=function(){if(!this.Frame)return;this.SetSizeChange(true);this.Draw();this.DelayUpdateStockData();};this.SetSizeChange=function(bChanged){for(var i=0;i<this.ChartPaint.length;++i){var chart=this.ChartPaint[i];if(chart)chart.SizeChange=bChanged;}};this.OnWheel=function(e)//滚轴
12447
12448
  {JSConsole.Chart.Log('[JSReportChartContainer::OnWheel]',e);if(this.ChartSplashPaint&&this.ChartSplashPaint.IsEnableSplash==true)return;if(!this.Data||!IFrameSplitOperator.IsNonEmptyArray(this.Data.Data))return;var x=e.clientX-this.UIElement.getBoundingClientRect().left;var y=e.clientY-this.UIElement.getBoundingClientRect().top;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)return;var chart=this.ChartPaint[0];if(!chart)return;var wheelValue=e.wheelDelta;if(!IFrameSplitOperator.IsObjectExist(e.wheelDelta))wheelValue=e.deltaY*-0.01;if(this.WheelPageType==1){console.log('[OnWheel] wheelValue='+wheelValue);if(wheelValue<0)//下
12448
- {this.LastMouseStatus.TooltipStatus=null;if(this.GotoNextItem(1)){this.Draw();this.DelayUpdateStockData();}}else if(wheelValue>0)//上
12449
- {this.LastMouseStatus.TooltipStatus=null;if(this.GotoNextItem(-1)){this.Draw();this.DelayUpdateStockData();}}}else{if(wheelValue<0)//下一页
12450
- {this.LastMouseStatus.TooltipStatus=null;if(this.GotoNextPage(this.PageUpDownCycle)){this.Draw();this.DelayUpdateStockData();}}else if(wheelValue>0)//上一页
12451
- {this.LastMouseStatus.TooltipStatus=null;if(this.GotoPreviousPage(this.PageUpDownCycle)){this.Draw();this.DelayUpdateStockData();}}}if(e.preventDefault)e.preventDefault();else e.returnValue=false;};this.OnKeyDown=function(e){if(this.ChartSplashPaint&&this.ChartSplashPaint.IsEnableSplash==true)return;var reportChart=this.GetReportChart();if(!reportChart)return;var keyID=e.keyCode?e.keyCode:e.which;if(keyID==116)return;//F15刷新不处理
12452
- switch(keyID){case 33://page up
12449
+ {this.LastMouseStatus.TooltipStatus=null;this.HideMinuteChartTooltip();if(this.GotoNextItem(1)){this.Draw();this.DelayUpdateStockData();}}else if(wheelValue>0)//上
12450
+ {this.LastMouseStatus.TooltipStatus=null;this.HideMinuteChartTooltip();if(this.GotoNextItem(-1)){this.Draw();this.DelayUpdateStockData();}}}else{if(wheelValue<0)//下一页
12451
+ {this.LastMouseStatus.TooltipStatus=null;this.HideMinuteChartTooltip();if(this.GotoNextPage(this.PageUpDownCycle)){this.Draw();this.DelayUpdateStockData();}}else if(wheelValue>0)//上一页
12452
+ {this.LastMouseStatus.TooltipStatus=null;this.HideMinuteChartTooltip();if(this.GotoPreviousPage(this.PageUpDownCycle)){this.Draw();this.DelayUpdateStockData();}}}if(e.preventDefault)e.preventDefault();else e.returnValue=false;};this.OnKeyDown=function(e){if(this.ChartSplashPaint&&this.ChartSplashPaint.IsEnableSplash==true)return;var reportChart=this.GetReportChart();if(!reportChart)return;var keyID=e.keyCode?e.keyCode:e.which;if(keyID==116)return;//F15刷新不处理
12453
+ this.HideMinuteChartTooltip();switch(keyID){case 33://page up
12453
12454
  if(this.GotoPreviousPage(this.PageUpDownCycle)){this.Draw();this.DelayUpdateStockData();}break;case 34://page down
12454
12455
  if(this.GotoNextPage(this.PageUpDownCycle)){this.Draw();this.DelayUpdateStockData();}break;case 38://up
12455
12456
  var result=this.MoveSelectedRow(-1);if(result){if(result.Redraw)this.Draw();if(result.Update)this.DelayUpdateStockData();}break;case 40://down
@@ -12473,8 +12474,8 @@ if((clickData.Type==2||clickData.Type==4)&&(e.button==0||e.button==2))//点击
12473
12474
  {if(this.MoveYOffset(1)){this.Draw();this.DelayUpdateStockData();}}else if(scroll.Type==3)//滚动条
12474
12475
  {this.DragYScroll={Click:{X:x,Y:y},LastMove:{X:x,Y:y}};}else if(scroll.Type==4)//滚动条内部
12475
12476
  {if(this.SetYOffset(scroll.Pos)){this.Draw();this.DelayUpdateStockData();}}}}}document.onmousemove=function(e){_this57.DocOnMouseMove(e);};document.onmouseup=function(e){_this57.DocOnMouseUp(e);};};this.UIOnMounseUp=function(e){console.log('"UIOnMounseUp');};//去掉右键菜单
12476
- this.UIOnContextMenu=function(e){if(this.ChartSplashPaint&&this.ChartSplashPaint.IsEnableSplash==true)return;if(!this.IsShowRightMenu)return;var x=e.clientX-this.UIElement.getBoundingClientRect().left;var y=e.clientY-this.UIElement.getBoundingClientRect().top;if(typeof this.OnRightMenu=='function')this.OnRightMenu(x,y,e);//右键菜单事件
12477
- };this.OnRightMenu=function(x,y,e){e.preventDefault();};this.UIOnMouseMove=function(e){var pixelTatio=GetDevicePixelRatio();var x=(e.clientX-this.UIElement.getBoundingClientRect().left)*pixelTatio;var y=(e.clientY-this.UIElement.getBoundingClientRect().top)*pixelTatio;var oldMouseOnStatus=this.LastMouseStatus.MouseOnStatus;this.LastMouseStatus.OnMouseMove=null;var bDrawTooltip=false;if(this.LastMouseStatus.TooltipStatus)bDrawTooltip=true;this.LastMouseStatus.TooltipStatus=null;var bShowChartTooltip=false;var chartTooltipData=null;if(this.DragRow)return;if(this.DrawHeader)return;if(this.DragColumnWidth)return;var tabChart=this.GetTabChart();var bDrawTab=false;if(tabChart){var tabData=tabChart.PtInTab(x,y);if(tabData){var index=tabData.Index;if(tabChart.MoveOnTabIndex!=index){tabChart.MoveOnTabIndex=index;bDrawTab=true;}}else{if(tabChart.MoveOnTabIndex>=0){tabChart.MoveOnTabIndex=-1;bDrawTab=true;}}}this.LastMouseStatus.OnMouseMove={X:x,Y:y};var mouseStatus={Cursor:"default",Name:"Default"};;//鼠标状态
12477
+ this.UIOnContextMenu=function(e){e.preventDefault();if(this.ChartSplashPaint&&this.ChartSplashPaint.IsEnableSplash==true)return;if(!this.IsShowRightMenu)return;var x=e.clientX-this.UIElement.getBoundingClientRect().left;var y=e.clientY-this.UIElement.getBoundingClientRect().top;if(typeof this.OnRightMenu=='function')this.OnRightMenu(x,y,e);//右键菜单事件
12478
+ };this.OnRightMenu=function(x,y,e){};this.UIOnMouseMove=function(e){var pixelTatio=GetDevicePixelRatio();var x=(e.clientX-this.UIElement.getBoundingClientRect().left)*pixelTatio;var y=(e.clientY-this.UIElement.getBoundingClientRect().top)*pixelTatio;var oldMouseOnStatus=this.LastMouseStatus.MouseOnStatus;this.LastMouseStatus.OnMouseMove=null;var bDrawTooltip=false;if(this.LastMouseStatus.TooltipStatus)bDrawTooltip=true;this.LastMouseStatus.TooltipStatus=null;var bShowChartTooltip=false;var chartTooltipData=null;if(this.DragRow)return;if(this.DrawHeader)return;if(this.DragColumnWidth)return;var tabChart=this.GetTabChart();var bDrawTab=false;if(tabChart){var tabData=tabChart.PtInTab(x,y);if(tabData){var index=tabData.Index;if(tabChart.MoveOnTabIndex!=index){tabChart.MoveOnTabIndex=index;bDrawTab=true;}}else{if(tabChart.MoveOnTabIndex>=0){tabChart.MoveOnTabIndex=-1;bDrawTab=true;}}}this.LastMouseStatus.OnMouseMove={X:x,Y:y};var mouseStatus={Cursor:"default",Name:"Default"};;//鼠标状态
12478
12479
  var report=this.GetReportChart();var bDraw=false;if(report){var dragHeaderWidth=report.PtInHeaderDragBorder(x,y);if(dragHeaderWidth){mouseStatus={Cursor:"col-resize",Name:"DragHeaderWidth"};JSConsole.Chart.Log("[JSReportChartContainer::UIOnMouseMove] drag column width ",dragHeaderWidth);}else{var buttonData=report.GetButtonData(x,y);var mouseOnStatus=null;if(buttonData){mouseStatus={Cursor:"pointer",Name:"Botton"};if(buttonData.Type==1||buttonData.Type==0||buttonData.Type==2){mouseOnStatus={Index:buttonData.Index,ColumnIndex:buttonData.ColumnIndex};}}//console.log("[UIOnMouseMove] ", oldMouseOnStatus, mouseOnStatus)
12479
12480
  if(!oldMouseOnStatus&&mouseOnStatus||oldMouseOnStatus&&!mouseOnStatus){bDraw=true;}else if(oldMouseOnStatus&&mouseOnStatus){if(oldMouseOnStatus.Index!=mouseOnStatus.Index||oldMouseOnStatus.ColumnIndex!=mouseOnStatus.ColumnIndex)bDraw=true;}var tooltipData=report.GetTooltipData(x,y);//单元格提示信息
12480
12481
  if(tooltipData){if(tooltipData.Type==20){if(tooltipData.Stock&&tooltipData.Stock.Symbol){bShowChartTooltip=true;chartTooltipData={Symbol:tooltipData.Stock.OriginalSymbol,Rect:tooltipData.Rect};}}else{this.LastMouseStatus.TooltipStatus={X:x,Y:y,Data:tooltipData,ClientX:e.clientX,ClientY:e.clientY};bDrawTooltip=true;}}}var scrollbar=report.VScrollbar;if(scrollbar.Enable){var bShowScrollbar=report.PtInClient(x,y);this.IsShowVScrollbar=bShowScrollbar;if(!this.DragYScroll){if(bShowScrollbar&&!scrollbar.LastStatus.Draw)bDraw=true;else if(!bShowScrollbar&&scrollbar.LastStatus.Draw)bDraw=true;}}}/* 目前没有用到
@@ -12932,9 +12933,9 @@ if(IFrameSplitOperator.IsNumber(option.BorderLine))this.Frame.BorderLine=option.
12932
12933
  if(IFrameSplitOperator.IsBool(option.ItemBorder))chart.IsDrawBorder=option.ItemBorder;//单元格边框
12933
12934
  if(IFrameSplitOperator.IsNumber(option.SelectedModel))chart.SelectedModel=option.SelectedModel;}var bRegisterKeydown=true;var bRegisterWheel=true;if(option){if(option.KeyDown===false){bRegisterKeydown=false;JSConsole.Chart.Log('[JSTReportChartContainer::Create] not register keydown event.');}if(option.Wheel===false){bRegisterWheel=false;JSConsole.Chart.Log('[JSTReportChartContainer::Create] not register wheel event.');}}if(bRegisterKeydown)this.UIElement.addEventListener("keydown",function(e){_this63.OnKeyDown(e);},true);//键盘消息
12934
12935
  if(bRegisterWheel)this.UIElement.addEventListener("wheel",function(e){_this63.OnWheel(e);},true);//上下滚动消息
12935
- this.UIElement.ondblclick=function(e){_this63.UIOnDblClick(e);};this.UIElement.onmousedown=function(e){_this63.UIOnMouseDown(e);};this.UIElement.onmousemove=function(e){_this63.UIOnMouseMove(e);};this.UIElement.onmouseout=function(e){_this63.UIOnMounseOut(e);};this.UIElement.onmouseleave=function(e){_this63.UIOnMouseleave(e);};/*
12936
+ this.UIElement.ondblclick=function(e){_this63.UIOnDblClick(e);};this.UIElement.onmousedown=function(e){_this63.UIOnMouseDown(e);};this.UIElement.onmousemove=function(e){_this63.UIOnMouseMove(e);};this.UIElement.onmouseout=function(e){_this63.UIOnMounseOut(e);};this.UIElement.onmouseleave=function(e){_this63.UIOnMouseleave(e);};this.UIElement.oncontextmenu=function(e){_this63.UIOnContextMenu(e);};/*
12936
12937
  this.UIElement.onmouseup=(e)=>{ this.UIOnMounseUp(e); }
12937
- this.UIElement.oncontextmenu=(e)=> { this.UIOnContextMenu(e); }
12938
+
12938
12939
 
12939
12940
 
12940
12941
  //手机拖拽
@@ -12990,8 +12991,8 @@ this.DelayUpdateStockData=function(){var _this66=this;if(this.DelayUpdateTimer!=
12990
12991
  {if(clickData.Redraw==true)this.Draw();}else if(clickData.Type==3&&e.button==0)//表头
12991
12992
  {this.OnClickHeader(clickData,e);}//document.onmousemove=(e)=>{ this.DocOnMouseMove(e); }
12992
12993
  //document.onmouseup=(e)=> { this.DocOnMouseUp(e); }
12993
- };this.GetReportChart=function(){var chart=this.ChartPaint[0];if(!chart)return;return chart;};this.UIOnMouseMove=function(e){var pixelTatio=GetDevicePixelRatio();var x=(e.clientX-this.UIElement.getBoundingClientRect().left)*pixelTatio;var y=(e.clientY-this.UIElement.getBoundingClientRect().top)*pixelTatio;var oldMouseOnStatus=this.LastMouseStatus.MouseOnStatus;this.LastMouseStatus.OnMouseMove=null;var bDrawTooltip=false;if(this.LastMouseStatus.TooltipStatus)bDrawTooltip=true;this.LastMouseStatus.TooltipStatus=null;var bShowChartTooltip=false;var chartTooltipData=null;this.LastMouseStatus.OnMouseMove={X:x,Y:y};var mouseStatus={Cursor:"default",Name:"Default"};;//鼠标状态
12994
- var report=this.GetReportChart();var bDraw=false;if(report){var tooltipData=report.GetTooltipData(x,y);//单元格提示信息
12994
+ };this.GetTReportChart=function(){var chart=this.ChartPaint[0];if(!chart)return null;return chart;};this.UIOnMouseMove=function(e){var pixelTatio=GetDevicePixelRatio();var x=(e.clientX-this.UIElement.getBoundingClientRect().left)*pixelTatio;var y=(e.clientY-this.UIElement.getBoundingClientRect().top)*pixelTatio;var oldMouseOnStatus=this.LastMouseStatus.MouseOnStatus;this.LastMouseStatus.OnMouseMove=null;var bDrawTooltip=false;if(this.LastMouseStatus.TooltipStatus)bDrawTooltip=true;this.LastMouseStatus.TooltipStatus=null;var bShowChartTooltip=false;var chartTooltipData=null;this.LastMouseStatus.OnMouseMove={X:x,Y:y};var mouseStatus={Cursor:"default",Name:"Default"};;//鼠标状态
12995
+ var report=this.GetTReportChart();var bDraw=false;if(report){var tooltipData=report.GetTooltipData(x,y);//单元格提示信息
12995
12996
  if(tooltipData){if(tooltipData.Type==20){if(tooltipData.Data&&tooltipData.Data.Symbol){bShowChartTooltip=true;chartTooltipData={Symbol:tooltipData.Data.Symbol,Rect:tooltipData.Rect};}}else{this.LastMouseStatus.TooltipStatus={X:x,Y:y,Data:tooltipData,ClientX:e.clientX,ClientY:e.clientY};bDrawTooltip=true;}}}/* 目前没有用到
12996
12997
  var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_REPORT_MOUSE_MOVE);
12997
12998
  if (event)
@@ -13000,18 +13001,19 @@ if(tooltipData){if(tooltipData.Type==20){if(tooltipData.Data&&tooltipData.Data.S
13000
13001
  event.Callback(event,sendData,this);
13001
13002
  }
13002
13003
  */if(mouseStatus)this.UIElement.style.cursor=mouseStatus.Cursor;//if (bDrawTooltip) this.DrawTooltip(this.LastMouseStatus.TooltipStatus);
13003
- if(bShowChartTooltip){this.ShowMinuteChartTooltip(null,null,chartTooltipData);}else{this.HideMinuteChartTooltip();}};this.UIOnMounseOut=function(e){this.HideMinuteChartTooltip();};this.UIOnMouseleave=function(e){this.HideMinuteChartTooltip();};//点表头
13004
+ if(bShowChartTooltip){this.ShowMinuteChartTooltip(null,null,chartTooltipData);}else{this.HideMinuteChartTooltip();}};this.UIOnMounseOut=function(e){this.HideMinuteChartTooltip();};this.UIOnMouseleave=function(e){this.HideMinuteChartTooltip();};this.UIOnContextMenu=function(e){e.preventDefault();var x=e.clientX-this.UIElement.getBoundingClientRect().left;var y=e.clientY-this.UIElement.getBoundingClientRect().top;this.OnRightMenu(x,y,e);//右键菜单事件
13005
+ };this.OnRightMenu=function(x,y,e){};//点表头
13004
13006
  this.OnClickHeader=function(clickData,e){var header=clickData.Header;if(header.Column&&header.Column.Sort==1){var data={CellType:header.CellType,ColumnIndex:header.ColumnIndex};this.SortHeader(header.Column,data);}};//排序
13005
13007
  this.SortHeader=function(column,sortData){var _this67=this;var sortInfo={Field:this.SortInfo.Field,Sort:this.SortInfo.Sort,CellType:this.SortInfo.CellType};var arySortType=column.SortType;if(sortInfo.Field!=sortData.ColumnIndex||sortInfo.CellType!=sortData.CellType){sortInfo.Field=sortData.ColumnIndex;sortInfo.CellType=sortData.CellType;sortInfo.Sort=arySortType[0];}else{if(arySortType.length==1){sortInfo.Sort=arySortType[0];}else{for(var i=0;i<arySortType.length;++i){if(sortInfo.Sort==arySortType[i]){sortInfo.Sort=arySortType[(i+1)%arySortType.length];break;}}}}if(sortInfo.Sort==0)//还原
13006
13008
  {this.Data.Data=[];for(var i=0;i<this.SourceData.Data.length;++i){this.Data.Data.push(this.SourceData.Data[i]);}}else{var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_TREPORT_LOCAL_SORT);if(event&&event.Callback){var sendData={Column:column,SortInfo:sortInfo,SymbolList:this.Data.Data,Result:null};event.Callback(event,sendData,this);if(Array.isArray(sendData.Result))this.Data.Data=sendData.Result;}else{this.Data.Data.sort(function(left,right){return _this67.LocalSort(left,right,column,sortInfo.Sort,sortInfo.CellType);});}}this.Data.YOffset=0;this.SortInfo.Field=sortInfo.Field;this.SortInfo.Sort=sortInfo.Sort;this.SortInfo.CellType=sortInfo.CellType;this.Draw();this.DelayUpdateStockData();};//本地排序
13007
13009
  this.LocalSort=function(left,right,column,sortType,cellType){switch(column.Type){case TREPORT_COLUMN_ID.SYMBOL_ID:case TREPORT_COLUMN_ID.NAME_ID:return this.LocalStringSort(left,right,column,sortType,cellType);case TREPORT_COLUMN_ID.PRICE_ID:case TREPORT_COLUMN_ID.VOL_ID:case TREPORT_COLUMN_ID.UPDOWN_ID:case TREPORT_COLUMN_ID.BUY_PRICE_ID:case TREPORT_COLUMN_ID.SELL_PRICE_ID:case TREPORT_COLUMN_ID.AMOUNT_ID:case TREPORT_COLUMN_ID.BUY_VOL_ID:case TREPORT_COLUMN_ID.SELL_VOL_ID:case TREPORT_COLUMN_ID.YCLOSE_ID:case TREPORT_COLUMN_ID.OPEN_ID:case TREPORT_COLUMN_ID.HIGH_ID:case TREPORT_COLUMN_ID.LOW_ID:case TREPORT_COLUMN_ID.AVERAGE_PRICE_ID:case TREPORT_COLUMN_ID.EXE_PRICE_ID://行权价格
13008
13010
  case TREPORT_COLUMN_ID.POSITION_ID://持仓量
13009
13011
  case TREPORT_COLUMN_ID.AMPLITUDE_ID:case TREPORT_COLUMN_ID.INCREASE_ID:case TREPORT_COLUMN_ID.RESERVE_NUMBER1_ID:case TREPORT_COLUMN_ID.RESERVE_NUMBER2_ID:case TREPORT_COLUMN_ID.RESERVE_NUMBER3_ID:case TREPORT_COLUMN_ID.RESERVE_NUMBER4_ID:case TREPORT_COLUMN_ID.RESERVE_NUMBER5_ID:case TREPORT_COLUMN_ID.RESERVE_NUMBER6_ID:case TREPORT_COLUMN_ID.RESERVE_NUMBER7_ID:case TREPORT_COLUMN_ID.RESERVE_NUMBER8_ID:case TREPORT_COLUMN_ID.RESERVE_NUMBER9_ID:case TREPORT_COLUMN_ID.RESERVE_NUMBER10_ID:return this.LocalNumberSort(left,right,column,sortType,cellType);default:return 0;}};this.LocalNumberSort=function(left,right,column,sortType,cellType){var leftStock=this.GetExePriceData(left);var rightStock=this.GetExePriceData(right);var leftValue=-99999999999999,rightValue=-99999999999999;if(sortType==2)leftValue=rightValue=99999999999999;var filedName=MAP_TREPORT_COLUMN_FIELD.get(column.Type);if(cellType==0)//行权价格
13010
- {if(leftStock&&IFrameSplitOperator.IsNumber(leftStock.ExePrice))leftValue=leftStock.ExePrice;if(rightStock&&IFrameSplitOperator.IsNumber(rightStock.ExePrice))rightValue=rightStock.ExePrice;}else if(cellType==1){if(leftStock&&leftStock.LeftData){var value=leftStock.LeftData[filedName];if(IFrameSplitOperator.IsNumber(value))leftValue=value;}if(rightStock&&rightStock.LeftData){var value=rightStock.LeftData[filedName];if(IFrameSplitOperator.IsNumber(value))rightValue=value;}}else if(cellType==2){if(leftStock&&leftStock.RightData){var value=leftStock.RightData[filedName];if(IFrameSplitOperator.IsNumber(value))leftValue=value;}if(rightStock&&rightStock.RightData){var value=rightStock.RightData[filedName];if(IFrameSplitOperator.IsNumber(value))rightValue=value;}}if(sortType==1){if(rightValue<leftValue)return-1;else if(rightValue<leftValue)return 1;else return 0;}else{if(leftValue<rightValue)return-1;else if(leftValue>rightValue)return 1;else return 0;}};this.GetTReportChart=function(){var chart=this.ChartPaint[0];return chart;};this.OnWheel=function(e)//滚轴
13012
+ {if(leftStock&&IFrameSplitOperator.IsNumber(leftStock.ExePrice))leftValue=leftStock.ExePrice;if(rightStock&&IFrameSplitOperator.IsNumber(rightStock.ExePrice))rightValue=rightStock.ExePrice;}else if(cellType==1){if(leftStock&&leftStock.LeftData){var value=leftStock.LeftData[filedName];if(IFrameSplitOperator.IsNumber(value))leftValue=value;}if(rightStock&&rightStock.LeftData){var value=rightStock.LeftData[filedName];if(IFrameSplitOperator.IsNumber(value))rightValue=value;}}else if(cellType==2){if(leftStock&&leftStock.RightData){var value=leftStock.RightData[filedName];if(IFrameSplitOperator.IsNumber(value))leftValue=value;}if(rightStock&&rightStock.RightData){var value=rightStock.RightData[filedName];if(IFrameSplitOperator.IsNumber(value))rightValue=value;}}if(sortType==1){if(rightValue<leftValue)return-1;else if(rightValue<leftValue)return 1;else return 0;}else{if(leftValue<rightValue)return-1;else if(leftValue>rightValue)return 1;else return 0;}};this.OnWheel=function(e)//滚轴
13011
13013
  {JSConsole.Chart.Log('[JSTReportChartContainer::OnWheel]',e);if(this.ChartSplashPaint&&this.ChartSplashPaint.IsEnableSplash==true)return;if(!this.Data||!IFrameSplitOperator.IsNonEmptyArray(this.Data.Data))return;var x=e.clientX-this.UIElement.getBoundingClientRect().left;var y=e.clientY-this.UIElement.getBoundingClientRect().top;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)return;var chart=this.GetTReportChart();if(!chart)return;var wheelValue=e.wheelDelta;if(!IFrameSplitOperator.IsObjectExist(e.wheelDelta))wheelValue=e.deltaY*-0.01;if(wheelValue<0)//下
13012
- {this.LastMouseStatus.TooltipStatus=null;var result=this.MoveSelectedRow(1,{EnablePageCycle:this.EnablePageCycle});if(result){if(result.Redraw)this.Draw();if(result.Update)this.DelayUpdateStockData();}}else if(wheelValue>0)//上
13013
- {this.LastMouseStatus.TooltipStatus=null;var result=this.MoveSelectedRow(-1,{EnablePageCycle:this.EnablePageCycle});if(result){if(result.Redraw)this.Draw();if(result.Update)this.DelayUpdateStockData();}}if(e.preventDefault)e.preventDefault();else e.returnValue=false;};this.OnKeyDown=function(e){if(this.ChartSplashPaint&&this.ChartSplashPaint.IsEnableSplash==true)return;var reportChart=this.GetTReportChart();if(!reportChart)return;var keyID=e.keyCode?e.keyCode:e.which;if(keyID==116)return;//F15刷新不处理
13014
- switch(keyID){/*
13014
+ {this.LastMouseStatus.TooltipStatus=null;this.HideMinuteChartTooltip();var result=this.MoveSelectedRow(1,{EnablePageCycle:this.EnablePageCycle});if(result){if(result.Redraw)this.Draw();if(result.Update)this.DelayUpdateStockData();}}else if(wheelValue>0)//上
13015
+ {this.LastMouseStatus.TooltipStatus=null;this.HideMinuteChartTooltip();var result=this.MoveSelectedRow(-1,{EnablePageCycle:this.EnablePageCycle});if(result){if(result.Redraw)this.Draw();if(result.Update)this.DelayUpdateStockData();}}if(e.preventDefault)e.preventDefault();else e.returnValue=false;};this.OnKeyDown=function(e){if(this.ChartSplashPaint&&this.ChartSplashPaint.IsEnableSplash==true)return;var reportChart=this.GetTReportChart();if(!reportChart)return;var keyID=e.keyCode?e.keyCode:e.which;if(keyID==116)return;//F15刷新不处理
13016
+ this.HideMinuteChartTooltip();switch(keyID){/*
13015
13017
  case 33: //page up
13016
13018
  if (this.GotoPreviousPage(this.PageUpDownCycle))
13017
13019
  {
@@ -13868,7 +13870,7 @@ hisData.Symbol=message.symbol;}var stockObj={HQDataType:HQ_DATA_TYPE.KLINE_ID,St
13868
13870
  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);};}/********************************************************************************
13869
13871
  * 版本信息输出
13870
13872
  *
13871
- */var HQCHART_VERSION="1.1.14153";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();//把给外界调用的方法暴露出来
13873
+ */var HQCHART_VERSION="1.1.14164";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();//把给外界调用的方法暴露出来
13872
13874
  exports.default=(_jsChartInit$jsChartS={jsChartInit:JSChart.Init,jsChartStyle:JSChart.SetStyle,// IsIndexSymbol:IsIndexSymbol,
13873
13875
  // BaseIndex:BaseIndex,
13874
13876
  // ChartLine:ChartLine,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hqchart",
3
- "version": "1.1.14154",
3
+ "version": "1.1.14165",
4
4
  "description": "HQChart - H5, 微信小程序 沪深/港股/数字货币/期货/美股 K线图(kline),走势图,缩放,拖拽,十字光标,画图工具,截图,筹码图. 分析家语法,通达信语法,(麦语法),第3方数据对接",
5
5
  "main": "lib/main.js",
6
6
  "scripts": {
@@ -472,10 +472,11 @@ function JSTReportChartContainer(uielement)
472
472
  this.UIElement.onmousemove=(e)=>{ this.UIOnMouseMove(e);}
473
473
  this.UIElement.onmouseout=(e)=>{ this.UIOnMounseOut(e); }
474
474
  this.UIElement.onmouseleave=(e)=>{ this.UIOnMouseleave(e); }
475
+ this.UIElement.oncontextmenu=(e)=> { this.UIOnContextMenu(e); }
475
476
 
476
477
  /*
477
478
  this.UIElement.onmouseup=(e)=>{ this.UIOnMounseUp(e); }
478
- this.UIElement.oncontextmenu=(e)=> { this.UIOnContextMenu(e); }
479
+
479
480
 
480
481
 
481
482
  //手机拖拽
@@ -1041,10 +1042,10 @@ function JSTReportChartContainer(uielement)
1041
1042
  //document.onmouseup=(e)=> { this.DocOnMouseUp(e); }
1042
1043
  }
1043
1044
 
1044
- this.GetReportChart=function()
1045
+ this.GetTReportChart=function()
1045
1046
  {
1046
1047
  var chart=this.ChartPaint[0];
1047
- if (!chart) return;
1048
+ if (!chart) return null;
1048
1049
 
1049
1050
  return chart;
1050
1051
  }
@@ -1067,7 +1068,7 @@ function JSTReportChartContainer(uielement)
1067
1068
 
1068
1069
  this.LastMouseStatus.OnMouseMove={ X:x, Y:y };
1069
1070
  var mouseStatus={ Cursor:"default", Name:"Default"};; //鼠标状态
1070
- var report=this.GetReportChart();
1071
+ var report=this.GetTReportChart();
1071
1072
  var bDraw=false;
1072
1073
 
1073
1074
  if (report)
@@ -1124,6 +1125,21 @@ function JSTReportChartContainer(uielement)
1124
1125
  this.HideMinuteChartTooltip();
1125
1126
  }
1126
1127
 
1128
+ this.UIOnContextMenu=function(e)
1129
+ {
1130
+ e.preventDefault();
1131
+
1132
+ var x = e.clientX-this.UIElement.getBoundingClientRect().left;
1133
+ var y = e.clientY-this.UIElement.getBoundingClientRect().top;
1134
+
1135
+ this.OnRightMenu(x,y,e); //右键菜单事件
1136
+ }
1137
+
1138
+ this.OnRightMenu=function(x,y,e)
1139
+ {
1140
+
1141
+ }
1142
+
1127
1143
  //点表头
1128
1144
  this.OnClickHeader=function(clickData, e)
1129
1145
  {
@@ -1300,12 +1316,6 @@ function JSTReportChartContainer(uielement)
1300
1316
  }
1301
1317
  }
1302
1318
 
1303
- this.GetTReportChart=function()
1304
- {
1305
- var chart=this.ChartPaint[0];
1306
- return chart;
1307
- }
1308
-
1309
1319
  this.OnWheel=function(e) //滚轴
1310
1320
  {
1311
1321
  JSConsole.Chart.Log('[JSTReportChartContainer::OnWheel]',e);
@@ -1331,6 +1341,7 @@ function JSTReportChartContainer(uielement)
1331
1341
  if (wheelValue<0) //下
1332
1342
  {
1333
1343
  this.LastMouseStatus.TooltipStatus=null;
1344
+ this.HideMinuteChartTooltip();
1334
1345
  var result=this.MoveSelectedRow(1,{ EnablePageCycle:this.EnablePageCycle })
1335
1346
  if (result)
1336
1347
  {
@@ -1341,6 +1352,7 @@ function JSTReportChartContainer(uielement)
1341
1352
  else if (wheelValue>0) //上
1342
1353
  {
1343
1354
  this.LastMouseStatus.TooltipStatus=null;
1355
+ this.HideMinuteChartTooltip();
1344
1356
  var result=this.MoveSelectedRow(-1,{ EnablePageCycle:this.EnablePageCycle} );
1345
1357
  if (result)
1346
1358
  {
@@ -1362,6 +1374,8 @@ function JSTReportChartContainer(uielement)
1362
1374
  var keyID = e.keyCode ? e.keyCode :e.which;
1363
1375
  if (keyID==116) return; //F15刷新不处理
1364
1376
 
1377
+ this.HideMinuteChartTooltip();
1378
+
1365
1379
  switch(keyID)
1366
1380
  {
1367
1381
  /*
@@ -85047,6 +85047,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
85047
85047
  frame.YSplitOperator.SplitCount=subFrame.Frame.YSplitOperator.SplitCount;
85048
85048
  frame.YSplitOperator.GetEventCallback=(id)=> { return this.GetEventCallback(id); };
85049
85049
  frame.YSplitOperator.OverlayIdentify=overlayFrame.Identify;
85050
+ frame.YSplitOperator.FloatPrecision=0; //持仓量 整数
85050
85051
 
85051
85052
  var chart=new ChartMinutePositionLine();
85052
85053
  chart.Canvas=this.Canvas
@@ -1737,6 +1737,7 @@ function JSReportChartContainer(uielement)
1737
1737
  if (wheelValue<0) //下
1738
1738
  {
1739
1739
  this.LastMouseStatus.TooltipStatus=null;
1740
+ this.HideMinuteChartTooltip();
1740
1741
  if (this.GotoNextItem(1))
1741
1742
  {
1742
1743
  this.Draw();
@@ -1746,6 +1747,7 @@ function JSReportChartContainer(uielement)
1746
1747
  else if (wheelValue>0) //上
1747
1748
  {
1748
1749
  this.LastMouseStatus.TooltipStatus=null;
1750
+ this.HideMinuteChartTooltip();
1749
1751
  if (this.GotoNextItem(-1))
1750
1752
  {
1751
1753
  this.Draw();
@@ -1758,6 +1760,7 @@ function JSReportChartContainer(uielement)
1758
1760
  if (wheelValue<0) //下一页
1759
1761
  {
1760
1762
  this.LastMouseStatus.TooltipStatus=null;
1763
+ this.HideMinuteChartTooltip();
1761
1764
  if (this.GotoNextPage(this.PageUpDownCycle))
1762
1765
  {
1763
1766
  this.Draw();
@@ -1767,6 +1770,7 @@ function JSReportChartContainer(uielement)
1767
1770
  else if (wheelValue>0) //上一页
1768
1771
  {
1769
1772
  this.LastMouseStatus.TooltipStatus=null;
1773
+ this.HideMinuteChartTooltip();
1770
1774
  if (this.GotoPreviousPage(this.PageUpDownCycle))
1771
1775
  {
1772
1776
  this.Draw();
@@ -1788,6 +1792,7 @@ function JSReportChartContainer(uielement)
1788
1792
  var keyID = e.keyCode ? e.keyCode :e.which;
1789
1793
  if (keyID==116) return; //F15刷新不处理
1790
1794
 
1795
+ this.HideMinuteChartTooltip();
1791
1796
  switch(keyID)
1792
1797
  {
1793
1798
  case 33: //page up
@@ -1970,6 +1975,8 @@ function JSReportChartContainer(uielement)
1970
1975
  //去掉右键菜单
1971
1976
  this.UIOnContextMenu=function(e)
1972
1977
  {
1978
+ e.preventDefault();
1979
+
1973
1980
  if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash == true) return;
1974
1981
 
1975
1982
  if (!this.IsShowRightMenu) return;
@@ -1982,7 +1989,7 @@ function JSReportChartContainer(uielement)
1982
1989
 
1983
1990
  this.OnRightMenu=function(x,y,e)
1984
1991
  {
1985
- e.preventDefault();
1992
+
1986
1993
  }
1987
1994
 
1988
1995
  this.UIOnMouseMove=function(e)
@@ -64,7 +64,7 @@ function GetBlackStyle()
64
64
  PriceColor: "rgb(25,180,231)",
65
65
  AreaPriceColor:"rgba(63,158,255,.3)",
66
66
  AvPriceColor: "rgb(255,236,0)",
67
- PositionColor:'rgb(218,165,32)',
67
+ PositionColor:'rgb(201, 9, 224)',
68
68
  VolTitleColor:"rgb(190,190,190)",
69
69
  Before:
70
70
  {
@@ -88972,6 +88972,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
88972
88972
  frame.YSplitOperator.SplitCount=subFrame.Frame.YSplitOperator.SplitCount;
88973
88973
  frame.YSplitOperator.GetEventCallback=(id)=> { return this.GetEventCallback(id); };
88974
88974
  frame.YSplitOperator.OverlayIdentify=overlayFrame.Identify;
88975
+ frame.YSplitOperator.FloatPrecision=0; //持仓量 整数
88975
88976
 
88976
88977
  var chart=new ChartMinutePositionLine();
88977
88978
  chart.Canvas=this.Canvas
@@ -124822,7 +124823,7 @@ function GetBlackStyle()
124822
124823
  PriceColor: "rgb(25,180,231)",
124823
124824
  AreaPriceColor:"rgba(63,158,255,.3)",
124824
124825
  AvPriceColor: "rgb(255,236,0)",
124825
- PositionColor:'rgb(218,165,32)',
124826
+ PositionColor:'rgb(201, 9, 224)',
124826
124827
  VolTitleColor:"rgb(190,190,190)",
124827
124828
  Before:
124828
124829
  {
@@ -128843,6 +128844,7 @@ function JSReportChartContainer(uielement)
128843
128844
  if (wheelValue<0) //下
128844
128845
  {
128845
128846
  this.LastMouseStatus.TooltipStatus=null;
128847
+ this.HideMinuteChartTooltip();
128846
128848
  if (this.GotoNextItem(1))
128847
128849
  {
128848
128850
  this.Draw();
@@ -128852,6 +128854,7 @@ function JSReportChartContainer(uielement)
128852
128854
  else if (wheelValue>0) //上
128853
128855
  {
128854
128856
  this.LastMouseStatus.TooltipStatus=null;
128857
+ this.HideMinuteChartTooltip();
128855
128858
  if (this.GotoNextItem(-1))
128856
128859
  {
128857
128860
  this.Draw();
@@ -128864,6 +128867,7 @@ function JSReportChartContainer(uielement)
128864
128867
  if (wheelValue<0) //下一页
128865
128868
  {
128866
128869
  this.LastMouseStatus.TooltipStatus=null;
128870
+ this.HideMinuteChartTooltip();
128867
128871
  if (this.GotoNextPage(this.PageUpDownCycle))
128868
128872
  {
128869
128873
  this.Draw();
@@ -128873,6 +128877,7 @@ function JSReportChartContainer(uielement)
128873
128877
  else if (wheelValue>0) //上一页
128874
128878
  {
128875
128879
  this.LastMouseStatus.TooltipStatus=null;
128880
+ this.HideMinuteChartTooltip();
128876
128881
  if (this.GotoPreviousPage(this.PageUpDownCycle))
128877
128882
  {
128878
128883
  this.Draw();
@@ -128894,6 +128899,7 @@ function JSReportChartContainer(uielement)
128894
128899
  var keyID = e.keyCode ? e.keyCode :e.which;
128895
128900
  if (keyID==116) return; //F15刷新不处理
128896
128901
 
128902
+ this.HideMinuteChartTooltip();
128897
128903
  switch(keyID)
128898
128904
  {
128899
128905
  case 33: //page up
@@ -129076,6 +129082,8 @@ function JSReportChartContainer(uielement)
129076
129082
  //去掉右键菜单
129077
129083
  this.UIOnContextMenu=function(e)
129078
129084
  {
129085
+ e.preventDefault();
129086
+
129079
129087
  if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash == true) return;
129080
129088
 
129081
129089
  if (!this.IsShowRightMenu) return;
@@ -129088,7 +129096,7 @@ function JSReportChartContainer(uielement)
129088
129096
 
129089
129097
  this.OnRightMenu=function(x,y,e)
129090
129098
  {
129091
- e.preventDefault();
129099
+
129092
129100
  }
129093
129101
 
129094
129102
  this.UIOnMouseMove=function(e)
@@ -139523,7 +139531,7 @@ function ScrollBarBGChart()
139523
139531
 
139524
139532
 
139525
139533
 
139526
- var HQCHART_VERSION="1.1.14153";
139534
+ var HQCHART_VERSION="1.1.14164";
139527
139535
 
139528
139536
  function PrintHQChartVersion()
139529
139537
  {
@@ -5,7 +5,7 @@
5
5
 
6
6
 
7
7
 
8
- var HQCHART_VERSION="1.1.14153";
8
+ var HQCHART_VERSION="1.1.14164";
9
9
 
10
10
  function PrintHQChartVersion()
11
11
  {
@@ -89016,6 +89016,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
89016
89016
  frame.YSplitOperator.SplitCount=subFrame.Frame.YSplitOperator.SplitCount;
89017
89017
  frame.YSplitOperator.GetEventCallback=(id)=> { return this.GetEventCallback(id); };
89018
89018
  frame.YSplitOperator.OverlayIdentify=overlayFrame.Identify;
89019
+ frame.YSplitOperator.FloatPrecision=0; //持仓量 整数
89019
89020
 
89020
89021
  var chart=new ChartMinutePositionLine();
89021
89022
  chart.Canvas=this.Canvas
@@ -124866,7 +124867,7 @@ function GetBlackStyle()
124866
124867
  PriceColor: "rgb(25,180,231)",
124867
124868
  AreaPriceColor:"rgba(63,158,255,.3)",
124868
124869
  AvPriceColor: "rgb(255,236,0)",
124869
- PositionColor:'rgb(218,165,32)',
124870
+ PositionColor:'rgb(201, 9, 224)',
124870
124871
  VolTitleColor:"rgb(190,190,190)",
124871
124872
  Before:
124872
124873
  {
@@ -128887,6 +128888,7 @@ function JSReportChartContainer(uielement)
128887
128888
  if (wheelValue<0) //下
128888
128889
  {
128889
128890
  this.LastMouseStatus.TooltipStatus=null;
128891
+ this.HideMinuteChartTooltip();
128890
128892
  if (this.GotoNextItem(1))
128891
128893
  {
128892
128894
  this.Draw();
@@ -128896,6 +128898,7 @@ function JSReportChartContainer(uielement)
128896
128898
  else if (wheelValue>0) //上
128897
128899
  {
128898
128900
  this.LastMouseStatus.TooltipStatus=null;
128901
+ this.HideMinuteChartTooltip();
128899
128902
  if (this.GotoNextItem(-1))
128900
128903
  {
128901
128904
  this.Draw();
@@ -128908,6 +128911,7 @@ function JSReportChartContainer(uielement)
128908
128911
  if (wheelValue<0) //下一页
128909
128912
  {
128910
128913
  this.LastMouseStatus.TooltipStatus=null;
128914
+ this.HideMinuteChartTooltip();
128911
128915
  if (this.GotoNextPage(this.PageUpDownCycle))
128912
128916
  {
128913
128917
  this.Draw();
@@ -128917,6 +128921,7 @@ function JSReportChartContainer(uielement)
128917
128921
  else if (wheelValue>0) //上一页
128918
128922
  {
128919
128923
  this.LastMouseStatus.TooltipStatus=null;
128924
+ this.HideMinuteChartTooltip();
128920
128925
  if (this.GotoPreviousPage(this.PageUpDownCycle))
128921
128926
  {
128922
128927
  this.Draw();
@@ -128938,6 +128943,7 @@ function JSReportChartContainer(uielement)
128938
128943
  var keyID = e.keyCode ? e.keyCode :e.which;
128939
128944
  if (keyID==116) return; //F15刷新不处理
128940
128945
 
128946
+ this.HideMinuteChartTooltip();
128941
128947
  switch(keyID)
128942
128948
  {
128943
128949
  case 33: //page up
@@ -129120,6 +129126,8 @@ function JSReportChartContainer(uielement)
129120
129126
  //去掉右键菜单
129121
129127
  this.UIOnContextMenu=function(e)
129122
129128
  {
129129
+ e.preventDefault();
129130
+
129123
129131
  if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash == true) return;
129124
129132
 
129125
129133
  if (!this.IsShowRightMenu) return;
@@ -129132,7 +129140,7 @@ function JSReportChartContainer(uielement)
129132
129140
 
129133
129141
  this.OnRightMenu=function(x,y,e)
129134
129142
  {
129135
- e.preventDefault();
129143
+
129136
129144
  }
129137
129145
 
129138
129146
  this.UIOnMouseMove=function(e)
@@ -136700,10 +136708,11 @@ function JSTReportChartContainer(uielement)
136700
136708
  this.UIElement.onmousemove=(e)=>{ this.UIOnMouseMove(e);}
136701
136709
  this.UIElement.onmouseout=(e)=>{ this.UIOnMounseOut(e); }
136702
136710
  this.UIElement.onmouseleave=(e)=>{ this.UIOnMouseleave(e); }
136711
+ this.UIElement.oncontextmenu=(e)=> { this.UIOnContextMenu(e); }
136703
136712
 
136704
136713
  /*
136705
136714
  this.UIElement.onmouseup=(e)=>{ this.UIOnMounseUp(e); }
136706
- this.UIElement.oncontextmenu=(e)=> { this.UIOnContextMenu(e); }
136715
+
136707
136716
 
136708
136717
 
136709
136718
  //手机拖拽
@@ -137269,10 +137278,10 @@ function JSTReportChartContainer(uielement)
137269
137278
  //document.onmouseup=(e)=> { this.DocOnMouseUp(e); }
137270
137279
  }
137271
137280
 
137272
- this.GetReportChart=function()
137281
+ this.GetTReportChart=function()
137273
137282
  {
137274
137283
  var chart=this.ChartPaint[0];
137275
- if (!chart) return;
137284
+ if (!chart) return null;
137276
137285
 
137277
137286
  return chart;
137278
137287
  }
@@ -137295,7 +137304,7 @@ function JSTReportChartContainer(uielement)
137295
137304
 
137296
137305
  this.LastMouseStatus.OnMouseMove={ X:x, Y:y };
137297
137306
  var mouseStatus={ Cursor:"default", Name:"Default"};; //鼠标状态
137298
- var report=this.GetReportChart();
137307
+ var report=this.GetTReportChart();
137299
137308
  var bDraw=false;
137300
137309
 
137301
137310
  if (report)
@@ -137352,6 +137361,21 @@ function JSTReportChartContainer(uielement)
137352
137361
  this.HideMinuteChartTooltip();
137353
137362
  }
137354
137363
 
137364
+ this.UIOnContextMenu=function(e)
137365
+ {
137366
+ e.preventDefault();
137367
+
137368
+ var x = e.clientX-this.UIElement.getBoundingClientRect().left;
137369
+ var y = e.clientY-this.UIElement.getBoundingClientRect().top;
137370
+
137371
+ this.OnRightMenu(x,y,e); //右键菜单事件
137372
+ }
137373
+
137374
+ this.OnRightMenu=function(x,y,e)
137375
+ {
137376
+
137377
+ }
137378
+
137355
137379
  //点表头
137356
137380
  this.OnClickHeader=function(clickData, e)
137357
137381
  {
@@ -137528,12 +137552,6 @@ function JSTReportChartContainer(uielement)
137528
137552
  }
137529
137553
  }
137530
137554
 
137531
- this.GetTReportChart=function()
137532
- {
137533
- var chart=this.ChartPaint[0];
137534
- return chart;
137535
- }
137536
-
137537
137555
  this.OnWheel=function(e) //滚轴
137538
137556
  {
137539
137557
  JSConsole.Chart.Log('[JSTReportChartContainer::OnWheel]',e);
@@ -137559,6 +137577,7 @@ function JSTReportChartContainer(uielement)
137559
137577
  if (wheelValue<0) //下
137560
137578
  {
137561
137579
  this.LastMouseStatus.TooltipStatus=null;
137580
+ this.HideMinuteChartTooltip();
137562
137581
  var result=this.MoveSelectedRow(1,{ EnablePageCycle:this.EnablePageCycle })
137563
137582
  if (result)
137564
137583
  {
@@ -137569,6 +137588,7 @@ function JSTReportChartContainer(uielement)
137569
137588
  else if (wheelValue>0) //上
137570
137589
  {
137571
137590
  this.LastMouseStatus.TooltipStatus=null;
137591
+ this.HideMinuteChartTooltip();
137572
137592
  var result=this.MoveSelectedRow(-1,{ EnablePageCycle:this.EnablePageCycle} );
137573
137593
  if (result)
137574
137594
  {
@@ -137590,6 +137610,8 @@ function JSTReportChartContainer(uielement)
137590
137610
  var keyID = e.keyCode ? e.keyCode :e.which;
137591
137611
  if (keyID==116) return; //F15刷新不处理
137592
137612
 
137613
+ this.HideMinuteChartTooltip();
137614
+
137593
137615
  switch(keyID)
137594
137616
  {
137595
137617
  /*
@@ -149019,7 +149041,7 @@ function HQChartScriptWorker()
149019
149041
 
149020
149042
 
149021
149043
 
149022
- var HQCHART_VERSION="1.1.14153";
149044
+ var HQCHART_VERSION="1.1.14164";
149023
149045
 
149024
149046
  function PrintHQChartVersion()
149025
149047
  {