hqchart 1.1.15002 → 1.1.15006

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.
@@ -55814,35 +55814,69 @@ HQData.Minute_RequestMinuteData=function(data, callback)
55814
55814
  }
55815
55815
  */
55816
55816
 
55817
- var before=[];
55818
- var beforeinfo={ totalcount:60*10, ver:2.0, TimeConfig:{ AryTime:[{ Start:91500, End:92459, Date:srcStock.date }]} }; //9:15-9:25 集合竞价15分钟 1s一个数据
55819
- var price=srcStock.yclose+0.01;
55817
+ if (symbol=="000001.sh") //指数
55818
+ {
55819
+ var before=[];
55820
+ var beforeinfo={ totalcount:60*10, ver:3.0, TimeConfig:{ AryTime:[{ Start:91500, End:92459, Date:srcStock.date }]} }; //9:15-9:25 集合竞价15分钟 1s一个数据
55821
+ var price=srcStock.yclose+0.01;
55822
+ var vol=0;
55820
55823
 
55821
- var date=new Date(2021,5,2, 9,15, 0);
55822
- before=
55823
- [
55824
- [91505,price+0.01, 400, 300, 1, 800],
55825
- [91550,price+0.02, 550, 600, 0, 1500],
55826
- [91603,price+0.03, 300, 600, 1, 3600],
55827
- [91613,price+0.03, 150, 320, 1, 3600],
55828
- [91623,price+0.04, 200, 400, 1, 3600],
55829
- [91635,price+0.05, 100, 100, 1, 3600],
55830
- [91640,price+0.03, 350, 210, 2, 1600],
55831
- [91711,price+0.02, 3210, 350, 2, 3700],
55832
- [91731,price+0.04, 110, 450, 1, 3700],
55833
- [91825,price-0.01, 210, 650, 2, 3700],
55834
- [91855,price-0.02, 330, 440, 1, 1000],
55835
- [91915,price-0.03, 630, 640, 1, 1200],
55836
- [92022,price+0.01, 260, 550, 2, 1000],
55837
- [92304,price-0.02, 300, 100, 2, 1000],
55838
- [92314,price-0.03, 550, 150, 2, 1000],
55839
- [92344,price-0.04, 550, 150, 1, 1000],
55840
- [92357,price-0.05, 250, 750, 1, 1500],
55841
- [92405,price-0.07, 450, 50, 2, 1000],
55842
- [92435,price-0.08, 650, 250, 1, 1000],
55843
- [92458,price-0.12, 350, 350, 2, 1000],
55844
- ];
55845
-
55824
+ var date=new Date(2021,5,2, 9,15, 0);
55825
+ var testData={ Up:1, Max:srcStock.yclose*1.02, Min:srcStock.yclose*0.98 };
55826
+
55827
+ for(var i=0;i<beforeinfo.totalcount; ++i) //3s一个数据
55828
+ {
55829
+ var time=date.getHours()*10000+date.getMinutes()*100+date.getSeconds();
55830
+ vol=HQData.GetRandomTestData(100,500)*1000;
55831
+ var item=[ time, price, price+0.04, vol, 3, vol*1.3 ];
55832
+ before.push(item);
55833
+
55834
+ if (price>testData.Max && testData.Up===1)
55835
+ testData.Up=0;
55836
+ else if (price<testData.Min && testData.Up===0)
55837
+ testData.Up=1;
55838
+
55839
+ var value=HQData.GetRandomTestData(1,10)/100;
55840
+ if (testData.Up==1) price+=value;
55841
+ else price-=value;
55842
+
55843
+ date.setSeconds(date.getSeconds()+3);
55844
+ time=date.getHours()*10000+date.getMinutes()*100+date.getSeconds();
55845
+ if (time>92500) break;
55846
+ }
55847
+
55848
+ }
55849
+ else //股票
55850
+ {
55851
+ var before=[];
55852
+ var beforeinfo={ totalcount:60*10, ver:2.0, TimeConfig:{ AryTime:[{ Start:91500, End:92459, Date:srcStock.date }]} }; //9:15-9:25 集合竞价15分钟 1s一个数据
55853
+ var price=srcStock.yclose+0.01;
55854
+
55855
+ var date=new Date(2021,5,2, 9,15, 0);
55856
+ before=
55857
+ [
55858
+ [91505,price+0.01, 400, 300, 1, 800],
55859
+ [91550,price+0.02, 550, 600, 0, 1500],
55860
+ [91603,price+0.03, 300, 600, 1, 3600],
55861
+ [91613,price+0.03, 150, 320, 1, 3600],
55862
+ [91623,price+0.04, 200, 400, 1, 3600],
55863
+ [91635,price+0.05, 100, 100, 1, 3600],
55864
+ [91640,price+0.03, 350, 210, 2, 1600],
55865
+ [91711,price+0.02, 3210, 350, 2, 3700],
55866
+ [91731,price+0.04, 110, 450, 1, 3700],
55867
+ [91825,price-0.01, 210, 650, 2, 3700],
55868
+ [91855,price-0.02, 330, 440, 1, 1000],
55869
+ [91915,price-0.03, 630, 640, 1, 1200],
55870
+ [92022,price+0.01, 260, 550, 2, 1000],
55871
+ [92304,price-0.02, 300, 100, 2, 1000],
55872
+ [92314,price-0.03, 550, 150, 2, 1000],
55873
+ [92344,price-0.04, 550, 150, 1, 1000],
55874
+ [92357,price-0.05, 250, 750, 1, 1500],
55875
+ [92405,price-0.07, 450, 50, 2, 1000],
55876
+ [92435,price-0.08, 650, 250, 1, 1000],
55877
+ [92458,price-0.12, 350, 350, 2, 1000],
55878
+ ];
55879
+ }
55846
55880
 
55847
55881
  stockItem.before=before;
55848
55882
  stockItem.beforeinfo=beforeinfo;
@@ -55925,27 +55959,51 @@ HQData.Minute_RequestMinuteData=function(data, callback)
55925
55959
  }
55926
55960
  */
55927
55961
 
55928
- var afterData=[]
55929
- var afterInfo={ ver:2.0, totalcount:60*3, TimeConfig:{ AryTime:[{ Start:145700, End:145959, Date:srcStock.date }]} } //14:57-15:00
55930
- if (stockItem.minute.length>=240)
55962
+ if (symbol=="000001.sh") //指数
55931
55963
  {
55932
- afterData=
55933
- [
55934
- [145708,price+0.01, 400, 300, 1, 800],
55935
- [145718,price+0.02, 550, 600, 0, 1500],
55936
- [145738,price+0.02, 150, 800, 0, 1500],
55937
- [145748,price+0.02, 150, 800, 0, 1500],
55938
- [145803,price+0.03, 300, 600, 1, 3600],
55939
- [145815,price+0.03, 350, 210, 2, 1600],
55940
- [145826,price+0.02, 1210, 350, 2, 2700],
55941
- [145833,price+0.01, 260, 550, 2, 1000],
55942
- [145845,price+0.02, 160, 750, 2, 1000],
55943
- [145858,price-0.01, 460, 650, 2, 1500],
55944
- [145905,price-0.02, 160, 450, 1, 1500],
55945
- [145928,price-0.02, 260, 250, 1, 1500],
55946
- [145948,price-0.02, 860, 150, 1, 1500],
55947
- ];
55964
+ var afterData=[]
55965
+ var afterInfo={ ver:3.0, totalcount:60*3, TimeConfig:{ AryTime:[{ Start:145700, End:145959, Date:srcStock.date }]} } //14:57-15:00
55966
+ var date=new Date(2021,5,2, 14,57, 0);
55967
+ var vol=0;
55968
+ for(var i=0;i<afterInfo.totalcount; ++i) //1s一个数据
55969
+ {
55970
+ var time=date.getHours()*10000+date.getMinutes()*100+date.getSeconds();
55971
+
55972
+ vol=HQData.GetRandomTestData(100,500)*1000;
55973
+ var item=[ time, price, price+0.04, vol, 3, vol*1.3 ];
55974
+
55975
+ afterData.push(item);
55976
+
55977
+ date.setSeconds(date.getSeconds()+3);
55978
+ var time=date.getHours()*10000+date.getMinutes()*100+date.getSeconds();
55979
+ if (time>145959) break;
55980
+ }
55981
+ }
55982
+ else
55983
+ {
55984
+ var afterData=[]
55985
+ var afterInfo={ ver:2.0, totalcount:60*3, TimeConfig:{ AryTime:[{ Start:145700, End:145959, Date:srcStock.date }]} } //14:57-15:00
55986
+ if (stockItem.minute.length>=240)
55987
+ {
55988
+ afterData=
55989
+ [
55990
+ [145708,price+0.01, 400, 300, 1, 800],
55991
+ [145718,price+0.02, 550, 600, 0, 1500],
55992
+ [145738,price+0.02, 150, 800, 0, 1500],
55993
+ [145748,price+0.02, 150, 800, 0, 1500],
55994
+ [145803,price+0.03, 300, 600, 1, 3600],
55995
+ [145815,price+0.03, 350, 210, 2, 1600],
55996
+ [145826,price+0.02, 1210, 350, 2, 2700],
55997
+ [145833,price+0.01, 260, 550, 2, 1000],
55998
+ [145845,price+0.02, 160, 750, 2, 1000],
55999
+ [145858,price-0.01, 460, 650, 2, 1500],
56000
+ [145905,price-0.02, 160, 450, 1, 1500],
56001
+ [145928,price-0.02, 260, 250, 1, 1500],
56002
+ [145948,price-0.02, 860, 150, 1, 1500],
56003
+ ];
56004
+ }
55948
56005
  }
56006
+
55949
56007
  stockItem.after=afterData;
55950
56008
  stockItem.afterinfo=afterInfo;
55951
56009
  }
@@ -55999,16 +56057,50 @@ HQData.Minute_RequestMinuteUpdateData=function(data, callback)
55999
56057
 
56000
56058
  if (callcation.Before)
56001
56059
  {
56002
- var beforeinfo={ totalcount:60*10, ver:2.0, TimeConfig:{ AryTime:[{ Start:91500, End:92459, Date:srcStock.date }]} }; //9:15-9:25 集合竞价15分钟 1s一个数据
56003
- var price=srcStock.yclose-0.01;
56004
- var before=
56005
- [
56006
- [92344,price-0.03, 150, 150, 2, 1000],
56007
- [92357,price-0.04, 250, 250, 2, 1500],
56008
- [92405,price-0.05, 350, 350, 1, 1000],
56009
- [92435,price-0.06, 450, 450, 1, 1000],
56010
- [92458,price-0.07, 550, 550, 2, 1000],
56011
- ];
56060
+ if (symbol=="000001.sh") //指数
56061
+ {
56062
+ var before=[];
56063
+ var beforeinfo={ totalcount:60*10, ver:3.0, TimeConfig:{ AryTime:[{ Start:91500, End:92459, Date:srcStock.date }]} }; //9:15-9:25 集合竞价15分钟 1s一个数据
56064
+ var price=srcStock.yclose+0.01;
56065
+ var vol=0;
56066
+
56067
+ var date=new Date(2021,5,2, 9,15, 0);
56068
+ var testData={ Value:0.01, Up:1, Max:srcStock.yclose*1.02, Min:srcStock.yclose*0.98 };
56069
+
56070
+ for(var i=0;i<beforeinfo.totalcount; ++i) //3s一个数据
56071
+ {
56072
+ vol=HQData.GetRandomTestData(100,500)*1000;
56073
+ var time=date.getHours()*10000+date.getMinutes()*100+date.getSeconds();
56074
+ var item=[ time, price, price+0.04, vol, 3, vol*1.3 ];
56075
+ before.push(item);
56076
+
56077
+ if (price>testData.Max && testData.Up===1)
56078
+ testData.Up=0;
56079
+ else if (price<testData.Min && testData.Up===0)
56080
+ testData.Up=1;
56081
+
56082
+ var value=HQData.GetRandomTestData(1,10)/100;
56083
+ if (testData.Up==1) price+=value;
56084
+ else price-=value;
56085
+
56086
+ date.setSeconds(date.getSeconds()+3);
56087
+ time=date.getHours()*10000+date.getMinutes()*100+date.getSeconds();
56088
+ if (time>92500) break;
56089
+ }
56090
+ }
56091
+ else
56092
+ {
56093
+ var beforeinfo={ totalcount:60*10, ver:2.0, TimeConfig:{ AryTime:[{ Start:91500, End:92459, Date:srcStock.date }]} }; //9:15-9:25 集合竞价15分钟 1s一个数据
56094
+ var price=srcStock.yclose-0.01;
56095
+ var before=
56096
+ [
56097
+ [92344,price-0.03, 150, 150, 2, 1000],
56098
+ [92357,price-0.04, 250, 250, 2, 1500],
56099
+ [92405,price-0.05, 350, 350, 1, 1000],
56100
+ [92435,price-0.06, 450, 450, 1, 1000],
56101
+ [92458,price-0.07, 550, 550, 2, 1000],
56102
+ ];
56103
+ }
56012
56104
 
56013
56105
  stockItem.before=before;
56014
56106
  stockItem.beforeinfo=beforeinfo;
@@ -56016,30 +56108,57 @@ HQData.Minute_RequestMinuteUpdateData=function(data, callback)
56016
56108
 
56017
56109
  if (callcation.After)
56018
56110
  {
56019
- var afterInfo={ totalcount:60*10, ver:2.0, TimeConfig:{ AryTime:[{ Start:145700, End:145959, Date:srcStock.date }]} }; //9:15-9:25 集合竞价15分钟 1s一个数据
56020
- var afterData=[];
56021
-
56022
- if (IFrameSplitOperator.IsNonEmptyArray(lastItem) && lastItem[1]>=1457)
56111
+ if (symbol=="000001.sh") //指数
56023
56112
  {
56024
- var price=lastItem[5];
56025
- afterData=
56026
- [
56027
- [145708,price+0.01, 400, 300, 1, 800],
56028
- [145718,price+0.02, 550, 600, 0, 1500],
56029
- [145738,price+0.02, 150, 800, 0, 1500],
56030
- [145748,price+0.02, 150, 800, 0, 1500],
56031
- [145803,price+0.03, 300, 600, 1, 3600],
56032
- [145815,price+0.03, 350, 210, 2, 1600],
56033
- [145826,price+0.02, 1210, 350, 2, 2700],
56034
- [145833,price+0.01, 260, 550, 2, 1000],
56035
- [145845,price+0.02, 160, 750, 2, 1000],
56036
- [145858,price-0.01, 460, 650, 2, 1500],
56037
- [145905,price-0.02, 160, 450, 1, 1500],
56038
- [145928,price-0.02, 260, 250, 1, 1500],
56039
- [145948,price-0.02, 860, 150, 1, 1500],
56040
- ];
56113
+ var afterData=[]
56114
+ var afterInfo={ ver:3.0, totalcount:60*3, TimeConfig:{ AryTime:[{ Start:145700, End:145959, Date:srcStock.date }]} } //14:57-15:00
56115
+ if (IFrameSplitOperator.IsNonEmptyArray(lastItem) && lastItem[1]>=1457)
56116
+ {
56117
+ var price=lastItem[5];
56118
+ var date=new Date(2021,5,2, 14,57, 0);
56119
+ var vol=0;
56120
+ for(var i=0;i<afterInfo.totalcount; ++i) //1s一个数据
56121
+ {
56122
+ var time=date.getHours()*10000+date.getMinutes()*100+date.getSeconds();
56123
+
56124
+ vol=HQData.GetRandomTestData(100,500)*1000;
56125
+ var item=[ time, price, price+0.04, vol, 3, vol*1.3 ];
56126
+
56127
+ afterData.push(item);
56128
+
56129
+ date.setSeconds(date.getSeconds()+3);
56130
+ var time=date.getHours()*10000+date.getMinutes()*100+date.getSeconds();
56131
+ if (time>145959) break;
56132
+ }
56133
+ }
56041
56134
  }
56135
+ else
56136
+ {
56137
+ var afterInfo={ totalcount:60*10, ver:2.0, TimeConfig:{ AryTime:[{ Start:145700, End:145959, Date:srcStock.date }]} }; //9:15-9:25 集合竞价15分钟 1s一个数据
56138
+ var afterData=[];
56042
56139
 
56140
+ if (IFrameSplitOperator.IsNonEmptyArray(lastItem) && lastItem[1]>=1457)
56141
+ {
56142
+ var price=lastItem[5];
56143
+ afterData=
56144
+ [
56145
+ [145708,price+0.01, 400, 300, 1, 800],
56146
+ [145718,price+0.02, 550, 600, 0, 1500],
56147
+ [145738,price+0.02, 150, 800, 0, 1500],
56148
+ [145748,price+0.02, 150, 800, 0, 1500],
56149
+ [145803,price+0.03, 300, 600, 1, 3600],
56150
+ [145815,price+0.03, 350, 210, 2, 1600],
56151
+ [145826,price+0.02, 1210, 350, 2, 2700],
56152
+ [145833,price+0.01, 260, 550, 2, 1000],
56153
+ [145845,price+0.02, 160, 750, 2, 1000],
56154
+ [145858,price-0.01, 460, 650, 2, 1500],
56155
+ [145905,price-0.02, 160, 450, 1, 1500],
56156
+ [145928,price-0.02, 260, 250, 1, 1500],
56157
+ [145948,price-0.02, 860, 150, 1, 1500],
56158
+ ];
56159
+ }
56160
+ }
56161
+
56043
56162
  stockItem.after=afterData;
56044
56163
  stockItem.afterinfo=afterInfo;
56045
56164
  }
@@ -17665,6 +17665,7 @@ function AverageWidthFrame()
17665
17665
  {
17666
17666
  var x=mouseOnToolbar.Point.X;
17667
17667
  var y=mouseOnToolbar.Point.Y+20;
17668
+ if (y+textHeight>border.ChartHeight) y=mouseOnToolbar.Point.Y-5-textHeight;
17668
17669
  }
17669
17670
  else if (JSCHART_BUTTON_ID.CLOSE_BEFOREOPEN_ID==mouseOnToolbar.Item.ID)
17670
17671
  {
@@ -138937,10 +138938,18 @@ function JSReportChart(divElement)
138937
138938
  if (IFrameSplitOperator.IsBool(option.EnableDragRow)) chart.EnableDragRow=option.EnableDragRow;
138938
138939
  if (IFrameSplitOperator.IsNumber(option.DragRowType)) chart.DragRowType=option.DragRowType;
138939
138940
  if (IFrameSplitOperator.IsBool(option.EnableDragHeader)) chart.EnableDragHeader=option.EnableDragHeader;
138940
- if (IFrameSplitOperator.IsNumber(option.WheelPageType)) chart.WheelPageType=option.WheelPageType;
138941
+ if (IFrameSplitOperator.IsNumber(option.WheelPageType)) chart.WheelPageConfig.Type=option.WheelPageType;
138941
138942
  if (IFrameSplitOperator.IsBool(option.PageUpDownCycle)) chart.PageUpDownCycle=option.PageUpDownCycle;
138942
138943
  if (IFrameSplitOperator.IsBool(option.EnablePageUpdate)) chart.EnablePageUpdate=option.EnablePageUpdate;
138943
138944
 
138945
+ if (option.WheelPage)
138946
+ {
138947
+ var item=option.WheelPage;
138948
+ if (IFrameSplitOperator.IsNumber(item.Type)) chart.WheelPageConfig.Type=item.Type;
138949
+ if (IFrameSplitOperator.IsPlusNumber(item.RowStep)) chart.WheelPageConfig.RowStep=item.RowStep;
138950
+ if (IFrameSplitOperator.IsBool(item.EnableCtrlTurn)) chart.WheelPageConfig.EnableCtrlTurn=item.EnableCtrlTurn;
138951
+ }
138952
+
138944
138953
  //数据下载提示信息
138945
138954
  if (IFrameSplitOperator.IsObject(option.SplashTitle))
138946
138955
  {
@@ -139231,7 +139240,13 @@ function JSReportChartContainer(uielement)
139231
139240
 
139232
139241
  this.PageUpDownCycle=true; //翻页循环
139233
139242
  this.DragPageCycle=true; //手机翻页循环
139234
- this.WheelPageType=0; //鼠标滚轴翻页模式 0=一页一页翻 1=一条一条翻
139243
+ //this.WheelPageType=0; //鼠标滚轴翻页模式 0=一页一页翻 1=一条一条翻
139244
+
139245
+ //鼠标滚轴配置
139246
+ // Type:0=一页一页翻 1=一条一条翻,
139247
+ // RowStep:单条数据滚动步长
139248
+ // EnableCtrlTurn Ctrl+滚轴翻页
139249
+ this.WheelPageConfig={ Type:0, RowStep:1, EnableCtrlTurn:false }
139235
139250
 
139236
139251
  //拖拽滚动条
139237
139252
  this.DragXScroll=null; //{Start:{x,y}, End:{x, y}}
@@ -140746,14 +140761,17 @@ function JSReportChartContainer(uielement)
140746
140761
  if (!IFrameSplitOperator.IsObjectExist(e.wheelDelta))
140747
140762
  wheelValue=e.deltaY* -0.01;
140748
140763
 
140749
- if (this.WheelPageType==1)
140764
+ var type=this.WheelPageConfig.Type;
140765
+ if (this.WheelPageConfig.EnableCtrlTurn && e && e.ctrlKey) type=0; //ctrl 翻页
140766
+
140767
+ if (type)
140750
140768
  {
140751
- console.log(`[OnWheel] wheelValue=${wheelValue}`);
140769
+ var step=this.WheelPageConfig.RowStep;
140752
140770
  if (wheelValue<0) //下
140753
140771
  {
140754
140772
  this.LastMouseStatus.TooltipStatus=null;
140755
140773
  this.HideAllTooltip();
140756
- if (this.GotoNextItem(1))
140774
+ if (this.GotoNextItem(step))
140757
140775
  {
140758
140776
  this.Draw();
140759
140777
  this.DelayUpdateStockData();
@@ -140763,7 +140781,7 @@ function JSReportChartContainer(uielement)
140763
140781
  {
140764
140782
  this.LastMouseStatus.TooltipStatus=null;
140765
140783
  this.HideAllTooltip();
140766
- if (this.GotoNextItem(-1))
140784
+ if (this.GotoNextItem(step*-1))
140767
140785
  {
140768
140786
  this.Draw();
140769
140787
  this.DelayUpdateStockData();
@@ -163872,7 +163890,7 @@ function HQChartScriptWorker()
163872
163890
 
163873
163891
 
163874
163892
 
163875
- var HQCHART_VERSION="1.1.15001";
163893
+ var HQCHART_VERSION="1.1.15005";
163876
163894
 
163877
163895
  function PrintHQChartVersion()
163878
163896
  {