hqchart 1.1.13960 → 1.1.13965

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.
@@ -47131,6 +47131,7 @@ function MinuteLeftTooltipPaint()
47131
47131
  this.DateTimeColor=g_JSChartResource.PCTooltipPaint.DateTimeColor; //日期时间颜色
47132
47132
  this.VolColor=g_JSChartResource.PCTooltipPaint.VolColor; //标题成交量
47133
47133
  this.AmountColor=g_JSChartResource.PCTooltipPaint.AmountColor; //成交金额
47134
+ this.PositionColor=g_JSChartResource.PCTooltipPaint.PositionColor; //持仓
47134
47135
  this.LanguageID=JSCHART_LANGUAGE_ID.LANGUAGE_CHINESE_ID;
47135
47136
  this.TitlePaint;
47136
47137
 
@@ -47304,6 +47305,12 @@ function MinuteLeftTooltipPaint()
47304
47305
 
47305
47306
  aryText.push(titleItem);
47306
47307
  }
47308
+
47309
+ if (isFutures && IFrameSplitOperator.IsNumber(item.Position)) //持仓
47310
+ {
47311
+ var titleItem=this.FormatPosition(item.Position,'PCTooltip-Position');
47312
+ if (titleItem) aryText.push(titleItem);
47313
+ }
47307
47314
  }
47308
47315
  else if (drawData.Type==1) //集合竞价
47309
47316
  {
@@ -47429,6 +47436,21 @@ function MinuteLeftTooltipPaint()
47429
47436
 
47430
47437
  return titleItem;
47431
47438
  }
47439
+
47440
+ this.FormatPosition=function(value, TitleID)
47441
+ {
47442
+ if (!IFrameSplitOperator.IsNumber(value)) return null;
47443
+
47444
+ var titleItem=
47445
+ {
47446
+ Title:g_JSChartLocalization.GetText(TitleID,this.LanguageID),
47447
+ TitleColor:this.TitleColor,
47448
+ Text:value.toFixed(0),
47449
+ TextColor:this.PositionColor
47450
+ };
47451
+
47452
+ return titleItem;
47453
+ }
47432
47454
  }
47433
47455
 
47434
47456
  //股票信息
@@ -73080,6 +73102,7 @@ function JSChartResource()
73080
73102
  DateTimeColor:'rgb(60,60,60)',
73081
73103
  VolColor:"rgb(60,60,60)", //标题成交量
73082
73104
  AmountColor:"rgb(60,60,60)", //成交金额
73105
+ PositionColor:"rgb(60,60,60)", //持仓量
73083
73106
  };
73084
73107
 
73085
73108
  this.PCTooltip= {
@@ -74086,6 +74109,8 @@ function JSChartResource()
74086
74109
  if (item.DateTimeColor) this.PCTooltipPaint.DateTimeColor=item.DateTimeColor;
74087
74110
  if (item.VolColor) this.PCTooltipPaint.VolColor=item.VolColor;
74088
74111
  if (item.AmountColor) this.PCTooltipPaint.AmountColor=item.AmountColor;
74112
+ if (item.PositionColor) this.PCTooltipPaint.PositionColor=item.PositionColor;
74113
+
74089
74114
  }
74090
74115
 
74091
74116
  if (style.DialogTooltip)
@@ -75096,6 +75121,7 @@ function JSChartLocalization()
75096
75121
  ['PCTooltip-Increase', {CN:'涨幅', EN:'Increase:', TC:'漲幅'}],
75097
75122
  ['PCTooltip-Vol', {CN:'成交量', EN:'Volume:', TC:'成交量'}],
75098
75123
  ['PCTooltip-Amount', {CN:'成交额', EN:'Amount:', TC:'成交額'}],
75124
+ ["PCTooltip-Position",{CN:'持仓量', EN:'Position:', TC:'持倉'}],
75099
75125
  ['PCTooltip-AC-Price', {CN:'匹配价:', EN:'Price:', TC:'匹配價'}],
75100
75126
  ['PCTooltip-AC-Increase', {CN:'竞价涨幅:', EN:'Increase:', TC:'競價漲幅'}],
75101
75127
  ['PCTooltip-AC-Vol', {CN:'匹配量:', EN:'V:', TC:'匹配量'}],
@@ -125592,6 +125618,7 @@ function GetBlackStyle()
125592
125618
  DateTimeColor:'rgb(210,210,210)',
125593
125619
  VolColor:"rgb(255, 185, 15)", //标题成交量
125594
125620
  AmountColor:"rgb(210,210,210)", //成交金额
125621
+ PositionColor:"rgb(255,215,0)", //持仓量
125595
125622
  },
125596
125623
 
125597
125624
  PCTooltipPaint:
@@ -127678,6 +127705,12 @@ function JSReportChart(divElement)
127678
127705
  if (IFrameSplitOperator.IsNumber(item.Sort)) chart.SortInfo.Sort=item.Sort;
127679
127706
  }
127680
127707
 
127708
+ if (option.VirtualTable)
127709
+ {
127710
+ var item=option.VirtualTable;
127711
+ if (IFrameSplitOperator.IsBool(item.Enable)) chart.Data.Virtual.Enable=item.Enable;
127712
+ }
127713
+
127681
127714
  var reportChart=chart.GetReportChart();
127682
127715
  if (reportChart)
127683
127716
  {
@@ -127892,7 +127925,7 @@ function JSReportChartContainer(uielement)
127892
127925
  this.Symbol; //板块代码
127893
127926
  this.Name; //板块名称
127894
127927
  this.NetworkFilter; //数据回调接口
127895
- this.Data={ XOffset:0, YOffset:0, Data:[] }; //股票列表
127928
+ this.Data={ XOffset:0, YOffset:0, Data:[], Virtual:{ Enable:false, Count:0 } }; //股票列表 (Virtual 虚拟表)
127896
127929
  this.SourceData={ Data:[] } ; //原始股票顺序(排序还原用)
127897
127930
  this.BlockData=new Map(); //当前板块数据
127898
127931
  this.MapStockData=new Map(); //原始股票数据
@@ -128261,6 +128294,7 @@ function JSReportChartContainer(uielement)
128261
128294
  {
128262
128295
  this.SourceData.Data=[];
128263
128296
  this.Data.Data=[];
128297
+ this.Data.Virtual.Count=0;
128264
128298
  this.BlockData=new Map();
128265
128299
  }
128266
128300
 
@@ -128517,6 +128551,12 @@ function JSReportChartContainer(uielement)
128517
128551
  }
128518
128552
  }
128519
128553
 
128554
+ if (recvData.Virtual) //虚拟表设置
128555
+ {
128556
+ var item=recvData.Virtual;
128557
+ if (IFrameSplitOperator.IsNumber(item.Count)) this.Data.Virtual.Count=item.Count;
128558
+ }
128559
+
128520
128560
  this.Draw();
128521
128561
  this.UpdateStockData();
128522
128562
  }
@@ -128742,6 +128782,12 @@ function JSReportChartContainer(uielement)
128742
128782
  var chart=this.ChartPaint[0];
128743
128783
  if (!chart) return;
128744
128784
 
128785
+ if (this.Data.Virtual && this.Data.Virtual.Enable)
128786
+ {
128787
+ this.RequestVirtualStockData(); //虚拟表格 全部取后台
128788
+ return;
128789
+ }
128790
+
128745
128791
  if (this.SortInfo && this.SortInfo.Field>=0 && this.SortInfo.Sort>0)
128746
128792
  {
128747
128793
  var column=chart.Column[this.SortInfo.Field];
@@ -130097,8 +130143,9 @@ function JSReportChartContainer(uielement)
130097
130143
  if (!chart) return false;
130098
130144
 
130099
130145
  var pageSize=chart.GetPageSize();
130100
- if (pageSize>this.Data.Data.length) return false;
130101
- if (this.Data.YOffset+pageSize>=this.Data.Data.length)
130146
+ var dataCount=chart.GetAllRowCount();
130147
+ if (pageSize>dataCount) return false;
130148
+ if (this.Data.YOffset+pageSize>=dataCount)
130102
130149
  {
130103
130150
  if (bCycle===true)
130104
130151
  {
@@ -130112,7 +130159,7 @@ function JSReportChartContainer(uielement)
130112
130159
  }
130113
130160
 
130114
130161
  this.Data.YOffset+=pageSize;
130115
- var showDataCount=this.Data.Data.length-this.Data.YOffset;
130162
+ var showDataCount=dataCount-this.Data.YOffset;
130116
130163
 
130117
130164
  if (chart.SelectedModel==0)
130118
130165
  {
@@ -130128,13 +130175,14 @@ function JSReportChartContainer(uielement)
130128
130175
  var chart=this.ChartPaint[0];
130129
130176
  if (!chart) return false;
130130
130177
  var pageSize=chart.GetPageSize();
130131
- if (pageSize>this.Data.Data.length) return false;
130178
+ var dataCount=chart.GetAllRowCount();
130179
+ if (pageSize>dataCount) return false;
130132
130180
 
130133
130181
  if (this.Data.YOffset<=0)
130134
130182
  {
130135
130183
  if (bCycle===true)
130136
130184
  {
130137
- this.Data.YOffset=this.Data.Data.length-pageSize; //循环到最后一页
130185
+ this.Data.YOffset=dataCount-pageSize; //循环到最后一页
130138
130186
  return true;
130139
130187
  }
130140
130188
  else
@@ -130572,7 +130620,16 @@ function JSReportChartContainer(uielement)
130572
130620
  if (column.Sort!=1 && column.Sort!=2) return false;
130573
130621
 
130574
130622
  var sortInfo={ Field:index, Sort:sortType };
130575
- if (sortInfo.Sort==0) //不排序还原
130623
+ if (this.Data.Virtual && this.Data.Virtual.Enable)
130624
+ {
130625
+ this.SortInfo.Field=sortInfo.Field;
130626
+ this.SortInfo.Sort=sortInfo.Sort;
130627
+ this.Data.YOffset=0;
130628
+ this.ResetReportSelectStatus();
130629
+ this.RequestVirtualStockData(); //虚拟表格
130630
+ return true;
130631
+ }
130632
+ else if (sortInfo.Sort==0) //不排序还原
130576
130633
  {
130577
130634
  this.Data.Data=[];
130578
130635
  if (IFrameSplitOperator.IsNonEmptyArray(this.SourceData.Data))
@@ -131298,6 +131355,70 @@ function JSReportChartContainer(uielement)
131298
131355
  if (bUpdate) this.Draw();
131299
131356
  }
131300
131357
 
131358
+ //虚拟表格 请求序号 所有数据后台返回
131359
+ this.RequestVirtualStockData=function()
131360
+ {
131361
+ var chart=this.ChartPaint[0];
131362
+ if (!chart) return;
131363
+
131364
+ var self=this;
131365
+ var startIndex=this.Data.YOffset;
131366
+ var pageSize=chart.GetPageSize();
131367
+ var endIndex=startIndex+pageSize;
131368
+ var dataCount=chart.GetAllRowCount();
131369
+ if (endIndex>=dataCount) endIndex=dataCount-1;
131370
+
131371
+ if (!this.NetworkFilter) return;
131372
+
131373
+ var requestData=
131374
+ {
131375
+ range:{ start:startIndex, end:endIndex, count:chart.GetAllRowCount() },
131376
+ column:null,
131377
+ sort:0, symbol:this.Symbol, name:this.Name,
131378
+ pageSize:pageSize
131379
+ }
131380
+
131381
+ if (this.SortInfo && this.SortInfo.Field>=0 && this.SortInfo.Sort>0) //排序
131382
+ {
131383
+ var column=chart.Column[this.SortInfo.Field];
131384
+ requestData.column={ name: column.Title, type: column.Type, index:this.SortInfo.Field, ID:column.ID };
131385
+ requestData.sort=this.SortInfo.Sort;
131386
+ }
131387
+
131388
+ var obj=
131389
+ {
131390
+ Name:'JSDealChartContainer::RequestVirtualStockData', //类名::函数名
131391
+ Explain:'报价列表股票数据(虚拟表格)',
131392
+ Request:
131393
+ {
131394
+ Data: requestData
131395
+ },
131396
+ Self:this,
131397
+ PreventDefault:false
131398
+ };
131399
+
131400
+ if (chart.FixedRowCount>0 && chart.FixedRowData.Type==1)
131401
+ {
131402
+ var arySymbol=[];
131403
+ for(var i=0;i<chart.FixedRowData.Symbol.length;++i)
131404
+ {
131405
+ var item=chart.FixedRowData.Symbol[i];
131406
+ if (item) arySymbol.push(item);
131407
+ }
131408
+
131409
+ obj.Request.FixedSymbol=arySymbol;
131410
+ }
131411
+
131412
+ this.NetworkFilter(obj, function(data)
131413
+ {
131414
+ self.RecvStockSortData(data);
131415
+ self.AutoUpdate();
131416
+ });
131417
+
131418
+ if (obj.PreventDefault==true) return;
131419
+
131420
+ }
131421
+
131301
131422
  //底部标签
131302
131423
  this.ShowPageInfo=function(bShow)
131303
131424
  {
@@ -131977,8 +132098,9 @@ function ChartReport()
131977
132098
  this.GetYScrollRange=function()
131978
132099
  {
131979
132100
  if (!IFrameSplitOperator.IsNonEmptyArray(this.Data.Data)) return 0;
132101
+ var dataCount=this.GetAllRowCount();
131980
132102
 
131981
- var maxOffset=this.Data.Data.length-this.RowCount;
132103
+ var maxOffset=dataCount-this.RowCount;
131982
132104
 
131983
132105
  return maxOffset;
131984
132106
  }
@@ -132554,6 +132676,14 @@ function ChartReport()
132554
132676
  this.Canvas.stroke();
132555
132677
  }
132556
132678
 
132679
+ //获取一共多少行
132680
+ this.GetAllRowCount=function()
132681
+ {
132682
+ var count=this.Data.Data.length;
132683
+ if (this.Data.Virtual && this.Data.Virtual.Enable) count=this.Data.Virtual.Count;
132684
+ return count;
132685
+ }
132686
+
132557
132687
  this.DrawBody=function()
132558
132688
  {
132559
132689
  if (!this.Data) return;
@@ -132593,7 +132723,8 @@ function ChartReport()
132593
132723
  var setSelected;
132594
132724
  if (this.MultiSelectModel==1) setSelected=new Set(this.MultiSelectedRow);
132595
132725
 
132596
- for(var i=this.Data.YOffset, j=0; i<this.Data.Data.length && j<this.RowCount ;++i, ++j)
132726
+ var dataCount=this.GetAllRowCount();
132727
+ for(var i=this.Data.YOffset, j=0; i<dataCount && j<this.RowCount ;++i, ++j)
132597
132728
  {
132598
132729
  var symbol=this.Data.Data[i];
132599
132730
 
@@ -144555,7 +144686,7 @@ function HQChartScriptWorker()
144555
144686
 
144556
144687
 
144557
144688
 
144558
- var HQCHART_VERSION="1.1.13959";
144689
+ var HQCHART_VERSION="1.1.13964";
144559
144690
 
144560
144691
  function PrintHQChartVersion()
144561
144692
  {