hqchart 1.1.13933 → 1.1.13944

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.
@@ -54790,6 +54790,7 @@ function ChartCorssCursor()
54790
54790
  this.XRangeBGColor=g_JSChartResource.CorssCursorXRangeBGColor;
54791
54791
  this.TextHeight=20; //文本字体高度
54792
54792
  this.LastPoint;
54793
+ this.LastValue; //{ Y:{ Value:, Extend: } }
54793
54794
  this.CursorIndex;
54794
54795
  this.IsOnlyDrawKLine=false; //是否只能画在K线上 (手机端)
54795
54796
  this.IsOnlyDrawMinute=false; //是否只能画在走势图价格线上
@@ -55021,6 +55022,7 @@ function ChartCorssCursor()
55021
55022
  {
55022
55023
  this.Status=0;
55023
55024
  this.RightButton.Rect=null;
55025
+ this.LastValue=null;
55024
55026
 
55025
55027
  if (!this.LastPoint) return;
55026
55028
 
@@ -55173,6 +55175,8 @@ function ChartCorssCursor()
55173
55175
  var yValue=this.Frame.GetYData(y,yValueExtend);
55174
55176
  if ( (this.IsOnlyDrawMinute || this.IsShowClose) && this.Close != null) yValue=this.Close;
55175
55177
 
55178
+ this.LastValue={ Y:{ Value:yValue, Extend:yValueExtend }}; //缓存十字光标对应的数值
55179
+
55176
55180
  //this.StringFormatX.Value=xValue;
55177
55181
  this.StringFormatX.Value=this.CursorIndex;
55178
55182
  this.StringFormatX.Point={X:x, Y:y};
@@ -75059,12 +75063,14 @@ function JSChartLocalization()
75059
75063
  ['DialogTooltip-Exchange', {CN:'换手率', EN:'Exchange', TC:'換手'}],
75060
75064
  ['DialogTooltip-Position', {CN:'持仓量', EN:'Position', TC:'持倉'}],
75061
75065
  ['DialogTooltip-Price', {CN:'价格', EN:'Price', TC:'價格'}],
75066
+ ['DialogTooltip-AvPrice', {CN:'均价', EN:'AVPrice:', TC:'均價'}],
75062
75067
  ['DialogTooltip-FClose', {CN:"结算价", EN:'Settlement', TC:'結算價'}],
75063
75068
  ['DialogTooltip-Amplitude', {CN:'振幅', EN:'amplitude', TC:'價格'}],
75064
75069
  ['DialogTooltip-AC-Price', {CN:'匹配价', EN:'Price', TC:'匹配價'}],
75065
75070
  ['DialogTooltip-AC-AvPrice', {CN:'匹配均价', EN:'AVPrice', TC:'匹配均價'}],
75066
75071
  ['DialogTooltip-AC-Increase', {CN:'竞价涨幅', EN:'Increase', TC:'競價漲幅'}],
75067
75072
  ['DialogTooltip-AC-Vol', {CN:'匹配量', EN:'Vol', TC:'匹配量'}],
75073
+ ['DialogTooltip-Value', {CN:'数值', EN:'Value', TC:'数值'}],
75068
75074
 
75069
75075
  //走势图PC tooltip
75070
75076
  ['PCTooltip-Date', {CN:'日期', EN:'Date', TC:"日期"}],
@@ -83389,6 +83395,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
83389
83395
  IsShowCorss:this.ChartCorssCursor.IsShowCorss, //是否显示十字线
83390
83396
  KItem:kItem,
83391
83397
  Symbol:this.Symbol, Name:this.Name,
83398
+ LastValue:this.ChartCorssCursor.LastValue,
83392
83399
  };
83393
83400
 
83394
83401
 
@@ -84855,11 +84862,38 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
84855
84862
  this.MouseDrag=drag;
84856
84863
  this.PhoneTouchInfo={ Start:{X:touches[0].clientX, Y:touches[0].clientY }, End:{ X:touches[0].clientX, Y:touches[0].clientY } };
84857
84864
  this.SelectChartDrawPicture=null;
84865
+
84866
+ var bStartTimer=true; //长按计时开始
84867
+ if (this.EnableClickModel)
84868
+ {
84869
+ if (this.ClickModel.IsShowCorssCursor==true) bStartTimer=false;
84870
+ else bStartTimer= true;
84871
+ }
84872
+
84873
+ if (bStartTimer)
84874
+ {
84875
+ this.StopDragTimer();
84876
+ this.DragTimer = setTimeout(()=>{
84877
+ this.IsPress=true;
84878
+ if (drag.Click.X == drag.LastMove.X && drag.Click.Y == drag.LastMove.Y) //手指没有移动,出现十字光标
84879
+ {
84880
+ this.MouseDrag = null;
84881
+ //移动十字光标
84882
+ var x = drag.Click.X;
84883
+ var y = drag.Click.Y;
84884
+ if (this.EnableClickModel===true) this.ClickModel.IsShowCorssCursor=true;
84885
+ self.MoveCorssCursor(drag.Click,e);//移动十字光标
84886
+ }
84858
84887
 
84859
- if (this.EnableScrollUpDown==false)
84860
- T_ShowCorssCursor(); //移动十字光标
84861
- else if (this.IsClickShowCorssCursor)
84862
- T_ShowCorssCursor();
84888
+ }, this.PressTime);
84889
+ }
84890
+ else if (!this.EnableClickModel)
84891
+ {
84892
+ if (this.EnableScrollUpDown==false)
84893
+ T_ShowCorssCursor(); //移动十字光标
84894
+ else if (this.IsClickShowCorssCursor)
84895
+ T_ShowCorssCursor();
84896
+ }
84863
84897
  }
84864
84898
 
84865
84899
  if (this.EnableZoomIndexWindow)
@@ -88573,6 +88607,15 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
88573
88607
 
88574
88608
  this.OnTouchFinished=function()
88575
88609
  {
88610
+ if (this.EnableClickModel===true)
88611
+ {
88612
+ if (this.ClickModel.IsShowCorssCursor==true && this.TouchDrawCount>0) return;
88613
+
88614
+ this.ClickModel.IsShowCorssCursor=false;
88615
+ this.DrawDynamicInfo();
88616
+ return;
88617
+ }
88618
+
88576
88619
  if (this.CorssCursorTouchEnd===true) //手势离开十字光标消失
88577
88620
  {
88578
88621
  this.DrawDynamicInfo();
@@ -89201,6 +89244,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
89201
89244
  IsShowCorss:this.ChartCorssCursor.IsShowCorss, //是否显示十字线
89202
89245
  MinItem:minuteItem,
89203
89246
  Symbol:this.Symbol, Name:this.Name,
89247
+ LastValue:this.ChartCorssCursor.LastValue,
89204
89248
  };
89205
89249
 
89206
89250
 
@@ -143519,6 +143563,8 @@ function JSDialogTooltip()
143519
143563
 
143520
143564
  this.KItemCache=null;
143521
143565
  this.KItemCacheID=null;
143566
+ this.LastValueCache=null; //最后的鼠标位置对应的数值
143567
+ this.LastValueCacheID=null;
143522
143568
 
143523
143569
  this.Inital=function(hqchart, option)
143524
143570
  {
@@ -143683,10 +143729,23 @@ function JSDialogTooltip()
143683
143729
  if (this.HQChart.ClassName=='KLineChartContainer')
143684
143730
  {
143685
143731
  var strKItem=JSON.stringify(data.KItem);
143732
+ var strLastValue=JSON.stringify(data.LastValue);
143733
+ var bUpdata=false;
143686
143734
  if (this.KItemCacheID!=strKItem) //数据变动的才更新
143687
143735
  {
143688
143736
  this.KItemCache= JSON.parse(strKItem);
143689
143737
  this.KItemCacheID=strKItem;
143738
+ bUpdata=true;
143739
+ }
143740
+ if (data.LastValue && data.LastValue.Y && IFrameSplitOperator.IsNumber(data.LastValue.Y.Value) && this.LastValueCacheID!=strLastValue)
143741
+ {
143742
+ this.LastValueCache=JSON.parse(strLastValue);
143743
+ this.LastValueCacheID=strLastValue;
143744
+ bUpdata=true;
143745
+ }
143746
+
143747
+ if (bUpdata)
143748
+ {
143690
143749
  this.UpdateTableDOM();
143691
143750
  }
143692
143751
  else
@@ -143697,10 +143756,23 @@ function JSDialogTooltip()
143697
143756
  else if (this.HQChart.ClassName=='MinuteChartContainer')
143698
143757
  {
143699
143758
  var strKItem=JSON.stringify(data.MinItem);
143759
+ var strLastValue=JSON.stringify(data.LastValue);
143760
+ var bUpdata=false;
143700
143761
  if (this.KItemCacheID!=strKItem) //数据变动的才更新
143701
143762
  {
143702
143763
  this.KItemCache= JSON.parse(strKItem);
143703
143764
  this.KItemCacheID=strKItem;
143765
+ bUpdata=true;
143766
+ }
143767
+ if (data.LastValue && data.LastValue.Y && IFrameSplitOperator.IsNumber(data.LastValue.Y.Value) && this.LastValueCacheID!=strLastValue)
143768
+ {
143769
+ this.LastValueCache=JSON.parse(strLastValue);
143770
+ this.LastValueCacheID=strLastValue;
143771
+ bUpdata=true;
143772
+ }
143773
+
143774
+ if (bUpdata)
143775
+ {
143704
143776
  this.UpdateTableDOM();
143705
143777
  }
143706
143778
  }
@@ -143849,6 +143921,22 @@ function JSDialogTooltip()
143849
143921
  this.FormatAmplitude(data.High,data.Low,yClose,defaultfloatPrecision,'DialogTooltip-Amplitude',priceFormat),
143850
143922
  ];
143851
143923
 
143924
+ if (this.LastValueCache && this.LastValueCache.Y)
143925
+ {
143926
+ var item=this.LastValueCache.Y;
143927
+ var rowItem=null;
143928
+ if (item.Extend.FrameID==0)
143929
+ {
143930
+ rowItem=this.ForamtPrice(item.Value,null, defaultfloatPrecision,'DialogTooltip-Value',2);
143931
+ }
143932
+ else
143933
+ {
143934
+ rowItem=this.ForamtValue(item.Value, 2,'DialogTooltip-Value');
143935
+ }
143936
+
143937
+ if (rowItem) aryText.unshift(rowItem);
143938
+ }
143939
+
143852
143940
  if (this.Style==1)
143853
143941
  {
143854
143942
  if (timeItem) aryText.unshift(timeItem);
@@ -143897,14 +143985,31 @@ function JSDialogTooltip()
143897
143985
 
143898
143986
  aryText=
143899
143987
  [
143900
- this.ForamtDate(item.Date,this.Style==1?"YYYY/MM/DD":"YYYY/MM/DD/W",'DialogTooltip-Date' ),
143988
+ this.ForamtDate(item.Date,this.Style==1?"MM/DD/W":"YYYY/MM/DD/W",'DialogTooltip-Date' ),
143901
143989
  this.FormatTime(item.Time, null, "HH:MM", 'DialogTooltip-Time'),
143902
143990
  this.ForamtPrice(item.Close,item.YClose, defaultfloatPrecision,'DialogTooltip-Price', 1),
143991
+ this.ForamtPrice(item.AvPrice,item.YClose, defaultfloatPrecision,'DialogTooltip-AvPrice', 1),
143903
143992
  this.FormatRisefall(item.Close,item.YClose, defaultfloatPrecision,'DialogTooltip-Risefall'),
143904
143993
  this.FormatIncrease(item.Close,item.YClose,defaultfloatPrecision,'DialogTooltip-Increase', 1),
143905
143994
  this.FormatVol(item.Vol,'DialogTooltip-Vol' ),
143906
143995
  this.FormatAmount(item.Amount,'DialogTooltip-Amount' ),
143907
143996
  ];
143997
+
143998
+ if (this.LastValueCache && this.LastValueCache.Y)
143999
+ {
144000
+ var item=this.LastValueCache.Y;
144001
+ var rowItem=null;
144002
+ if (item.Extend.FrameID==0)
144003
+ {
144004
+ rowItem=this.ForamtPrice(item.Value,null, defaultfloatPrecision,'DialogTooltip-Value',2);
144005
+ }
144006
+ else
144007
+ {
144008
+ rowItem=this.ForamtValue(item.Value, 2,'DialogTooltip-Value');
144009
+ }
144010
+
144011
+ if (rowItem) aryText.splice(2,0,rowItem);
144012
+ }
143908
144013
  }
143909
144014
  else if (data.Type==1) //集合竞价
143910
144015
  {
@@ -143915,7 +144020,7 @@ function JSDialogTooltip()
143915
144020
  if (item.Ver===1) timeForamt="HH:MM"
143916
144021
  aryText=
143917
144022
  [
143918
- this.ForamtDate(item.Date,this.Style==1?"YYYY/MM/DD":"YYYY/MM/DD/W",'DialogTooltip-Date' ),
144023
+ this.ForamtDate(item.Date,this.Style==1?"MM/DD/W":"YYYY/MM/DD/W",'DialogTooltip-Date' ),
143919
144024
  this.FormatTime(item.Time, null, timeForamt, 'DialogTooltip-Time'),
143920
144025
  this.ForamtPrice(item.Price,item.YClose, defaultfloatPrecision,'DialogTooltip-AC-Price',1),
143921
144026
  this.FormatIncrease(item.Price,item.YClose,defaultfloatPrecision,'DialogTooltip-AC-Increase',1),
@@ -143987,7 +144092,7 @@ function JSDialogTooltip()
143987
144092
 
143988
144093
 
143989
144094
  /////////////////////////////////////////////////////////////////////////////////////////////
143990
- //数据格式化
144095
+ //数据格式化 format=0 点差+涨幅 1=涨幅
143991
144096
  this.ForamtPrice=function(price, yClose, defaultfloatPrecision, TitleID, format)
143992
144097
  {
143993
144098
  var item=
@@ -143999,6 +144104,13 @@ function JSDialogTooltip()
143999
144104
 
144000
144105
  if (!IFrameSplitOperator.IsNumber(price)) return item;
144001
144106
 
144107
+ if (format==2)
144108
+ {
144109
+ item.Text=price.toFixed(defaultfloatPrecision);
144110
+ item.Color=this.TitleColor;
144111
+ return item;
144112
+ }
144113
+
144002
144114
  if (IFrameSplitOperator.IsNumber(yClose) && format!=1)
144003
144115
  {
144004
144116
  var value=(price-yClose)/yClose*100;
@@ -144015,6 +144127,21 @@ function JSDialogTooltip()
144015
144127
  return item;
144016
144128
  }
144017
144129
 
144130
+ this.ForamtValue=function(value, defaultfloatPrecision, TitleID)
144131
+ {
144132
+ var item=
144133
+ {
144134
+ Title:g_JSChartLocalization.GetText(TitleID,this.LanguageID),
144135
+ Text:'--',
144136
+ Color:this.TitleColor
144137
+ };
144138
+
144139
+ if (!IFrameSplitOperator.IsNumber(value)) return item;
144140
+
144141
+ item.Text=IFrameSplitOperator.FormatValueStringV2(value,defaultfloatPrecision,2,this.LanguageID);
144142
+ return item;
144143
+ }
144144
+
144018
144145
  this.FormatVol=function(vol, TitleID)
144019
144146
  {
144020
144147
  var item=
@@ -144336,7 +144463,7 @@ function HQChartScriptWorker()
144336
144463
 
144337
144464
 
144338
144465
 
144339
- var HQCHART_VERSION="1.1.13932";
144466
+ var HQCHART_VERSION="1.1.13943";
144340
144467
 
144341
144468
  function PrintHQChartVersion()
144342
144469
  {