hqchart 1.1.13370 → 1.1.13381

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.
@@ -6046,6 +6046,7 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
6046
6046
  JSChart.LastVersion=null; //最新的版本号
6047
6047
  JSChart.EnableCanvasWillReadFrequently=false; //https://html.spec.whatwg.org/multipage/canvas.html#concept-canvas-will-read-frequently
6048
6048
  JSChart.CorssCursorCanvasKey="hqchart_corsscursor";
6049
+ JSChart.TooltipCursorCanvasKey="hqchart_tooltip";
6049
6050
 
6050
6051
  //初始化
6051
6052
  JSChart.Init=function(divElement,bScreen,bCacheCanvas)
@@ -6456,6 +6457,7 @@ var JSCHART_OPERATOR_ID=
6456
6457
  OP_SCROOLBAR_SLIDER_CHANGED:15, //滑块变动
6457
6458
 
6458
6459
  OP_GOTO:16, //移动到某一个天或某一个分钟
6460
+ OP_GOTO_BY_DATAINDEX:17, //的移动到某一个数据起始位置
6459
6461
  }
6460
6462
 
6461
6463
  var JSCHART_DRAG_ID=
@@ -14677,15 +14679,21 @@ function AverageWidthFrame()
14677
14679
  if (!text) return;
14678
14680
 
14679
14681
  var pixelRatio=GetDevicePixelRatio();
14682
+ var canvas=this.Canvas;
14683
+ if (this.GetExtraCanvas)
14684
+ {
14685
+ var finder=this.GetExtraCanvas(JSChart.TooltipCursorCanvasKey);
14686
+ if (finder) canvas=finder.Canvas;
14687
+ }
14680
14688
 
14681
14689
  var xCenter=mouseOnToolbar.Rect.Left+mouseOnToolbar.Rect.Width/2;
14682
14690
 
14683
- this.Canvas.font=this.ButtonTooltip.Font;
14684
- this.Canvas.textAlign="left";
14685
- this.Canvas.textBaseline="bottom";
14691
+ canvas.font=this.ButtonTooltip.Font;
14692
+ canvas.textAlign="left";
14693
+ canvas.textBaseline="bottom";
14686
14694
 
14687
14695
  var mergin= this.ButtonTooltip.Mergin;
14688
- var textWidth=this.Canvas.measureText(text).width+mergin.Left+mergin.Right;
14696
+ var textWidth=canvas.measureText(text).width+mergin.Left+mergin.Right;
14689
14697
  var textHeight=this.GetFontHeight();
14690
14698
  var bgHeight=textHeight+mergin.Top+mergin.Bottom;
14691
14699
  if (mouseOnToolbar.ID=="TitleButton")
@@ -14717,25 +14725,25 @@ function AverageWidthFrame()
14717
14725
  if (IFrameSplitOperator.IsNumber(this.ButtonTooltip.BorderRadius)) //圆角
14718
14726
  {
14719
14727
  var roundRadius=this.ButtonTooltip.BorderRadius;
14720
- this.Canvas.beginPath();
14721
- this.Canvas.roundRect(ToFixedPoint(x), ToFixedPoint(y), ToFixedRect(textWidth), ToFixedRect(bgHeight), [roundRadius]);
14722
- this.Canvas.closePath();
14728
+ canvas.beginPath();
14729
+ canvas.roundRect(ToFixedPoint(x), ToFixedPoint(y), ToFixedRect(textWidth), ToFixedRect(bgHeight), [roundRadius]);
14730
+ canvas.closePath();
14723
14731
 
14724
- this.Canvas.fillStyle=this.ButtonTooltip.ColorBG;
14725
- this.Canvas.fill();
14732
+ canvas.fillStyle=this.ButtonTooltip.ColorBG;
14733
+ canvas.fill();
14726
14734
 
14727
- this.Canvas.strokeStyle=this.ButtonTooltip.ColorBorder;
14728
- this.Canvas.stroke();
14735
+ canvas.strokeStyle=this.ButtonTooltip.ColorBorder;
14736
+ canvas.stroke();
14729
14737
 
14730
- this.Canvas.fillStyle=this.ButtonTooltip.Color;
14731
- this.Canvas.fillText(text, x+mergin.Left, y+bgHeight-mergin.Bottom);
14738
+ canvas.fillStyle=this.ButtonTooltip.Color;
14739
+ canvas.fillText(text, x+mergin.Left, y+bgHeight-mergin.Bottom);
14732
14740
  }
14733
14741
  else
14734
14742
  {
14735
- this.Canvas.fillStyle=this.ButtonTooltip.ColorBG;
14736
- this.Canvas.fillRect(x,y,textWidth,bgHeight); //画一个背景色, 不然是一个黑的背景
14737
- this.Canvas.fillStyle=this.ButtonTooltip.Color;
14738
- this.Canvas.fillText(text, x+mergin.Left,y+bgHeight-mergin.Bottom);
14743
+ canvas.fillStyle=this.ButtonTooltip.ColorBG;
14744
+ canvas.fillRect(x,y,textWidth,bgHeight); //画一个背景色, 不然是一个黑的背景
14745
+ canvas.fillStyle=this.ButtonTooltip.Color;
14746
+ canvas.fillText(text, x+mergin.Left,y+bgHeight-mergin.Bottom);
14739
14747
  }
14740
14748
 
14741
14749
 
@@ -73113,6 +73121,29 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
73113
73121
 
73114
73122
  this.ChartOperator_Temp_Update();
73115
73123
  }
73124
+ else if (id==JSCHART_OPERATOR_ID.OP_GOTO_BY_DATAINDEX) //{PageSize:可选, DataIndex:起始位置数据索引}
73125
+ {
73126
+ if (!IFrameSplitOperator.IsNumber(obj.DataIndex)) return;
73127
+ var hisData=this.ChartOperator_Temp_GetHistroyData();
73128
+ if (!hisData) return; //数据还没有到达
73129
+ if (obj.DataIndex<0 || obj.DataIndex>=hisData.Data.length)
73130
+ {
73131
+ JSConsole.Chart.Log(`[KLineChartContainer::ChartOperator] OP_GOTO_BY_DATAINDEX obj.DataIndex=${obj.DataIndex} error.}`);
73132
+ return;
73133
+ }
73134
+
73135
+ var oldXPointCount=this.Frame.SubFrame[0].Frame.XPointCount;
73136
+ var xPointCount=oldXPointCount;
73137
+ if (obj.PageSize>0) xPointCount=obj.PageSize; //调整一屏显示的个数
73138
+ if (xPointCount!=oldXPointCount) this.Frame.SetXShowCount(xPointCount); //设置X轴显示数据个数
73139
+
73140
+ hisData.DataOffset=obj.DataIndex;
73141
+ this.CursorIndex=0;
73142
+ this.LastPoint.X=null;
73143
+ this.LastPoint.Y=null;
73144
+
73145
+ this.ChartOperator_Temp_Update();
73146
+ }
73116
73147
  else if (id==JSCHART_OPERATOR_ID.OP_CORSSCURSOR_GOTO) //移动十字光标{ Date:, Time }
73117
73148
  {
73118
73149
  if (!IFrameSplitOperator.IsNumber(obj.Date)) return;
@@ -73563,6 +73594,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
73563
73594
 
73564
73595
  var frame=g_ChartFrameFactory.Create("KLineFrame", { ID:i });
73565
73596
  frame.Canvas=this.Canvas;
73597
+ frame.GetExtraCanvas=(name)=>{ this.GetExtraCanvas(name); };
73566
73598
  frame.ChartBorder=border;
73567
73599
  frame.Identify=i; //窗口序号
73568
73600
  frame.RightSpaceCount=this.RightSpaceCount; //右边
@@ -73648,6 +73680,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
73648
73680
  var frame=g_ChartFrameFactory.Create(frameClassName, { ID:id });
73649
73681
 
73650
73682
  frame.Canvas=this.Canvas;
73683
+ frame.GetExtraCanvas=(name)=>{ this.GetExtraCanvas(name); };
73651
73684
  frame.ChartBorder=border;
73652
73685
  frame.Identify=id; //窗口序号
73653
73686
  frame.GetEventCallback=(id)=> { return this.GetEventCallback(id); };
@@ -87585,6 +87618,7 @@ function KLineChartHScreenContainer(uielement)
87585
87618
 
87586
87619
  var frame=g_ChartFrameFactory.Create("KLineHScreenFrame", { ID:i });
87587
87620
  frame.Canvas=this.Canvas;
87621
+ frame.GetExtraCanvas=(name)=>{ this.GetExtraCanvas(name); };
87588
87622
  frame.ChartBorder=border;
87589
87623
  frame.Identify=i; //窗口序号
87590
87624
  frame.RightSpaceCount=this.RightSpaceCount; //右边
@@ -133577,22 +133611,52 @@ function ScrollBarBGChart()
133577
133611
 
133578
133612
 
133579
133613
 
133580
- var HQCHART_VERSION="1.1.13369";
133614
+ var HQCHART_VERSION="1.1.13380";
133581
133615
 
133582
133616
  function PrintHQChartVersion()
133583
133617
  {
133584
- var log=
133585
- `*************************************************************************************************************
133618
+ var logo=`
133619
+
133620
+ ***************************************************************************************************************************************************************************
133621
+ *
133622
+ * :%@@-
133623
+ * :@@@@-
133624
+ * =@@@@ :#@@@ .:+#@@@#=: :=*@@@@@@#+-. *@@@@.
133625
+ * :@@@@@ .@@@@@ .#@@@@@@@@@@@- +@@@@@@@@@@@@@+ @@@@@ -%@@*
133626
+ * +@@@@% #@@@@# *@@@@@@@@@@@@@@%. =@@@@@@@@@@@@@@@- @@@@@ -@@@@+
133627
+ * %@@@@* @@@@@+ .%@@@@@@@@@@@@@@@@%: #@@@@@@@@@@@@@@@% @@@@# *@@@@=
133628
+ * @@@@@= @@@@@- .%@@@@@@@*++*%@@@@@@% .%@@@@@@@%*+==+**= -@@@@+ #@@@@-
133629
+ * @@@@@. @@@@@. #@@@@@%= =@@@@@@* %@@@@@@#: *@@@@- :::. .-+*###+: ::: .+##+: -%%@@@@@%%%%
133630
+ * .@@@@@ .@@@@@. +@@@@@% .@@@@@@ *@@@@@@: %@@@@: +@@@@@%. :%@@@@@@@@@@: *@@@ :@@@@@* @@@@@@@@@@@@
133631
+ * :@@@@@ :@@@@@ @@@@@% :@@@@@+ @@@@@@: %@@@@-@@@@@@@@@. @@@@@@@@@@@@@. :@@@%-@@@@@@.:@@@@@@@@@@@#
133632
+ * -@@@@% -@@@@@ =@@@@@. %@@@@% %@@@@@- %@@@@@@@@@@@@@@* %@@@@@@@@@@@@+ -@@@@@@@@@@# -@@@@@@@@@@@.
133633
+ * +@@@@%=========#@@@@% @@@@@# :@@@@@ .@@@@@% @@@@@@@@%@@@@@@@ -%+:. .#@@@@* +@@@@@@@%%@. .::+@@@@#::
133634
+ * #@@@@@@@@@@@@@@@@@@@# .@@@@@ .@@@@@ :@@@@@. @@@@@@#. #@@@@@. -@@@@* #@@@@@@: *@@@@+
133635
+ * %@@@@@@@@@@@@@@@@@@@+ :@@@@@ .@@@@@ -@@@@@ @@@@@+ @@@@@. :@@@@* @@@@@% #@@@@-
133636
+ * @@@@@@@@@@@@@@@@@@@@: :@@@@% :@@@@@ +@@@@% -@@@@+ @@@@@ -@@@@+ @@@@@. @@@@@.
133637
+ * .@@@@@@@@@@@@@@@@@@@@ :@@@@% -@@@@% *@@@@% #@@@@. @@@@@ .=*#%%%@@@@@= :@@@@# @@@@@.
133638
+ * -@@@@@:::::::::=@@@@@ :@@@@@ @@@@@* +@@@@% @@@@@ @@@@% -#@@@@@@@@@@@@: -@@@@* @@@@@
133639
+ * =@@@@% =@@@@% .@@@@@ :@@@@@. -@@@@% @@@@@ .@@@@* +@@@@@@@@@@@@@@. =@@@@+ .@@@@@
133640
+ * +@@@@# +@@@@# @@@@@# %@@@@% :@@@@@ .@@@@% =@@@@= -@@@@@*-:..%@@@@ +@@@@= :@@@@#
133641
+ * *@@@@* *@@@@* +@@@@@: #@@@@@+ .@@@@@@ :@@@@% *@@@@- @@@@@. @@@@% #@@@@: =@@@@+
133642
+ * %@@@@= %@@@@+ @@@@@@- .%@@@@@# #@@@@@# :@@@@% #@@@@: @@@@% @@@@* %@@@@. #@@@@-
133643
+ * @@@@@- @@@@@= =@@@@@@#=...-*@@@@@@@: @@@@@@%=. :+**. :@@@@* %@@@@. .@@@@* *@@@@= @@@@@ %@@@@+
133644
+ * .@@@@@: .@@@@@: *@@@@@@@@@@@@@@@@@@@# =@@@@@@@@%%%@@@@@@ +@@@@- @@@@@ .@@@@@: :%@@@@@- .@@@@% %@@@@@*+-
133645
+ * :@@@@@ :@@@@@ +@@@@@@@@@@@@@@@@@@@# =@@@@@@@@@@@@@@@@% %@@@@ @@@@@ @@@@@@@@@@@@@@@: -@@@@* *@@@@@@@@-
133646
+ * =@@@@@ -@@@@@ :@@@@@@@@@@@@@@@@@@@# :@@@@@@@@@@@@@@@% @@@@@ %@@@% #@@@@@@@@@#@@@@. +@@@@- .@@@@@@@@#
133647
+ * *@@@@# =@@@@% :#@@@@@@@#: :@@@@@= =@@@@@@@@@@@+. @@@@@ :@@@+ *@@@@@@@- %@@@ *@@@= =@@@@@@@*
133648
+ * =++++- -++++= .:::. .=*+: :-=+++=:. ****= .=+. .-++=: :+++ -+=: .-=+=:.
133649
+ *
133650
+ *
133651
+ * HQChart
133652
+ * Ver: ${HQCHART_VERSION}
133653
+ * License: Apache License 2.0
133654
+ * Source: https://github.com/jones2000/HQChart
133586
133655
  *
133587
- * HQChart Ver: ${HQCHART_VERSION}
133588
- *
133589
- * License: Apache License 2.0
133590
- * Source: https://github.com/jones2000/HQChart
133591
- *
133592
- *************************************************************************************************************
133593
- `
133594
-
133595
- console.log(log);
133656
+ **************************************************************************************************************************************************************************
133657
+ `;
133658
+
133659
+ console.log(logo);
133596
133660
  }
133597
133661
 
133598
133662
 
@@ -5,22 +5,52 @@
5
5
 
6
6
 
7
7
 
8
- var HQCHART_VERSION="1.1.13369";
8
+ var HQCHART_VERSION="1.1.13380";
9
9
 
10
10
  function PrintHQChartVersion()
11
11
  {
12
- var log=
13
- `*************************************************************************************************************
12
+ var logo=`
13
+
14
+ ***************************************************************************************************************************************************************************
15
+ *
16
+ * :%@@-
17
+ * :@@@@-
18
+ * =@@@@ :#@@@ .:+#@@@#=: :=*@@@@@@#+-. *@@@@.
19
+ * :@@@@@ .@@@@@ .#@@@@@@@@@@@- +@@@@@@@@@@@@@+ @@@@@ -%@@*
20
+ * +@@@@% #@@@@# *@@@@@@@@@@@@@@%. =@@@@@@@@@@@@@@@- @@@@@ -@@@@+
21
+ * %@@@@* @@@@@+ .%@@@@@@@@@@@@@@@@%: #@@@@@@@@@@@@@@@% @@@@# *@@@@=
22
+ * @@@@@= @@@@@- .%@@@@@@@*++*%@@@@@@% .%@@@@@@@%*+==+**= -@@@@+ #@@@@-
23
+ * @@@@@. @@@@@. #@@@@@%= =@@@@@@* %@@@@@@#: *@@@@- :::. .-+*###+: ::: .+##+: -%%@@@@@%%%%
24
+ * .@@@@@ .@@@@@. +@@@@@% .@@@@@@ *@@@@@@: %@@@@: +@@@@@%. :%@@@@@@@@@@: *@@@ :@@@@@* @@@@@@@@@@@@
25
+ * :@@@@@ :@@@@@ @@@@@% :@@@@@+ @@@@@@: %@@@@-@@@@@@@@@. @@@@@@@@@@@@@. :@@@%-@@@@@@.:@@@@@@@@@@@#
26
+ * -@@@@% -@@@@@ =@@@@@. %@@@@% %@@@@@- %@@@@@@@@@@@@@@* %@@@@@@@@@@@@+ -@@@@@@@@@@# -@@@@@@@@@@@.
27
+ * +@@@@%=========#@@@@% @@@@@# :@@@@@ .@@@@@% @@@@@@@@%@@@@@@@ -%+:. .#@@@@* +@@@@@@@%%@. .::+@@@@#::
28
+ * #@@@@@@@@@@@@@@@@@@@# .@@@@@ .@@@@@ :@@@@@. @@@@@@#. #@@@@@. -@@@@* #@@@@@@: *@@@@+
29
+ * %@@@@@@@@@@@@@@@@@@@+ :@@@@@ .@@@@@ -@@@@@ @@@@@+ @@@@@. :@@@@* @@@@@% #@@@@-
30
+ * @@@@@@@@@@@@@@@@@@@@: :@@@@% :@@@@@ +@@@@% -@@@@+ @@@@@ -@@@@+ @@@@@. @@@@@.
31
+ * .@@@@@@@@@@@@@@@@@@@@ :@@@@% -@@@@% *@@@@% #@@@@. @@@@@ .=*#%%%@@@@@= :@@@@# @@@@@.
32
+ * -@@@@@:::::::::=@@@@@ :@@@@@ @@@@@* +@@@@% @@@@@ @@@@% -#@@@@@@@@@@@@: -@@@@* @@@@@
33
+ * =@@@@% =@@@@% .@@@@@ :@@@@@. -@@@@% @@@@@ .@@@@* +@@@@@@@@@@@@@@. =@@@@+ .@@@@@
34
+ * +@@@@# +@@@@# @@@@@# %@@@@% :@@@@@ .@@@@% =@@@@= -@@@@@*-:..%@@@@ +@@@@= :@@@@#
35
+ * *@@@@* *@@@@* +@@@@@: #@@@@@+ .@@@@@@ :@@@@% *@@@@- @@@@@. @@@@% #@@@@: =@@@@+
36
+ * %@@@@= %@@@@+ @@@@@@- .%@@@@@# #@@@@@# :@@@@% #@@@@: @@@@% @@@@* %@@@@. #@@@@-
37
+ * @@@@@- @@@@@= =@@@@@@#=...-*@@@@@@@: @@@@@@%=. :+**. :@@@@* %@@@@. .@@@@* *@@@@= @@@@@ %@@@@+
38
+ * .@@@@@: .@@@@@: *@@@@@@@@@@@@@@@@@@@# =@@@@@@@@%%%@@@@@@ +@@@@- @@@@@ .@@@@@: :%@@@@@- .@@@@% %@@@@@*+-
39
+ * :@@@@@ :@@@@@ +@@@@@@@@@@@@@@@@@@@# =@@@@@@@@@@@@@@@@% %@@@@ @@@@@ @@@@@@@@@@@@@@@: -@@@@* *@@@@@@@@-
40
+ * =@@@@@ -@@@@@ :@@@@@@@@@@@@@@@@@@@# :@@@@@@@@@@@@@@@% @@@@@ %@@@% #@@@@@@@@@#@@@@. +@@@@- .@@@@@@@@#
41
+ * *@@@@# =@@@@% :#@@@@@@@#: :@@@@@= =@@@@@@@@@@@+. @@@@@ :@@@+ *@@@@@@@- %@@@ *@@@= =@@@@@@@*
42
+ * =++++- -++++= .:::. .=*+: :-=+++=:. ****= .=+. .-++=: :+++ -+=: .-=+=:.
43
+ *
44
+ *
45
+ * HQChart
46
+ * Ver: ${HQCHART_VERSION}
47
+ * License: Apache License 2.0
48
+ * Source: https://github.com/jones2000/HQChart
14
49
  *
15
- * HQChart Ver: ${HQCHART_VERSION}
16
- *
17
- * License: Apache License 2.0
18
- * Source: https://github.com/jones2000/HQChart
19
- *
20
- *************************************************************************************************************
21
- `
22
-
23
- console.log(log);
50
+ **************************************************************************************************************************************************************************
51
+ `;
52
+
53
+ console.log(logo);
24
54
  }
25
55
 
26
56