hqchart 1.1.13933 → 1.1.13946

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)
@@ -84941,6 +84975,10 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
84941
84975
  drag.LastMove.X=touches[0].clientX;
84942
84976
  drag.LastMove.Y=touches[0].clientY;
84943
84977
  }
84978
+ else if (this.EnableClickModel && this.ClickModel.IsShowCorssCursor===false)
84979
+ {
84980
+ //点击模式 十字光标隐藏 不做任何操作
84981
+ }
84944
84982
  else
84945
84983
  {
84946
84984
  //上下滚动
@@ -88573,6 +88611,15 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
88573
88611
 
88574
88612
  this.OnTouchFinished=function()
88575
88613
  {
88614
+ if (this.EnableClickModel===true)
88615
+ {
88616
+ if (this.ClickModel.IsShowCorssCursor==true && this.TouchDrawCount>0) return;
88617
+
88618
+ this.ClickModel.IsShowCorssCursor=false;
88619
+ this.DrawDynamicInfo();
88620
+ return;
88621
+ }
88622
+
88576
88623
  if (this.CorssCursorTouchEnd===true) //手势离开十字光标消失
88577
88624
  {
88578
88625
  this.DrawDynamicInfo();
@@ -89201,6 +89248,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
89201
89248
  IsShowCorss:this.ChartCorssCursor.IsShowCorss, //是否显示十字线
89202
89249
  MinItem:minuteItem,
89203
89250
  Symbol:this.Symbol, Name:this.Name,
89251
+ LastValue:this.ChartCorssCursor.LastValue,
89204
89252
  };
89205
89253
 
89206
89254
 
@@ -143519,6 +143567,8 @@ function JSDialogTooltip()
143519
143567
 
143520
143568
  this.KItemCache=null;
143521
143569
  this.KItemCacheID=null;
143570
+ this.LastValueCache=null; //最后的鼠标位置对应的数值
143571
+ this.LastValueCacheID=null;
143522
143572
 
143523
143573
  this.Inital=function(hqchart, option)
143524
143574
  {
@@ -143683,10 +143733,23 @@ function JSDialogTooltip()
143683
143733
  if (this.HQChart.ClassName=='KLineChartContainer')
143684
143734
  {
143685
143735
  var strKItem=JSON.stringify(data.KItem);
143736
+ var strLastValue=JSON.stringify(data.LastValue);
143737
+ var bUpdata=false;
143686
143738
  if (this.KItemCacheID!=strKItem) //数据变动的才更新
143687
143739
  {
143688
143740
  this.KItemCache= JSON.parse(strKItem);
143689
143741
  this.KItemCacheID=strKItem;
143742
+ bUpdata=true;
143743
+ }
143744
+ if (data.LastValue && data.LastValue.Y && IFrameSplitOperator.IsNumber(data.LastValue.Y.Value) && this.LastValueCacheID!=strLastValue)
143745
+ {
143746
+ this.LastValueCache=JSON.parse(strLastValue);
143747
+ this.LastValueCacheID=strLastValue;
143748
+ bUpdata=true;
143749
+ }
143750
+
143751
+ if (bUpdata)
143752
+ {
143690
143753
  this.UpdateTableDOM();
143691
143754
  }
143692
143755
  else
@@ -143697,10 +143760,23 @@ function JSDialogTooltip()
143697
143760
  else if (this.HQChart.ClassName=='MinuteChartContainer')
143698
143761
  {
143699
143762
  var strKItem=JSON.stringify(data.MinItem);
143763
+ var strLastValue=JSON.stringify(data.LastValue);
143764
+ var bUpdata=false;
143700
143765
  if (this.KItemCacheID!=strKItem) //数据变动的才更新
143701
143766
  {
143702
143767
  this.KItemCache= JSON.parse(strKItem);
143703
143768
  this.KItemCacheID=strKItem;
143769
+ bUpdata=true;
143770
+ }
143771
+ if (data.LastValue && data.LastValue.Y && IFrameSplitOperator.IsNumber(data.LastValue.Y.Value) && this.LastValueCacheID!=strLastValue)
143772
+ {
143773
+ this.LastValueCache=JSON.parse(strLastValue);
143774
+ this.LastValueCacheID=strLastValue;
143775
+ bUpdata=true;
143776
+ }
143777
+
143778
+ if (bUpdata)
143779
+ {
143704
143780
  this.UpdateTableDOM();
143705
143781
  }
143706
143782
  }
@@ -143849,6 +143925,22 @@ function JSDialogTooltip()
143849
143925
  this.FormatAmplitude(data.High,data.Low,yClose,defaultfloatPrecision,'DialogTooltip-Amplitude',priceFormat),
143850
143926
  ];
143851
143927
 
143928
+ if (this.LastValueCache && this.LastValueCache.Y)
143929
+ {
143930
+ var item=this.LastValueCache.Y;
143931
+ var rowItem=null;
143932
+ if (item.Extend.FrameID==0)
143933
+ {
143934
+ rowItem=this.ForamtPrice(item.Value,null, defaultfloatPrecision,'DialogTooltip-Value',2);
143935
+ }
143936
+ else
143937
+ {
143938
+ rowItem=this.ForamtValue(item.Value, 2,'DialogTooltip-Value');
143939
+ }
143940
+
143941
+ if (rowItem) aryText.unshift(rowItem);
143942
+ }
143943
+
143852
143944
  if (this.Style==1)
143853
143945
  {
143854
143946
  if (timeItem) aryText.unshift(timeItem);
@@ -143897,14 +143989,31 @@ function JSDialogTooltip()
143897
143989
 
143898
143990
  aryText=
143899
143991
  [
143900
- this.ForamtDate(item.Date,this.Style==1?"YYYY/MM/DD":"YYYY/MM/DD/W",'DialogTooltip-Date' ),
143992
+ this.ForamtDate(item.Date,this.Style==1?"MM/DD/W":"YYYY/MM/DD/W",'DialogTooltip-Date' ),
143901
143993
  this.FormatTime(item.Time, null, "HH:MM", 'DialogTooltip-Time'),
143902
143994
  this.ForamtPrice(item.Close,item.YClose, defaultfloatPrecision,'DialogTooltip-Price', 1),
143995
+ this.ForamtPrice(item.AvPrice,item.YClose, defaultfloatPrecision,'DialogTooltip-AvPrice', 1),
143903
143996
  this.FormatRisefall(item.Close,item.YClose, defaultfloatPrecision,'DialogTooltip-Risefall'),
143904
143997
  this.FormatIncrease(item.Close,item.YClose,defaultfloatPrecision,'DialogTooltip-Increase', 1),
143905
143998
  this.FormatVol(item.Vol,'DialogTooltip-Vol' ),
143906
143999
  this.FormatAmount(item.Amount,'DialogTooltip-Amount' ),
143907
144000
  ];
144001
+
144002
+ if (this.LastValueCache && this.LastValueCache.Y)
144003
+ {
144004
+ var item=this.LastValueCache.Y;
144005
+ var rowItem=null;
144006
+ if (item.Extend.FrameID==0)
144007
+ {
144008
+ rowItem=this.ForamtPrice(item.Value,null, defaultfloatPrecision,'DialogTooltip-Value',2);
144009
+ }
144010
+ else
144011
+ {
144012
+ rowItem=this.ForamtValue(item.Value, 2,'DialogTooltip-Value');
144013
+ }
144014
+
144015
+ if (rowItem) aryText.splice(2,0,rowItem);
144016
+ }
143908
144017
  }
143909
144018
  else if (data.Type==1) //集合竞价
143910
144019
  {
@@ -143915,7 +144024,7 @@ function JSDialogTooltip()
143915
144024
  if (item.Ver===1) timeForamt="HH:MM"
143916
144025
  aryText=
143917
144026
  [
143918
- this.ForamtDate(item.Date,this.Style==1?"YYYY/MM/DD":"YYYY/MM/DD/W",'DialogTooltip-Date' ),
144027
+ this.ForamtDate(item.Date,this.Style==1?"MM/DD/W":"YYYY/MM/DD/W",'DialogTooltip-Date' ),
143919
144028
  this.FormatTime(item.Time, null, timeForamt, 'DialogTooltip-Time'),
143920
144029
  this.ForamtPrice(item.Price,item.YClose, defaultfloatPrecision,'DialogTooltip-AC-Price',1),
143921
144030
  this.FormatIncrease(item.Price,item.YClose,defaultfloatPrecision,'DialogTooltip-AC-Increase',1),
@@ -143987,7 +144096,7 @@ function JSDialogTooltip()
143987
144096
 
143988
144097
 
143989
144098
  /////////////////////////////////////////////////////////////////////////////////////////////
143990
- //数据格式化
144099
+ //数据格式化 format=0 点差+涨幅 1=涨幅
143991
144100
  this.ForamtPrice=function(price, yClose, defaultfloatPrecision, TitleID, format)
143992
144101
  {
143993
144102
  var item=
@@ -143999,6 +144108,13 @@ function JSDialogTooltip()
143999
144108
 
144000
144109
  if (!IFrameSplitOperator.IsNumber(price)) return item;
144001
144110
 
144111
+ if (format==2)
144112
+ {
144113
+ item.Text=price.toFixed(defaultfloatPrecision);
144114
+ item.Color=this.TitleColor;
144115
+ return item;
144116
+ }
144117
+
144002
144118
  if (IFrameSplitOperator.IsNumber(yClose) && format!=1)
144003
144119
  {
144004
144120
  var value=(price-yClose)/yClose*100;
@@ -144015,6 +144131,21 @@ function JSDialogTooltip()
144015
144131
  return item;
144016
144132
  }
144017
144133
 
144134
+ this.ForamtValue=function(value, defaultfloatPrecision, TitleID)
144135
+ {
144136
+ var item=
144137
+ {
144138
+ Title:g_JSChartLocalization.GetText(TitleID,this.LanguageID),
144139
+ Text:'--',
144140
+ Color:this.TitleColor
144141
+ };
144142
+
144143
+ if (!IFrameSplitOperator.IsNumber(value)) return item;
144144
+
144145
+ item.Text=IFrameSplitOperator.FormatValueStringV2(value,defaultfloatPrecision,2,this.LanguageID);
144146
+ return item;
144147
+ }
144148
+
144018
144149
  this.FormatVol=function(vol, TitleID)
144019
144150
  {
144020
144151
  var item=
@@ -144336,7 +144467,7 @@ function HQChartScriptWorker()
144336
144467
 
144337
144468
 
144338
144469
 
144339
- var HQCHART_VERSION="1.1.13932";
144470
+ var HQCHART_VERSION="1.1.13945";
144340
144471
 
144341
144472
  function PrintHQChartVersion()
144342
144473
  {