hqchart 1.1.14660 → 1.1.14667

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.14660",
3
+ "version": "1.1.14667",
4
4
  "description": "HQChart - H5, 微信小程序 沪深/港股/数字货币/期货/美股 K线图(kline),走势图,缩放,拖拽,十字光标,画图工具,截图,筹码图. 分析家语法,通达信语法,(麦语法),第3方数据对接",
5
5
  "main": "lib/main.js",
6
6
  "scripts": {
@@ -3026,6 +3026,89 @@ function ChartTReport()
3026
3026
  return null;
3027
3027
  }
3028
3028
 
3029
+ //获取一行位置 option={ Symbol:, RowIndex:}
3030
+ this.GetRowRect=function(option)
3031
+ {
3032
+ if (!this.Data) return null;
3033
+ if (!IFrameSplitOperator.IsNonEmptyArray(this.Data.Data)) return null;
3034
+
3035
+ var symbol=null;
3036
+ var rowIndex=null;
3037
+ if (option)
3038
+ {
3039
+ if (option.Symbol) symbol=option.Symbol;
3040
+ if (IFrameSplitOperator.IsNumber(option.RowIndex)) rowIndex=option.RowIndex;
3041
+ }
3042
+ var top=this.RectClient.Top+this.HeaderHeight;
3043
+ var left=this.RectClient.Left;
3044
+ var right=this.RectClient.Right;
3045
+
3046
+ var textTop=top+this.FixedRowHeight*this.FixedRowCount;
3047
+ for(var i=this.Data.YOffset, j=0; i<this.Data.Data.length && j<this.RowCount ;++i, ++j, textTop+=this.RowHeight)
3048
+ {
3049
+ var exePrice=this.Data.Data[i];
3050
+ var rtRow={ Left:left, Top:textTop, Right:right, Bottom: textTop+this.RowHeight };
3051
+ rtRow.Height=rtRow.Bottom-rtRow.Top;
3052
+ rtRow.Width=rtRow.Right-rtRow.Left;
3053
+
3054
+ var data={ RectRow:rtRow, DataIndex:i, Index:j, ExePrice:exePrice };
3055
+ var item=this.GetExePriceDataCallback(exePrice);
3056
+ if (!item) continue;
3057
+
3058
+ var bLeftFind=false, bRightFind=false;
3059
+ if (symbol)
3060
+ {
3061
+ if (item.LeftData && item.LeftData.Symbol && item.LeftData.Symbol==symbol) bLeftFind=true;
3062
+ if (item.RightData && item.RightData.Symbol && item.RightData.Symbol==symbol) bRightFind=true;
3063
+ }
3064
+ else if (IFrameSplitOperator.IsNumber(rowIndex))
3065
+ {
3066
+ if (rowIndex==i)
3067
+ {
3068
+ bLeftFind=true;
3069
+ bRightFind=true;
3070
+ }
3071
+ }
3072
+
3073
+ if (bLeftFind || bRightFind)
3074
+ {
3075
+ data.Item=item;
3076
+ data.AryLeftRect=[];
3077
+ data.AryRightRect=[];
3078
+ data.ElementRect=this.UIElement.getBoundingClientRect();
3079
+ data.PixelRatio=GetDevicePixelRatio();
3080
+
3081
+ var rtCenterItem=this.GetCenterItemRect();
3082
+ var rtCenter={Left:rtCenterItem.Left, Right:rtCenterItem.Right, Top:rtRow.Top, Height:rtRow.Height, Bottom:rtRow.Bottom };
3083
+
3084
+ var xLeft=rtCenterItem.Left; //左边
3085
+ var xRight=rtCenterItem.Right; //右边
3086
+
3087
+ var reportleft=this.RectClient.Left;
3088
+ var reportRight=this.RectClient.Right;
3089
+ for(var k=this.Data.XOffset;k<this.Column.length;++k)
3090
+ {
3091
+ var colItem=this.Column[k];
3092
+ var itemWidth=colItem.Width+this.ItemExtraWidth;
3093
+ xLeft-=itemWidth;
3094
+ if (xLeft<reportleft) break;
3095
+
3096
+ var rtItem={ Left:xLeft, Right:xLeft+itemWidth, Top:rtRow.Top, Height:rtRow.Height, Bottom:rtRow.Bottom, Width:itemWidth };
3097
+ data.AryLeftRect.push({ Rect:rtItem, ColumnIndex:k, Column:colItem })
3098
+
3099
+ rtItem={ Left:xRight, Right:xRight+itemWidth, Top:rtRow.Top, Height:rtRow.Height, Bottom:rtRow.Bottom, Width:itemWidth };
3100
+ data.AryRightRect.push({ Rect:rtItem, ColumnIndex:k, Column:colItem });
3101
+
3102
+ xRight+=itemWidth;
3103
+ }
3104
+
3105
+ return data;
3106
+ }
3107
+ }
3108
+
3109
+ return null;
3110
+ }
3111
+
3029
3112
  this.PtInBody=function(x,y)
3030
3113
  {
3031
3114
  if (!this.Data) return null;
@@ -588,6 +588,7 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
588
588
  }
589
589
 
590
590
  if (IFrameSplitOperator.IsBool(item.EnablePrediction)) klineChart.PredictionConfig.Enable=item.EnablePrediction;
591
+ if (IFrameSplitOperator.IsBool(item.EnableDaySummary)) klineChart.DaySummary.Enable=item.EnableDaySummary;
591
592
  }
592
593
 
593
594
  if(option.KLineTitle)
@@ -2925,6 +2926,7 @@ var JSCHART_MENU_ID=
2925
2926
 
2926
2927
  CMD_FULLSCREEN_SUMMARY_ID:56, //当前屏区间统计
2927
2928
  CMD_CORSS_DBCLICK_ID:57, //双击显示隐藏十字光标
2929
+ CMD_ENABLE_KLINE_DAY_SUMMARY_ID:58, //K线底部显示走完剩余时间
2928
2930
 
2929
2931
 
2930
2932
 
@@ -10898,6 +10900,13 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
10898
10900
  case JSCHART_MENU_ID.CMD_FULLSCREEN_SUMMARY_ID:
10899
10901
  this.FullScreenSummary();
10900
10902
  break;
10903
+ case JSCHART_MENU_ID.CMD_ENABLE_KLINE_DAY_SUMMARY_ID:
10904
+ if (IFrameSplitOperator.IsBool(srcParam))
10905
+ {
10906
+ this.ChartPaint[0].DaySummary.Enable=srcParam;
10907
+ this.Draw();
10908
+ }
10909
+ break;
10901
10910
  }
10902
10911
  }
10903
10912
 
@@ -11607,6 +11616,20 @@ function IsRectOverlap(rt, rt2)
11607
11616
  return false;
11608
11617
  }
11609
11618
 
11619
+ //获取文字高度和宽度
11620
+ function GetTextSize(canvas, text, option)
11621
+ {
11622
+ var data=canvas.measureText(text);
11623
+ var height=Math.abs(Math.abs(data.fontBoundingBoxAscent)+Math.abs(data.fontBoundingBoxDescent));
11624
+ var textBaseline=canvas.textBaseline;
11625
+
11626
+ if (textBaseline=="top") height=data.fontBoundingBoxDescent;
11627
+ else if (textBaseline=="bottom") height=data.fontBoundingBoxAscent;
11628
+
11629
+ var result={ Width:data.width, Height:height};
11630
+ return result;
11631
+ }
11632
+
11610
11633
  Number.prototype.toFixed2=Number.prototype.toFixed; //备份下老的
11611
11634
  Number.prototype.toFixed = function( precision )
11612
11635
  {
@@ -12133,7 +12156,7 @@ function IChartFramePainting()
12133
12156
 
12134
12157
  this.BorderLine=null; //1=上 2=下 4=左 8=右
12135
12158
  this.Buttons=[]; //按钮事件
12136
- this.LeftButtonWidth=0; //左侧按钮的宽度
12159
+ this.ToolbarCacheSize=null; //缓存工具条宽度{ RToolbar:{ Left:, Right }}
12137
12160
 
12138
12161
  this.IsMinSize=false; //窗口是否最小化
12139
12162
 
@@ -12196,6 +12219,7 @@ function IChartFramePainting()
12196
12219
  {
12197
12220
  this.Buttons=[];
12198
12221
  this.HorizontalLabel=[];
12222
+ this.ToolbarCacheSize=null;
12199
12223
  this.DrawClientBG();
12200
12224
  this.DrawFrame();
12201
12225
  this.DrawBorder();
@@ -12715,7 +12739,9 @@ function AverageWidthFrame()
12715
12739
  var right=border.Right-3;
12716
12740
  var left=border.Left;
12717
12741
  var yButton=border.Top+this.ChartBorder.TitleHeight/2;
12718
-
12742
+
12743
+ this.ToolbarCacheSize={ RToolbar:{ Right:right, Left:left }}
12744
+
12719
12745
  //右往左绘制
12720
12746
  for(var i=0;i<aryButton.length;++i)
12721
12747
  {
@@ -12741,8 +12767,12 @@ function AverageWidthFrame()
12741
12767
 
12742
12768
  this.Buttons.push({ ID:item.ID, Rect:rtButton });
12743
12769
 
12770
+ this.ToolbarCacheSize.RToolbar.Left=rtButton.Left;
12771
+
12744
12772
  right=xBotton;
12745
12773
  }
12774
+
12775
+
12746
12776
  }
12747
12777
  }
12748
12778
 
@@ -17747,7 +17777,6 @@ function KLineFrame()
17747
17777
  if (g_JSChartResource.IsDOMFrameToolbar===true) return;
17748
17778
 
17749
17779
  this.Buttons=[];
17750
- this.LeftButtonWidth=0;
17751
17780
  if (this.IsMinSize==true) return;
17752
17781
  if (this.ChartBorder.TitleHeight<5) return;
17753
17782
 
@@ -26565,6 +26594,31 @@ function ChartKLine()
26565
26594
  //面积图和收盘价线 断开点
26566
26595
  this.AryBreakPoint;
26567
26596
 
26597
+ //天数统计
26598
+ this.DaySummary={ MapDate:new Map(), Enable:false };
26599
+ this.DaySummaryConfig=
26600
+ {
26601
+ Font: g_JSChartResource.DaySummaryKLine.Font,
26602
+ TextColor: g_JSChartResource.DaySummaryKLine.TextColor
26603
+ }
26604
+
26605
+ this.AddToDaySummary=function(kItem)
26606
+ {
26607
+ if (!this.DaySummary.Enable) return false;
26608
+
26609
+ if (!kItem) return false;
26610
+ if (!IFrameSplitOperator.IsPlusNumber(kItem.Date)) return false;
26611
+
26612
+ if (this.DaySummary.MapDate.has(kItem.Date)) return false;
26613
+
26614
+ this.DaySummary.MapDate.set(kItem.Date, { Date:kItem.Date });
26615
+ }
26616
+
26617
+ this.ClearDaySummary=function()
26618
+ {
26619
+ this.DaySummary.MapDate.clear();
26620
+ }
26621
+
26568
26622
  this.BuildDateTimeKey=function(item)
26569
26623
  {
26570
26624
  if (!item) return null;
@@ -26622,6 +26676,13 @@ function ChartKLine()
26622
26676
  UnchangeColor:g_JSChartResource.PredictionKLine.Bar.UnchangeColor,
26623
26677
  DrawType:g_JSChartResource.PredictionKLine.Bar.DrawType
26624
26678
  };
26679
+
26680
+
26681
+ this.DaySummaryConfig=
26682
+ {
26683
+ Font: g_JSChartResource.DaySummaryKLine.Font,
26684
+ TextColor: g_JSChartResource.DaySummaryKLine.TextColor
26685
+ }
26625
26686
 
26626
26687
  }
26627
26688
 
@@ -27254,6 +27315,8 @@ function ChartKLine()
27254
27315
  this.ShowRange.End=i;
27255
27316
  if (!data || data.Open==null || data.High==null || data.Low==null || data.Close==null) continue;
27256
27317
 
27318
+ this.AddToDaySummary(data);
27319
+
27257
27320
  var left=xOffset;
27258
27321
  var right=xOffset+dataWidth;
27259
27322
  if (right>chartright) break;
@@ -29139,6 +29202,7 @@ function ChartKLine()
29139
29202
  if (this.IsShowIndexTitleOnly()) return;
29140
29203
  if (this.IsHideScriptIndex()) return;
29141
29204
 
29205
+ this.ClearDaySummary();
29142
29206
  this.IsShowOrderText=false;
29143
29207
  this.TooltipRect=[];
29144
29208
  this.InfoTooltipRect=[];
@@ -29277,6 +29341,8 @@ function ChartKLine()
29277
29341
  this.FFKChart.DrawMaxMinPrice();
29278
29342
  }
29279
29343
  }
29344
+
29345
+ this.DrawDaySummary();
29280
29346
  }
29281
29347
 
29282
29348
  this.OnFormatHighLowTitle=function(ptMax, ptMin)
@@ -29347,8 +29413,33 @@ function ChartKLine()
29347
29413
  else text=text+rightArrow;
29348
29414
  if (ptTop.Y>(top-2))
29349
29415
  {
29416
+ var textSize=GetTextSize(this.Canvas,text);
29417
+ var textWidth=textSize.Width;
29418
+ var textHeight=textSize.Height;
29419
+ if (this.ChartFrame.CoordinateType==1) //反转坐标
29420
+ {
29421
+ var rtText={ Width:textWidth, Height:textHeight, Top:ptTop.Y };
29422
+ rtText.Bottom=rtText.Top+rtText.Height;
29423
+ }
29424
+ else
29425
+ {
29426
+ var rtText={ Width:textWidth, Height:textHeight, Bottom:ptTop.Y };
29427
+ rtText.Top=rtText.Bottom-rtText.Height;
29428
+ }
29429
+
29430
+ if (ptTop.Align=="left")
29431
+ {
29432
+ rtText.Left=left;
29433
+ rtText.Right=rtText.Left+rtText.Width;
29434
+ }
29435
+ else
29436
+ {
29437
+ rtText.Right=left;
29438
+ rtText.Left=rtText.Right-rtText.Width;
29439
+ }
29440
+
29350
29441
  this.Canvas.fillText(text,left,ptTop.Y);
29351
- this.ChartFrame.ChartKLine.Max={X:left, Y:ptTop.Y, Text: { BaseLine:'bottom'}};
29442
+ this.ChartFrame.ChartKLine.Max={X:left, Y:ptTop.Y, Text: { BaseLine:'bottom'}, Rect:rtText };
29352
29443
  }
29353
29444
 
29354
29445
  var ptBottom=ptMin;
@@ -29377,8 +29468,33 @@ function ChartKLine()
29377
29468
  else text=text+rightArrow;
29378
29469
  if (ptBottom.Y<(bottom+1))
29379
29470
  {
29471
+ var textSize=GetTextSize(this.Canvas,text);
29472
+ var textWidth=textSize.Width;
29473
+ var textHeight=textSize.Height;
29474
+ if (this.ChartFrame.CoordinateType==1) //反转坐标
29475
+ {
29476
+ var rtText={ Width:textWidth, Height:textHeight, Bottom:ptBottom.Y };
29477
+ rtText.Top=rtText.Bottom-rtText.Height;
29478
+ }
29479
+ else
29480
+ {
29481
+ var rtText={ Width:textWidth, Height:textHeight, Top:ptBottom.Y };
29482
+ rtText.Bottom=rtText.Top+rtText.Height;
29483
+ }
29484
+
29485
+ if (ptBottom.Align=="left")
29486
+ {
29487
+ rtText.Left=left;
29488
+ rtText.Right=rtText.Left+rtText.Width;
29489
+ }
29490
+ else
29491
+ {
29492
+ rtText.Right=left;
29493
+ rtText.Left=rtText.Right-rtText.Width;
29494
+ }
29495
+
29380
29496
  this.Canvas.fillText(text,left,ptBottom.Y);
29381
- this.ChartFrame.ChartKLine.Min={X:left, Y:ptBottom.Y, Text:{ BaseLine:'top'}};
29497
+ this.ChartFrame.ChartKLine.Min={X:left, Y:ptBottom.Y, Text:{ BaseLine:'top'}, Rect:rtText };
29382
29498
  }
29383
29499
  }
29384
29500
 
@@ -31465,7 +31581,99 @@ function ChartKLine()
31465
31581
  }
31466
31582
  }
31467
31583
  }
31468
-
31584
+
31585
+ this.GetDaySummaryText=function()
31586
+ {
31587
+ var count=this.DaySummary.MapDate.size;
31588
+ if (count<=0) return null;
31589
+ if (!this.HQChart) return null;
31590
+
31591
+ var text;
31592
+ if (ChartData.IsMinutePeriod(this.Data.Period,true))
31593
+ {
31594
+ text=`${count}${g_JSChartLocalization.GetText('天',this.HQChart.LanguageID)}`;
31595
+ return text;
31596
+ }
31597
+
31598
+ if (ChartData.IsDayPeriod(this.Data.Period,true))
31599
+ {
31600
+ switch(this.Data.Period)
31601
+ {
31602
+ case 0:
31603
+ text=`${count}${g_JSChartLocalization.GetText('天',this.HQChart.LanguageID)}`;
31604
+ break;
31605
+ case 1:
31606
+ text=`${count}${g_JSChartLocalization.GetText('周',this.HQChart.LanguageID)}`;
31607
+ break;
31608
+ case 2:
31609
+ text=`${count}${g_JSChartLocalization.GetText('月',this.HQChart.LanguageID)}`;
31610
+ break;
31611
+ case 4:
31612
+ text=`${count}${g_JSChartLocalization.GetText('年',this.HQChart.LanguageID)}`;
31613
+ break;
31614
+ default:
31615
+ return null;
31616
+ }
31617
+
31618
+ return text;
31619
+ }
31620
+
31621
+ return null;
31622
+ }
31623
+
31624
+ this.DrawDaySummary=function()
31625
+ {
31626
+ if (!this.DaySummary.Enable) return;
31627
+ if (this.ChartFrame.IsHScreen===true) return;
31628
+
31629
+ var text=this.GetDaySummaryText();
31630
+ if (!text) return;
31631
+
31632
+ this.Canvas.font=this.DaySummaryConfig.Font;
31633
+
31634
+ this.Canvas.textAlign = 'left';
31635
+ this.Canvas.textBaseline = 'bottom';
31636
+
31637
+ var border=this.ChartBorder.GetBorder();
31638
+ var xText=border.Left+1;
31639
+ var yText=border.Bottom;
31640
+
31641
+ var textSize=GetTextSize(this.Canvas,text);
31642
+ var textWidth=textSize.Width;
31643
+ var textHeight=textSize.Height;
31644
+
31645
+ var rtText={ Left:xText, Bottom:yText, Width:textWidth, Height:textHeight };
31646
+ rtText.Right=rtText.Left+rtText.Width;
31647
+ rtText.Top=rtText.Bottom-rtText.Height;
31648
+
31649
+ if (this.ChartFrame.ChartKLine.Max && this.ChartFrame.ChartKLine.Max.Rect)
31650
+ {
31651
+ var rtMax=this.ChartFrame.ChartKLine.Max.Rect;
31652
+ if (IsRectOverlap(rtText,rtMax))
31653
+ {
31654
+ rtText.Left=rtMax.Right+2;
31655
+ rtText.Right=rtText.Left+rtText.Width;
31656
+ }
31657
+ }
31658
+
31659
+ if (this.ChartFrame.ChartKLine.Min && this.ChartFrame.ChartKLine.Min.Rect)
31660
+ {
31661
+ var rtMin=this.ChartFrame.ChartKLine.Min.Rect;
31662
+ if (IsRectOverlap(rtText,rtMin))
31663
+ {
31664
+ rtText.Left=rtMin.Right+2;
31665
+ rtText.Right=rtText.Left+rtText.Width;
31666
+ }
31667
+ }
31668
+
31669
+ //this.Canvas.fillStyle="rgb(100,0,100)";
31670
+ //this.Canvas.fillRect(rtText.Left,rtText.Top,rtText.Width,rtText.Height);
31671
+
31672
+ this.Canvas.fillStyle=this.DaySummaryConfig.TextColor;
31673
+ this.Canvas.fillText(text,rtText.Left,rtText.Bottom);
31674
+
31675
+ this.ClearDaySummary();
31676
+ }
31469
31677
  }
31470
31678
 
31471
31679
  function ChartColorKline()
@@ -60199,7 +60407,10 @@ function DynamicChartTitlePainting()
60199
60407
  }
60200
60408
  else
60201
60409
  {
60202
- this.DrawMainIndexTitle({ Left:left, Right:right, Bottom:bottom }, isShowLastData, rtText);
60410
+ var yRight=right;
60411
+ if (this.Frame.ToolbarCacheSize && this.Frame.ToolbarCacheSize.RToolbar) yRight=this.Frame.ToolbarCacheSize.RToolbar.Left-2; //右侧按钮宽度要去掉
60412
+ this.DrawMainIndexTitle({ Left:left, Right:yRight, Bottom:bottom }, isShowLastData, rtText);
60413
+ if (IFrameSplitOperator.IsNumber(rtText.Bottom)) bottom=rtText.Bottom;
60203
60414
  }
60204
60415
 
60205
60416
  left=rtText.Left;
@@ -60237,7 +60448,7 @@ function DynamicChartTitlePainting()
60237
60448
  if (this.OverlayIndexType.Position==1)
60238
60449
  {
60239
60450
  if (!this.Frame.ChartBorder.IsShowTitleOnly)
60240
- this.DrawOverlayIndexSingleLine(moveonPoint, mouseStatus);
60451
+ this.DrawOverlayIndexSingleLine(moveonPoint, mouseStatus, bottom+1);
60241
60452
  }
60242
60453
  else
60243
60454
  {
@@ -60429,9 +60640,11 @@ function DynamicChartTitlePainting()
60429
60640
  if (!this.IsShowMainIndexTitle) return;
60430
60641
 
60431
60642
  var left=positionInfo.Left;
60643
+ var newLineLeft=this.Frame.ChartBorder.GetLeft()+this.MerginLeft+5;
60432
60644
  var right=positionInfo.Right;
60433
60645
  var bottom=positionInfo.Bottom;
60434
60646
  var pixelRatio=GetDevicePixelRatio();
60647
+ var lineHeight=this.Canvas.measureText("擎").width+2;
60435
60648
  for(var i=0; i<this.Data.length; ++i)
60436
60649
  {
60437
60650
  var item=this.Data[i];
@@ -60471,7 +60684,12 @@ function DynamicChartTitlePainting()
60471
60684
  }
60472
60685
  }
60473
60686
 
60474
- if ((left+textWidth+space)>right) break;
60687
+ if ((left+textWidth+space)>right)
60688
+ {
60689
+ left=newLineLeft;
60690
+ bottom+=lineHeight;
60691
+ right=this.Frame.ChartBorder.GetRight(); //第2行以后 右侧边框
60692
+ }
60475
60693
 
60476
60694
  if (titleItem.BG) //背景
60477
60695
  {
@@ -60530,7 +60748,12 @@ function DynamicChartTitlePainting()
60530
60748
  }
60531
60749
  var space=this.ParamSpace*pixelRatio;
60532
60750
  var textWidth=this.Canvas.measureText(text).width+space;
60533
- if ((left+textWidth)>right) break;
60751
+ if ((left+textWidth)>right) //换行
60752
+ {
60753
+ left=newLineLeft;
60754
+ bottom+=lineHeight;
60755
+ right=this.Frame.ChartBorder.GetRight(); //第2行以后 右侧边框
60756
+ }
60534
60757
 
60535
60758
  this.Canvas.fillText(text,left,bottom,textWidth);
60536
60759
  left+=textWidth;
@@ -60538,6 +60761,7 @@ function DynamicChartTitlePainting()
60538
60761
  }
60539
60762
 
60540
60763
  rtText.Left=left;
60764
+ rtText.Bottom=bottom;
60541
60765
  }
60542
60766
 
60543
60767
  //集合竞价
@@ -60726,10 +60950,12 @@ function DynamicChartTitlePainting()
60726
60950
  return { Text:valueText, ArrayText:aryText };
60727
60951
  }
60728
60952
 
60729
- this.DrawOverlayIndexSingleLine=function(moveonPoint, mouseStatus) //叠加指标1个指标一行
60953
+ this.DrawOverlayIndexSingleLine=function(moveonPoint, mouseStatus, yTop) //叠加指标1个指标一行
60730
60954
  {
60731
60955
  var pixelRatio=GetDevicePixelRatio();
60732
60956
  var border=this.Frame.GetBorder();
60957
+ var fontHeight=GetFontHeight(this.Canvas,this.Font,"擎");
60958
+
60733
60959
  if (this.Frame.IsHScreen===true)
60734
60960
  {
60735
60961
  var left=1;
@@ -60740,6 +60966,7 @@ function DynamicChartTitlePainting()
60740
60966
  else
60741
60967
  {
60742
60968
  var top=border.TopTitle+2*pixelRatio;
60969
+ if (IFrameSplitOperator.IsNumber(yTop) && yTop>top) top=yTop+fontHeight/2+2*pixelRatio;
60743
60970
  if (!this.IsShowMainIndexTitle) top=this.Frame.ChartBorder.GetTop()+2*pixelRatio;
60744
60971
  var left=this.Frame.ChartBorder.GetLeft()+this.MerginLeft;
60745
60972
  var right=border.Right;
@@ -60749,7 +60976,6 @@ function DynamicChartTitlePainting()
60749
60976
 
60750
60977
  var lineSpace=this.OverlayIndexType.LineSpace*pixelRatio;
60751
60978
  var x=left, y=top;
60752
- var fontHeight=GetFontHeight(this.Canvas,this.Font,"擎");
60753
60979
  y=top+fontHeight/2;
60754
60980
  for(item of this.OverlayIndex)
60755
60981
  {
@@ -73549,6 +73775,12 @@ function JSChartResource()
73549
73775
  Text:{ Color:"rgb(105,105,105)", Font:`${12*GetDevicePixelRatio()}px 微软雅黑`}
73550
73776
  };
73551
73777
 
73778
+ this.DaySummaryKLine=
73779
+ {
73780
+ Font:`${12*GetDevicePixelRatio()}px 微软雅黑`,
73781
+ TextColor:"rgb(105,105,105)"
73782
+ }
73783
+
73552
73784
  //订单流配置
73553
73785
  this.OrderFlow=
73554
73786
  {
@@ -75000,6 +75232,14 @@ function JSChartResource()
75000
75232
  }
75001
75233
  }
75002
75234
 
75235
+ if (style.DaySummaryKLine)
75236
+ {
75237
+ var item=style.DaySummaryKLine;
75238
+ var dest=this.DaySummaryKLine;
75239
+ if (item.Font) dest.Font=item.Font;
75240
+ if (item.TextColor) dest.TextColor=item.TextColor;
75241
+ }
75242
+
75003
75243
  if (style.Index)
75004
75244
  {
75005
75245
  if (style.Index.LineColor) this.Index.LineColor = style.Index.LineColor;
@@ -76547,7 +76787,14 @@ function JSChartLocalization()
76547
76787
 
76548
76788
  //日盘|夜盘
76549
76789
  ["日盘",{CN:'日盘', EN:'Day', TC:'日盤'}],
76550
- ["夜盘",{CN:'夜盘', EN:'Night', TC:'夜盤'} ]
76790
+ ["夜盘",{CN:'夜盘', EN:'Night', TC:'夜盤'} ],
76791
+
76792
+
76793
+ ["天", {CN:'天', EN:'Day', TC:'天'} ],
76794
+ ["周", {CN:'周', EN:'Week', TC:'周'} ],
76795
+ ["月", {CN:'月', EN:'Month', TC:'月'} ],
76796
+ ["年", {CN:'年', EN:'Year', TC:'年'} ],
76797
+
76551
76798
  ]);
76552
76799
 
76553
76800
  this.GetText=function(key,language)
@@ -78732,6 +78979,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
78732
78979
  kline.Name="Main-KLine";
78733
78980
  kline.DrawType=this.KLineDrawType;
78734
78981
  kline.Identify="Main-KLine";
78982
+ kline.HQChart=this;
78735
78983
  kline.GetEventCallback=(id)=>{ return this.GetEventCallback(id); };
78736
78984
 
78737
78985
  this.ChartPaint[0]=kline;
@@ -83291,6 +83539,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
83291
83539
  var klineType=klineChart.DrawType;
83292
83540
  var bThinAKBar=klineChart.IsThinAKBar;
83293
83541
  var priceGap=klineChart.PriceGap; //缺口配置信息
83542
+ var bDaySummary=klineChart.DaySummary.Enable;
83294
83543
  var infoPosition=klineChart.InfoPosition;
83295
83544
  var coordinateType=null, yCoordinateType=null; //坐标类型
83296
83545
  var mainFrame=null;
@@ -83538,6 +83787,8 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
83538
83787
 
83539
83788
  { Name:"双击弹分时图", Data:{ ID:JSCHART_MENU_ID.CMD_ENABLE_POP_MINUTE_CHART_ID, Args:[!bPopMinuteChart]}, Checked:bPopMinuteChart},
83540
83789
 
83790
+ { Name:"显示走完剩余时间", Data:{ ID:JSCHART_MENU_ID.CMD_ENABLE_KLINE_DAY_SUMMARY_ID, Args:[!bDaySummary]}, Checked:bDaySummary},
83791
+
83541
83792
  { Name:JSPopMenu.SEPARATOR_LINE_NAME },
83542
83793
  {
83543
83794
  Name:"鼠标形状",
@@ -296,6 +296,13 @@ function GetBlackStyle()
296
296
  Text:{ Color:"rgb(219,220,220)", Font:`${12*GetDevicePixelRatio()}px 微软雅黑` }
297
297
  },
298
298
 
299
+ DaySummaryKLine:
300
+ {
301
+ //Font:`${12*GetDevicePixelRatio()}px 微软雅黑`,
302
+ TextColor:"rgb(255,165,0)"
303
+ },
304
+
305
+
299
306
  //指标锁
300
307
  IndexLock:
301
308
  {