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.
- package/lib/umychart.vue.js +25 -15
- package/package.json +1 -1
- package/src/jscommon/umychart.DialogDrawTool.js +82 -11
- package/src/jscommon/umychart.js +51 -17
- package/src/jscommon/umychart.resource/css/tools.css +21 -0
- package/src/jscommon/umychart.resource/font/drawtool/demo_index.html +26 -3
- package/src/jscommon/umychart.resource/font/drawtool/iconfont.css +7 -3
- package/src/jscommon/umychart.resource/font/drawtool/iconfont.js +1 -1
- package/src/jscommon/umychart.resource/font/drawtool/iconfont.json +7 -0
- package/src/jscommon/umychart.resource/font/drawtool/iconfont.ttf +0 -0
- package/src/jscommon/umychart.resource/font/drawtool/iconfont.woff +0 -0
- package/src/jscommon/umychart.resource/font/drawtool/iconfont.woff2 +0 -0
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +93 -29
- package/src/jscommon/umychart.version.js +42 -12
- package/src/jscommon/umychart.vue/umychart.vue.js +175 -40
|
@@ -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
|
-
|
|
14684
|
-
|
|
14685
|
-
|
|
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=
|
|
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
|
-
|
|
14721
|
-
|
|
14722
|
-
|
|
14728
|
+
canvas.beginPath();
|
|
14729
|
+
canvas.roundRect(ToFixedPoint(x), ToFixedPoint(y), ToFixedRect(textWidth), ToFixedRect(bgHeight), [roundRadius]);
|
|
14730
|
+
canvas.closePath();
|
|
14723
14731
|
|
|
14724
|
-
|
|
14725
|
-
|
|
14732
|
+
canvas.fillStyle=this.ButtonTooltip.ColorBG;
|
|
14733
|
+
canvas.fill();
|
|
14726
14734
|
|
|
14727
|
-
|
|
14728
|
-
|
|
14735
|
+
canvas.strokeStyle=this.ButtonTooltip.ColorBorder;
|
|
14736
|
+
canvas.stroke();
|
|
14729
14737
|
|
|
14730
|
-
|
|
14731
|
-
|
|
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
|
-
|
|
14736
|
-
|
|
14737
|
-
|
|
14738
|
-
|
|
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.
|
|
133614
|
+
var HQCHART_VERSION="1.1.13380";
|
|
133581
133615
|
|
|
133582
133616
|
function PrintHQChartVersion()
|
|
133583
133617
|
{
|
|
133584
|
-
var
|
|
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
|
-
|
|
133588
|
-
|
|
133589
|
-
|
|
133590
|
-
|
|
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.
|
|
8
|
+
var HQCHART_VERSION="1.1.13380";
|
|
9
9
|
|
|
10
10
|
function PrintHQChartVersion()
|
|
11
11
|
{
|
|
12
|
-
var
|
|
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
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
*
|
|
20
|
-
*************************************************************************************************************
|
|
21
|
-
`
|
|
22
|
-
|
|
23
|
-
console.log(log);
|
|
50
|
+
**************************************************************************************************************************************************************************
|
|
51
|
+
`;
|
|
52
|
+
|
|
53
|
+
console.log(logo);
|
|
24
54
|
}
|
|
25
55
|
|
|
26
56
|
|