hqchart 1.1.15349 → 1.1.15354

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.
@@ -4508,6 +4508,7 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
4508
4508
  if (option.KLine.FirstShowDate>19910101) chart.CustomShow={ Date:option.KLine.FirstShowDate, PageSize:option.KLine.PageSize }; //!!已弃用 新的格式"CustomShow"
4509
4509
  if (option.KLine.RightSpaceCount>0) chart.RightSpaceCount=option.KLine.RightSpaceCount;
4510
4510
  if (option.KLine.ZoomType>0) chart.ZoomType=option.KLine.ZoomType;
4511
+ if (IFrameSplitOperator.IsNumber(option.KLine.PageSizeV2)) chart.KLineSize={ PageSize:option.KLine.PageSizeV2 };
4511
4512
  if (option.KLine.DataWidth>=1) chart.KLineSize={ DataWidth:option.KLine.DataWidth };
4512
4513
  if (IFrameSplitOperator.IsNumber(option.KLine.RightFormula)) chart.RightFormula=option.KLine.RightFormula;
4513
4514
  }
@@ -17565,7 +17566,7 @@ function IChartFramePainting()
17565
17566
  this.HorizontalMax; //Y轴最大值
17566
17567
  this.HorizontalMin; //Y轴最小值
17567
17568
  this.HorizontalReserved=null; //Y轴预留高度 { Top:上, Bottom:下 }
17568
- this.XPointCount=10; //X轴数据个数
17569
+ this.XPointCount=g_JSChartResource.Frame.XPointCount; //X轴数据个数
17569
17570
 
17570
17571
  this.ClientBGColor; //客户区背景色
17571
17572
 
@@ -35507,7 +35508,7 @@ function ChartKLine()
35507
35508
  var data=this.Data.Data[i];
35508
35509
  if (!data || data.Open==null || data.High==null || data.Low==null || data.Close==null) continue;
35509
35510
 
35510
- if (this.DrawType==5 && data.OrderFlow && IFrameSplitOperator.IsNumber(data.OrderFlow.PriceOffset))
35511
+ if ([5,7,8,17,18].includes(this.DrawType) && data.OrderFlow && IFrameSplitOperator.IsNumber(data.OrderFlow.PriceOffset))
35511
35512
  {
35512
35513
  var high=data.High;
35513
35514
  var low=data.Low;
@@ -35882,16 +35883,29 @@ function ChartKLine()
35882
35883
  this.Canvas.stroke();
35883
35884
  }
35884
35885
 
35886
+ this.DrawOrderFlowBarHighLow(orderFlow, xKLine, cellHeight); //绘制最高 最低点文字
35887
+ }
35888
+
35889
+ //绘制最高 最低点文字
35890
+ this.DrawOrderFlowBarHighLow=function(orderFlow, xKLine, cellHeight)
35891
+ {
35892
+ if (!orderFlow) return;
35893
+ if (!this.IsShowOrderText) return;
35894
+ var bDrawHigh=IFrameSplitOperator.IsNonEmptyArray(orderFlow.High);
35895
+ var bDrawLow=IFrameSplitOperator.IsNonEmptyArray(orderFlow.Low);
35896
+ if (!bDrawHigh && !bDrawLow) return;
35897
+
35898
+ var defaultFont=this.GetDynamicOrderFlowFont(cellHeight, xKLine.DataWidth);
35899
+ this.Canvas.textBaseline='middle';
35900
+ this.Canvas.textAlign='center';
35885
35901
 
35886
- //var fontHeight=this.Canvas.measureText("擎").width+2;
35887
- var textFont=this.GetDynamicOrderFlowFont(cellHeight, xKLine.DataWidth);
35888
- //上下文字
35889
- if (orderFlow && IFrameSplitOperator.IsNonEmptyArray(orderFlow.High) && this.IsShowOrderText)
35902
+ //高点文字
35903
+ if (bDrawHigh)
35890
35904
  {
35891
35905
  for(var i=0;i<orderFlow.High.length;++i)
35892
35906
  {
35893
35907
  var item=orderFlow.High[i];
35894
- var text;
35908
+ var text=null;
35895
35909
  if (IFrameSplitOperator.IsString(item.Text)) text=item.Text;
35896
35910
  else if (IFrameSplitOperator.IsNumber(item.Value)) text=item.Value.toString();
35897
35911
  if (!text) continue;
@@ -35906,22 +35920,24 @@ function ChartKLine()
35906
35920
  var itemFont=this.GetDynamicOrderFlowFont(cellHeight, xKLine.DataWidth, item.Font);
35907
35921
  this.Canvas.font=itemFont;
35908
35922
  this.Canvas.fillText(text,xKLine.Center,yPrice);
35909
- this.Canvas.font=textFont;
35923
+ this.Canvas.font=defaultFont;
35910
35924
  }
35911
35925
  else
35912
35926
  {
35927
+
35913
35928
  this.Canvas.fillText(text,xKLine.Center,yPrice);
35914
35929
  }
35915
35930
 
35916
35931
  }
35917
35932
  }
35918
35933
 
35919
- if (orderFlow && IFrameSplitOperator.IsNonEmptyArray(orderFlow.Low) && this.IsShowOrderText)
35934
+ //低点
35935
+ if (bDrawLow)
35920
35936
  {
35921
35937
  for(var i=0;i<orderFlow.Low.length;++i)
35922
35938
  {
35923
35939
  var item=orderFlow.Low[i];
35924
- var text;
35940
+ var text=null;
35925
35941
  if (IFrameSplitOperator.IsString(item.Text)) text=item.Text;
35926
35942
  else if (IFrameSplitOperator.IsNumber(item.Value)) text=item.Value.toString();
35927
35943
  if (!text) continue;
@@ -35936,7 +35952,7 @@ function ChartKLine()
35936
35952
  var itemFont=this.GetDynamicOrderFlowFont(cellHeight, xKLine.DataWidth, item.Font);
35937
35953
  this.Canvas.font=itemFont;
35938
35954
  this.Canvas.fillText(text,xKLine.Center,yPrice);
35939
- this.Canvas.font=textFont;
35955
+ this.Canvas.font=defaultFont;
35940
35956
  }
35941
35957
  else
35942
35958
  {
@@ -36256,6 +36272,7 @@ function ChartKLine()
36256
36272
  this.Canvas.fillRect(barLeft,ToFixedRect(barTop-cellHeight/2),barWidth,ToFixedRect(barBottom-barTop+cellHeight));
36257
36273
  var yKline={ Low:yLow, High:yHigh, Open:yOpen, Close:yClose };
36258
36274
  var xKLine={ Left:barRight, Right:right, DataWidth:(right-barRight) };
36275
+ xKLine.Center=xKLine.Left+xKLine.DataWidth/2;
36259
36276
  this.DrawOrderFlowBar_Style3(data.OrderFlow, data, xKLine, yKline, isHScreen);
36260
36277
  }
36261
36278
 
@@ -36402,6 +36419,8 @@ function ChartKLine()
36402
36419
  }
36403
36420
  }
36404
36421
  }
36422
+
36423
+ this.DrawOrderFlowBarHighLow(orderFlow, xKLine, cellHeight); //绘制最高 最低点文字
36405
36424
  }
36406
36425
 
36407
36426
  this.DrawOrderFlowBar_Style3=function(orderFlow, kItem, xKLine, yKline, isHScreen)
@@ -36490,6 +36509,8 @@ function ChartKLine()
36490
36509
  }
36491
36510
  }
36492
36511
  }
36512
+
36513
+ this.DrawOrderFlowBarHighLow(orderFlow, xKLine, cellHeight); //绘制最高 最低点文字
36493
36514
  }
36494
36515
 
36495
36516
 
@@ -36731,6 +36752,8 @@ function ChartKLine()
36731
36752
 
36732
36753
  }
36733
36754
  }
36755
+
36756
+ this.DrawOrderFlowBarHighLow(orderFlow, xKLine, cellHeight); //绘制最高 最低点文字
36734
36757
  }
36735
36758
 
36736
36759
  ////////////////////////////////////////////////////////////////////////////////
@@ -36906,6 +36929,8 @@ function ChartKLine()
36906
36929
  }
36907
36930
  }
36908
36931
  }
36932
+
36933
+ this.DrawOrderFlowBarHighLow(orderFlow, xKLine, cellHeight); //绘制最高 最低点文字
36909
36934
  }
36910
36935
 
36911
36936
  //////////////////////////////////////////////////////////////
@@ -38908,6 +38933,12 @@ function ChartKLineTable()
38908
38933
 
38909
38934
  if (item.Name && rtBG.Width>10)
38910
38935
  {
38936
+ if (item.BGColor)
38937
+ {
38938
+ this.Canvas.fillStyle=item.BGColor;
38939
+ this.Canvas.fillRect(rtBG.Left, rtBG.Top, rtBG.Width, rtBG.Height);
38940
+ }
38941
+
38911
38942
  this.Canvas.fillStyle=item.Color?item.Color:this.TextColor;
38912
38943
  this.Canvas.textBaseline='bottom';
38913
38944
  this.Canvas.textAlign='left';
@@ -82331,7 +82362,8 @@ function JSChartResource()
82331
82362
  YTopOffset:2*GetDevicePixelRatio(), //Y轴顶部文字向下偏移
82332
82363
  YTextPadding:[2,2],
82333
82364
  EnableRemoveZero:true, //移除小数点后面的0
82334
- StringFormat:0
82365
+ StringFormat:0,
82366
+ XPointCount:10,
82335
82367
  };
82336
82368
  this.ToolbarButtonStyle=0;
82337
82369
 
@@ -83971,6 +84003,7 @@ function JSChartResource()
83971
84003
  {
83972
84004
  if (style.Frame.XBottomOffset) this.Frame.XBottomOffset=style.Frame.XBottomOffset;
83973
84005
  if (style.Frame.YTopOffset) this.Frame.YTopOffset=style.Frame.YTopOffset;
84006
+ if (IFrameSplitOperator.IsNumber(style.Frame.XPointCount)) this.Frame.XPointCount=style.Frame.XPointCount;
83974
84007
  if (style.Frame.PercentageText)
83975
84008
  {
83976
84009
  var item=style.Frame.PercentageText;
@@ -88232,21 +88265,32 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
88232
88265
  this.BindMainData=function(hisData, showCount, chartOperator)
88233
88266
  {
88234
88267
  var isShowAll=false; //全部显示
88235
- if (chartOperator && chartOperator.IsShowAll===true) isShowAll=true;
88268
+ if (chartOperator)
88269
+ {
88270
+ if (chartOperator.IsShowAll===true) isShowAll=true;
88271
+ if (IFrameSplitOperator.IsPlusNumber(chartOperator.PageSize)) showCount=chartOperator.PageSize;
88272
+ }
88236
88273
  this.ChartPaint[0].Data=hisData;
88237
88274
  this.ChartPaint[0].Symbol=this.Symbol;
88238
88275
 
88239
88276
  if (this.KLineSize)
88240
88277
  {
88241
- if (!IFrameSplitOperator.IsNumber(this.KLineSize.DataWidth))
88242
- {
88243
- showCount=this.Frame.SubFrame[0].Frame.XPointCount-this.RightSpaceCount;
88244
- }
88245
- else
88278
+ if (IFrameSplitOperator.IsNumber(this.KLineSize.DataWidth))
88246
88279
  {
88247
88280
  var obj=this.Frame.SetDataWidth(this.KLineSize.DataWidth);
88248
88281
  showCount=obj.XPointCount-this.RightSpaceCount;
88249
88282
  this.KLineSize.DataWidth=null;
88283
+ this.KLineSize.PageSize=null;
88284
+ }
88285
+ else if (IFrameSplitOperator.IsNumber(this.KLineSize.PageSize))
88286
+ {
88287
+ showCount=this.KLineSize.PageSize;
88288
+ this.KLineSize.PageSize=null;
88289
+ this.KLineSize.DataWidth=null;
88290
+ }
88291
+ else
88292
+ {
88293
+ showCount=this.Frame.SubFrame[0].Frame.XPointCount-this.RightSpaceCount;
88250
88294
  }
88251
88295
  }
88252
88296
 
@@ -88910,7 +88954,8 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
88910
88954
  {
88911
88955
  var item=data.ChartOperator;
88912
88956
  chartOperator={ };
88913
- if (item.IsShowAll===true) chartOperator.IsShowAll=true; //全部显示
88957
+ if (item.IsShowAll===true) chartOperator.IsShowAll=true;
88958
+ if (IFrameSplitOperator.IsNumber(item.PageSize)) chartOperator.PageSize=item.PageSize; //全部显示
88914
88959
  }
88915
88960
 
88916
88961
  this.BindMainData(bindData,this.PageSize,chartOperator);
@@ -167445,7 +167490,7 @@ function HQChartScriptWorker()
167445
167490
 
167446
167491
 
167447
167492
 
167448
- var HQCHART_VERSION="1.1.15348";
167493
+ var HQCHART_VERSION="1.1.15353";
167449
167494
 
167450
167495
  function PrintHQChartVersion()
167451
167496
  {