hqchart 1.1.14912 → 1.1.14919

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.14912",
3
+ "version": "1.1.14919",
4
4
  "description": "HQChart - H5, 微信小程序 沪深/港股/数字货币/期货/美股 K线图(kline),走势图,缩放,拖拽,十字光标,画图工具,截图,筹码图. 分析家语法,通达信语法,(麦语法),第3方数据对接",
5
5
  "main": "lib/main.js",
6
6
  "scripts": {
@@ -1125,6 +1125,13 @@ function JSFloatTooltip()
1125
1125
  Left:"UMyChart_Tooltip_Float_Text2_Span", //左对齐
1126
1126
  MarginLeft:'UMyChart_Tooltip_Float_Text3_Span',
1127
1127
  Right:"UMyChart_Tooltip_Float_Text_Span",
1128
+
1129
+
1130
+ }
1131
+
1132
+ this.TitleAlign=
1133
+ {
1134
+ Default:"UMyChart_Tooltip_Float_Title_Span", //标题默认
1128
1135
  }
1129
1136
 
1130
1137
  this.AryData=[]; //输出文字信息
@@ -1223,7 +1230,7 @@ function JSFloatTooltip()
1223
1230
  rowItem.TitleTd=tdDom;
1224
1231
 
1225
1232
  var spanDom=document.createElement("span");
1226
- spanDom.className='UMyChart_Tooltip_Float_Title_Span';
1233
+ spanDom.className=this.TitleAlign.Default;
1227
1234
  spanDom.innerText='标题';
1228
1235
  tdDom.appendChild(spanDom);
1229
1236
  rowItem.TitleSpan=spanDom;
@@ -1724,6 +1731,15 @@ function JSFloatTooltip()
1724
1731
  if (item.TextSpan.className!=this.ValueAlign.Right) item.TextSpan.className=this.ValueAlign.Right;
1725
1732
  }
1726
1733
 
1734
+ if (outItem.TitleClassName)
1735
+ {
1736
+ item.TitleSpan.className=outItem.TitleClassName;
1737
+ }
1738
+ else
1739
+ {
1740
+ if (item.TitleSpan.className!=this.TitleAlign.Default) item.TitleSpan.className=this.TitleAlign.Default;
1741
+ }
1742
+
1727
1743
  if (outItem.IsMergeCell) //合并单元格
1728
1744
  {
1729
1745
  item.TitleTd.colspan=2;
@@ -61867,7 +61867,7 @@ function DynamicChartTitlePainting()
61867
61867
  this.FormatValue=function(value,item)
61868
61868
  {
61869
61869
  if (item.StringFormat==STRING_FORMAT_TYPE.DEFAULT)
61870
- return IFrameSplitOperator.FormatValueString(value,item.FloatPrecision,this.LanguageID);
61870
+ return IFrameSplitOperator.FormatValueStringV2(value,item.FloatPrecision,2,this.LanguageID);
61871
61871
  else if (item.StringFormat==STRING_FORMAT_TYPE.THOUSANDS)
61872
61872
  return IFrameSplitOperator.FormatValueThousandsString(value,item.FloatPrecision);
61873
61873
  else if (item.StringFormat==STRING_FORMAT_TYPE.ORIGINAL)
@@ -494,6 +494,7 @@ function JSReportChartContainer(uielement)
494
494
 
495
495
  //MouseOnStatus:{ RowIndex:行, ColumnIndex:列}
496
496
  this.LastMouseStatus={ MoveStatus:null, TooltipStatus:null, MouseOnStatus:null };
497
+ this.RequestStatus={ IsFinishStockList:false, IsFinishMemberList:false }; //下载状态
497
498
 
498
499
  this.ChartDestroy=function() //销毁
499
500
  {
@@ -1032,6 +1033,8 @@ function JSReportChartContainer(uielement)
1032
1033
  var requestOption={ Callback:null };
1033
1034
  if (this.Symbol) requestOption.Callback=()=>{ this.RequestMemberListData(); };
1034
1035
  this.MapStockData=new Map();
1036
+ this.RequestStatus.IsFinishStockList=false;
1037
+ this.RequestStatus.IsFinishMemberList=false;
1035
1038
  this.RequestStockListData(requestOption);
1036
1039
  return;
1037
1040
  }
@@ -1143,10 +1146,12 @@ function JSReportChartContainer(uielement)
1143
1146
 
1144
1147
  this.RequestMemberListData=function()
1145
1148
  {
1149
+ if (this.RequestStatus.IsFinishStockList==false) return; //码表没有下完
1150
+
1146
1151
  //this.ChartSplashPaint.SetTitle(this.SplashTitle.MemberList);
1147
1152
  //this.ChartSplashPaint.EnableSplash(true);
1148
1153
  //this.Draw();
1149
-
1154
+ this.RequestStatus.IsFinishMemberList=false;
1150
1155
  var self=this;
1151
1156
  if (this.NetworkFilter)
1152
1157
  {
@@ -1200,6 +1205,30 @@ function JSReportChartContainer(uielement)
1200
1205
  if (IFrameSplitOperator.IsNumber(item.Count)) this.Data.Virtual.Count=item.Count;
1201
1206
  }
1202
1207
 
1208
+ this.RequestStatus.IsFinishMemberList=true;
1209
+
1210
+ //实时本地数据排序
1211
+ var chart=this.GetReportChart();
1212
+ if (chart && (this.SortInfo.Sort==1 || this.SortInfo.Sort==2) && IFrameSplitOperator.IsNumber(this.SortInfo.Field) && this.SortInfo.Field>=0)
1213
+ {
1214
+ var column=chart.Column[this.SortInfo.Field];
1215
+ var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_REPORT_LOCAL_SORT);
1216
+
1217
+ var bLocalSrot=true;
1218
+ if (event && event.Callback)
1219
+ {
1220
+ var sendData={ Column:column, SortInfo:this.SortInfo, SymbolList:this.Data.Data, Result:null, PreventDefault:false };
1221
+ event.Callback (event, sendData, this);
1222
+ if (event.PreventDefault)
1223
+ {
1224
+ bLocalSrot=false;
1225
+ if (Array.isArray(sendData.Result)) this.Data.Data=sendData.Result;
1226
+ }
1227
+ }
1228
+
1229
+ if (bLocalSrot) this.Data.Data.sort((left, right)=> { return this.LocalSort(left, right, column, this.SortInfo.Sort); });
1230
+ }
1231
+
1203
1232
  this.Draw();
1204
1233
  this.UpdateStockData();
1205
1234
  }
@@ -1311,6 +1340,7 @@ function JSReportChartContainer(uielement)
1311
1340
  //下载码表
1312
1341
  this.RequestStockListData=function(option)
1313
1342
  {
1343
+ this.RequestStatus.IsFinishStockList=false;
1314
1344
  this.ChartSplashPaint.SetTitle(this.SplashTitle.StockList);
1315
1345
  this.ChartSplashPaint.EnableSplash(true);
1316
1346
  this.Draw();
@@ -1366,6 +1396,8 @@ function JSReportChartContainer(uielement)
1366
1396
  }
1367
1397
  }
1368
1398
 
1399
+ this.RequestStatus.IsFinishStockList=true;
1400
+
1369
1401
  if (option && option.Callback)
1370
1402
  {
1371
1403
  option.Callback();
@@ -1509,6 +1541,9 @@ function JSReportChartContainer(uielement)
1509
1541
  var chart=this.ChartPaint[0];
1510
1542
  if (!chart) return;
1511
1543
 
1544
+ //列表还没有加载完成
1545
+ if (this.RequestStatus.IsFinishStockList==false || this.RequestStatus.IsFinishMemberList==false) return;
1546
+
1512
1547
  if (this.Data.Virtual && this.Data.Virtual.Enable)
1513
1548
  {
1514
1549
  this.RequestVirtualStockData(); //虚拟表格 全部取后台
@@ -65963,7 +65963,7 @@ function DynamicChartTitlePainting()
65963
65963
  this.FormatValue=function(value,item)
65964
65964
  {
65965
65965
  if (item.StringFormat==STRING_FORMAT_TYPE.DEFAULT)
65966
- return IFrameSplitOperator.FormatValueString(value,item.FloatPrecision,this.LanguageID);
65966
+ return IFrameSplitOperator.FormatValueStringV2(value,item.FloatPrecision,2,this.LanguageID);
65967
65967
  else if (item.StringFormat==STRING_FORMAT_TYPE.THOUSANDS)
65968
65968
  return IFrameSplitOperator.FormatValueThousandsString(value,item.FloatPrecision);
65969
65969
  else if (item.StringFormat==STRING_FORMAT_TYPE.ORIGINAL)
@@ -138193,6 +138193,7 @@ function JSReportChartContainer(uielement)
138193
138193
 
138194
138194
  //MouseOnStatus:{ RowIndex:行, ColumnIndex:列}
138195
138195
  this.LastMouseStatus={ MoveStatus:null, TooltipStatus:null, MouseOnStatus:null };
138196
+ this.RequestStatus={ IsFinishStockList:false, IsFinishMemberList:false }; //下载状态
138196
138197
 
138197
138198
  this.ChartDestroy=function() //销毁
138198
138199
  {
@@ -138731,6 +138732,8 @@ function JSReportChartContainer(uielement)
138731
138732
  var requestOption={ Callback:null };
138732
138733
  if (this.Symbol) requestOption.Callback=()=>{ this.RequestMemberListData(); };
138733
138734
  this.MapStockData=new Map();
138735
+ this.RequestStatus.IsFinishStockList=false;
138736
+ this.RequestStatus.IsFinishMemberList=false;
138734
138737
  this.RequestStockListData(requestOption);
138735
138738
  return;
138736
138739
  }
@@ -138842,10 +138845,12 @@ function JSReportChartContainer(uielement)
138842
138845
 
138843
138846
  this.RequestMemberListData=function()
138844
138847
  {
138848
+ if (this.RequestStatus.IsFinishStockList==false) return; //码表没有下完
138849
+
138845
138850
  //this.ChartSplashPaint.SetTitle(this.SplashTitle.MemberList);
138846
138851
  //this.ChartSplashPaint.EnableSplash(true);
138847
138852
  //this.Draw();
138848
-
138853
+ this.RequestStatus.IsFinishMemberList=false;
138849
138854
  var self=this;
138850
138855
  if (this.NetworkFilter)
138851
138856
  {
@@ -138899,6 +138904,30 @@ function JSReportChartContainer(uielement)
138899
138904
  if (IFrameSplitOperator.IsNumber(item.Count)) this.Data.Virtual.Count=item.Count;
138900
138905
  }
138901
138906
 
138907
+ this.RequestStatus.IsFinishMemberList=true;
138908
+
138909
+ //实时本地数据排序
138910
+ var chart=this.GetReportChart();
138911
+ if (chart && (this.SortInfo.Sort==1 || this.SortInfo.Sort==2) && IFrameSplitOperator.IsNumber(this.SortInfo.Field) && this.SortInfo.Field>=0)
138912
+ {
138913
+ var column=chart.Column[this.SortInfo.Field];
138914
+ var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_REPORT_LOCAL_SORT);
138915
+
138916
+ var bLocalSrot=true;
138917
+ if (event && event.Callback)
138918
+ {
138919
+ var sendData={ Column:column, SortInfo:this.SortInfo, SymbolList:this.Data.Data, Result:null, PreventDefault:false };
138920
+ event.Callback (event, sendData, this);
138921
+ if (event.PreventDefault)
138922
+ {
138923
+ bLocalSrot=false;
138924
+ if (Array.isArray(sendData.Result)) this.Data.Data=sendData.Result;
138925
+ }
138926
+ }
138927
+
138928
+ if (bLocalSrot) this.Data.Data.sort((left, right)=> { return this.LocalSort(left, right, column, this.SortInfo.Sort); });
138929
+ }
138930
+
138902
138931
  this.Draw();
138903
138932
  this.UpdateStockData();
138904
138933
  }
@@ -139010,6 +139039,7 @@ function JSReportChartContainer(uielement)
139010
139039
  //下载码表
139011
139040
  this.RequestStockListData=function(option)
139012
139041
  {
139042
+ this.RequestStatus.IsFinishStockList=false;
139013
139043
  this.ChartSplashPaint.SetTitle(this.SplashTitle.StockList);
139014
139044
  this.ChartSplashPaint.EnableSplash(true);
139015
139045
  this.Draw();
@@ -139065,6 +139095,8 @@ function JSReportChartContainer(uielement)
139065
139095
  }
139066
139096
  }
139067
139097
 
139098
+ this.RequestStatus.IsFinishStockList=true;
139099
+
139068
139100
  if (option && option.Callback)
139069
139101
  {
139070
139102
  option.Callback();
@@ -139208,6 +139240,9 @@ function JSReportChartContainer(uielement)
139208
139240
  var chart=this.ChartPaint[0];
139209
139241
  if (!chart) return;
139210
139242
 
139243
+ //列表还没有加载完成
139244
+ if (this.RequestStatus.IsFinishStockList==false || this.RequestStatus.IsFinishMemberList==false) return;
139245
+
139211
139246
  if (this.Data.Virtual && this.Data.Virtual.Enable)
139212
139247
  {
139213
139248
  this.RequestVirtualStockData(); //虚拟表格 全部取后台
@@ -151093,7 +151128,7 @@ function ScrollBarBGChart()
151093
151128
 
151094
151129
 
151095
151130
 
151096
- var HQCHART_VERSION="1.1.14911";
151131
+ var HQCHART_VERSION="1.1.14918";
151097
151132
 
151098
151133
  function PrintHQChartVersion()
151099
151134
  {
@@ -5,7 +5,7 @@
5
5
 
6
6
 
7
7
 
8
- var HQCHART_VERSION="1.1.14911";
8
+ var HQCHART_VERSION="1.1.14918";
9
9
 
10
10
  function PrintHQChartVersion()
11
11
  {
@@ -66007,7 +66007,7 @@ function DynamicChartTitlePainting()
66007
66007
  this.FormatValue=function(value,item)
66008
66008
  {
66009
66009
  if (item.StringFormat==STRING_FORMAT_TYPE.DEFAULT)
66010
- return IFrameSplitOperator.FormatValueString(value,item.FloatPrecision,this.LanguageID);
66010
+ return IFrameSplitOperator.FormatValueStringV2(value,item.FloatPrecision,2,this.LanguageID);
66011
66011
  else if (item.StringFormat==STRING_FORMAT_TYPE.THOUSANDS)
66012
66012
  return IFrameSplitOperator.FormatValueThousandsString(value,item.FloatPrecision);
66013
66013
  else if (item.StringFormat==STRING_FORMAT_TYPE.ORIGINAL)
@@ -138237,6 +138237,7 @@ function JSReportChartContainer(uielement)
138237
138237
 
138238
138238
  //MouseOnStatus:{ RowIndex:行, ColumnIndex:列}
138239
138239
  this.LastMouseStatus={ MoveStatus:null, TooltipStatus:null, MouseOnStatus:null };
138240
+ this.RequestStatus={ IsFinishStockList:false, IsFinishMemberList:false }; //下载状态
138240
138241
 
138241
138242
  this.ChartDestroy=function() //销毁
138242
138243
  {
@@ -138775,6 +138776,8 @@ function JSReportChartContainer(uielement)
138775
138776
  var requestOption={ Callback:null };
138776
138777
  if (this.Symbol) requestOption.Callback=()=>{ this.RequestMemberListData(); };
138777
138778
  this.MapStockData=new Map();
138779
+ this.RequestStatus.IsFinishStockList=false;
138780
+ this.RequestStatus.IsFinishMemberList=false;
138778
138781
  this.RequestStockListData(requestOption);
138779
138782
  return;
138780
138783
  }
@@ -138886,10 +138889,12 @@ function JSReportChartContainer(uielement)
138886
138889
 
138887
138890
  this.RequestMemberListData=function()
138888
138891
  {
138892
+ if (this.RequestStatus.IsFinishStockList==false) return; //码表没有下完
138893
+
138889
138894
  //this.ChartSplashPaint.SetTitle(this.SplashTitle.MemberList);
138890
138895
  //this.ChartSplashPaint.EnableSplash(true);
138891
138896
  //this.Draw();
138892
-
138897
+ this.RequestStatus.IsFinishMemberList=false;
138893
138898
  var self=this;
138894
138899
  if (this.NetworkFilter)
138895
138900
  {
@@ -138943,6 +138948,30 @@ function JSReportChartContainer(uielement)
138943
138948
  if (IFrameSplitOperator.IsNumber(item.Count)) this.Data.Virtual.Count=item.Count;
138944
138949
  }
138945
138950
 
138951
+ this.RequestStatus.IsFinishMemberList=true;
138952
+
138953
+ //实时本地数据排序
138954
+ var chart=this.GetReportChart();
138955
+ if (chart && (this.SortInfo.Sort==1 || this.SortInfo.Sort==2) && IFrameSplitOperator.IsNumber(this.SortInfo.Field) && this.SortInfo.Field>=0)
138956
+ {
138957
+ var column=chart.Column[this.SortInfo.Field];
138958
+ var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_REPORT_LOCAL_SORT);
138959
+
138960
+ var bLocalSrot=true;
138961
+ if (event && event.Callback)
138962
+ {
138963
+ var sendData={ Column:column, SortInfo:this.SortInfo, SymbolList:this.Data.Data, Result:null, PreventDefault:false };
138964
+ event.Callback (event, sendData, this);
138965
+ if (event.PreventDefault)
138966
+ {
138967
+ bLocalSrot=false;
138968
+ if (Array.isArray(sendData.Result)) this.Data.Data=sendData.Result;
138969
+ }
138970
+ }
138971
+
138972
+ if (bLocalSrot) this.Data.Data.sort((left, right)=> { return this.LocalSort(left, right, column, this.SortInfo.Sort); });
138973
+ }
138974
+
138946
138975
  this.Draw();
138947
138976
  this.UpdateStockData();
138948
138977
  }
@@ -139054,6 +139083,7 @@ function JSReportChartContainer(uielement)
139054
139083
  //下载码表
139055
139084
  this.RequestStockListData=function(option)
139056
139085
  {
139086
+ this.RequestStatus.IsFinishStockList=false;
139057
139087
  this.ChartSplashPaint.SetTitle(this.SplashTitle.StockList);
139058
139088
  this.ChartSplashPaint.EnableSplash(true);
139059
139089
  this.Draw();
@@ -139109,6 +139139,8 @@ function JSReportChartContainer(uielement)
139109
139139
  }
139110
139140
  }
139111
139141
 
139142
+ this.RequestStatus.IsFinishStockList=true;
139143
+
139112
139144
  if (option && option.Callback)
139113
139145
  {
139114
139146
  option.Callback();
@@ -139252,6 +139284,9 @@ function JSReportChartContainer(uielement)
139252
139284
  var chart=this.ChartPaint[0];
139253
139285
  if (!chart) return;
139254
139286
 
139287
+ //列表还没有加载完成
139288
+ if (this.RequestStatus.IsFinishStockList==false || this.RequestStatus.IsFinishMemberList==false) return;
139289
+
139255
139290
  if (this.Data.Virtual && this.Data.Virtual.Enable)
139256
139291
  {
139257
139292
  this.RequestVirtualStockData(); //虚拟表格 全部取后台
@@ -158953,6 +158988,13 @@ function JSFloatTooltip()
158953
158988
  Left:"UMyChart_Tooltip_Float_Text2_Span", //左对齐
158954
158989
  MarginLeft:'UMyChart_Tooltip_Float_Text3_Span',
158955
158990
  Right:"UMyChart_Tooltip_Float_Text_Span",
158991
+
158992
+
158993
+ }
158994
+
158995
+ this.TitleAlign=
158996
+ {
158997
+ Default:"UMyChart_Tooltip_Float_Title_Span", //标题默认
158956
158998
  }
158957
158999
 
158958
159000
  this.AryData=[]; //输出文字信息
@@ -159051,7 +159093,7 @@ function JSFloatTooltip()
159051
159093
  rowItem.TitleTd=tdDom;
159052
159094
 
159053
159095
  var spanDom=document.createElement("span");
159054
- spanDom.className='UMyChart_Tooltip_Float_Title_Span';
159096
+ spanDom.className=this.TitleAlign.Default;
159055
159097
  spanDom.innerText='标题';
159056
159098
  tdDom.appendChild(spanDom);
159057
159099
  rowItem.TitleSpan=spanDom;
@@ -159552,6 +159594,15 @@ function JSFloatTooltip()
159552
159594
  if (item.TextSpan.className!=this.ValueAlign.Right) item.TextSpan.className=this.ValueAlign.Right;
159553
159595
  }
159554
159596
 
159597
+ if (outItem.TitleClassName)
159598
+ {
159599
+ item.TitleSpan.className=outItem.TitleClassName;
159600
+ }
159601
+ else
159602
+ {
159603
+ if (item.TitleSpan.className!=this.TitleAlign.Default) item.TitleSpan.className=this.TitleAlign.Default;
159604
+ }
159605
+
159555
159606
  if (outItem.IsMergeCell) //合并单元格
159556
159607
  {
159557
159608
  item.TitleTd.colspan=2;
@@ -162426,7 +162477,7 @@ function HQChartScriptWorker()
162426
162477
 
162427
162478
 
162428
162479
 
162429
- var HQCHART_VERSION="1.1.14911";
162480
+ var HQCHART_VERSION="1.1.14918";
162430
162481
 
162431
162482
  function PrintHQChartVersion()
162432
162483
  {