hqchart 1.1.13946 → 1.1.13951
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 +67 -64
- package/package.json +1 -1
- package/src/jscommon/umychart.TReport.js +17 -0
- package/src/jscommon/umychart.js +33 -4
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +34 -5
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +51 -5
package/package.json
CHANGED
|
@@ -15,6 +15,7 @@ function JSTReportChart(divElement)
|
|
|
15
15
|
{
|
|
16
16
|
this.DivElement=divElement;
|
|
17
17
|
this.JSChartContainer; //表格控件
|
|
18
|
+
this.ResizeListener; //大小变动监听
|
|
18
19
|
|
|
19
20
|
//h5 canvas
|
|
20
21
|
this.CanvasElement=document.createElement("canvas");
|
|
@@ -61,6 +62,8 @@ function JSTReportChart(divElement)
|
|
|
61
62
|
this.JSChartContainer=chart;
|
|
62
63
|
this.DivElement.JSChart=this; //div中保存一份
|
|
63
64
|
|
|
65
|
+
if (option.EnableResize==true) this.CreateResizeListener();
|
|
66
|
+
|
|
64
67
|
if (option.Symbol)
|
|
65
68
|
{
|
|
66
69
|
chart.Draw();
|
|
@@ -128,6 +131,20 @@ function JSTReportChart(divElement)
|
|
|
128
131
|
chart.Frame.ChartBorder.Bottom*=pixelTatio;
|
|
129
132
|
}
|
|
130
133
|
|
|
134
|
+
this.CreateResizeListener=function()
|
|
135
|
+
{
|
|
136
|
+
this.ResizeListener = new ResizeObserver((entries)=>{ this.OnDivResize(entries); });
|
|
137
|
+
this.ResizeListener.observe(this.DivElement);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
this.OnDivResize=function(entries)
|
|
141
|
+
{
|
|
142
|
+
JSConsole.Chart.Log("[JSTReportChart::OnDivResize] entries=", entries);
|
|
143
|
+
|
|
144
|
+
this.OnSize();
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
|
|
131
148
|
/////////////////////////////////////////////////////////////////////////////
|
|
132
149
|
//对外接口
|
|
133
150
|
|
package/src/jscommon/umychart.js
CHANGED
|
@@ -329,6 +329,13 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
329
329
|
if (IFrameSplitOperator.IsNumber(item.WheelYMove)) chart.EnableYDrag.WheelYMove=item.WheelYMove;
|
|
330
330
|
}
|
|
331
331
|
|
|
332
|
+
if (option.KLineTooltip)
|
|
333
|
+
{
|
|
334
|
+
var item=option.KLineTooltip;
|
|
335
|
+
if (IFrameSplitOperator.IsBool(item.Enable)) chart.KLineTooltipConfig.Enable=item.Enable;
|
|
336
|
+
if (IFrameSplitOperator.IsBool(item.EnableKeyDown)) chart.KLineTooltipConfig.EnableKeyDown=item.EnableKeyDown;
|
|
337
|
+
}
|
|
338
|
+
|
|
332
339
|
if (option.KLine) //k线图的属性设置
|
|
333
340
|
{
|
|
334
341
|
var item=option.KLine;
|
|
@@ -339,7 +346,6 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
339
346
|
if (option.KLine.MaxRequestDataCount>0) chart.MaxRequestDataCount=option.KLine.MaxRequestDataCount;
|
|
340
347
|
if (option.KLine.Info && option.KLine.Info.length>0) chart.SetKLineInfo(option.KLine.Info,false);
|
|
341
348
|
if (IFrameSplitOperator.IsBool(item.IsShowTooltip)) chart.IsShowTooltip=item.IsShowTooltip;
|
|
342
|
-
if (IFrameSplitOperator.IsBool(item.IsShowKLineDivTooltip)) chart.IsShowKLineDivTooltip=item.IsShowKLineDivTooltip;
|
|
343
349
|
if (option.KLine.MaxRequestMinuteDayCount>0) chart.MaxRequestMinuteDayCount=option.KLine.MaxRequestMinuteDayCount;
|
|
344
350
|
if (option.KLine.DrawType) chart.KLineDrawType=option.KLine.DrawType;
|
|
345
351
|
if (option.KLine.FirstShowDate>19910101) chart.CustomShow={ Date:option.KLine.FirstShowDate, PageSize:option.KLine.PageSize }; //!!已弃用 新的格式"CustomShow"
|
|
@@ -2806,6 +2812,7 @@ var JSCHART_MENU_ID=
|
|
|
2806
2812
|
CMD_REPORT_COLUMN_FILTER_ID:64, //报价列表 筛选
|
|
2807
2813
|
|
|
2808
2814
|
CMD_DIALOG_TOOLTIP_ATTRIBUTE:65, //修改K线信息框属性 Ary:[{ Enable:, Style:}, ]
|
|
2815
|
+
CMD_KLINE_TOOLTIP_ATTRIBUTE:66, //修改K线提示框属性 Ary:[{ Enable:true/false, EnableKeyDown:true/false}]
|
|
2809
2816
|
}
|
|
2810
2817
|
|
|
2811
2818
|
|
|
@@ -2961,6 +2968,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
2961
2968
|
this.Tooltip.id=Guid();
|
|
2962
2969
|
uielement.parentNode.appendChild(this.Tooltip);
|
|
2963
2970
|
this.IsShowTooltip=true; //是否显示K线tooltip
|
|
2971
|
+
this.KLineTooltipConfig={ EnableKeyDown:true, Enable:true }; //K线鼠标移动上去提示信息配置
|
|
2964
2972
|
this.TooltipCache={ Type:null, IsShow:false, X:null, Y:null, Data:null, InnerHTML:null }; //缓存tooltip数据
|
|
2965
2973
|
|
|
2966
2974
|
//坐标轴风格方法 double-更加数值型分割 price-更加股票价格分割
|
|
@@ -6940,6 +6948,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
6940
6948
|
|
|
6941
6949
|
this.ShowTooltipByKeyDown=function()
|
|
6942
6950
|
{
|
|
6951
|
+
if (!this.KLineTooltipConfig.Enable || !this.KLineTooltipConfig.EnableKeyDown) return;
|
|
6952
|
+
|
|
6943
6953
|
var index=Math.abs(this.CursorIndex-0.5);
|
|
6944
6954
|
index=parseInt(index.toFixed(0));
|
|
6945
6955
|
if (this.ClassName=='KLineChartContainer' || this.ClassName=='KLineTrainChartContainer') index=this.CursorIndex;
|
|
@@ -6973,7 +6983,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
6973
6983
|
|
|
6974
6984
|
if (toolTip.Type===0) //K线信息
|
|
6975
6985
|
{
|
|
6976
|
-
if (!this.
|
|
6986
|
+
if (!this.KLineTooltipConfig.Enable) return;
|
|
6977
6987
|
|
|
6978
6988
|
var scrollPos=GetScrollPosition();
|
|
6979
6989
|
var left = x;
|
|
@@ -9783,6 +9793,12 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9783
9793
|
this.InitalTooltipDialog(option);
|
|
9784
9794
|
}
|
|
9785
9795
|
break;
|
|
9796
|
+
case JSCHART_MENU_ID.CMD_KLINE_TOOLTIP_ATTRIBUTE:
|
|
9797
|
+
if (!aryArgs[0]) return false;
|
|
9798
|
+
var option=aryArgs[0];
|
|
9799
|
+
if (IFrameSplitOperator.IsBool(option.Enable)) this.KLineTooltipConfig.Enable=option.Enable;
|
|
9800
|
+
if (IFrameSplitOperator.IsBool(option.EnableKeyDown)) this.KLineTooltipConfig.EnableKeyDown=option.EnableKeyDown;
|
|
9801
|
+
break;
|
|
9786
9802
|
}
|
|
9787
9803
|
}
|
|
9788
9804
|
|
|
@@ -71943,7 +71959,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
71943
71959
|
this.SourceDataLimit=new Map(); //每个周期缓存数据最大个数 key=周期 value=最大个数
|
|
71944
71960
|
this.CtrlMoveStep=5; //Ctrl+(Left/Right) 移动数据个数
|
|
71945
71961
|
|
|
71946
|
-
this.CustomShow=null; //首先显示的K线的起始日期 { Date:日期, Time:时间, PageSize:}
|
|
71962
|
+
this.CustomShow=null; //首先显示的K线的起始日期 { Date:日期, Time:时间, PageSize:, Callback:}
|
|
71947
71963
|
this.ZoomType=0; //缩放模式 0=最右边固定缩放, 1=十字光标两边缩放
|
|
71948
71964
|
this.IsZoomLockRight=false;
|
|
71949
71965
|
this.KLineSize=null; //{ DataWidth:, }
|
|
@@ -71994,7 +72010,6 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
71994
72010
|
|
|
71995
72011
|
this.ScrollBar=null; //横向滚动条
|
|
71996
72012
|
this.IsAutoSyncDataOffset=true; //增量更新时,是否移动当前屏数据
|
|
71997
|
-
this.IsShowKLineDivTooltip=true; //是否显示K线tooltip
|
|
71998
72013
|
|
|
71999
72014
|
this.GetKLineCalulate=function()
|
|
72000
72015
|
{
|
|
@@ -73395,6 +73410,12 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
73395
73410
|
|
|
73396
73411
|
this.SetCustomShow=function(customShow,hisData)
|
|
73397
73412
|
{
|
|
73413
|
+
if (customShow.Callback) //预留给外部回调,可以定制移动
|
|
73414
|
+
{
|
|
73415
|
+
customShow.Callback(chart, hisData)
|
|
73416
|
+
return;
|
|
73417
|
+
}
|
|
73418
|
+
|
|
73398
73419
|
var index=this.ChartOperator_GetIndex_ByDateTime(hisData,customShow, this.Period, 0);
|
|
73399
73420
|
if (index===null)
|
|
73400
73421
|
{
|
|
@@ -77771,6 +77792,14 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
77771
77792
|
{ Name:"样式1", Data:{ ID:JSCHART_MENU_ID.CMD_DIALOG_TOOLTIP_ATTRIBUTE, Args:[{Enable:true, Style:0}]}, Checked:(this.DialogTooltip && this.DialogTooltip.Style===0) },
|
|
77772
77793
|
{ Name:"样式2", Data:{ ID:JSCHART_MENU_ID.CMD_DIALOG_TOOLTIP_ATTRIBUTE, Args:[{Enable:true, Style:1}]}, Checked:(this.DialogTooltip && this.DialogTooltip.Style===1) },
|
|
77773
77794
|
]
|
|
77795
|
+
},
|
|
77796
|
+
{
|
|
77797
|
+
Name:"K线提示框",
|
|
77798
|
+
SubMenu:
|
|
77799
|
+
[
|
|
77800
|
+
{ Name:"启用", Data:{ ID:JSCHART_MENU_ID.CMD_KLINE_TOOLTIP_ATTRIBUTE, Args:[{Enable:!this.KLineTooltipConfig.Enable}]}, Checked:this.KLineTooltipConfig.Enable },
|
|
77801
|
+
{ Name:"键盘左右显示", Data:{ ID:JSCHART_MENU_ID.CMD_KLINE_TOOLTIP_ATTRIBUTE, Args:[{EnableKeyDown:!this.KLineTooltipConfig.EnableKeyDown}]}, Checked:this.KLineTooltipConfig.EnableKeyDown },
|
|
77802
|
+
]
|
|
77774
77803
|
}
|
|
77775
77804
|
]
|
|
77776
77805
|
}
|
|
@@ -4254,6 +4254,13 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
4254
4254
|
if (IFrameSplitOperator.IsNumber(item.WheelYMove)) chart.EnableYDrag.WheelYMove=item.WheelYMove;
|
|
4255
4255
|
}
|
|
4256
4256
|
|
|
4257
|
+
if (option.KLineTooltip)
|
|
4258
|
+
{
|
|
4259
|
+
var item=option.KLineTooltip;
|
|
4260
|
+
if (IFrameSplitOperator.IsBool(item.Enable)) chart.KLineTooltipConfig.Enable=item.Enable;
|
|
4261
|
+
if (IFrameSplitOperator.IsBool(item.EnableKeyDown)) chart.KLineTooltipConfig.EnableKeyDown=item.EnableKeyDown;
|
|
4262
|
+
}
|
|
4263
|
+
|
|
4257
4264
|
if (option.KLine) //k线图的属性设置
|
|
4258
4265
|
{
|
|
4259
4266
|
var item=option.KLine;
|
|
@@ -4264,7 +4271,6 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
4264
4271
|
if (option.KLine.MaxRequestDataCount>0) chart.MaxRequestDataCount=option.KLine.MaxRequestDataCount;
|
|
4265
4272
|
if (option.KLine.Info && option.KLine.Info.length>0) chart.SetKLineInfo(option.KLine.Info,false);
|
|
4266
4273
|
if (IFrameSplitOperator.IsBool(item.IsShowTooltip)) chart.IsShowTooltip=item.IsShowTooltip;
|
|
4267
|
-
if (IFrameSplitOperator.IsBool(item.IsShowKLineDivTooltip)) chart.IsShowKLineDivTooltip=item.IsShowKLineDivTooltip;
|
|
4268
4274
|
if (option.KLine.MaxRequestMinuteDayCount>0) chart.MaxRequestMinuteDayCount=option.KLine.MaxRequestMinuteDayCount;
|
|
4269
4275
|
if (option.KLine.DrawType) chart.KLineDrawType=option.KLine.DrawType;
|
|
4270
4276
|
if (option.KLine.FirstShowDate>19910101) chart.CustomShow={ Date:option.KLine.FirstShowDate, PageSize:option.KLine.PageSize }; //!!已弃用 新的格式"CustomShow"
|
|
@@ -6731,6 +6737,7 @@ var JSCHART_MENU_ID=
|
|
|
6731
6737
|
CMD_REPORT_COLUMN_FILTER_ID:64, //报价列表 筛选
|
|
6732
6738
|
|
|
6733
6739
|
CMD_DIALOG_TOOLTIP_ATTRIBUTE:65, //修改K线信息框属性 Ary:[{ Enable:, Style:}, ]
|
|
6740
|
+
CMD_KLINE_TOOLTIP_ATTRIBUTE:66, //修改K线提示框属性 Ary:[{ Enable:true/false, EnableKeyDown:true/false}]
|
|
6734
6741
|
}
|
|
6735
6742
|
|
|
6736
6743
|
|
|
@@ -6886,6 +6893,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
6886
6893
|
this.Tooltip.id=Guid();
|
|
6887
6894
|
uielement.parentNode.appendChild(this.Tooltip);
|
|
6888
6895
|
this.IsShowTooltip=true; //是否显示K线tooltip
|
|
6896
|
+
this.KLineTooltipConfig={ EnableKeyDown:true, Enable:true }; //K线鼠标移动上去提示信息配置
|
|
6889
6897
|
this.TooltipCache={ Type:null, IsShow:false, X:null, Y:null, Data:null, InnerHTML:null }; //缓存tooltip数据
|
|
6890
6898
|
|
|
6891
6899
|
//坐标轴风格方法 double-更加数值型分割 price-更加股票价格分割
|
|
@@ -10865,6 +10873,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
10865
10873
|
|
|
10866
10874
|
this.ShowTooltipByKeyDown=function()
|
|
10867
10875
|
{
|
|
10876
|
+
if (!this.KLineTooltipConfig.Enable || !this.KLineTooltipConfig.EnableKeyDown) return;
|
|
10877
|
+
|
|
10868
10878
|
var index=Math.abs(this.CursorIndex-0.5);
|
|
10869
10879
|
index=parseInt(index.toFixed(0));
|
|
10870
10880
|
if (this.ClassName=='KLineChartContainer' || this.ClassName=='KLineTrainChartContainer') index=this.CursorIndex;
|
|
@@ -10898,7 +10908,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
10898
10908
|
|
|
10899
10909
|
if (toolTip.Type===0) //K线信息
|
|
10900
10910
|
{
|
|
10901
|
-
if (!this.
|
|
10911
|
+
if (!this.KLineTooltipConfig.Enable) return;
|
|
10902
10912
|
|
|
10903
10913
|
var scrollPos=GetScrollPosition();
|
|
10904
10914
|
var left = x;
|
|
@@ -13708,6 +13718,12 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
13708
13718
|
this.InitalTooltipDialog(option);
|
|
13709
13719
|
}
|
|
13710
13720
|
break;
|
|
13721
|
+
case JSCHART_MENU_ID.CMD_KLINE_TOOLTIP_ATTRIBUTE:
|
|
13722
|
+
if (!aryArgs[0]) return false;
|
|
13723
|
+
var option=aryArgs[0];
|
|
13724
|
+
if (IFrameSplitOperator.IsBool(option.Enable)) this.KLineTooltipConfig.Enable=option.Enable;
|
|
13725
|
+
if (IFrameSplitOperator.IsBool(option.EnableKeyDown)) this.KLineTooltipConfig.EnableKeyDown=option.EnableKeyDown;
|
|
13726
|
+
break;
|
|
13711
13727
|
}
|
|
13712
13728
|
}
|
|
13713
13729
|
|
|
@@ -75868,7 +75884,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
75868
75884
|
this.SourceDataLimit=new Map(); //每个周期缓存数据最大个数 key=周期 value=最大个数
|
|
75869
75885
|
this.CtrlMoveStep=5; //Ctrl+(Left/Right) 移动数据个数
|
|
75870
75886
|
|
|
75871
|
-
this.CustomShow=null; //首先显示的K线的起始日期 { Date:日期, Time:时间, PageSize:}
|
|
75887
|
+
this.CustomShow=null; //首先显示的K线的起始日期 { Date:日期, Time:时间, PageSize:, Callback:}
|
|
75872
75888
|
this.ZoomType=0; //缩放模式 0=最右边固定缩放, 1=十字光标两边缩放
|
|
75873
75889
|
this.IsZoomLockRight=false;
|
|
75874
75890
|
this.KLineSize=null; //{ DataWidth:, }
|
|
@@ -75919,7 +75935,6 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
75919
75935
|
|
|
75920
75936
|
this.ScrollBar=null; //横向滚动条
|
|
75921
75937
|
this.IsAutoSyncDataOffset=true; //增量更新时,是否移动当前屏数据
|
|
75922
|
-
this.IsShowKLineDivTooltip=true; //是否显示K线tooltip
|
|
75923
75938
|
|
|
75924
75939
|
this.GetKLineCalulate=function()
|
|
75925
75940
|
{
|
|
@@ -77320,6 +77335,12 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
77320
77335
|
|
|
77321
77336
|
this.SetCustomShow=function(customShow,hisData)
|
|
77322
77337
|
{
|
|
77338
|
+
if (customShow.Callback) //预留给外部回调,可以定制移动
|
|
77339
|
+
{
|
|
77340
|
+
customShow.Callback(chart, hisData)
|
|
77341
|
+
return;
|
|
77342
|
+
}
|
|
77343
|
+
|
|
77323
77344
|
var index=this.ChartOperator_GetIndex_ByDateTime(hisData,customShow, this.Period, 0);
|
|
77324
77345
|
if (index===null)
|
|
77325
77346
|
{
|
|
@@ -81696,6 +81717,14 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
81696
81717
|
{ Name:"样式1", Data:{ ID:JSCHART_MENU_ID.CMD_DIALOG_TOOLTIP_ATTRIBUTE, Args:[{Enable:true, Style:0}]}, Checked:(this.DialogTooltip && this.DialogTooltip.Style===0) },
|
|
81697
81718
|
{ Name:"样式2", Data:{ ID:JSCHART_MENU_ID.CMD_DIALOG_TOOLTIP_ATTRIBUTE, Args:[{Enable:true, Style:1}]}, Checked:(this.DialogTooltip && this.DialogTooltip.Style===1) },
|
|
81698
81719
|
]
|
|
81720
|
+
},
|
|
81721
|
+
{
|
|
81722
|
+
Name:"K线提示框",
|
|
81723
|
+
SubMenu:
|
|
81724
|
+
[
|
|
81725
|
+
{ Name:"启用", Data:{ ID:JSCHART_MENU_ID.CMD_KLINE_TOOLTIP_ATTRIBUTE, Args:[{Enable:!this.KLineTooltipConfig.Enable}]}, Checked:this.KLineTooltipConfig.Enable },
|
|
81726
|
+
{ Name:"键盘左右显示", Data:{ ID:JSCHART_MENU_ID.CMD_KLINE_TOOLTIP_ATTRIBUTE, Args:[{EnableKeyDown:!this.KLineTooltipConfig.EnableKeyDown}]}, Checked:this.KLineTooltipConfig.EnableKeyDown },
|
|
81727
|
+
]
|
|
81699
81728
|
}
|
|
81700
81729
|
]
|
|
81701
81730
|
}
|
|
@@ -139088,7 +139117,7 @@ function ScrollBarBGChart()
|
|
|
139088
139117
|
|
|
139089
139118
|
|
|
139090
139119
|
|
|
139091
|
-
var HQCHART_VERSION="1.1.
|
|
139120
|
+
var HQCHART_VERSION="1.1.13950";
|
|
139092
139121
|
|
|
139093
139122
|
function PrintHQChartVersion()
|
|
139094
139123
|
{
|
|
@@ -4298,6 +4298,13 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
4298
4298
|
if (IFrameSplitOperator.IsNumber(item.WheelYMove)) chart.EnableYDrag.WheelYMove=item.WheelYMove;
|
|
4299
4299
|
}
|
|
4300
4300
|
|
|
4301
|
+
if (option.KLineTooltip)
|
|
4302
|
+
{
|
|
4303
|
+
var item=option.KLineTooltip;
|
|
4304
|
+
if (IFrameSplitOperator.IsBool(item.Enable)) chart.KLineTooltipConfig.Enable=item.Enable;
|
|
4305
|
+
if (IFrameSplitOperator.IsBool(item.EnableKeyDown)) chart.KLineTooltipConfig.EnableKeyDown=item.EnableKeyDown;
|
|
4306
|
+
}
|
|
4307
|
+
|
|
4301
4308
|
if (option.KLine) //k线图的属性设置
|
|
4302
4309
|
{
|
|
4303
4310
|
var item=option.KLine;
|
|
@@ -4308,7 +4315,6 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
4308
4315
|
if (option.KLine.MaxRequestDataCount>0) chart.MaxRequestDataCount=option.KLine.MaxRequestDataCount;
|
|
4309
4316
|
if (option.KLine.Info && option.KLine.Info.length>0) chart.SetKLineInfo(option.KLine.Info,false);
|
|
4310
4317
|
if (IFrameSplitOperator.IsBool(item.IsShowTooltip)) chart.IsShowTooltip=item.IsShowTooltip;
|
|
4311
|
-
if (IFrameSplitOperator.IsBool(item.IsShowKLineDivTooltip)) chart.IsShowKLineDivTooltip=item.IsShowKLineDivTooltip;
|
|
4312
4318
|
if (option.KLine.MaxRequestMinuteDayCount>0) chart.MaxRequestMinuteDayCount=option.KLine.MaxRequestMinuteDayCount;
|
|
4313
4319
|
if (option.KLine.DrawType) chart.KLineDrawType=option.KLine.DrawType;
|
|
4314
4320
|
if (option.KLine.FirstShowDate>19910101) chart.CustomShow={ Date:option.KLine.FirstShowDate, PageSize:option.KLine.PageSize }; //!!已弃用 新的格式"CustomShow"
|
|
@@ -6775,6 +6781,7 @@ var JSCHART_MENU_ID=
|
|
|
6775
6781
|
CMD_REPORT_COLUMN_FILTER_ID:64, //报价列表 筛选
|
|
6776
6782
|
|
|
6777
6783
|
CMD_DIALOG_TOOLTIP_ATTRIBUTE:65, //修改K线信息框属性 Ary:[{ Enable:, Style:}, ]
|
|
6784
|
+
CMD_KLINE_TOOLTIP_ATTRIBUTE:66, //修改K线提示框属性 Ary:[{ Enable:true/false, EnableKeyDown:true/false}]
|
|
6778
6785
|
}
|
|
6779
6786
|
|
|
6780
6787
|
|
|
@@ -6930,6 +6937,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
6930
6937
|
this.Tooltip.id=Guid();
|
|
6931
6938
|
uielement.parentNode.appendChild(this.Tooltip);
|
|
6932
6939
|
this.IsShowTooltip=true; //是否显示K线tooltip
|
|
6940
|
+
this.KLineTooltipConfig={ EnableKeyDown:true, Enable:true }; //K线鼠标移动上去提示信息配置
|
|
6933
6941
|
this.TooltipCache={ Type:null, IsShow:false, X:null, Y:null, Data:null, InnerHTML:null }; //缓存tooltip数据
|
|
6934
6942
|
|
|
6935
6943
|
//坐标轴风格方法 double-更加数值型分割 price-更加股票价格分割
|
|
@@ -10909,6 +10917,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
10909
10917
|
|
|
10910
10918
|
this.ShowTooltipByKeyDown=function()
|
|
10911
10919
|
{
|
|
10920
|
+
if (!this.KLineTooltipConfig.Enable || !this.KLineTooltipConfig.EnableKeyDown) return;
|
|
10921
|
+
|
|
10912
10922
|
var index=Math.abs(this.CursorIndex-0.5);
|
|
10913
10923
|
index=parseInt(index.toFixed(0));
|
|
10914
10924
|
if (this.ClassName=='KLineChartContainer' || this.ClassName=='KLineTrainChartContainer') index=this.CursorIndex;
|
|
@@ -10942,7 +10952,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
10942
10952
|
|
|
10943
10953
|
if (toolTip.Type===0) //K线信息
|
|
10944
10954
|
{
|
|
10945
|
-
if (!this.
|
|
10955
|
+
if (!this.KLineTooltipConfig.Enable) return;
|
|
10946
10956
|
|
|
10947
10957
|
var scrollPos=GetScrollPosition();
|
|
10948
10958
|
var left = x;
|
|
@@ -13752,6 +13762,12 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
13752
13762
|
this.InitalTooltipDialog(option);
|
|
13753
13763
|
}
|
|
13754
13764
|
break;
|
|
13765
|
+
case JSCHART_MENU_ID.CMD_KLINE_TOOLTIP_ATTRIBUTE:
|
|
13766
|
+
if (!aryArgs[0]) return false;
|
|
13767
|
+
var option=aryArgs[0];
|
|
13768
|
+
if (IFrameSplitOperator.IsBool(option.Enable)) this.KLineTooltipConfig.Enable=option.Enable;
|
|
13769
|
+
if (IFrameSplitOperator.IsBool(option.EnableKeyDown)) this.KLineTooltipConfig.EnableKeyDown=option.EnableKeyDown;
|
|
13770
|
+
break;
|
|
13755
13771
|
}
|
|
13756
13772
|
}
|
|
13757
13773
|
|
|
@@ -75912,7 +75928,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
75912
75928
|
this.SourceDataLimit=new Map(); //每个周期缓存数据最大个数 key=周期 value=最大个数
|
|
75913
75929
|
this.CtrlMoveStep=5; //Ctrl+(Left/Right) 移动数据个数
|
|
75914
75930
|
|
|
75915
|
-
this.CustomShow=null; //首先显示的K线的起始日期 { Date:日期, Time:时间, PageSize:}
|
|
75931
|
+
this.CustomShow=null; //首先显示的K线的起始日期 { Date:日期, Time:时间, PageSize:, Callback:}
|
|
75916
75932
|
this.ZoomType=0; //缩放模式 0=最右边固定缩放, 1=十字光标两边缩放
|
|
75917
75933
|
this.IsZoomLockRight=false;
|
|
75918
75934
|
this.KLineSize=null; //{ DataWidth:, }
|
|
@@ -75963,7 +75979,6 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
75963
75979
|
|
|
75964
75980
|
this.ScrollBar=null; //横向滚动条
|
|
75965
75981
|
this.IsAutoSyncDataOffset=true; //增量更新时,是否移动当前屏数据
|
|
75966
|
-
this.IsShowKLineDivTooltip=true; //是否显示K线tooltip
|
|
75967
75982
|
|
|
75968
75983
|
this.GetKLineCalulate=function()
|
|
75969
75984
|
{
|
|
@@ -77364,6 +77379,12 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
77364
77379
|
|
|
77365
77380
|
this.SetCustomShow=function(customShow,hisData)
|
|
77366
77381
|
{
|
|
77382
|
+
if (customShow.Callback) //预留给外部回调,可以定制移动
|
|
77383
|
+
{
|
|
77384
|
+
customShow.Callback(chart, hisData)
|
|
77385
|
+
return;
|
|
77386
|
+
}
|
|
77387
|
+
|
|
77367
77388
|
var index=this.ChartOperator_GetIndex_ByDateTime(hisData,customShow, this.Period, 0);
|
|
77368
77389
|
if (index===null)
|
|
77369
77390
|
{
|
|
@@ -81740,6 +81761,14 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
81740
81761
|
{ Name:"样式1", Data:{ ID:JSCHART_MENU_ID.CMD_DIALOG_TOOLTIP_ATTRIBUTE, Args:[{Enable:true, Style:0}]}, Checked:(this.DialogTooltip && this.DialogTooltip.Style===0) },
|
|
81741
81762
|
{ Name:"样式2", Data:{ ID:JSCHART_MENU_ID.CMD_DIALOG_TOOLTIP_ATTRIBUTE, Args:[{Enable:true, Style:1}]}, Checked:(this.DialogTooltip && this.DialogTooltip.Style===1) },
|
|
81742
81763
|
]
|
|
81764
|
+
},
|
|
81765
|
+
{
|
|
81766
|
+
Name:"K线提示框",
|
|
81767
|
+
SubMenu:
|
|
81768
|
+
[
|
|
81769
|
+
{ Name:"启用", Data:{ ID:JSCHART_MENU_ID.CMD_KLINE_TOOLTIP_ATTRIBUTE, Args:[{Enable:!this.KLineTooltipConfig.Enable}]}, Checked:this.KLineTooltipConfig.Enable },
|
|
81770
|
+
{ Name:"键盘左右显示", Data:{ ID:JSCHART_MENU_ID.CMD_KLINE_TOOLTIP_ATTRIBUTE, Args:[{EnableKeyDown:!this.KLineTooltipConfig.EnableKeyDown}]}, Checked:this.KLineTooltipConfig.EnableKeyDown },
|
|
81771
|
+
]
|
|
81743
81772
|
}
|
|
81744
81773
|
]
|
|
81745
81774
|
}
|
|
@@ -135808,6 +135837,7 @@ function JSTReportChart(divElement)
|
|
|
135808
135837
|
{
|
|
135809
135838
|
this.DivElement=divElement;
|
|
135810
135839
|
this.JSChartContainer; //表格控件
|
|
135840
|
+
this.ResizeListener; //大小变动监听
|
|
135811
135841
|
|
|
135812
135842
|
//h5 canvas
|
|
135813
135843
|
this.CanvasElement=document.createElement("canvas");
|
|
@@ -135854,6 +135884,8 @@ function JSTReportChart(divElement)
|
|
|
135854
135884
|
this.JSChartContainer=chart;
|
|
135855
135885
|
this.DivElement.JSChart=this; //div中保存一份
|
|
135856
135886
|
|
|
135887
|
+
if (option.EnableResize==true) this.CreateResizeListener();
|
|
135888
|
+
|
|
135857
135889
|
if (option.Symbol)
|
|
135858
135890
|
{
|
|
135859
135891
|
chart.Draw();
|
|
@@ -135921,6 +135953,20 @@ function JSTReportChart(divElement)
|
|
|
135921
135953
|
chart.Frame.ChartBorder.Bottom*=pixelTatio;
|
|
135922
135954
|
}
|
|
135923
135955
|
|
|
135956
|
+
this.CreateResizeListener=function()
|
|
135957
|
+
{
|
|
135958
|
+
this.ResizeListener = new ResizeObserver((entries)=>{ this.OnDivResize(entries); });
|
|
135959
|
+
this.ResizeListener.observe(this.DivElement);
|
|
135960
|
+
}
|
|
135961
|
+
|
|
135962
|
+
this.OnDivResize=function(entries)
|
|
135963
|
+
{
|
|
135964
|
+
JSConsole.Chart.Log("[JSTReportChart::OnDivResize] entries=", entries);
|
|
135965
|
+
|
|
135966
|
+
this.OnSize();
|
|
135967
|
+
}
|
|
135968
|
+
|
|
135969
|
+
|
|
135924
135970
|
/////////////////////////////////////////////////////////////////////////////
|
|
135925
135971
|
//对外接口
|
|
135926
135972
|
|
|
@@ -144467,7 +144513,7 @@ function HQChartScriptWorker()
|
|
|
144467
144513
|
|
|
144468
144514
|
|
|
144469
144515
|
|
|
144470
|
-
var HQCHART_VERSION="1.1.
|
|
144516
|
+
var HQCHART_VERSION="1.1.13950";
|
|
144471
144517
|
|
|
144472
144518
|
function PrintHQChartVersion()
|
|
144473
144519
|
{
|