hqchart 1.1.13280 → 1.1.13286

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hqchart",
3
- "version": "1.1.13280",
3
+ "version": "1.1.13286",
4
4
  "description": "HQChart - H5, 微信小程序 沪深/港股/数字货币/期货/美股 K线图(kline),走势图,缩放,拖拽,十字光标,画图工具,截图,筹码图. 分析家语法,通达信语法,(麦语法),第3方数据对接",
5
5
  "main": "lib/main.js",
6
6
  "scripts": {
@@ -105,6 +105,9 @@ function JSDialogDrawTool()
105
105
  Title:"文字",
106
106
  AryChart:
107
107
  [
108
+ { Title:"文字", ClassName: 'hqchart_drawtool icon-draw_text', Type:0, Data:{ ID:"文本" } },
109
+ { Title:"锚点文字", ClassName: 'hqchart_drawtool icon-maodianwenzi', Type:0, Data:{ ID:"AnchoredText" } },
110
+ { Title:"注释", ClassName: 'hqchart_drawtool icon-maodian ', Type:0, Data:{ ID:"Note"} },
108
111
  { Title: '价格标签', ClassName: 'hqchart_drawtool icon-Tooltip', Type:0, Data:{ ID:"PriceLabel" } },
109
112
  { Title: '价格注释', ClassName: 'hqchart_drawtool icon-tooltiptext', Type:0, Data:{ ID:"PriceNote" } },
110
113
  { Title: '向上箭头', ClassName: 'iconfont icon-arrow_up', Type:0, Data:{ ID:"icon-arrow_up" } },
@@ -18812,15 +18812,9 @@ function JSExplainer(ast,option)
18812
18812
 
18813
18813
  if (g_JSComplierResource.IsCustomFunction(funcName))
18814
18814
  {
18815
- var data=this.Algorithm.CallCustomFunction(funcName, args, this.SymbolData, node);
18816
- node.Out=[];
18817
- node.Draw=null;
18818
-
18819
- if (data)
18820
- {
18821
- if (data.Out) node.Out=data.Out;
18822
- if (data.Draw) node.Draw=data.Draw;
18823
- }
18815
+ var functionInfo=g_JSComplierResource.CustomFunction.Data.get(funcName);
18816
+ if (!functionInfo.Description) node.Out=`自定义函数${funcName}`;
18817
+ else node.Out=functionInfo.Description;
18824
18818
 
18825
18819
  return node.Out;
18826
18820
  }
@@ -19439,7 +19433,12 @@ function JSExplainer(ast,option)
19439
19433
  return data;
19440
19434
  }
19441
19435
 
19442
- if (g_JSComplierResource.IsCustomVariant(name)) return this.ReadCustomVariant(name,node); //读取自定义变量
19436
+ if (g_JSComplierResource.IsCustomVariant(name))
19437
+ {
19438
+ var variantInfo=g_JSComplierResource.CustomVariant.Data.get(name); //读取自定义变量
19439
+ if (variantInfo.Description) return variantInfo.Description;
19440
+ else return name;
19441
+ }
19443
19442
 
19444
19443
  if (this.VarTable.has(name)) return this.VarTable.get(name);
19445
19444
 
@@ -2523,6 +2523,8 @@ var JSCHART_EVENT_ID=
2523
2523
  ON_CHANGE_INDEX:150, //切换指标
2524
2524
  ON_MENU_COMMAND:151, //菜单时间回调
2525
2525
  ON_CREATE_RIGHT_MENU:152, //创建右键菜单
2526
+
2527
+ ON_FORMAT_CALL_AUCTION_INDEX_TITLE:153, //集合竞价指标窗口标题内容
2526
2528
  }
2527
2529
 
2528
2530
  var JSCHART_OPERATOR_ID=
@@ -5718,14 +5720,11 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
5718
5720
  }
5719
5721
  item.DrawStatus=drawStatus;
5720
5722
 
5721
- if (item.ClassName=="DynamicMinuteTitlePainting")
5722
- {
5723
- if (option && IFrameSplitOperator.IsNumber(option.ClientPos) && option.Point)
5724
- item.PointInfo={ ClientPos:option.ClientPos, Point:{ X:option.Point.X, Y:option.Point.Y }};
5725
- else
5726
- item.PointInfo=null;
5727
- }
5728
-
5723
+ var pointInfo=null;
5724
+ if (option && IFrameSplitOperator.IsNumber(option.ClientPos) && option.Point) //当前鼠标所在位置的详细信息 包含盘前盘后
5725
+ pointInfo={ ClientPos:option.ClientPos, Point:{ X:option.Point.X, Y:option.Point.Y }};
5726
+ item.PointInfo=pointInfo;
5727
+
5729
5728
  item.Draw(moveonPoint, this.LastMouseStatus);
5730
5729
  }
5731
5730
 
@@ -6485,9 +6484,6 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
6485
6484
  for(var i=0;i<border.DayBorder.length;++i)
6486
6485
  {
6487
6486
  var client=border.DayBorder[i];
6488
- this.Canvas.beginPath();
6489
- this.Canvas.rect(client.LeftEx,border.TopEx,client.RightEx-client.LeftEx,border.BottomEx-border.TopEx);
6490
- if (this.Canvas.isPointInPath(x,y)) return 1;
6491
6487
 
6492
6488
  //盘前
6493
6489
  this.Canvas.beginPath();
@@ -6495,6 +6491,11 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
6495
6491
  if (this.Canvas.isPointInPath(x,y))
6496
6492
  return 200+parseInt(i);
6497
6493
 
6494
+ //盘中
6495
+ this.Canvas.beginPath();
6496
+ this.Canvas.rect(client.LeftEx,border.TopEx,client.RightEx-client.LeftEx,border.BottomEx-border.TopEx);
6497
+ if (this.Canvas.isPointInPath(x,y)) return 1;
6498
+
6498
6499
  //盘后
6499
6500
  this.Canvas.beginPath();
6500
6501
  this.Canvas.rect(client.RightEx,border.TopEx,client.Right-client.RightEx,border.BottomEx-border.TopEx);
@@ -9774,6 +9775,8 @@ function ChartBorder()
9774
9775
  var item={ Left:this.Left+dayWidth*i, Right:this.Left+dayWidth*(i+1) };
9775
9776
  item.LeftEx=item.Left+this.MultiDayMinute.Left;
9776
9777
  item.RightEx=item.Right-this.MultiDayMinute.Right;
9778
+ if (i>0) item.Left+=1; //第2天的盘前 移到一个像素,跟上一天分开
9779
+
9777
9780
  dayBorder.push(item);
9778
9781
  }
9779
9782
 
@@ -10443,6 +10446,26 @@ function IChartFramePainting()
10443
10446
  {
10444
10447
 
10445
10448
  }
10449
+
10450
+ //bIncludeOverlay =false不包含叠加框架 true=主框架+叠加框架 默认true
10451
+ this.IsMinuteFrame=function(bIncludeOverlay)
10452
+ {
10453
+ var aryName=["MinuteFrame", "MinuteHScreenFrame", "OverlayMinuteFrame", "OverlayMinuteHScreenFrame"];
10454
+ if (bIncludeOverlay===false) aryName=["MinuteFrame", "MinuteHScreenFrame"];
10455
+
10456
+ var isMinute=aryName.includes(this.ClassName);
10457
+ return isMinute;
10458
+ }
10459
+
10460
+ //bIncludeOverlay =false不包含叠加框架 true=主框架+叠加框架 默认true
10461
+ this.IsKLineFrame=function(bIncludeOverlay)
10462
+ {
10463
+ var aryName=["KLineFrame", "KLineHScreenFrame", "KLineHScreenFrame", "OverlayKLineHScreenFrame"];
10464
+ if (bIncludeOverlay===false) aryName=["KLineFrame", "KLineHScreenFrame"];
10465
+
10466
+ var isKline=aryName.includes(this.ClassName);
10467
+ return isKline;
10468
+ }
10446
10469
  }
10447
10470
 
10448
10471
  //空框架只画边框
@@ -52533,6 +52556,7 @@ function DynamicChartTitlePainting()
52533
52556
  this.SelectedColor=g_JSChartResource.IndexTitleSelectedColor;
52534
52557
 
52535
52558
  this.IsKLineFrame=false; //是否是K线框架标题
52559
+ this.IsMinuteFrame=false;
52536
52560
  this.Identify; //指标ID
52537
52561
  this.SelectedChart; //选中的图形
52538
52562
  this.ArgumentsText; //参数信息
@@ -52555,6 +52579,7 @@ function DynamicChartTitlePainting()
52555
52579
  this.OverlayDynamicTitle=new Map(); //key , value={ OutName, OutValue }
52556
52580
 
52557
52581
  this.IsShowMainIndexTitle=true; //是否显示主图指标标题
52582
+ this.MainTitlePaint=null; //主标题
52558
52583
 
52559
52584
  this.ReloadResource=function()
52560
52585
  {
@@ -52969,7 +52994,8 @@ function DynamicChartTitlePainting()
52969
52994
  this.Buttons=[];
52970
52995
  if (this.Frame.IsMinSize) return;
52971
52996
 
52972
- this.IsKLineFrame= this.Frame.ClassName=='KLineFrame' || this.Frame.ClassName=='KLineHScreenFrame';
52997
+ this.IsKLineFrame= this.Frame.IsKLineFrame(false);
52998
+ this.IsMinuteFrame=this.Frame.IsMinuteFrame(false);
52973
52999
  this.IsDrawTitleBG=this.Frame.IsDrawTitleBG;
52974
53000
  this.IsShowNameArrow=this.Frame.IsShowNameArrow;
52975
53001
  this.IsShowUpDownArrow=this.Frame.IsShowTitleArrow;
@@ -53068,108 +53094,19 @@ function DynamicChartTitlePainting()
53068
53094
  if (isShowLastData) return;
53069
53095
  }
53070
53096
 
53071
- for(var i=0; i<this.Data.length && this.IsShowMainIndexTitle; ++i)
53097
+ var rtText={ Left:left, Right:left };
53098
+ if (this.IsMinuteFrame && this.PointInfo && ( this.PointInfo.ClientPos==2 || this.PointInfo.ClientPos==3 || (this.PointInfo.ClientPos>=200&& this.PointInfo.ClientPos<=299) || (this.PointInfo.ClientPos>=300&& this.PointInfo.ClientPos<=399) ))
53072
53099
  {
53073
- var item=this.Data[i];
53074
- var outText=this.GetTitleItem(item, isShowLastData, i);
53075
- if (!outText) continue;
53076
-
53077
- var valueText=outText.Text;
53078
- var aryText=outText.ArrayText;
53079
-
53080
- if (aryText) //多变量输出
53081
- {
53082
- var text;
53083
- for(var k=0;k<aryText.length;++k)
53084
- {
53085
- var titleItem=aryText[k];
53086
- if (titleItem.Name) text=titleItem.Name+":"+titleItem.Text;
53087
- else text=titleItem.Text;
53088
-
53089
- var space=this.ParamSpace*GetDevicePixelRatio();
53090
- var indexTextWidth=this.Canvas.measureText(text).width; //标题+数值长度
53091
- var textWidth=indexTextWidth;
53092
-
53093
- if (IFrameSplitOperator.IsNonEmptyArray(titleItem.TextEx))
53094
- {
53095
- var xLeft=left;
53096
- for(var n=0; n<titleItem.TextEx.length; ++n)
53097
- {
53098
- var outItem=titleItem.TextEx[n];
53099
- var outTextWidth=this.Canvas.measureText(outItem.Text).width+2;
53100
- outItem.Width=outTextWidth;
53101
- outItem.Left=xLeft;
53102
-
53103
- textWidth+=outTextWidth;
53104
- xLeft+=outTextWidth;
53105
- }
53106
- }
53107
-
53108
- if ((left+textWidth+space)>right) break;
53109
-
53110
- if (titleItem.BG) //背景
53111
- {
53112
- var textHeight=this.Canvas.measureText("擎").width+2;
53113
- var rtBG={ Left:left, Top:bottom-textHeight/2, Width:textWidth, Height:textHeight };
53114
- this.Canvas.fillStyle=titleItem.BG;
53115
- this.Canvas.fillRect(rtBG.Left,rtBG.Top-1, rtBG.Width, rtBG.Height);
53116
-
53117
- this.Canvas.fillStyle=titleItem.Color;
53118
- this.Canvas.fillText(text,rtBG.Left+1,bottom,indexTextWidth);
53119
- left+=indexTextWidth;
53120
-
53121
- if (IFrameSplitOperator.IsNonEmptyArray(titleItem.TextEx))
53122
- {
53123
- for(var n=0; n<titleItem.TextEx.length; ++n)
53124
- {
53125
- var outItem=titleItem.TextEx[n];
53126
- this.Canvas.fillStyle=outItem.TextColor;
53127
- this.Canvas.fillText(outItem.Text,left,bottom,outItem.Width);
53128
- left+=outItem.Width;
53129
- }
53130
- }
53131
-
53132
- left+=space;
53133
- }
53134
- else
53135
- {
53136
- this.Canvas.fillStyle=titleItem.Color;
53137
- this.Canvas.fillText(text,left,bottom,indexTextWidth);
53138
- left+=indexTextWidth;
53139
-
53140
- if (IFrameSplitOperator.IsNonEmptyArray(titleItem.TextEx))
53141
- {
53142
- for(var n=0; n<titleItem.TextEx.length; ++n)
53143
- {
53144
- var outItem=titleItem.TextEx[n];
53145
- this.Canvas.fillStyle=outItem.TextColor;
53146
- this.Canvas.fillText(outItem.Text,left,bottom,outItem.Width);
53147
- left+=outItem.Width;
53148
- }
53149
- }
53150
-
53151
- left+=space;
53152
- }
53153
- }
53154
- }
53155
- else
53156
- {
53157
- this.Canvas.fillStyle=item.Color;
53158
- var text=valueText;
53159
- if (item.Name)
53160
- {
53161
- var dyTitle=this.GetDynamicOutName(item.Name);
53162
- if (dyTitle) text=dyTitle+":"+valueText;
53163
- else text=item.Name+":"+valueText;
53164
- }
53165
- var space=this.ParamSpace*GetDevicePixelRatio();
53166
- var textWidth=this.Canvas.measureText(text).width+space;
53167
- if ((left+textWidth)>right) break;
53168
-
53169
- this.Canvas.fillText(text,left,bottom,textWidth);
53170
- left+=textWidth;
53171
- }
53100
+ var result={ PreventDefault:false }
53101
+ this.DrawMainCallAuction({ Left:left, Right:right, Bottom:bottom }, rtText, result);
53102
+ if (result.PreventDefault===false) this.DrawMainIndexTitle({ Left:left, Right:right, Bottom:bottom }, isShowLastData, rtText);
53172
53103
  }
53104
+ else
53105
+ {
53106
+ this.DrawMainIndexTitle({ Left:left, Right:right, Bottom:bottom }, isShowLastData, rtText);
53107
+ }
53108
+
53109
+ left=rtText.Left;
53173
53110
 
53174
53111
  if (this.Explain) //说明信息
53175
53112
  {
@@ -53373,6 +53310,185 @@ function DynamicChartTitlePainting()
53373
53310
  return { Text:valueText, ArrayText:aryText };
53374
53311
  }
53375
53312
 
53313
+ //绘制主图指标 rtText 返回画完以后的区域
53314
+ this.DrawMainIndexTitle=function(positionInfo, isShowLastData, rtText)
53315
+ {
53316
+ if (!this.IsShowMainIndexTitle) return;
53317
+
53318
+ var left=positionInfo.Left;
53319
+ var right=positionInfo.Right;
53320
+ var bottom=positionInfo.Bottom;
53321
+
53322
+ for(var i=0; i<this.Data.length; ++i)
53323
+ {
53324
+ var item=this.Data[i];
53325
+ var outText=this.GetTitleItem(item, isShowLastData, i);
53326
+ if (!outText) continue;
53327
+
53328
+ var valueText=outText.Text;
53329
+ var aryText=outText.ArrayText;
53330
+
53331
+ if (aryText) //多变量输出
53332
+ {
53333
+ var text;
53334
+ for(var k=0;k<aryText.length;++k)
53335
+ {
53336
+ var titleItem=aryText[k];
53337
+ if (titleItem.Name) text=titleItem.Name+":"+titleItem.Text;
53338
+ else text=titleItem.Text;
53339
+
53340
+ var space=this.ParamSpace*GetDevicePixelRatio();
53341
+ var indexTextWidth=this.Canvas.measureText(text).width; //标题+数值长度
53342
+ var textWidth=indexTextWidth;
53343
+
53344
+ if (IFrameSplitOperator.IsNonEmptyArray(titleItem.TextEx))
53345
+ {
53346
+ var xLeft=left;
53347
+ for(var n=0; n<titleItem.TextEx.length; ++n)
53348
+ {
53349
+ var outItem=titleItem.TextEx[n];
53350
+ var outTextWidth=this.Canvas.measureText(outItem.Text).width+2;
53351
+ outItem.Width=outTextWidth;
53352
+ outItem.Left=xLeft;
53353
+
53354
+ textWidth+=outTextWidth;
53355
+ xLeft+=outTextWidth;
53356
+ }
53357
+ }
53358
+
53359
+ if ((left+textWidth+space)>right) break;
53360
+
53361
+ if (titleItem.BG) //背景
53362
+ {
53363
+ var textHeight=this.Canvas.measureText("擎").width+2;
53364
+ var rtBG={ Left:left, Top:bottom-textHeight/2, Width:textWidth, Height:textHeight };
53365
+ this.Canvas.fillStyle=titleItem.BG;
53366
+ this.Canvas.fillRect(rtBG.Left,rtBG.Top-1, rtBG.Width, rtBG.Height);
53367
+
53368
+ this.Canvas.fillStyle=titleItem.Color;
53369
+ this.Canvas.fillText(text,rtBG.Left+1,bottom,indexTextWidth);
53370
+ left+=indexTextWidth;
53371
+
53372
+ if (IFrameSplitOperator.IsNonEmptyArray(titleItem.TextEx))
53373
+ {
53374
+ for(var n=0; n<titleItem.TextEx.length; ++n)
53375
+ {
53376
+ var outItem=titleItem.TextEx[n];
53377
+ this.Canvas.fillStyle=outItem.TextColor;
53378
+ this.Canvas.fillText(outItem.Text,left,bottom,outItem.Width);
53379
+ left+=outItem.Width;
53380
+ }
53381
+ }
53382
+
53383
+ left+=space;
53384
+ }
53385
+ else
53386
+ {
53387
+ this.Canvas.fillStyle=titleItem.Color;
53388
+ this.Canvas.fillText(text,left,bottom,indexTextWidth);
53389
+ left+=indexTextWidth;
53390
+
53391
+ if (IFrameSplitOperator.IsNonEmptyArray(titleItem.TextEx))
53392
+ {
53393
+ for(var n=0; n<titleItem.TextEx.length; ++n)
53394
+ {
53395
+ var outItem=titleItem.TextEx[n];
53396
+ this.Canvas.fillStyle=outItem.TextColor;
53397
+ this.Canvas.fillText(outItem.Text,left,bottom,outItem.Width);
53398
+ left+=outItem.Width;
53399
+ }
53400
+ }
53401
+
53402
+ left+=space;
53403
+ }
53404
+ }
53405
+ }
53406
+ else
53407
+ {
53408
+ this.Canvas.fillStyle=item.Color;
53409
+ var text=valueText;
53410
+ if (item.Name)
53411
+ {
53412
+ var dyTitle=this.GetDynamicOutName(item.Name);
53413
+ if (dyTitle) text=dyTitle+":"+valueText;
53414
+ else text=item.Name+":"+valueText;
53415
+ }
53416
+ var space=this.ParamSpace*GetDevicePixelRatio();
53417
+ var textWidth=this.Canvas.measureText(text).width+space;
53418
+ if ((left+textWidth)>right) break;
53419
+
53420
+ this.Canvas.fillText(text,left,bottom,textWidth);
53421
+ left+=textWidth;
53422
+ }
53423
+ }
53424
+
53425
+ rtText.Left=left;
53426
+ }
53427
+
53428
+ //集合竞价
53429
+ this.DrawMainCallAuction=function(positionInfo, rtText, result)
53430
+ {
53431
+ if (!this.IsShowMainIndexTitle) return;
53432
+ if (!this.MainTitlePaint) return;
53433
+ var auctionData=this.MainTitlePaint.GetCurrentAuctionData(); //集合竞价分时数据
53434
+ if (!auctionData || !auctionData.Data) return;
53435
+ if (!this.GetEventCallback) return;
53436
+
53437
+ var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_FORMAT_CALL_AUCTION_INDEX_TITLE);
53438
+ if (!event) return;
53439
+
53440
+ var data={ AuctionData:auctionData, Data:this.Data, FrameID:this.Frame.Identify, Out:null, PreventDefault:false };
53441
+ event.Callback(event,data,this);
53442
+ result.PreventDefault=data.PreventDefault;
53443
+
53444
+ if (!IFrameSplitOperator.IsNonEmptyArray(data.Out)) return;
53445
+
53446
+ var left=positionInfo.Left;
53447
+ var right=positionInfo.Right;
53448
+ var bottom=positionInfo.Bottom;
53449
+ var pixelRatio=GetDevicePixelRatio();
53450
+
53451
+ var aryText=data.Out; //[{Text:, Color, Space:间距 }]
53452
+ for(var i=0; i<aryText.length; ++i)
53453
+ {
53454
+ var item=aryText[i];
53455
+ if (!item.Text) continue;
53456
+ var textWidth=this.Canvas.measureText(item.Text).width+2;
53457
+ if (left+textWidth>right) break;
53458
+
53459
+ if (item.BGColor) //背景
53460
+ {
53461
+ var textHeight=this.Canvas.measureText("擎").width+2;
53462
+ var rtBG={ Left:left, Top:bottom-textHeight/2, Width:textWidth, Height:textHeight };
53463
+ this.Canvas.fillStyle=item.BGColor;
53464
+ this.Canvas.fillRect(rtBG.Left,rtBG.Top-1, rtBG.Width, rtBG.Height);
53465
+ left+=1;
53466
+ }
53467
+
53468
+ this.Canvas.fillStyle=item.Color;
53469
+ this.Canvas.fillText(item.Text,left,bottom,textWidth);
53470
+ left+=textWidth;
53471
+
53472
+ if (IFrameSplitOperator.IsPlusNumber(item.Space)) left+=item.Space*pixelRatio;
53473
+ }
53474
+
53475
+ rtText.Left=left;
53476
+ }
53477
+
53478
+ this.GetCallAuctionTitleItem=function(item, titleIndex, auctionData)
53479
+ {
53480
+ if (item.IsShow===false) return null;
53481
+ if (item.IsVisible===false) return null;
53482
+ if (!item || !item.Data || !item.Data.Data) return null;
53483
+
53484
+ if (g_ScriptIndexChartFactory.Has(item.DataType)) //外部挂接
53485
+ {
53486
+ var find=g_ScriptIndexChartFactory.Get(item.DataType);
53487
+ if (find && find.FormatTitleCallback)
53488
+ return find.FormatTitleCallback(value, item, dataIndex);
53489
+ }
53490
+ }
53491
+
53376
53492
  //获取上一个有效数据
53377
53493
  this.GetPreVaildItem=function(data, start)
53378
53494
  {
@@ -68691,8 +68807,10 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
68691
68807
  }
68692
68808
 
68693
68809
  //绑定主图K线数据
68694
- this.BindMainData=function(hisData,showCount)
68810
+ this.BindMainData=function(hisData, showCount, chartOperator)
68695
68811
  {
68812
+ var isShowAll=false; //全部显示
68813
+ if (chartOperator && chartOperator.IsShowAll===true) isShowAll=true;
68696
68814
  this.ChartPaint[0].Data=hisData;
68697
68815
  this.ChartPaint[0].Symbol=this.Symbol;
68698
68816
 
@@ -68713,9 +68831,10 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
68713
68831
  for(var i=0;i<this.Frame.SubFrame.length;++i)
68714
68832
  {
68715
68833
  var item =this.Frame.SubFrame[i].Frame;
68716
- item.XPointCount=showCount+this.RightSpaceCount;
68717
- item.Data=this.ChartPaint[0].Data;
68834
+ if (isShowAll) item.XPointCount=hisData.Data.length+this.RightSpaceCount;
68835
+ else item.XPointCount=showCount+this.RightSpaceCount;
68718
68836
 
68837
+ item.Data=this.ChartPaint[0].Data;
68719
68838
  item.XSplitOperator.Symbol=this.Symbol;
68720
68839
  item.XSplitOperator.Period=this.Period;
68721
68840
  }
@@ -68734,17 +68853,25 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
68734
68853
  item.MainData=this.ChartPaint[0].Data;
68735
68854
  }
68736
68855
 
68737
- var dataOffset=hisData.Data.length-showCount;
68738
- if (dataOffset<0) dataOffset=0;
68739
- this.ChartPaint[0].Data.DataOffset=dataOffset;
68740
- this.ChartPaint[0].Period=this.Period;
68856
+ if (isShowAll)
68857
+ {
68858
+ var dataOffset=0;
68859
+ this.CursorIndex=0;
68860
+ }
68861
+ else
68862
+ {
68863
+ var dataOffset=hisData.Data.length-showCount;
68864
+ if (dataOffset<0) dataOffset=0;
68865
+ this.ChartPaint[0].Data.DataOffset=dataOffset;
68866
+
68867
+ this.CursorIndex=showCount;
68868
+ if (this.CursorIndex+dataOffset>=hisData.Data.length) this.CursorIndex=hisData.Data.length-1-dataOffset;
68869
+ if (this.CursorIndex<0) this.CursorIndex=0; //不一定对啊
68870
+ }
68741
68871
 
68872
+ this.ChartPaint[0].Period=this.Period;
68742
68873
  this.ChartCorssCursor.StringFormatY.Symbol=this.Symbol;
68743
68874
 
68744
- this.CursorIndex=showCount;
68745
- if (this.CursorIndex+dataOffset>=hisData.Data.length) this.CursorIndex=hisData.Data.length-1-dataOffset;
68746
- if (this.CursorIndex<0) this.CursorIndex=0; //不一定对啊
68747
-
68748
68875
  if (this.CustomShow) //定制显示 1次有效
68749
68876
  {
68750
68877
  this.SetCustomShow(this.CustomShow,hisData);
@@ -69613,8 +69740,16 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
69613
69740
  //绑定数据
69614
69741
  this.Symbol=data.symbol;
69615
69742
  this.Name=data.name;
69743
+
69744
+ var chartOperator=null; //额外的图形控制
69745
+ if (data && data.ChartOperator)
69746
+ {
69747
+ var item=data.ChartOperator;
69748
+ chartOperator={ };
69749
+ if (item.IsShowAll===true) chartOperator.IsShowAll=true; //全部显示
69750
+ }
69616
69751
 
69617
- this.BindMainData(bindData,this.PageSize);
69752
+ this.BindMainData(bindData,this.PageSize,chartOperator);
69618
69753
  if (this.AfterBindMainData) this.AfterBindMainData("RecvMinuteHistoryData");
69619
69754
  this.Frame.SetSizeChage(true);
69620
69755
 
@@ -76873,6 +77008,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
76873
77008
  titlePaint.LanguageID=this.LanguageID;
76874
77009
  titlePaint.GetEventCallback=(id)=> { return this.GetEventCallback(id); }
76875
77010
  titlePaint.SelectedChart=this.SelectedChart;
77011
+ titlePaint.MainTitlePaint=this.TitlePaint[0];
76876
77012
  this.TitlePaint.push(titlePaint);
76877
77013
  }
76878
77014
 
@@ -77084,7 +77220,8 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
77084
77220
  titlePaint.Frame=this.Frame.SubFrame[index].Frame;
77085
77221
  titlePaint.Canvas=this.Canvas;
77086
77222
  titlePaint.LanguageID=this.LanguageID;
77087
- titlePaint.GetEventCallback=(id)=> { return this.GetEventCallback(id); }
77223
+ titlePaint.GetEventCallback=(id)=> { return this.GetEventCallback(id); };
77224
+ titlePaint.MainTitlePaint=this.TitlePaint[0];
77088
77225
  this.TitlePaint[index+1]=titlePaint;
77089
77226
 
77090
77227
  this.SetSubFrameOption(subFrame,option);
@@ -77321,6 +77458,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
77321
77458
  titlePaint.LanguageID=this.LanguageID;
77322
77459
  titlePaint.GetEventCallback=(id)=> { return this.GetEventCallback(id); }
77323
77460
  titlePaint.SelectedChart=this.SelectedChart;
77461
+ titlePaint.MainTitlePaint=this.TitlePaint[0];
77324
77462
  this.TitlePaint[i+1]=titlePaint;
77325
77463
  }
77326
77464
 
@@ -77407,6 +77545,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
77407
77545
  titlePaint.LanguageID=this.LanguageID;
77408
77546
  titlePaint.GetEventCallback=(id)=> { return this.GetEventCallback(id); }
77409
77547
  titlePaint.SelectedChart=this.SelectedChart;
77548
+ titlePaint.MainTitlePaint=this.TitlePaint[0];
77410
77549
  this.TitlePaint[i+1]=titlePaint;
77411
77550
  }
77412
77551
  }
@@ -54,6 +54,18 @@
54
54
  <div class="content unicode" style="display: block;">
55
55
  <ul class="icon_lists dib-box">
56
56
 
57
+ <li class="dib">
58
+ <span class="icon hqchart_drawtool">&#xe62e;</span>
59
+ <div class="name">锚点文字</div>
60
+ <div class="code-name">&amp;#xe62e;</div>
61
+ </li>
62
+
63
+ <li class="dib">
64
+ <span class="icon hqchart_drawtool">&#xe6db;</span>
65
+ <div class="name">锚点</div>
66
+ <div class="code-name">&amp;#xe6db;</div>
67
+ </li>
68
+
57
69
  <li class="dib">
58
70
  <span class="icon hqchart_drawtool">&#xe620;</span>
59
71
  <div class="name">斐波那契速度阻力扇</div>
@@ -378,9 +390,9 @@
378
390
  <pre><code class="language-css"
379
391
  >@font-face {
380
392
  font-family: 'hqchart_drawtool';
381
- src: url('iconfont.woff2?t=1715090362723') format('woff2'),
382
- url('iconfont.woff?t=1715090362723') format('woff'),
383
- url('iconfont.ttf?t=1715090362723') format('truetype');
393
+ src: url('iconfont.woff2?t=1715267320890') format('woff2'),
394
+ url('iconfont.woff?t=1715267320890') format('woff'),
395
+ url('iconfont.ttf?t=1715267320890') format('truetype');
384
396
  }
385
397
  </code></pre>
386
398
  <h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
@@ -406,6 +418,24 @@
406
418
  <div class="content font-class">
407
419
  <ul class="icon_lists dib-box">
408
420
 
421
+ <li class="dib">
422
+ <span class="icon hqchart_drawtool icon-maodianwenzi"></span>
423
+ <div class="name">
424
+ 锚点文字
425
+ </div>
426
+ <div class="code-name">.icon-maodianwenzi
427
+ </div>
428
+ </li>
429
+
430
+ <li class="dib">
431
+ <span class="icon hqchart_drawtool icon-maodian"></span>
432
+ <div class="name">
433
+ 锚点
434
+ </div>
435
+ <div class="code-name">.icon-maodian
436
+ </div>
437
+ </li>
438
+
409
439
  <li class="dib">
410
440
  <span class="icon hqchart_drawtool icon-feibonaqisuduzulishan"></span>
411
441
  <div class="name">
@@ -892,6 +922,22 @@
892
922
  <div class="content symbol">
893
923
  <ul class="icon_lists dib-box">
894
924
 
925
+ <li class="dib">
926
+ <svg class="icon svg-icon" aria-hidden="true">
927
+ <use xlink:href="#icon-maodianwenzi"></use>
928
+ </svg>
929
+ <div class="name">锚点文字</div>
930
+ <div class="code-name">#icon-maodianwenzi</div>
931
+ </li>
932
+
933
+ <li class="dib">
934
+ <svg class="icon svg-icon" aria-hidden="true">
935
+ <use xlink:href="#icon-maodian"></use>
936
+ </svg>
937
+ <div class="name">锚点</div>
938
+ <div class="code-name">#icon-maodian</div>
939
+ </li>
940
+
895
941
  <li class="dib">
896
942
  <svg class="icon svg-icon" aria-hidden="true">
897
943
  <use xlink:href="#icon-feibonaqisuduzulishan"></use>