hqchart 1.1.15002 → 1.1.15008

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.
@@ -1592,7 +1592,9 @@ CHIP_CLOSE:45//关闭筹码图
1592
1592
  };var JSCHART_DATA_FIELD_ID={KLINE_ORDERFLOW:99,MINUTE_MULTI_DAY_EXTENDDATA:21,//多日分时图扩展数据序号
1593
1593
  MINUTE_DAY_EXTENDDATA:21,MINUTE_BEFOREOPEN_EXTENDDATA:21,MINUTE_AFTERCLOSE_EXTENDDATA:21,KLINE_COLOR_DATA:66,//K线自定义颜色数据
1594
1594
  KLINE_DAY_EXTENDDATA:25,KLINE_MINUTE_EXTENDDATA:25,//OrderBook Heatmap
1595
- KLINE_HEATMAP:67};var JSCHART_WORKER_MESSAGE_ID={EXECUTE_SCRIPT:1,//工作线程执行脚本
1595
+ KLINE_HEATMAP:67,//报价列表
1596
+ REPORT_EXTENDDATA:81//报价列表扩展数据
1597
+ };var JSCHART_WORKER_MESSAGE_ID={EXECUTE_SCRIPT:1,//工作线程执行脚本
1596
1598
  FINISH_EXECUTE_SCRIPT:2,//脚本执行完成
1597
1599
  ERROR_EXECUTE_SCRIPT:3};var JSCHART_MENU_ID={CMD_CHANGE_PERIOD_ID:1,//切换周期
1598
1600
  CMD_CHANGE_WINDOW_COUNT_ID:2,//窗口个数
@@ -2622,7 +2624,7 @@ this.FrameData={SubFrameItem:null};//窗口框架信息
2622
2624
  this.DrawPicture={BGColor:g_JSChartResource.DrawPicture.XYCoordinate.BGColor,TextBGColor:g_JSChartResource.DrawPicture.XYCoordinate.TextBGColor,TextColor:g_JSChartResource.DrawPicture.XYCoordinate.TextColor,Font:g_JSChartResource.DrawPicture.XYCoordinate.Font};this.IChartFramePainting_ReloadResource=this.ReloadResource;this.ReloadResource=function(resource){this.IChartFramePainting_ReloadResource(resource);if(!resource){this.ToolbarButtonStyle=g_JSChartResource.ToolbarButtonStyle;this.CloseWindowButton=CloneData(g_JSChartResource.Buttons.CloseWindow);this.OverlayIndexButton=CloneData(g_JSChartResource.Buttons.OverlayIndex);this.ChangeIndexButton=CloneData(g_JSChartResource.Buttons.ChangeIndex);this.ModifyIndexParamButton=CloneData(g_JSChartResource.Buttons.ModifyIndexParam);this.MaxMinWindowButton=CloneData(g_JSChartResource.Buttons.MaxMinWindow);this.TitleWindowButton=CloneData(g_JSChartResource.Buttons.TitleWindow);this.ButtonTooltip=CloneData(g_JSChartResource.Buttons.Tooltip);this.AddIndexWindowButton=CloneData(g_JSChartResource.Buttons.AddIndexWindow);}};this.DrawFrame=function(){if(this.XPointCount>0){var dInterval=this.ChartBorder.GetWidth()/(6*this.XPointCount);//分6份, 数据4 间距2
2623
2625
  this.DistanceWidth=2*dInterval;this.DataWidth=4*dInterval;}this.DrawHorizontal();this.DrawVertical();};this.DrawTitleButton=function(aryButton,moveonPoint,mouseStatus){var border=this.GetBorder();if(this.IsHScreen){var y=border.Bottom-3;var x=border.RightTitle+this.ChartBorder.TitleHeight/2;this.Canvas.save();this.Canvas.translate(x,y);this.Canvas.rotate(90*Math.PI/180);//底部开始画
2624
2626
  var yButton=0,xButton=0,bottom=0;for(var i=0;i<aryButton.length;++i){var item=aryButton[i];var size=item.Style.Size;var xButton=bottom-size-item.Style.MerginLeft;var font=size+'px '+item.Style.Family;var color=item.Style.Color;this.Canvas.fillStyle=color;this.Canvas.font=font;this.Canvas.textAlign="left";this.Canvas.textBaseline="middle";this.Canvas.fillText(item.Style.Text,xButton,0);var rtButton={Left:x-size/2,Right:x+size/2,Bottom:y,Width:size,Height:size+item.Style.MerginLeft};rtButton.Top=rtButton.Bottom-size-item.Style.MerginLeft;this.Buttons.push({ID:item.ID,Rect:rtButton});bottom=xButton;y=rtButton.Top;}this.Canvas.restore();}else{var right=border.RightEx-3;var left=border.Left;var yButton=border.Top+this.ChartBorder.TitleHeight/2;this.ToolbarCacheSize={RToolbar:{Right:right,Left:right}//右往左绘制
2625
- };for(var i=0;i<aryButton.length;++i){var item=aryButton[i];var size=item.Style.Size;var xBotton=right-size-item.Style.MerginLeft;var font=size+'px '+item.Style.Family;var rtButton={Left:xBotton,Top:yButton-size/2,Right:xBotton+size+item.Style.MerginLeft,Bottom:yButton+size/2,Width:size+item.Style.MerginLeft,Height:size};var color=item.Style.Color;if(moveonPoint&&moveonPoint.X>=rtButton.Left&&moveonPoint.X<rtButton.Right&&moveonPoint.Y>=rtButton.Top&&moveonPoint.Y<=rtButton.Bottom){color=item.Style.MoveOnColor;if(mouseStatus)mouseStatus.MouseOnToolbar={Rect:rtButton,Item:item,Frame:this,Point:{X:moveonPoint.X,Y:moveonPoint.Y}};}this.Canvas.fillStyle=color;this.Canvas.font=font;this.Canvas.textAlign="left";this.Canvas.textBaseline="middle";this.Canvas.fillText(item.Style.Text,xBotton,yButton);this.Buttons.push({ID:item.ID,Rect:rtButton});this.ToolbarCacheSize.RToolbar.Left=rtButton.Left;right=xBotton;}}};this.DrawToolbarTooltip=function(mouseOnToolbar){if(!mouseOnToolbar)return;var border=this.GetBorder();var text=null;if(mouseOnToolbar.Item.TooltipText){text=mouseOnToolbar.Item.TooltipText;}else{var key='Toolbar-'+mouseOnToolbar.Item.ID;text=g_JSChartLocalization.GetText(key,0);}if(!text)return;var pixelRatio=GetDevicePixelRatio();var canvas=this.Canvas;if(this.GetExtraCanvas){var finder=this.GetExtraCanvas(JSChart.TooltipCursorCanvasKey);if(finder)canvas=finder.Canvas;}var xCenter=mouseOnToolbar.Rect.Left+mouseOnToolbar.Rect.Width/2;canvas.font=this.ButtonTooltip.Font;canvas.textAlign="left";canvas.textBaseline="bottom";var mergin=this.ButtonTooltip.Mergin;var textWidth=canvas.measureText(text).width+mergin.Left+mergin.Right;var textHeight=this.GetFontHeight();var bgHeight=textHeight+mergin.Top+mergin.Bottom;if(mouseOnToolbar.ID=="TitleButton"){var x=mouseOnToolbar.Point.X;var y=mouseOnToolbar.Point.Y+20;}else if(JSCHART_BUTTON_ID.CLOSE_BEFOREOPEN_ID==mouseOnToolbar.Item.ID){var x=mouseOnToolbar.Rect.Right+5;var y=mouseOnToolbar.Rect.Top;}else if(JSCHART_BUTTON_ID.DRAW_PICTURE_DELETE==mouseOnToolbar.Item.ID||JSCHART_BUTTON_ID.DRAW_PICTURE_SETTING==mouseOnToolbar.Item.ID||mouseOnToolbar.Item.ID>=JSCHART_BUTTON_ID.DRAW_PICTURE_BUTTON_1&&mouseOnToolbar.Item.ID<=JSCHART_BUTTON_ID.DRAW_PICTURE_BUTTON_18){var x=mouseOnToolbar.Point.X;var y=mouseOnToolbar.Point.Y+20;if(x+textWidth>=border.ChartWidth)x=border.ChartWidth-textWidth-2;}else{var x=xCenter-textWidth/2;var y=border.Top-bgHeight;if(y<0)y=border.TopEx+1;if(x+textWidth>border.ChartWidth)x=border.ChartWidth-textWidth-2;}if(IFrameSplitOperator.IsNumber(this.ButtonTooltip.BorderRadius))//圆角
2627
+ };for(var i=0;i<aryButton.length;++i){var item=aryButton[i];var size=item.Style.Size;var xBotton=right-size-item.Style.MerginLeft;var font=size+'px '+item.Style.Family;var rtButton={Left:xBotton,Top:yButton-size/2,Right:xBotton+size+item.Style.MerginLeft,Bottom:yButton+size/2,Width:size+item.Style.MerginLeft,Height:size};var color=item.Style.Color;if(moveonPoint&&moveonPoint.X>=rtButton.Left&&moveonPoint.X<rtButton.Right&&moveonPoint.Y>=rtButton.Top&&moveonPoint.Y<=rtButton.Bottom){color=item.Style.MoveOnColor;if(mouseStatus)mouseStatus.MouseOnToolbar={Rect:rtButton,Item:item,Frame:this,Point:{X:moveonPoint.X,Y:moveonPoint.Y}};}this.Canvas.fillStyle=color;this.Canvas.font=font;this.Canvas.textAlign="left";this.Canvas.textBaseline="middle";this.Canvas.fillText(item.Style.Text,xBotton,yButton);this.Buttons.push({ID:item.ID,Rect:rtButton});this.ToolbarCacheSize.RToolbar.Left=rtButton.Left;right=xBotton;}}};this.DrawToolbarTooltip=function(mouseOnToolbar){if(!mouseOnToolbar)return;var border=this.GetBorder();var text=null;if(mouseOnToolbar.Item.TooltipText){text=mouseOnToolbar.Item.TooltipText;}else{var key='Toolbar-'+mouseOnToolbar.Item.ID;text=g_JSChartLocalization.GetText(key,0);}if(!text)return;var pixelRatio=GetDevicePixelRatio();var canvas=this.Canvas;if(this.GetExtraCanvas){var finder=this.GetExtraCanvas(JSChart.TooltipCursorCanvasKey);if(finder)canvas=finder.Canvas;}var xCenter=mouseOnToolbar.Rect.Left+mouseOnToolbar.Rect.Width/2;canvas.font=this.ButtonTooltip.Font;canvas.textAlign="left";canvas.textBaseline="bottom";var mergin=this.ButtonTooltip.Mergin;var textWidth=canvas.measureText(text).width+mergin.Left+mergin.Right;var textHeight=this.GetFontHeight();var bgHeight=textHeight+mergin.Top+mergin.Bottom;if(mouseOnToolbar.ID=="TitleButton"){var x=mouseOnToolbar.Point.X;var y=mouseOnToolbar.Point.Y+20;if(y+textHeight>border.ChartHeight)y=mouseOnToolbar.Point.Y-5-textHeight;}else if(JSCHART_BUTTON_ID.CLOSE_BEFOREOPEN_ID==mouseOnToolbar.Item.ID){var x=mouseOnToolbar.Rect.Right+5;var y=mouseOnToolbar.Rect.Top;}else if(JSCHART_BUTTON_ID.DRAW_PICTURE_DELETE==mouseOnToolbar.Item.ID||JSCHART_BUTTON_ID.DRAW_PICTURE_SETTING==mouseOnToolbar.Item.ID||mouseOnToolbar.Item.ID>=JSCHART_BUTTON_ID.DRAW_PICTURE_BUTTON_1&&mouseOnToolbar.Item.ID<=JSCHART_BUTTON_ID.DRAW_PICTURE_BUTTON_18){var x=mouseOnToolbar.Point.X;var y=mouseOnToolbar.Point.Y+20;if(x+textWidth>=border.ChartWidth)x=border.ChartWidth-textWidth-2;}else{var x=xCenter-textWidth/2;var y=border.Top-bgHeight;if(y<0)y=border.TopEx+1;if(x+textWidth>border.ChartWidth)x=border.ChartWidth-textWidth-2;}if(IFrameSplitOperator.IsNumber(this.ButtonTooltip.BorderRadius))//圆角
2626
2628
  {var roundRadius=this.ButtonTooltip.BorderRadius;canvas.beginPath();canvas.roundRect(ToFixedPoint(x),ToFixedPoint(y),ToFixedRect(textWidth),ToFixedRect(bgHeight),[roundRadius]);canvas.closePath();canvas.fillStyle=this.ButtonTooltip.ColorBG;canvas.fill();canvas.strokeStyle=this.ButtonTooltip.ColorBorder;canvas.stroke();canvas.fillStyle=this.ButtonTooltip.Color;canvas.fillText(text,x+mergin.Left,y+bgHeight-mergin.Bottom);}else{canvas.fillStyle=this.ButtonTooltip.ColorBG;canvas.fillRect(x,y,textWidth,bgHeight);//画一个背景色, 不然是一个黑的背景
2627
2629
  canvas.fillStyle=this.ButtonTooltip.Color;canvas.fillText(text,x+mergin.Left,y+bgHeight-mergin.Bottom);}};//isLimit 是否限制在当前坐标下
2628
2630
  this.GetYFromData=function(value,isLimit){if(this.Logarithmic&&this.GetYLogarithmicFromData){return this.GetYLogarithmicFromData(value,isLimit);}if(isLimit===false){if(this.CoordinateType==1){var height=this.ChartBorder.GetHeightEx()*(value-this.HorizontalMin)/(this.HorizontalMax-this.HorizontalMin);return this.ChartBorder.GetTopEx()+height;}else{var height=this.ChartBorder.GetHeightEx()*(value-this.HorizontalMin)/(this.HorizontalMax-this.HorizontalMin);return this.ChartBorder.GetBottomEx()-height;}}else{if(this.CoordinateType==1){if(value<=this.HorizontalMin)return this.ChartBorder.GetTopEx();if(value>=this.HorizontalMax)return this.ChartBorder.GetBottomEx();var height=this.ChartBorder.GetHeightEx()*(value-this.HorizontalMin)/(this.HorizontalMax-this.HorizontalMin);return this.ChartBorder.GetTopEx()+height;}else{if(value<=this.HorizontalMin)return this.ChartBorder.GetBottomEx();if(value>=this.HorizontalMax)return this.ChartBorder.GetTopEx();var height=this.ChartBorder.GetHeightEx()*(value-this.HorizontalMin)/(this.HorizontalMax-this.HorizontalMin);return this.ChartBorder.GetBottomEx()-height;}}};this.IsShowRightHorizontal=function(){var borderRight=this.ChartBorder.Right;if(borderRight<=10)return false;if(this.YTextPosition[1]==2)return false;if(this.IsShowYText[1]===false)return false;if(this.GlobalOption&&this.GlobalOption.RightHorizontal){var item=this.GlobalOption.RightHorizontal;if(item.Show===false)return false;}return true;};//画Y轴
@@ -13298,7 +13300,7 @@ var _iteratorNormalCompletion23=true;var _didIteratorError23=false;var _iterator
13298
13300
  //注册事件
13299
13301
  if(option.EventCallback){for(var i=0;i<option.EventCallback.length;++i){var item=option.EventCallback[i];chart.AddEventCallback(item);}}if(option.EnableResize==true)this.CreateResizeListener();if(option.EnablePopMenuV2===true)chart.InitalPopMenu();if(option.FloatTooltip&&option.FloatTooltip.Enable)chart.InitalFloatTooltip(option.FloatTooltip);//提示信息
13300
13302
  if(option.MinuteChartTooltip&&option.MinuteChartTooltip.Enable)chart.InitalMinuteChartTooltip(option.MinuteChartTooltip);if(option.KLineChartTooltip&&option.KLineChartTooltip.Enable)chart.InitalKLineChartTooltip(option.KLineChartTooltip);if(option.Symbol)chart.Symbol=option.Symbol;if(option.Name)chart.Name=option.Name;var requestOption={Callback:null};if(chart.Symbol)requestOption.Callback=function(){chart.RequestMemberListData();};if(option.LoadStockList===false){chart.ChartSplashPaint.IsEnableSplash=false;chart.Draw();}else{chart.RequestStockListData(requestOption);//下载码表
13301
- }};this.CreateJSReportChartContainer=function(option){var _this56=this;var chart=new JSReportChartContainer(this.CanvasElement);chart.GetExtraCanvas=function(name){return _this56.GetExtraCanvas(name);};chart.Create(option);if(option.NetworkFilter)chart.NetworkFilter=option.NetworkFilter;if(IFrameSplitOperator.IsNonEmptyArray(option.Column))chart.SetColumn(option.Column);if(IFrameSplitOperator.IsNonEmptyArray(option.Tab))chart.SetTab(option.Tab);if(IFrameSplitOperator.IsNumber(option.TabSelected))chart.SetSelectedTab(option.TabSelected);if(IFrameSplitOperator.IsBool(option.EnableDragRow))chart.EnableDragRow=option.EnableDragRow;if(IFrameSplitOperator.IsNumber(option.DragRowType))chart.DragRowType=option.DragRowType;if(IFrameSplitOperator.IsBool(option.EnableDragHeader))chart.EnableDragHeader=option.EnableDragHeader;if(IFrameSplitOperator.IsNumber(option.WheelPageType))chart.WheelPageType=option.WheelPageType;if(IFrameSplitOperator.IsBool(option.PageUpDownCycle))chart.PageUpDownCycle=option.PageUpDownCycle;if(IFrameSplitOperator.IsBool(option.EnablePageUpdate))chart.EnablePageUpdate=option.EnablePageUpdate;//数据下载提示信息
13303
+ }};this.CreateJSReportChartContainer=function(option){var _this56=this;var chart=new JSReportChartContainer(this.CanvasElement);chart.GetExtraCanvas=function(name){return _this56.GetExtraCanvas(name);};chart.Create(option);if(option.NetworkFilter)chart.NetworkFilter=option.NetworkFilter;if(IFrameSplitOperator.IsNonEmptyArray(option.Column))chart.SetColumn(option.Column);if(IFrameSplitOperator.IsNonEmptyArray(option.Tab))chart.SetTab(option.Tab);if(IFrameSplitOperator.IsNumber(option.TabSelected))chart.SetSelectedTab(option.TabSelected);if(IFrameSplitOperator.IsBool(option.EnableDragRow))chart.EnableDragRow=option.EnableDragRow;if(IFrameSplitOperator.IsNumber(option.DragRowType))chart.DragRowType=option.DragRowType;if(IFrameSplitOperator.IsBool(option.EnableDragHeader))chart.EnableDragHeader=option.EnableDragHeader;if(IFrameSplitOperator.IsNumber(option.WheelPageType))chart.WheelPageConfig.Type=option.WheelPageType;if(IFrameSplitOperator.IsBool(option.PageUpDownCycle))chart.PageUpDownCycle=option.PageUpDownCycle;if(IFrameSplitOperator.IsBool(option.EnablePageUpdate))chart.EnablePageUpdate=option.EnablePageUpdate;if(option.WheelPage){var item=option.WheelPage;if(IFrameSplitOperator.IsNumber(item.Type))chart.WheelPageConfig.Type=item.Type;if(IFrameSplitOperator.IsPlusNumber(item.RowStep))chart.WheelPageConfig.RowStep=item.RowStep;if(IFrameSplitOperator.IsBool(item.EnableCtrlTurn))chart.WheelPageConfig.EnableCtrlTurn=item.EnableCtrlTurn;}//数据下载提示信息
13302
13304
  if(IFrameSplitOperator.IsObject(option.SplashTitle)){var item=option.SplashTitle;if(item)chart.SplashTitle.StockList=item.StockList;if(item)chart.SplashTitle.MemberList=item.MemberList;}if(option.VScrollbar)chart.SetVScrollbar(option.VScrollbar);if(option.SortInfo){var item=option.SortInfo;if(item.Search)chart.SortInfo.Field=chart.FindFiledIndex(item.Search);if(IFrameSplitOperator.IsNumber(item.Field))chart.SortInfo.Field=item.Field;if(IFrameSplitOperator.IsNumber(item.Sort))chart.SortInfo.Sort=item.Sort;}if(option.VirtualTable){var item=option.VirtualTable;if(IFrameSplitOperator.IsBool(item.Enable))chart.Data.Virtual.Enable=item.Enable;}var reportChart=chart.GetReportChart();if(reportChart){if(IFrameSplitOperator.IsNumber(option.TextOverflowStyle))reportChart.TextOverflowStyle=option.TextOverflowStyle;if(IFrameSplitOperator.IsNumber(option.MultiSelectModel))reportChart.MultiSelectModel=option.MultiSelectModel;if(IFrameSplitOperator.IsNumber(option.SelectedStyle))reportChart.SelectedStyle=option.SelectedStyle;}this.SetChartBorder(chart,option);//是否自动更新
13303
13305
  if(option.IsAutoUpdate!=null)chart.IsAutoUpdate=option.IsAutoUpdate;if(option.AutoUpdateFrequency>0)chart.AutoUpdateFrequency=option.AutoUpdateFrequency;//数据筛选
13304
13306
  if(option.DataFilter){var item=option.DataFilter;if(IFrameSplitOperator.IsBool(item.Enable))chart.DataFilterConfig.Enable=item.Enable;}//注册事件
@@ -13361,9 +13363,13 @@ this.UIElement=uielement;this.LastPoint=new Point();//鼠标位置
13361
13363
  this.IsOnTouch=false;this.TouchDrag;this.TouchMoveMinAngle=70;//左右移动最小角度
13362
13364
  this.YStepPixel=5*GetDevicePixelRatio();this.XStepPixel=10*GetDevicePixelRatio();this.PageUpDownCycle=true;//翻页循环
13363
13365
  this.DragPageCycle=true;//手机翻页循环
13364
- this.WheelPageType=0;//鼠标滚轴翻页模式 0=一页一页翻 1=一条一条翻
13365
- //拖拽滚动条
13366
- this.DragXScroll=null;//{Start:{x,y}, End:{x, y}}
13366
+ //this.WheelPageType=0; //鼠标滚轴翻页模式 0=一页一页翻 1=一条一条翻
13367
+ //鼠标滚轴配置
13368
+ // Type:0=一页一页翻 1=一条一条翻,
13369
+ // RowStep:单条数据滚动步长
13370
+ // EnableCtrlTurn Ctrl+滚轴翻页
13371
+ this.WheelPageConfig={Type:0,RowStep:1,EnableCtrlTurn:false//拖拽滚动条
13372
+ };this.DragXScroll=null;//{Start:{x,y}, End:{x, y}}
13367
13373
  this.DragYScroll=null;this.IsShowVScrollbar=false;this.IsDestroy=false;//是否已经销毁了
13368
13374
  this.JSPopMenu;//内置菜单
13369
13375
  this.IsShowRightMenu=true;//
@@ -13527,6 +13533,7 @@ if(IFrameSplitOperator.IsNumber(item[41]))stock.OpenPosition=item[41];//开仓
13527
13533
  if(IFrameSplitOperator.IsNumber(item[42]))stock.ClosePosition=item[42];//平仓量
13528
13534
  //1,3,5,10,15 涨速%
13529
13535
  if(IFrameSplitOperator.IsNumber(item[43]))stock.RSpeed1M=item[43];if(IFrameSplitOperator.IsNumber(item[44]))stock.RSpeed3M=item[44];if(IFrameSplitOperator.IsNumber(item[45]))stock.RSpeed5M=item[45];if(IFrameSplitOperator.IsNumber(item[46]))stock.RSpeed10M=item[46];if(IFrameSplitOperator.IsNumber(item[47]))stock.RSpeed15M=item[47];if(item[80]||item[80]===null)stock.BGColor=item[80];//整行背景色
13536
+ if(item[JSCHART_DATA_FIELD_ID.REPORT_EXTENDDATA])stock.ExtendDataV2=item[JSCHART_DATA_FIELD_ID.REPORT_EXTENDDATA];//扩展数据2
13530
13537
  //10个数值型 101-199
13531
13538
  if(IFrameSplitOperator.IsNumber(item[101]))stock.ReserveNumber1=item[101];if(IFrameSplitOperator.IsNumber(item[102]))stock.ReserveNumber2=item[102];if(IFrameSplitOperator.IsNumber(item[103]))stock.ReserveNumber3=item[103];if(IFrameSplitOperator.IsNumber(item[104]))stock.ReserveNumber4=item[104];if(IFrameSplitOperator.IsNumber(item[105]))stock.ReserveNumber5=item[105];if(IFrameSplitOperator.IsNumber(item[106]))stock.ReserveNumber6=item[106];if(IFrameSplitOperator.IsNumber(item[107]))stock.ReserveNumber7=item[107];if(IFrameSplitOperator.IsNumber(item[108]))stock.ReserveNumber8=item[108];if(IFrameSplitOperator.IsNumber(item[109]))stock.ReserveNumber9=item[109];if(IFrameSplitOperator.IsNumber(item[110]))stock.ReserveNumber10=item[110];if(IFrameSplitOperator.IsNumber(item[111]))stock.ReserveNumber11=item[111];if(IFrameSplitOperator.IsNumber(item[112]))stock.ReserveNumber12=item[112];if(IFrameSplitOperator.IsNumber(item[113]))stock.ReserveNumber13=item[113];if(IFrameSplitOperator.IsNumber(item[114]))stock.ReserveNumber14=item[114];if(IFrameSplitOperator.IsNumber(item[115]))stock.ReserveNumber15=item[115];if(IFrameSplitOperator.IsNumber(item[116]))stock.ReserveNumber16=item[116];if(IFrameSplitOperator.IsNumber(item[117]))stock.ReserveNumber17=item[117];if(IFrameSplitOperator.IsNumber(item[118]))stock.ReserveNumber18=item[118];if(IFrameSplitOperator.IsNumber(item[119]))stock.ReserveNumber19=item[119];if(IFrameSplitOperator.IsNumber(item[120]))stock.ReserveNumber20=item[120];//10个字符型 201-299
13532
13539
  if(IFrameSplitOperator.IsString(item[201])||IFrameSplitOperator.IsObject(item[201]))stock.ReserveString1=item[201];if(IFrameSplitOperator.IsString(item[202])||IFrameSplitOperator.IsObject(item[202]))stock.ReserveString2=item[202];if(IFrameSplitOperator.IsString(item[203])||IFrameSplitOperator.IsObject(item[203]))stock.ReserveString3=item[203];if(IFrameSplitOperator.IsString(item[204])||IFrameSplitOperator.IsObject(item[204]))stock.ReserveString4=item[204];if(IFrameSplitOperator.IsString(item[205])||IFrameSplitOperator.IsObject(item[205]))stock.ReserveString5=item[205];if(IFrameSplitOperator.IsString(item[206])||IFrameSplitOperator.IsObject(item[206]))stock.ReserveString6=item[206];if(IFrameSplitOperator.IsString(item[207])||IFrameSplitOperator.IsObject(item[207]))stock.ReserveString7=item[207];if(IFrameSplitOperator.IsString(item[208])||IFrameSplitOperator.IsObject(item[208]))stock.ReserveString8=item[208];if(IFrameSplitOperator.IsString(item[209])||IFrameSplitOperator.IsObject(item[209]))stock.ReserveString9=item[209];if(IFrameSplitOperator.IsString(item[210])||IFrameSplitOperator.IsObject(item[210]))stock.ReserveString10=item[210];if(IFrameSplitOperator.IsString(item[211])||IFrameSplitOperator.IsObject(item[211]))stock.ReserveString11=item[211];if(IFrameSplitOperator.IsString(item[212])||IFrameSplitOperator.IsObject(item[212]))stock.ReserveString12=item[212];if(IFrameSplitOperator.IsString(item[213])||IFrameSplitOperator.IsObject(item[213]))stock.ReserveString13=item[213];if(IFrameSplitOperator.IsString(item[214])||IFrameSplitOperator.IsObject(item[214]))stock.ReserveString14=item[214];if(IFrameSplitOperator.IsString(item[215])||IFrameSplitOperator.IsObject(item[215]))stock.ReserveString15=item[215];if(IFrameSplitOperator.IsString(item[216])||IFrameSplitOperator.IsObject(item[216]))stock.ReserveString16=item[216];if(IFrameSplitOperator.IsString(item[217])||IFrameSplitOperator.IsObject(item[217]))stock.ReserveString17=item[217];if(IFrameSplitOperator.IsString(item[218])||IFrameSplitOperator.IsObject(item[218]))stock.ReserveString18=item[218];if(IFrameSplitOperator.IsString(item[219])||IFrameSplitOperator.IsObject(item[219]))stock.ReserveString19=item[219];if(IFrameSplitOperator.IsString(item[220])||IFrameSplitOperator.IsObject(item[220]))stock.ReserveString20=item[220];//10个进度条 301-350 { Value:, BGColor: }
@@ -13541,9 +13548,10 @@ var frequency=this.AutoUpdateFrequency;if(marketStatus==1)//盘前
13541
13548
  //{event:事件id, callback:回调函数}
13542
13549
  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)//获取事件回调
13543
13550
  {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)//滚轴
13544
- {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)//下
13545
- {this.LastMouseStatus.TooltipStatus=null;this.HideAllTooltip();if(this.GotoNextItem(1)){this.Draw();this.DelayUpdateStockData();}}else if(wheelValue>0)//上
13546
- {this.LastMouseStatus.TooltipStatus=null;this.HideAllTooltip();if(this.GotoNextItem(-1)){this.Draw();this.DelayUpdateStockData();}}}else{if(wheelValue<0)//下一页
13551
+ {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;var type=this.WheelPageConfig.Type;if(this.WheelPageConfig.EnableCtrlTurn&&e&&e.ctrlKey)type=0;//ctrl 翻页
13552
+ if(type){var step=this.WheelPageConfig.RowStep;if(wheelValue<0)//下
13553
+ {this.LastMouseStatus.TooltipStatus=null;this.HideAllTooltip();if(this.GotoNextItem(step)){this.Draw();this.DelayUpdateStockData();}}else if(wheelValue>0)//上
13554
+ {this.LastMouseStatus.TooltipStatus=null;this.HideAllTooltip();if(this.GotoNextItem(step*-1)){this.Draw();this.DelayUpdateStockData();}}}else{if(wheelValue<0)//下一页
13547
13555
  {this.LastMouseStatus.TooltipStatus=null;this.HideAllTooltip();if(this.GotoNextPage(this.PageUpDownCycle)){this.Draw();this.DelayUpdateStockData();}}else if(wheelValue>0)//上一页
13548
13556
  {this.LastMouseStatus.TooltipStatus=null;this.HideAllTooltip();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;//回调事件
13549
13557
  var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_KEYDOWN);if(event&&event.Callback){var sendData={e:e,KeyID:keyID,PreventDefault:false,ReportChart:reportChart};event.Callback(event,sendData,this);if(sendData.PreventDefault)return;}if(keyID==116)return;//F15刷新不处理
@@ -15275,7 +15283,7 @@ hisData.Symbol=message.symbol;}var stockObj={HQDataType:HQ_DATA_TYPE.KLINE_ID,St
15275
15283
  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);};}/********************************************************************************
15276
15284
  * 版本信息输出
15277
15285
  *
15278
- */var HQCHART_VERSION="1.1.15001";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();//把给外界调用的方法暴露出来
15286
+ */var HQCHART_VERSION="1.1.15007";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();//把给外界调用的方法暴露出来
15279
15287
  exports.default=(_jsChartInit$jsChartS={jsChartInit:JSChart.Init,jsChartStyle:JSChart.SetStyle,// IsIndexSymbol:IsIndexSymbol,
15280
15288
  // BaseIndex:BaseIndex,
15281
15289
  // ChartLine:ChartLine,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hqchart",
3
- "version": "1.1.15002",
3
+ "version": "1.1.15008",
4
4
  "description": "HQChart - H5, 微信小程序 沪深/港股/数字货币/期货/美股 K线图(kline),走势图,缩放,拖拽,十字光标,画图工具,截图,筹码图. 分析家语法,通达信语法,(麦语法),第3方数据对接",
5
5
  "main": "lib/main.js",
6
6
  "scripts": {
@@ -55796,35 +55796,69 @@ HQData.Minute_RequestMinuteData=function(data, callback)
55796
55796
  }
55797
55797
  */
55798
55798
 
55799
- var before=[];
55800
- var beforeinfo={ totalcount:60*10, ver:2.0, TimeConfig:{ AryTime:[{ Start:91500, End:92459, Date:srcStock.date }]} }; //9:15-9:25 集合竞价15分钟 1s一个数据
55801
- var price=srcStock.yclose+0.01;
55799
+ if (symbol=="000001.sh") //指数
55800
+ {
55801
+ var before=[];
55802
+ var beforeinfo={ totalcount:60*10, ver:3.0, TimeConfig:{ AryTime:[{ Start:91500, End:92459, Date:srcStock.date }]} }; //9:15-9:25 集合竞价15分钟 1s一个数据
55803
+ var price=srcStock.yclose+0.01;
55804
+ var vol=0;
55802
55805
 
55803
- var date=new Date(2021,5,2, 9,15, 0);
55804
- before=
55805
- [
55806
- [91505,price+0.01, 400, 300, 1, 800],
55807
- [91550,price+0.02, 550, 600, 0, 1500],
55808
- [91603,price+0.03, 300, 600, 1, 3600],
55809
- [91613,price+0.03, 150, 320, 1, 3600],
55810
- [91623,price+0.04, 200, 400, 1, 3600],
55811
- [91635,price+0.05, 100, 100, 1, 3600],
55812
- [91640,price+0.03, 350, 210, 2, 1600],
55813
- [91711,price+0.02, 3210, 350, 2, 3700],
55814
- [91731,price+0.04, 110, 450, 1, 3700],
55815
- [91825,price-0.01, 210, 650, 2, 3700],
55816
- [91855,price-0.02, 330, 440, 1, 1000],
55817
- [91915,price-0.03, 630, 640, 1, 1200],
55818
- [92022,price+0.01, 260, 550, 2, 1000],
55819
- [92304,price-0.02, 300, 100, 2, 1000],
55820
- [92314,price-0.03, 550, 150, 2, 1000],
55821
- [92344,price-0.04, 550, 150, 1, 1000],
55822
- [92357,price-0.05, 250, 750, 1, 1500],
55823
- [92405,price-0.07, 450, 50, 2, 1000],
55824
- [92435,price-0.08, 650, 250, 1, 1000],
55825
- [92458,price-0.12, 350, 350, 2, 1000],
55826
- ];
55827
-
55806
+ var date=new Date(2021,5,2, 9,15, 0);
55807
+ var testData={ Up:1, Max:srcStock.yclose*1.02, Min:srcStock.yclose*0.98 };
55808
+
55809
+ for(var i=0;i<beforeinfo.totalcount; ++i) //3s一个数据
55810
+ {
55811
+ var time=date.getHours()*10000+date.getMinutes()*100+date.getSeconds();
55812
+ vol=HQData.GetRandomTestData(100,500)*1000;
55813
+ var item=[ time, price, price+0.04, vol, 3, vol*1.3 ];
55814
+ before.push(item);
55815
+
55816
+ if (price>testData.Max && testData.Up===1)
55817
+ testData.Up=0;
55818
+ else if (price<testData.Min && testData.Up===0)
55819
+ testData.Up=1;
55820
+
55821
+ var value=HQData.GetRandomTestData(1,10)/100;
55822
+ if (testData.Up==1) price+=value;
55823
+ else price-=value;
55824
+
55825
+ date.setSeconds(date.getSeconds()+3);
55826
+ time=date.getHours()*10000+date.getMinutes()*100+date.getSeconds();
55827
+ if (time>92500) break;
55828
+ }
55829
+
55830
+ }
55831
+ else //股票
55832
+ {
55833
+ var before=[];
55834
+ var beforeinfo={ totalcount:60*10, ver:2.0, TimeConfig:{ AryTime:[{ Start:91500, End:92459, Date:srcStock.date }]} }; //9:15-9:25 集合竞价15分钟 1s一个数据
55835
+ var price=srcStock.yclose+0.01;
55836
+
55837
+ var date=new Date(2021,5,2, 9,15, 0);
55838
+ before=
55839
+ [
55840
+ [91505,price+0.01, 400, 300, 1, 800],
55841
+ [91550,price+0.02, 550, 600, 0, 1500],
55842
+ [91603,price+0.03, 300, 600, 1, 3600],
55843
+ [91613,price+0.03, 150, 320, 1, 3600],
55844
+ [91623,price+0.04, 200, 400, 1, 3600],
55845
+ [91635,price+0.05, 100, 100, 1, 3600],
55846
+ [91640,price+0.03, 350, 210, 2, 1600],
55847
+ [91711,price+0.02, 3210, 350, 2, 3700],
55848
+ [91731,price+0.04, 110, 450, 1, 3700],
55849
+ [91825,price-0.01, 210, 650, 2, 3700],
55850
+ [91855,price-0.02, 330, 440, 1, 1000],
55851
+ [91915,price-0.03, 630, 640, 1, 1200],
55852
+ [92022,price+0.01, 260, 550, 2, 1000],
55853
+ [92304,price-0.02, 300, 100, 2, 1000],
55854
+ [92314,price-0.03, 550, 150, 2, 1000],
55855
+ [92344,price-0.04, 550, 150, 1, 1000],
55856
+ [92357,price-0.05, 250, 750, 1, 1500],
55857
+ [92405,price-0.07, 450, 50, 2, 1000],
55858
+ [92435,price-0.08, 650, 250, 1, 1000],
55859
+ [92458,price-0.12, 350, 350, 2, 1000],
55860
+ ];
55861
+ }
55828
55862
 
55829
55863
  stockItem.before=before;
55830
55864
  stockItem.beforeinfo=beforeinfo;
@@ -55907,27 +55941,51 @@ HQData.Minute_RequestMinuteData=function(data, callback)
55907
55941
  }
55908
55942
  */
55909
55943
 
55910
- var afterData=[]
55911
- var afterInfo={ ver:2.0, totalcount:60*3, TimeConfig:{ AryTime:[{ Start:145700, End:145959, Date:srcStock.date }]} } //14:57-15:00
55912
- if (stockItem.minute.length>=240)
55944
+ if (symbol=="000001.sh") //指数
55913
55945
  {
55914
- afterData=
55915
- [
55916
- [145708,price+0.01, 400, 300, 1, 800],
55917
- [145718,price+0.02, 550, 600, 0, 1500],
55918
- [145738,price+0.02, 150, 800, 0, 1500],
55919
- [145748,price+0.02, 150, 800, 0, 1500],
55920
- [145803,price+0.03, 300, 600, 1, 3600],
55921
- [145815,price+0.03, 350, 210, 2, 1600],
55922
- [145826,price+0.02, 1210, 350, 2, 2700],
55923
- [145833,price+0.01, 260, 550, 2, 1000],
55924
- [145845,price+0.02, 160, 750, 2, 1000],
55925
- [145858,price-0.01, 460, 650, 2, 1500],
55926
- [145905,price-0.02, 160, 450, 1, 1500],
55927
- [145928,price-0.02, 260, 250, 1, 1500],
55928
- [145948,price-0.02, 860, 150, 1, 1500],
55929
- ];
55946
+ var afterData=[]
55947
+ var afterInfo={ ver:3.0, totalcount:60*3, TimeConfig:{ AryTime:[{ Start:145700, End:145959, Date:srcStock.date }]} } //14:57-15:00
55948
+ var date=new Date(2021,5,2, 14,57, 0);
55949
+ var vol=0;
55950
+ for(var i=0;i<afterInfo.totalcount; ++i) //1s一个数据
55951
+ {
55952
+ var time=date.getHours()*10000+date.getMinutes()*100+date.getSeconds();
55953
+
55954
+ vol=HQData.GetRandomTestData(100,500)*1000;
55955
+ var item=[ time, price, price+0.04, vol, 3, vol*1.3 ];
55956
+
55957
+ afterData.push(item);
55958
+
55959
+ date.setSeconds(date.getSeconds()+3);
55960
+ var time=date.getHours()*10000+date.getMinutes()*100+date.getSeconds();
55961
+ if (time>145959) break;
55962
+ }
55963
+ }
55964
+ else
55965
+ {
55966
+ var afterData=[]
55967
+ var afterInfo={ ver:2.0, totalcount:60*3, TimeConfig:{ AryTime:[{ Start:145700, End:145959, Date:srcStock.date }]} } //14:57-15:00
55968
+ if (stockItem.minute.length>=240)
55969
+ {
55970
+ afterData=
55971
+ [
55972
+ [145708,price+0.01, 400, 300, 1, 800],
55973
+ [145718,price+0.02, 550, 600, 0, 1500],
55974
+ [145738,price+0.02, 150, 800, 0, 1500],
55975
+ [145748,price+0.02, 150, 800, 0, 1500],
55976
+ [145803,price+0.03, 300, 600, 1, 3600],
55977
+ [145815,price+0.03, 350, 210, 2, 1600],
55978
+ [145826,price+0.02, 1210, 350, 2, 2700],
55979
+ [145833,price+0.01, 260, 550, 2, 1000],
55980
+ [145845,price+0.02, 160, 750, 2, 1000],
55981
+ [145858,price-0.01, 460, 650, 2, 1500],
55982
+ [145905,price-0.02, 160, 450, 1, 1500],
55983
+ [145928,price-0.02, 260, 250, 1, 1500],
55984
+ [145948,price-0.02, 860, 150, 1, 1500],
55985
+ ];
55986
+ }
55930
55987
  }
55988
+
55931
55989
  stockItem.after=afterData;
55932
55990
  stockItem.afterinfo=afterInfo;
55933
55991
  }
@@ -55981,16 +56039,50 @@ HQData.Minute_RequestMinuteUpdateData=function(data, callback)
55981
56039
 
55982
56040
  if (callcation.Before)
55983
56041
  {
55984
- var beforeinfo={ totalcount:60*10, ver:2.0, TimeConfig:{ AryTime:[{ Start:91500, End:92459, Date:srcStock.date }]} }; //9:15-9:25 集合竞价15分钟 1s一个数据
55985
- var price=srcStock.yclose-0.01;
55986
- var before=
55987
- [
55988
- [92344,price-0.03, 150, 150, 2, 1000],
55989
- [92357,price-0.04, 250, 250, 2, 1500],
55990
- [92405,price-0.05, 350, 350, 1, 1000],
55991
- [92435,price-0.06, 450, 450, 1, 1000],
55992
- [92458,price-0.07, 550, 550, 2, 1000],
55993
- ];
56042
+ if (symbol=="000001.sh") //指数
56043
+ {
56044
+ var before=[];
56045
+ var beforeinfo={ totalcount:60*10, ver:3.0, TimeConfig:{ AryTime:[{ Start:91500, End:92459, Date:srcStock.date }]} }; //9:15-9:25 集合竞价15分钟 1s一个数据
56046
+ var price=srcStock.yclose+0.01;
56047
+ var vol=0;
56048
+
56049
+ var date=new Date(2021,5,2, 9,15, 0);
56050
+ var testData={ Value:0.01, Up:1, Max:srcStock.yclose*1.02, Min:srcStock.yclose*0.98 };
56051
+
56052
+ for(var i=0;i<beforeinfo.totalcount; ++i) //3s一个数据
56053
+ {
56054
+ vol=HQData.GetRandomTestData(100,500)*1000;
56055
+ var time=date.getHours()*10000+date.getMinutes()*100+date.getSeconds();
56056
+ var item=[ time, price, price+0.04, vol, 3, vol*1.3 ];
56057
+ before.push(item);
56058
+
56059
+ if (price>testData.Max && testData.Up===1)
56060
+ testData.Up=0;
56061
+ else if (price<testData.Min && testData.Up===0)
56062
+ testData.Up=1;
56063
+
56064
+ var value=HQData.GetRandomTestData(1,10)/100;
56065
+ if (testData.Up==1) price+=value;
56066
+ else price-=value;
56067
+
56068
+ date.setSeconds(date.getSeconds()+3);
56069
+ time=date.getHours()*10000+date.getMinutes()*100+date.getSeconds();
56070
+ if (time>92500) break;
56071
+ }
56072
+ }
56073
+ else
56074
+ {
56075
+ var beforeinfo={ totalcount:60*10, ver:2.0, TimeConfig:{ AryTime:[{ Start:91500, End:92459, Date:srcStock.date }]} }; //9:15-9:25 集合竞价15分钟 1s一个数据
56076
+ var price=srcStock.yclose-0.01;
56077
+ var before=
56078
+ [
56079
+ [92344,price-0.03, 150, 150, 2, 1000],
56080
+ [92357,price-0.04, 250, 250, 2, 1500],
56081
+ [92405,price-0.05, 350, 350, 1, 1000],
56082
+ [92435,price-0.06, 450, 450, 1, 1000],
56083
+ [92458,price-0.07, 550, 550, 2, 1000],
56084
+ ];
56085
+ }
55994
56086
 
55995
56087
  stockItem.before=before;
55996
56088
  stockItem.beforeinfo=beforeinfo;
@@ -55998,30 +56090,57 @@ HQData.Minute_RequestMinuteUpdateData=function(data, callback)
55998
56090
 
55999
56091
  if (callcation.After)
56000
56092
  {
56001
- var afterInfo={ totalcount:60*10, ver:2.0, TimeConfig:{ AryTime:[{ Start:145700, End:145959, Date:srcStock.date }]} }; //9:15-9:25 集合竞价15分钟 1s一个数据
56002
- var afterData=[];
56003
-
56004
- if (IFrameSplitOperator.IsNonEmptyArray(lastItem) && lastItem[1]>=1457)
56093
+ if (symbol=="000001.sh") //指数
56005
56094
  {
56006
- var price=lastItem[5];
56007
- afterData=
56008
- [
56009
- [145708,price+0.01, 400, 300, 1, 800],
56010
- [145718,price+0.02, 550, 600, 0, 1500],
56011
- [145738,price+0.02, 150, 800, 0, 1500],
56012
- [145748,price+0.02, 150, 800, 0, 1500],
56013
- [145803,price+0.03, 300, 600, 1, 3600],
56014
- [145815,price+0.03, 350, 210, 2, 1600],
56015
- [145826,price+0.02, 1210, 350, 2, 2700],
56016
- [145833,price+0.01, 260, 550, 2, 1000],
56017
- [145845,price+0.02, 160, 750, 2, 1000],
56018
- [145858,price-0.01, 460, 650, 2, 1500],
56019
- [145905,price-0.02, 160, 450, 1, 1500],
56020
- [145928,price-0.02, 260, 250, 1, 1500],
56021
- [145948,price-0.02, 860, 150, 1, 1500],
56022
- ];
56095
+ var afterData=[]
56096
+ var afterInfo={ ver:3.0, totalcount:60*3, TimeConfig:{ AryTime:[{ Start:145700, End:145959, Date:srcStock.date }]} } //14:57-15:00
56097
+ if (IFrameSplitOperator.IsNonEmptyArray(lastItem) && lastItem[1]>=1457)
56098
+ {
56099
+ var price=lastItem[5];
56100
+ var date=new Date(2021,5,2, 14,57, 0);
56101
+ var vol=0;
56102
+ for(var i=0;i<afterInfo.totalcount; ++i) //1s一个数据
56103
+ {
56104
+ var time=date.getHours()*10000+date.getMinutes()*100+date.getSeconds();
56105
+
56106
+ vol=HQData.GetRandomTestData(100,500)*1000;
56107
+ var item=[ time, price, price+0.04, vol, 3, vol*1.3 ];
56108
+
56109
+ afterData.push(item);
56110
+
56111
+ date.setSeconds(date.getSeconds()+3);
56112
+ var time=date.getHours()*10000+date.getMinutes()*100+date.getSeconds();
56113
+ if (time>145959) break;
56114
+ }
56115
+ }
56023
56116
  }
56117
+ else
56118
+ {
56119
+ var afterInfo={ totalcount:60*10, ver:2.0, TimeConfig:{ AryTime:[{ Start:145700, End:145959, Date:srcStock.date }]} }; //9:15-9:25 集合竞价15分钟 1s一个数据
56120
+ var afterData=[];
56024
56121
 
56122
+ if (IFrameSplitOperator.IsNonEmptyArray(lastItem) && lastItem[1]>=1457)
56123
+ {
56124
+ var price=lastItem[5];
56125
+ afterData=
56126
+ [
56127
+ [145708,price+0.01, 400, 300, 1, 800],
56128
+ [145718,price+0.02, 550, 600, 0, 1500],
56129
+ [145738,price+0.02, 150, 800, 0, 1500],
56130
+ [145748,price+0.02, 150, 800, 0, 1500],
56131
+ [145803,price+0.03, 300, 600, 1, 3600],
56132
+ [145815,price+0.03, 350, 210, 2, 1600],
56133
+ [145826,price+0.02, 1210, 350, 2, 2700],
56134
+ [145833,price+0.01, 260, 550, 2, 1000],
56135
+ [145845,price+0.02, 160, 750, 2, 1000],
56136
+ [145858,price-0.01, 460, 650, 2, 1500],
56137
+ [145905,price-0.02, 160, 450, 1, 1500],
56138
+ [145928,price-0.02, 260, 250, 1, 1500],
56139
+ [145948,price-0.02, 860, 150, 1, 1500],
56140
+ ];
56141
+ }
56142
+ }
56143
+
56025
56144
  stockItem.after=afterData;
56026
56145
  stockItem.afterinfo=afterInfo;
56027
56146
  }
@@ -2951,6 +2951,10 @@ var JSCHART_DATA_FIELD_ID=
2951
2951
 
2952
2952
  //OrderBook Heatmap
2953
2953
  KLINE_HEATMAP:67,
2954
+
2955
+
2956
+ //报价列表
2957
+ REPORT_EXTENDDATA:81, //报价列表扩展数据
2954
2958
  }
2955
2959
 
2956
2960
  var JSCHART_WORKER_MESSAGE_ID=
@@ -13525,6 +13529,7 @@ function AverageWidthFrame()
13525
13529
  {
13526
13530
  var x=mouseOnToolbar.Point.X;
13527
13531
  var y=mouseOnToolbar.Point.Y+20;
13532
+ if (y+textHeight>border.ChartHeight) y=mouseOnToolbar.Point.Y-5-textHeight;
13528
13533
  }
13529
13534
  else if (JSCHART_BUTTON_ID.CLOSE_BEFOREOPEN_ID==mouseOnToolbar.Item.ID)
13530
13535
  {
@@ -190,10 +190,18 @@ function JSReportChart(divElement)
190
190
  if (IFrameSplitOperator.IsBool(option.EnableDragRow)) chart.EnableDragRow=option.EnableDragRow;
191
191
  if (IFrameSplitOperator.IsNumber(option.DragRowType)) chart.DragRowType=option.DragRowType;
192
192
  if (IFrameSplitOperator.IsBool(option.EnableDragHeader)) chart.EnableDragHeader=option.EnableDragHeader;
193
- if (IFrameSplitOperator.IsNumber(option.WheelPageType)) chart.WheelPageType=option.WheelPageType;
193
+ if (IFrameSplitOperator.IsNumber(option.WheelPageType)) chart.WheelPageConfig.Type=option.WheelPageType;
194
194
  if (IFrameSplitOperator.IsBool(option.PageUpDownCycle)) chart.PageUpDownCycle=option.PageUpDownCycle;
195
195
  if (IFrameSplitOperator.IsBool(option.EnablePageUpdate)) chart.EnablePageUpdate=option.EnablePageUpdate;
196
196
 
197
+ if (option.WheelPage)
198
+ {
199
+ var item=option.WheelPage;
200
+ if (IFrameSplitOperator.IsNumber(item.Type)) chart.WheelPageConfig.Type=item.Type;
201
+ if (IFrameSplitOperator.IsPlusNumber(item.RowStep)) chart.WheelPageConfig.RowStep=item.RowStep;
202
+ if (IFrameSplitOperator.IsBool(item.EnableCtrlTurn)) chart.WheelPageConfig.EnableCtrlTurn=item.EnableCtrlTurn;
203
+ }
204
+
197
205
  //数据下载提示信息
198
206
  if (IFrameSplitOperator.IsObject(option.SplashTitle))
199
207
  {
@@ -484,7 +492,13 @@ function JSReportChartContainer(uielement)
484
492
 
485
493
  this.PageUpDownCycle=true; //翻页循环
486
494
  this.DragPageCycle=true; //手机翻页循环
487
- this.WheelPageType=0; //鼠标滚轴翻页模式 0=一页一页翻 1=一条一条翻
495
+ //this.WheelPageType=0; //鼠标滚轴翻页模式 0=一页一页翻 1=一条一条翻
496
+
497
+ //鼠标滚轴配置
498
+ // Type:0=一页一页翻 1=一条一条翻,
499
+ // RowStep:单条数据滚动步长
500
+ // EnableCtrlTurn Ctrl+滚轴翻页
501
+ this.WheelPageConfig={ Type:0, RowStep:1, EnableCtrlTurn:false }
488
502
 
489
503
  //拖拽滚动条
490
504
  this.DragXScroll=null; //{Start:{x,y}, End:{x, y}}
@@ -1791,6 +1805,7 @@ function JSReportChartContainer(uielement)
1791
1805
  if (IFrameSplitOperator.IsNumber(item[47])) stock.RSpeed15M=item[47];
1792
1806
 
1793
1807
  if (item[80] || item[80]===null) stock.BGColor=item[80]; //整行背景色
1808
+ if (item[JSCHART_DATA_FIELD_ID.REPORT_EXTENDDATA]) stock.ExtendDataV2=item[JSCHART_DATA_FIELD_ID.REPORT_EXTENDDATA]; //扩展数据2
1794
1809
 
1795
1810
  //10个数值型 101-199
1796
1811
  if (IFrameSplitOperator.IsNumber(item[101])) stock.ReserveNumber1=item[101];
@@ -1999,14 +2014,17 @@ function JSReportChartContainer(uielement)
1999
2014
  if (!IFrameSplitOperator.IsObjectExist(e.wheelDelta))
2000
2015
  wheelValue=e.deltaY* -0.01;
2001
2016
 
2002
- if (this.WheelPageType==1)
2017
+ var type=this.WheelPageConfig.Type;
2018
+ if (this.WheelPageConfig.EnableCtrlTurn && e && e.ctrlKey) type=0; //ctrl 翻页
2019
+
2020
+ if (type)
2003
2021
  {
2004
- console.log(`[OnWheel] wheelValue=${wheelValue}`);
2022
+ var step=this.WheelPageConfig.RowStep;
2005
2023
  if (wheelValue<0) //下
2006
2024
  {
2007
2025
  this.LastMouseStatus.TooltipStatus=null;
2008
2026
  this.HideAllTooltip();
2009
- if (this.GotoNextItem(1))
2027
+ if (this.GotoNextItem(step))
2010
2028
  {
2011
2029
  this.Draw();
2012
2030
  this.DelayUpdateStockData();
@@ -2016,7 +2034,7 @@ function JSReportChartContainer(uielement)
2016
2034
  {
2017
2035
  this.LastMouseStatus.TooltipStatus=null;
2018
2036
  this.HideAllTooltip();
2019
- if (this.GotoNextItem(-1))
2037
+ if (this.GotoNextItem(step*-1))
2020
2038
  {
2021
2039
  this.Draw();
2022
2040
  this.DelayUpdateStockData();