hqchart 1.1.14394 → 1.1.14406

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.
@@ -4876,6 +4876,15 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
4876
4876
  }
4877
4877
  }
4878
4878
 
4879
+ if (option.EnableYDrag)
4880
+ {
4881
+ var item=option.EnableYDrag;
4882
+ if (IFrameSplitOperator.IsBool(item.Left)) chart.EnableYDrag.Left=item.Left;
4883
+ if (IFrameSplitOperator.IsBool(item.Right)) chart.EnableYDrag.Right=item.Right;
4884
+ if (IFrameSplitOperator.IsBool(item.Wheel)) chart.EnableYDrag.Wheel=item.Wheel;
4885
+ if (IFrameSplitOperator.IsNumber(item.WheelYMove)) chart.EnableYDrag.WheelYMove=item.WheelYMove;
4886
+ }
4887
+
4879
4888
  //分页
4880
4889
  if (option.PageInfo) chart.SetPageInfo(option.PageInfo);
4881
4890
 
@@ -4951,7 +4960,6 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
4951
4960
  }
4952
4961
  if (item.Height>=0) chart.Frame.SubFrame[i].Height = item.Height;
4953
4962
  if (item.Custom) chart.Frame.SubFrame[i].Frame.YSplitOperator.Custom=item.Custom;
4954
- if (item.RightTextFormat>0) chart.Frame.SubFrame[i].Frame.YSplitOperator.RightTextFormat=item.RightTextFormat;
4955
4963
  if (IFrameSplitOperator.IsNumber(item.TitleHeight)) chart.Frame.SubFrame[i].Frame.ChartBorder.TitleHeight=item.TitleHeight;
4956
4964
  if (IFrameSplitOperator.IsNumber(item.BorderLine)) chart.Frame.SubFrame[i].Frame.BorderLine=item.BorderLine;
4957
4965
  if (IFrameSplitOperator.IsBool(item.EnableRemoveZero)) chart.Frame.SubFrame[i].Frame.YSplitOperator.EnableRemoveZero=item.EnableRemoveZero;
@@ -4969,6 +4977,15 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
4969
4977
 
4970
4978
  if (item.ClientBGColor) subFrame.ClientBGColor=item.ClientBGColor;
4971
4979
  if (!IFrameSplitOperator.IsUndefined(item.HorizontalReserved)) subFrame.HorizontalReserved=item.HorizontalReserved;
4980
+
4981
+ if (i==0)
4982
+ {
4983
+ if (IFrameSplitOperator.IsNumber(item.RightTextFormat))
4984
+ {
4985
+ subFrame.YSplitOperator.RightTextFormat=item.RightTextFormat;
4986
+ if (item.RightTextFormat==2) subFrame.MultiTextFormat=1;
4987
+ }
4988
+ }
4972
4989
  }
4973
4990
 
4974
4991
  chart.UpdateXShowText();
@@ -16361,7 +16378,7 @@ function AverageWidthFrame()
16361
16378
  var item=aryText[i];
16362
16379
  var message=item.Item;
16363
16380
 
16364
- this.Canvas.textBaseline=message.TextBaseline;
16381
+ this.Canvas.textBaseline=item.TextBaseline;
16365
16382
  if (message.ExtendData && message.ExtendData.Font) this.Canvas.font=message.ExtendData.Font;
16366
16383
  else if (message.Font) this.Canvas.font=message.Font;
16367
16384
 
@@ -17984,20 +18001,17 @@ function AverageWidthFrame()
17984
18001
 
17985
18002
  if (Array.isArray(item.Message[1]))
17986
18003
  {
17987
- if (this.MultiTextFormat==1) //显示1行 格式:价格/百分比
18004
+ if (this.MultiTextFormat==1 && IFrameSplitOperator.IsNonEmptyArray(item.Message[1])) //显示1行 格式:价格/百分比
17988
18005
  {
17989
- if (item.ExtendData)
17990
- {
17991
- if (item.ExtendData.Font) this.Canvas.font=item.ExtendData.Font;
17992
- var width1=this.Canvas.measureText(item.Message[1][0]).width;
17993
- var width2=this.Canvas.measureText(item.Message[1][1]).width;
17994
- var width3=this.Canvas.measureText('/').width;
17995
- textWidth=width1+width3;
17996
-
17997
- if (rightExtendWidth<width2) rightExtendWidth=width2;
18006
+ if (item.ExtendData && item.ExtendData.Font) this.Canvas.font=item.ExtendData.Font;
18007
+
18008
+ var width1=this.Canvas.measureText(item.Message[1][0]).width;
18009
+ var width2=this.Canvas.measureText(item.Message[1][1]).width;
18010
+ var width3=this.Canvas.measureText('/').width;
18011
+ textWidth=width1+width3;
18012
+ if (rightExtendWidth<width2) rightExtendWidth=width2;
17998
18013
 
17999
- //JSConsole.Chart.Log(`[ChartData::GetScaleTextWidth] ${item.Message[1][1]}/${item.Message[1][0]} ${textWidth}, ${rightExtendWidth}`);
18000
- }
18014
+ //JSConsole.Chart.Log(`[ChartData::GetScaleTextWidth] ${item.Message[1][1]}/${item.Message[1][0]} ${textWidth}, ${rightExtendWidth}`);
18001
18015
  }
18002
18016
  else if (this.MultiTextFormat==2) //显示2行
18003
18017
  {
@@ -41022,7 +41036,7 @@ function ChartMinutePriceLine()
41022
41036
  if (value==null) continue;
41023
41037
 
41024
41038
  var x=this.ChartFrame.GetXFromIndex(j);
41025
- var y=this.ChartFrame.GetYFromData(value);
41039
+ var y=this.ChartFrame.GetYFromData(value,false);
41026
41040
 
41027
41041
  if (bFirstPoint)
41028
41042
  {
@@ -56259,7 +56273,7 @@ function FrameSplitMinutePriceY()
56259
56273
  this.DefaultSplitType=0;
56260
56274
  this.LimitPrice; //{Max: Min:} 涨跌停价
56261
56275
  this.Custom;
56262
- this.RightTextFormat=0; //右边刻度显示模式 0=百分比 1=价格
56276
+ this.RightTextFormat=0; //右边刻度显示模式 0=百分比 1=价格 2=价格 | 百分比
56263
56277
 
56264
56278
  this.BeforeOpenData;
56265
56279
  this.IsBeforeData=false;
@@ -56275,9 +56289,12 @@ function FrameSplitMinutePriceY()
56275
56289
  this.GlobalOption;
56276
56290
  this.HQChart;
56277
56291
 
56292
+ this.FixedYMaxMin; //{ Max, Min} 固定Y轴最大最小值
56293
+ this.EnableZoomUpDown=false;
56294
+
56278
56295
  this.IsEnableDragY=function()
56279
56296
  {
56280
- return false;
56297
+ return true;
56281
56298
  }
56282
56299
 
56283
56300
  this.Operator=function()
@@ -56286,23 +56303,35 @@ function FrameSplitMinutePriceY()
56286
56303
  this.Frame.CustomHorizontalInfo=[];
56287
56304
  if (!this.Data) return;
56288
56305
 
56289
- var range=this.GetMaxMin();
56306
+ var range=null;
56307
+ var isFixedMaxMin=(this.FixedYMaxMin && IFrameSplitOperator.IsNumber(this.FixedYMaxMin.Max) && IFrameSplitOperator.IsNumber(this.FixedYMaxMin.Min));
56308
+ if (isFixedMaxMin)
56309
+ {
56310
+ range={ Max:this.FixedYMaxMin.Max, Min:this.FixedYMaxMin.Min };
56311
+ JSConsole.Chart.Log(`[FrameSplitMinutePriceY::Operator] FixedYMaxMin.Max=${this.FixedYMaxMin.Max} FixedYMaxMin.Min=${this.FixedYMaxMin.Min} `);
56312
+ }
56313
+ else
56314
+ {
56315
+ range=this.GetMaxMin();
56316
+ }
56290
56317
 
56291
56318
  if (this.Symbol && MARKET_SUFFIX_NAME.IsUSA(this.Symbol.toUpperCase()))
56292
56319
  {
56293
- this.USASplit(range);
56320
+ this.USASplit(range,isFixedMaxMin);
56294
56321
  }
56295
56322
  else if (this.SplitType==2)
56296
56323
  {
56297
- this.USASplit(range);
56324
+ this.USASplit(range,isFixedMaxMin);
56298
56325
  }
56299
56326
  else
56300
56327
  {
56301
- this.DefaultSplit(range);
56328
+ this.DefaultSplit(range,isFixedMaxMin);
56302
56329
  }
56303
56330
 
56304
56331
  this.CustomCoordinate();
56305
56332
 
56333
+ if (this.EnableZoomUpDown==true && !this.FixedYMaxMin) this.FixedYMaxMin={ Max:range.Max, Min:range.Min };
56334
+
56306
56335
  this.ReservedHeight({ Max:this.Frame.HorizontalMax, Min:this.Frame.HorizontalMin }); //预留高度
56307
56336
 
56308
56337
  if (this.GetEventCallback)
@@ -56690,21 +56719,7 @@ function FrameSplitMinutePriceY()
56690
56719
  if (this.YClose && price==this.YClose) continue;
56691
56720
  var coordinate=new CoordinateInfo();
56692
56721
  coordinate.Value=price;
56693
- var strPrice=price.toFixed(defaultfloatPrecision); //价格刻度字符串
56694
- if (this.IsShowLeftText) coordinate.Message[0]=strPrice;
56695
-
56696
- if (this.YClose && this.YClose!=0)
56697
- {
56698
- var per=(price/this.YClose-1)*100;
56699
- if (per>0) coordinate.TextColor=g_JSChartResource.UpTextColor;
56700
- else if (per<0) coordinate.TextColor=g_JSChartResource.DownTextColor;
56701
- if (this.IsShowRightText)
56702
- {
56703
- if (this.RightTextFormat==1) coordinate.Message[1]=strPrice;
56704
- else coordinate.Message[1]=IFrameSplitOperator.FormatValueString(per,2)+'%'; //百分比
56705
- }
56706
- }
56707
-
56722
+ this.FormatCoordinate(coordinate,defaultfloatPrecision);
56708
56723
  this.Frame.HorizontalInfo.push(coordinate);
56709
56724
  }
56710
56725
 
@@ -56733,22 +56748,25 @@ function FrameSplitMinutePriceY()
56733
56748
  this.Frame.HorizontalMin=min;
56734
56749
  }
56735
56750
 
56736
- this.DefaultSplit=function(range)
56751
+ this.DefaultSplit=function(range,isFixedMaxMin)
56737
56752
  {
56738
56753
  var max=range.Max;
56739
56754
  var min=range.Min;
56740
56755
 
56741
- if (this.YClose==max && this.YClose==min)
56756
+ if (!isFixedMaxMin)
56742
56757
  {
56743
- max=this.YClose+this.YClose*0.1;
56744
- min=this.YClose-this.YClose*0.1
56745
- }
56746
- else
56747
- {
56748
- var distanceValue=Math.max(Math.abs(this.YClose-max),Math.abs(this.YClose-min));
56749
- max=this.YClose+distanceValue;
56750
- min=this.YClose-distanceValue;
56751
- if (min<0) min=range.Min;
56758
+ if (this.YClose==max && this.YClose==min)
56759
+ {
56760
+ max=this.YClose+this.YClose*0.1;
56761
+ min=this.YClose-this.YClose*0.1
56762
+ }
56763
+ else
56764
+ {
56765
+ var distanceValue=Math.max(Math.abs(this.YClose-max),Math.abs(this.YClose-min));
56766
+ max=this.YClose+distanceValue;
56767
+ min=this.YClose-distanceValue;
56768
+ if (min<0) min=range.Min;
56769
+ }
56752
56770
  }
56753
56771
 
56754
56772
  var pixelTatio = GetDevicePixelRatio(); //获取设备的分辨率
@@ -56761,13 +56779,34 @@ function FrameSplitMinutePriceY()
56761
56779
  const minDistance=[1, 0.1, 0.01, 0.001, 0.0001];
56762
56780
  var defaultfloatPrecision=GetfloatPrecision(this.Symbol);
56763
56781
  if (isPhoneModel && MARKET_SUFFIX_NAME.IsSHSZIndex(this.Symbol)) defaultfloatPrecision = 0; //手机端指数不显示小数位数,太长了
56764
- if (distance<minDistance[defaultfloatPrecision])
56782
+ if (distance<minDistance[defaultfloatPrecision] && !isFixedMaxMin)
56765
56783
  {
56766
56784
  distance=minDistance[defaultfloatPrecision];
56767
56785
  max=this.YClose+(distance*(showCount-1)/2);
56768
56786
  min=this.YClose-(distance*(showCount-1)/2);
56769
56787
  }
56770
56788
 
56789
+ var aryCoordinate=[];
56790
+ var extendValue=distance*0.5;
56791
+ for(var price=this.YClose, i=0; price<=max+extendValue && i<30; price+=distance, ++i)
56792
+ {
56793
+ var coordinate=new CoordinateInfo();
56794
+ coordinate.Value=price;
56795
+ this.FormatCoordinate(coordinate,defaultfloatPrecision);
56796
+ aryCoordinate.push(coordinate);
56797
+ }
56798
+
56799
+ for(var price=this.YClose-distance, i=0; price>=min-extendValue && i<30; price-=distance, ++i)
56800
+ {
56801
+ var coordinate=new CoordinateInfo();
56802
+ coordinate.Value=price;
56803
+ this.FormatCoordinate(coordinate,defaultfloatPrecision);
56804
+ aryCoordinate.push(coordinate);
56805
+ }
56806
+
56807
+ aryCoordinate.sort((left,right)=>{ return left.Value-right.Value; })
56808
+
56809
+ /*
56771
56810
  for(var i=0;i<showCount;++i)
56772
56811
  {
56773
56812
  var price=min+(distance*i);
@@ -56782,11 +56821,21 @@ function FrameSplitMinutePriceY()
56782
56821
  var per=(price/this.YClose-1)*100;
56783
56822
  if (per>0) coordinate.TextColor=g_JSChartResource.UpTextColor;
56784
56823
  else if (per<0) coordinate.TextColor=g_JSChartResource.DownTextColor;
56785
-
56824
+ var strPer=`${IFrameSplitOperator.FormatValueString(per,2)}%`;
56786
56825
  if (this.IsShowRightText)
56787
56826
  {
56788
- if (this.RightTextFormat==1) coordinate.Message[1]=strPrice;
56789
- else coordinate.Message[1]=IFrameSplitOperator.FormatValueString(per,2)+'%'; //百分比
56827
+ if (this.RightTextFormat==1)
56828
+ {
56829
+ coordinate.Message[1]=strPrice;
56830
+ }
56831
+ else if (this.RightTextFormat==2) //价格/百分比
56832
+ {
56833
+ coordinate.Message[1]=[strPer,strPrice];
56834
+ }
56835
+ else
56836
+ {
56837
+ coordinate.Message[1]=strPer; //百分比
56838
+ }
56790
56839
  }
56791
56840
 
56792
56841
  if (Math.abs(price-this.YClose) <0.00000000001) //小数有精度问题 使用差值
@@ -56796,13 +56845,51 @@ function FrameSplitMinutePriceY()
56796
56845
  if (g_JSChartResource.FrameDotSplitPen) coordinate.LineColor=g_JSChartResource.FrameDotSplitPen;
56797
56846
  }
56798
56847
  }
56799
-
56800
- }
56848
+ }*/
56801
56849
 
56850
+ this.Frame.HorizontalInfo=aryCoordinate;
56802
56851
  this.Frame.HorizontalMax=max;
56803
56852
  this.Frame.HorizontalMin=min;
56804
56853
  }
56805
56854
 
56855
+ this.FormatCoordinate=function(coordinate, defaultfloatPrecision)
56856
+ {
56857
+ var price=coordinate.Value;
56858
+ var strPrice=price.toFixed(defaultfloatPrecision); //价格刻度字符串
56859
+ if (this.IsShowLeftText) coordinate.Message[0]=strPrice;
56860
+
56861
+ if (IFrameSplitOperator.IsNumber(this.YClose) && this.YClose!=0)
56862
+ {
56863
+ var per=(price/this.YClose-1)*100;
56864
+ if (per>0) coordinate.TextColor=g_JSChartResource.UpTextColor;
56865
+ else if (per<0) coordinate.TextColor=g_JSChartResource.DownTextColor;
56866
+ var strPer=`${IFrameSplitOperator.FormatValueString(per,2)}%`;
56867
+
56868
+ if (this.IsShowRightText)
56869
+ {
56870
+ if (this.RightTextFormat==1)
56871
+ {
56872
+ coordinate.Message[1]=strPrice;
56873
+ }
56874
+ else if (this.RightTextFormat==2) //价格/百分比
56875
+ {
56876
+ coordinate.Message[1]=[strPer,strPrice];
56877
+ }
56878
+ else
56879
+ {
56880
+ coordinate.Message[1]=strPer; //百分比
56881
+ }
56882
+ }
56883
+
56884
+ if (Math.abs(price-this.YClose) <0.00000000001) //小数有精度问题 使用差值
56885
+ {
56886
+ coordinate.LineType=2;//中间的线画虚线
56887
+ coordinate.TextColor=g_JSChartResource.UnchagneTextColor;
56888
+ if (g_JSChartResource.FrameDotSplitPen) coordinate.LineColor=g_JSChartResource.FrameDotSplitPen;
56889
+ }
56890
+ }
56891
+ }
56892
+
56806
56893
  }
56807
56894
 
56808
56895
  function FrameSplitMinuteX()
@@ -87500,14 +87587,30 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
87500
87587
  var moveSetp=moveData.X;
87501
87588
  var yMoveSetp=moveData.Y;
87502
87589
 
87503
- if (this.RectSelectDrag && this.RectSelectDrag.Index>=0) //区间选择
87590
+ var bNeedDraw=true;
87591
+ if (this.UpDownDrag && this.UpDownDrag.Index>=0)
87592
+ {
87593
+ if (yMoveSetp>=5)
87594
+ {
87595
+ var yMove=e.clientY-drag.LastMove.Y;
87596
+ JSConsole.Chart.Log("[MinuteChartContainer::OnDragMode_One] UpDownDrag ",this.UpDownDrag,yMove);
87597
+ //this.UIElement.style.cursor="pointer";
87598
+ this.SetCursor({Cursor:"pointer"});
87599
+ if (this.OnUpDonwFrameY(this.UpDownDrag, yMove))
87600
+ {
87601
+ drag.LastMove.Y=e.clientY;
87602
+ bNeedDraw=true;
87603
+ }
87604
+ }
87605
+ }
87606
+ else if (this.RectSelectDrag && this.RectSelectDrag.Index>=0) //区间选择
87504
87607
  {
87505
87608
  if (moveSetp<5) return;
87506
87609
  var obj={ X:e.clientX, Y:e.clientY, PointIndex:this.RectSelectDrag.Index, Name:"MoveRectSelectLine" };
87507
87610
  if (this.MoveRectSelectPoint(obj))
87508
87611
  {
87509
87612
  drag.LastMove.X=e.clientX;
87510
- this.Draw();
87613
+ bNeedDraw=true;
87511
87614
  }
87512
87615
  }
87513
87616
  else
@@ -87525,6 +87628,8 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
87525
87628
  drag.LastMove.X=e.clientX;
87526
87629
  drag.LastMove.Y=e.clientY;
87527
87630
  }
87631
+
87632
+ if (bNeedDraw) this.Draw();
87528
87633
  }
87529
87634
 
87530
87635
  this.OnMinuteSelectRectMouseUp=function(e)
@@ -87542,8 +87647,12 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
87542
87647
  selectData.YEnd=(drag.LastMove.Y-uielement.getBoundingClientRect().top)*pixelTatio;
87543
87648
  selectData.JSChartContainer=this;
87544
87649
  selectData.Stock={Symbol:this.Symbol, Name:this.Name};
87650
+
87651
+ if (this.UpDownDrag)
87652
+ {
87545
87653
 
87546
- if (this.EnableSelectRect && !this.BorderDrag && this.GetSelectRectData(selectData))
87654
+ }
87655
+ else if (this.EnableSelectRect && !this.BorderDrag && this.GetSelectRectData(selectData))
87547
87656
  {
87548
87657
  var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_SELECT_RECT);
87549
87658
  var paint=this.GetRectSelectPaint();
@@ -87914,25 +88023,83 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
87914
88023
  }
87915
88024
  }
87916
88025
 
88026
+
88027
+ this.GetDataIndexByDatTime=function(date, time)
88028
+ {
88029
+ var result={ DayIndex:-1, DataIndex:-1, Index:-1 };
88030
+ var frame=this.Frame.SubFrame[0].Frame;
88031
+ var minCount=frame.MinuteCount; //每天的分钟个数
88032
+ var kData=this.GetKData();
88033
+ for(var i=0;i<kData.Data.length;++i)
88034
+ {
88035
+ var minItem=kData.Data[i];
88036
+ if (!minItem) continue;
88037
+
88038
+ if (minItem.Date==date && minItem.Time==time)
88039
+ {
88040
+ result.Index=i;
88041
+ result.DayIndex=parseInt(i/minCount);
88042
+ result.DataIndex=i%minCount;
88043
+ break;
88044
+ }
88045
+ }
88046
+
88047
+ return result;
88048
+ }
88049
+
88050
+ //获取十字光标位置 通过日期和时间 目前只支持连续交易时间段
88051
+ this.GetCorssCursorIndexByDateTime=function(date, time)
88052
+ {
88053
+ var border=this.Frame.ChartBorder.GetBorder();
88054
+
88055
+ if (border.DayBorder) //多日分时主图+多日集合竞价
88056
+ {
88057
+ var corssCursorIndex=this.GetDataIndexByDatTime(date, time);
88058
+ corssCursorIndex.Type=10;
88059
+ }
88060
+ else //单日,多日
88061
+ {
88062
+ var corssCursorIndex=this.GetDataIndexByDatTime(date, time);
88063
+ corssCursorIndex.Type=1;
88064
+ corssCursorIndex.DayIndex=0;
88065
+ corssCursorIndex.DataIndex=corssCursorIndex.Index;
88066
+ }
88067
+
88068
+ return corssCursorIndex;
88069
+ }
88070
+
87917
88071
  this.LockCorssCursor=function(option)
87918
88072
  {
87919
88073
  var xItem=this.GlobalOption.LockCorssCursor.X;
88074
+
88075
+ var corssCursorIndex={ DayIndex:-1, DataIndex:-1, Type:-1, Index:this.CursorIndex };
88076
+ if (this.EnableNewIndex)
88077
+ {
88078
+ corssCursorIndex.Type=this.CorssCursorIndex.Type;
88079
+ corssCursorIndex.DayIndex=this.CorssCursorIndex.DayIndex;
88080
+ corssCursorIndex.DataIndex=this.CorssCursorIndex.DataIndex;
88081
+ }
88082
+
88083
+ if (option && option.KItem) //指定日期时间
88084
+ {
88085
+ corssCursorIndex=this.GetCorssCursorIndexByDateTime(option.KItem.Date, option.KItem.Time);
88086
+ }
87920
88087
 
87921
88088
  if (this.EnableNewIndex)
87922
88089
  {
87923
- if (this.CorssCursorIndex.Type!=1 && this.CorssCursorIndex.Type!=10) return false; //目前只支持连续交易时间段
88090
+ if (corssCursorIndex.Type!=1 && corssCursorIndex.Type!=10) return false; //目前只支持连续交易时间段
87924
88091
 
87925
88092
  xItem.Minute=
87926
88093
  {
87927
- DayIndex:this.CorssCursorIndex.DayIndex,
87928
- DataIndex:this.CorssCursorIndex.DataIndex,
87929
- Type:this.CorssCursorIndex.Type,
87930
- CursorIndex:this.CursorIndex,
88094
+ DayIndex:corssCursorIndex.DayIndex,
88095
+ DataIndex:corssCursorIndex.DataIndex,
88096
+ Type:corssCursorIndex.Type,
88097
+ CursorIndex:corssCursorIndex.Index,
87931
88098
  };
87932
88099
  }
87933
88100
  else
87934
88101
  {
87935
- xItem.Minute={ CursorIndex:this.CursorIndex };
88102
+ xItem.Minute={ CursorIndex:corssCursorIndex.Index };
87936
88103
  }
87937
88104
 
87938
88105
  xItem.Enable=true;
@@ -88008,12 +88175,16 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
88008
88175
  var x=null;
88009
88176
  var dayIndex=corssCursorIndex.DayIndex;
88010
88177
  var dataIndex=corssCursorIndex.DataIndex;
88011
- switch(corssCursorIndex.Type) //单日 1=主图 2=盘前 3=盘后 //多日 10=主图 20=盘前 30=盘后
88178
+ var frame=this.Frame.SubFrame[0].Frame;
88179
+ switch(corssCursorIndex.Type) //单日,多日 1=主图 2=盘前 3=盘后 //多日+多日集合竞价 10=主图 20=盘前 30=盘后
88012
88180
  {
88013
- case 1: //单日 1=主图
88014
- case 10: //多日 10=主图
88181
+ case 1: //单日,多日 1=主图
88015
88182
  x=this.Frame.GetXFromIndex(dataIndex)
88016
88183
  break;
88184
+ case 10: //多日+多日集合竞价 10=主图
88185
+ var cursorIndex=frame.MinuteCount*dayIndex+dataIndex;
88186
+ x=this.Frame.GetXFromIndex(cursorIndex);
88187
+ break;
88017
88188
  /*
88018
88189
  case 2: //单日 2=盘前
88019
88190
  x=this.Frame.SubFrame[0].Frame.GetLeftExtendXFromIndex(dataIndex,this.GetBeforeOpenData());
@@ -88811,6 +88982,17 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
88811
88982
  var bShowCorss=false; //十字光标十字线
88812
88983
  if (this.ChartCorssCursor) bShowCorss=this.ChartCorssCursor.IsShowCorss;
88813
88984
 
88985
+ var minItem=null;
88986
+ if (frameID>=0 && option && IFrameSplitOperator.IsNumber(option.CursorIndex))
88987
+ {
88988
+ var kData=this.GetKData();
88989
+ if (kData && IFrameSplitOperator.IsNonEmptyArray(kData.Data))
88990
+ {
88991
+ var dataIndex=kData.DataOffset+parseInt(option.CursorIndex.toFixed(0));
88992
+ if (dataIndex>=0 && dataIndex<kData.Data.length) minItem=kData.Data[dataIndex];
88993
+ }
88994
+ }
88995
+
88814
88996
  var aryMenu=
88815
88997
  [
88816
88998
  {
@@ -88942,7 +89124,14 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
88942
89124
  }
88943
89125
  else if (item.Name=="其他设置")
88944
89126
  {
88945
-
89127
+ if (minItem)
89128
+ {
89129
+ var bLocked=this.IsLockCorssCursor();
89130
+ if (bLocked)
89131
+ item.SubMenu.push({ Name:"锁十字光标", Data:{ ID: JSCHART_MENU_ID.CMD_UNLOCK_CROSSCURSOR }, Checked:bLocked });
89132
+ else
89133
+ item.SubMenu.push({ Name:"锁十字光标", Data:{ ID: JSCHART_MENU_ID.CMD_LOCK_CROSSCURSOR, Args:[{ KItem:{Date:minItem.Date, Time:minItem.Time}, Draw:true }] }, Checked:bLocked });
89134
+ }
88946
89135
  }
88947
89136
  }
88948
89137
 
@@ -88958,6 +89147,18 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
88958
89147
  {
88959
89148
  JSConsole.Chart.Log("[MinuteChartContainer::OnDoubleClick]", e);
88960
89149
 
89150
+ if (this.EnableYDrag && (this.EnableYDrag.Left || this.EnableYDrag.Right) && this.Frame && this.Frame.PtInFrameY)
89151
+ {
89152
+ var pixelTatio = GetDevicePixelRatio();
89153
+ var x = (e.clientX-this.UIElement.getBoundingClientRect().left)*pixelTatio;
89154
+ var y = (e.clientY-this.UIElement.getBoundingClientRect().top)*pixelTatio;
89155
+ var dragY=this.Frame.PtInFrameY(x,y);
89156
+ if (dragY && dragY.Index>=0)
89157
+ {
89158
+ this.CancelZoomUpDownFrameY(dragY);
89159
+ }
89160
+ }
89161
+
88961
89162
  if (this.ClickChartTimer!=null)
88962
89163
  {
88963
89164
  clearTimeout(this.ClickChartTimer);
@@ -143191,7 +143392,7 @@ function ScrollBarBGChart()
143191
143392
 
143192
143393
 
143193
143394
 
143194
- var HQCHART_VERSION="1.1.14393";
143395
+ var HQCHART_VERSION="1.1.14405";
143195
143396
 
143196
143397
  function PrintHQChartVersion()
143197
143398
  {
@@ -5,7 +5,7 @@
5
5
 
6
6
 
7
7
 
8
- var HQCHART_VERSION="1.1.14393";
8
+ var HQCHART_VERSION="1.1.14405";
9
9
 
10
10
  function PrintHQChartVersion()
11
11
  {