hqchart 1.1.14388 → 1.1.14404

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
  {
@@ -32318,9 +32332,10 @@ function ChartKLine()
32318
32332
  var item=this.TradeIconTooltipRect[i];
32319
32333
  if (!item.Rect) continue;
32320
32334
  var rect=item.Rect;
32321
- this.Canvas.beginPath();
32322
- this.Canvas.rect(rect.X,rect.Y,rect.Width,rect.Height);
32323
- if (this.Canvas.isPointInPath(x,y))
32335
+ var left=rect.X, top=rect.Y;
32336
+ var right=left+rect.Width;
32337
+ var bottom=top+rect.Height;
32338
+ if (x>=left && x<=right && y>=top && y<=bottom)
32324
32339
  {
32325
32340
  JSConsole.Chart.Log('[ChartKLine::GetTooltipData] trade icon ', item);
32326
32341
  tooltip.Data=item;
@@ -32335,9 +32350,10 @@ function ChartKLine()
32335
32350
  var item=this.InfoTooltipRect[i];
32336
32351
  if (!item.Rect) continue;
32337
32352
  var rect=item.Rect;
32338
- this.Canvas.beginPath();
32339
- this.Canvas.rect(rect.X,rect.Y,rect.Width,rect.Height);
32340
- if (this.Canvas.isPointInPath(x,y))
32353
+ var left=rect.X, top=rect.Y;
32354
+ var right=left+rect.Width;
32355
+ var bottom=top+rect.Height;
32356
+ if (x>=left && x<=right && y>=top && y<=bottom)
32341
32357
  {
32342
32358
  //JSConsole.Chart.Log('[ChartKLine::GetTooltipData] info ', item);
32343
32359
  tooltip.Data=item;
@@ -32347,18 +32363,22 @@ function ChartKLine()
32347
32363
  }
32348
32364
  }
32349
32365
 
32350
- for(var i in this.TooltipRect)
32366
+ if (IFrameSplitOperator.IsNonEmptyArray(this.TooltipRect))
32351
32367
  {
32352
- var rect=this.TooltipRect[i][1];
32353
- this.Canvas.beginPath();
32354
- this.Canvas.rect(rect.X,rect.Y,rect.Width,rect.Height);
32355
- if (this.Canvas.isPointInPath(x,y))
32368
+ for(var i=0; i<this.TooltipRect.length; ++i)
32356
32369
  {
32357
- var index=this.TooltipRect[i][0];
32358
- tooltip.Data=this.Data.Data[index];
32359
- tooltip.ChartPaint=this;
32360
- tooltip.Type=0; //K线信息
32361
- return true;
32370
+ var rect=this.TooltipRect[i][1];
32371
+ var left=rect.X, top=rect.Y;
32372
+ var right=left+rect.Width;
32373
+ var bottom=top+rect.Height;
32374
+ if (x>=left && x<=right && y>=top && y<=bottom)
32375
+ {
32376
+ var index=this.TooltipRect[i][0];
32377
+ tooltip.Data=this.Data.Data[index];
32378
+ tooltip.ChartPaint=this;
32379
+ tooltip.Type=0; //K线信息
32380
+ return true;
32381
+ }
32362
32382
  }
32363
32383
  }
32364
32384
 
@@ -41016,7 +41036,7 @@ function ChartMinutePriceLine()
41016
41036
  if (value==null) continue;
41017
41037
 
41018
41038
  var x=this.ChartFrame.GetXFromIndex(j);
41019
- var y=this.ChartFrame.GetYFromData(value);
41039
+ var y=this.ChartFrame.GetYFromData(value,false);
41020
41040
 
41021
41041
  if (bFirstPoint)
41022
41042
  {
@@ -56253,7 +56273,7 @@ function FrameSplitMinutePriceY()
56253
56273
  this.DefaultSplitType=0;
56254
56274
  this.LimitPrice; //{Max: Min:} 涨跌停价
56255
56275
  this.Custom;
56256
- this.RightTextFormat=0; //右边刻度显示模式 0=百分比 1=价格
56276
+ this.RightTextFormat=0; //右边刻度显示模式 0=百分比 1=价格 2=价格 | 百分比
56257
56277
 
56258
56278
  this.BeforeOpenData;
56259
56279
  this.IsBeforeData=false;
@@ -56269,9 +56289,12 @@ function FrameSplitMinutePriceY()
56269
56289
  this.GlobalOption;
56270
56290
  this.HQChart;
56271
56291
 
56292
+ this.FixedYMaxMin; //{ Max, Min} 固定Y轴最大最小值
56293
+ this.EnableZoomUpDown=false;
56294
+
56272
56295
  this.IsEnableDragY=function()
56273
56296
  {
56274
- return false;
56297
+ return true;
56275
56298
  }
56276
56299
 
56277
56300
  this.Operator=function()
@@ -56280,23 +56303,35 @@ function FrameSplitMinutePriceY()
56280
56303
  this.Frame.CustomHorizontalInfo=[];
56281
56304
  if (!this.Data) return;
56282
56305
 
56283
- 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
+ }
56284
56317
 
56285
56318
  if (this.Symbol && MARKET_SUFFIX_NAME.IsUSA(this.Symbol.toUpperCase()))
56286
56319
  {
56287
- this.USASplit(range);
56320
+ this.USASplit(range,isFixedMaxMin);
56288
56321
  }
56289
56322
  else if (this.SplitType==2)
56290
56323
  {
56291
- this.USASplit(range);
56324
+ this.USASplit(range,isFixedMaxMin);
56292
56325
  }
56293
56326
  else
56294
56327
  {
56295
- this.DefaultSplit(range);
56328
+ this.DefaultSplit(range,isFixedMaxMin);
56296
56329
  }
56297
56330
 
56298
56331
  this.CustomCoordinate();
56299
56332
 
56333
+ if (this.EnableZoomUpDown==true && !this.FixedYMaxMin) this.FixedYMaxMin={ Max:range.Max, Min:range.Min };
56334
+
56300
56335
  this.ReservedHeight({ Max:this.Frame.HorizontalMax, Min:this.Frame.HorizontalMin }); //预留高度
56301
56336
 
56302
56337
  if (this.GetEventCallback)
@@ -56692,10 +56727,21 @@ function FrameSplitMinutePriceY()
56692
56727
  var per=(price/this.YClose-1)*100;
56693
56728
  if (per>0) coordinate.TextColor=g_JSChartResource.UpTextColor;
56694
56729
  else if (per<0) coordinate.TextColor=g_JSChartResource.DownTextColor;
56730
+ var strPer=IFrameSplitOperator.FormatValueString(per,2)+'%';
56695
56731
  if (this.IsShowRightText)
56696
56732
  {
56697
- if (this.RightTextFormat==1) coordinate.Message[1]=strPrice;
56698
- else coordinate.Message[1]=IFrameSplitOperator.FormatValueString(per,2)+'%'; //百分比
56733
+ if (this.RightTextFormat==1)
56734
+ {
56735
+ coordinate.Message[1]=strPrice;
56736
+ }
56737
+ else if (this.RightTextFormat==2) //价格/百分比
56738
+ {
56739
+ coordinate.Message[1]=[strPrice,strPer];
56740
+ }
56741
+ else
56742
+ {
56743
+ coordinate.Message[1]=strPer; //百分比
56744
+ }
56699
56745
  }
56700
56746
  }
56701
56747
 
@@ -56727,22 +56773,25 @@ function FrameSplitMinutePriceY()
56727
56773
  this.Frame.HorizontalMin=min;
56728
56774
  }
56729
56775
 
56730
- this.DefaultSplit=function(range)
56776
+ this.DefaultSplit=function(range,isFixedMaxMin)
56731
56777
  {
56732
56778
  var max=range.Max;
56733
56779
  var min=range.Min;
56734
56780
 
56735
- if (this.YClose==max && this.YClose==min)
56736
- {
56737
- max=this.YClose+this.YClose*0.1;
56738
- min=this.YClose-this.YClose*0.1
56739
- }
56740
- else
56781
+ if (!isFixedMaxMin)
56741
56782
  {
56742
- var distanceValue=Math.max(Math.abs(this.YClose-max),Math.abs(this.YClose-min));
56743
- max=this.YClose+distanceValue;
56744
- min=this.YClose-distanceValue;
56745
- if (min<0) min=range.Min;
56783
+ if (this.YClose==max && this.YClose==min)
56784
+ {
56785
+ max=this.YClose+this.YClose*0.1;
56786
+ min=this.YClose-this.YClose*0.1
56787
+ }
56788
+ else
56789
+ {
56790
+ var distanceValue=Math.max(Math.abs(this.YClose-max),Math.abs(this.YClose-min));
56791
+ max=this.YClose+distanceValue;
56792
+ min=this.YClose-distanceValue;
56793
+ if (min<0) min=range.Min;
56794
+ }
56746
56795
  }
56747
56796
 
56748
56797
  var pixelTatio = GetDevicePixelRatio(); //获取设备的分辨率
@@ -56755,7 +56804,7 @@ function FrameSplitMinutePriceY()
56755
56804
  const minDistance=[1, 0.1, 0.01, 0.001, 0.0001];
56756
56805
  var defaultfloatPrecision=GetfloatPrecision(this.Symbol);
56757
56806
  if (isPhoneModel && MARKET_SUFFIX_NAME.IsSHSZIndex(this.Symbol)) defaultfloatPrecision = 0; //手机端指数不显示小数位数,太长了
56758
- if (distance<minDistance[defaultfloatPrecision])
56807
+ if (distance<minDistance[defaultfloatPrecision] && !isFixedMaxMin)
56759
56808
  {
56760
56809
  distance=minDistance[defaultfloatPrecision];
56761
56810
  max=this.YClose+(distance*(showCount-1)/2);
@@ -56776,11 +56825,21 @@ function FrameSplitMinutePriceY()
56776
56825
  var per=(price/this.YClose-1)*100;
56777
56826
  if (per>0) coordinate.TextColor=g_JSChartResource.UpTextColor;
56778
56827
  else if (per<0) coordinate.TextColor=g_JSChartResource.DownTextColor;
56779
-
56828
+ var strPer=`${IFrameSplitOperator.FormatValueString(per,2)}%`;
56780
56829
  if (this.IsShowRightText)
56781
56830
  {
56782
- if (this.RightTextFormat==1) coordinate.Message[1]=strPrice;
56783
- else coordinate.Message[1]=IFrameSplitOperator.FormatValueString(per,2)+'%'; //百分比
56831
+ if (this.RightTextFormat==1)
56832
+ {
56833
+ coordinate.Message[1]=strPrice;
56834
+ }
56835
+ else if (this.RightTextFormat==2) //价格/百分比
56836
+ {
56837
+ coordinate.Message[1]=[strPer,strPrice];
56838
+ }
56839
+ else
56840
+ {
56841
+ coordinate.Message[1]=strPer; //百分比
56842
+ }
56784
56843
  }
56785
56844
 
56786
56845
  if (Math.abs(price-this.YClose) <0.00000000001) //小数有精度问题 使用差值
@@ -79629,7 +79688,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
79629
79688
 
79630
79689
  this.ChartOperator_Temp_Update();
79631
79690
  }
79632
- else if (id==JSCHART_OPERATOR_ID.OP_CORSSCURSOR_GOTO) //移动十字光标{ Date:, Time }
79691
+ else if (id==JSCHART_OPERATOR_ID.OP_CORSSCURSOR_GOTO) //移动十字光标{ Date:, Time, Type:1=如果不存在 就隐藏十字光标 }
79633
79692
  {
79634
79693
  if (!IFrameSplitOperator.IsNumber(obj.Date)) return;
79635
79694
  var bTime=IFrameSplitOperator.IsNumber(obj.Time);
@@ -79670,6 +79729,23 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
79670
79729
 
79671
79730
  if (findIndex<0)
79672
79731
  {
79732
+ if (obj.Type==1) // 如果不存在 就隐藏十字光标
79733
+ {
79734
+ var x=-1,y=-1;
79735
+ var MoveStatus={ X:x, Y:y, IsInClient: this.IsMouseOnClient(x,y) };
79736
+ this.LastMouseStatus.OnMouseMove=MoveStatus;
79737
+ this.LastMouseStatus.MoveOnPoint={X:x, Y:y}; //鼠标移动的位置
79738
+
79739
+ var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_MOUSE_MOVE);
79740
+ var titleChart=this.TitlePaint[0];
79741
+ if (event && titleChart) titleChart.OnMouseMoveEvent=event;
79742
+
79743
+ var e={clientX:x, clientY:y};
79744
+ this.MoveOnPoint={X:x, Y:y};
79745
+ this.OnMouseMove(x,y,e);
79746
+ this.LastMouseStatus.MoveOnPoint=null;
79747
+ if (titleChart) titleChart.OnMouseMoveEvent=null;
79748
+ }
79673
79749
  return;
79674
79750
  }
79675
79751
 
@@ -87477,14 +87553,30 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
87477
87553
  var moveSetp=moveData.X;
87478
87554
  var yMoveSetp=moveData.Y;
87479
87555
 
87480
- if (this.RectSelectDrag && this.RectSelectDrag.Index>=0) //区间选择
87556
+ var bNeedDraw=true;
87557
+ if (this.UpDownDrag && this.UpDownDrag.Index>=0)
87558
+ {
87559
+ if (yMoveSetp>=5)
87560
+ {
87561
+ var yMove=e.clientY-drag.LastMove.Y;
87562
+ JSConsole.Chart.Log("[MinuteChartContainer::OnDragMode_One] UpDownDrag ",this.UpDownDrag,yMove);
87563
+ //this.UIElement.style.cursor="pointer";
87564
+ this.SetCursor({Cursor:"pointer"});
87565
+ if (this.OnUpDonwFrameY(this.UpDownDrag, yMove))
87566
+ {
87567
+ drag.LastMove.Y=e.clientY;
87568
+ bNeedDraw=true;
87569
+ }
87570
+ }
87571
+ }
87572
+ else if (this.RectSelectDrag && this.RectSelectDrag.Index>=0) //区间选择
87481
87573
  {
87482
87574
  if (moveSetp<5) return;
87483
87575
  var obj={ X:e.clientX, Y:e.clientY, PointIndex:this.RectSelectDrag.Index, Name:"MoveRectSelectLine" };
87484
87576
  if (this.MoveRectSelectPoint(obj))
87485
87577
  {
87486
87578
  drag.LastMove.X=e.clientX;
87487
- this.Draw();
87579
+ bNeedDraw=true;
87488
87580
  }
87489
87581
  }
87490
87582
  else
@@ -87502,6 +87594,8 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
87502
87594
  drag.LastMove.X=e.clientX;
87503
87595
  drag.LastMove.Y=e.clientY;
87504
87596
  }
87597
+
87598
+ if (bNeedDraw) this.Draw();
87505
87599
  }
87506
87600
 
87507
87601
  this.OnMinuteSelectRectMouseUp=function(e)
@@ -87519,8 +87613,12 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
87519
87613
  selectData.YEnd=(drag.LastMove.Y-uielement.getBoundingClientRect().top)*pixelTatio;
87520
87614
  selectData.JSChartContainer=this;
87521
87615
  selectData.Stock={Symbol:this.Symbol, Name:this.Name};
87616
+
87617
+ if (this.UpDownDrag)
87618
+ {
87522
87619
 
87523
- if (this.EnableSelectRect && !this.BorderDrag && this.GetSelectRectData(selectData))
87620
+ }
87621
+ else if (this.EnableSelectRect && !this.BorderDrag && this.GetSelectRectData(selectData))
87524
87622
  {
87525
87623
  var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_SELECT_RECT);
87526
87624
  var paint=this.GetRectSelectPaint();
@@ -87891,25 +87989,83 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
87891
87989
  }
87892
87990
  }
87893
87991
 
87992
+
87993
+ this.GetDataIndexByDatTime=function(date, time)
87994
+ {
87995
+ var result={ DayIndex:-1, DataIndex:-1, Index:-1 };
87996
+ var frame=this.Frame.SubFrame[0].Frame;
87997
+ var minCount=frame.MinuteCount; //每天的分钟个数
87998
+ var kData=this.GetKData();
87999
+ for(var i=0;i<kData.Data.length;++i)
88000
+ {
88001
+ var minItem=kData.Data[i];
88002
+ if (!minItem) continue;
88003
+
88004
+ if (minItem.Date==date && minItem.Time==time)
88005
+ {
88006
+ result.Index=i;
88007
+ result.DayIndex=parseInt(i/minCount);
88008
+ result.DataIndex=i%minCount;
88009
+ break;
88010
+ }
88011
+ }
88012
+
88013
+ return result;
88014
+ }
88015
+
88016
+ //获取十字光标位置 通过日期和时间 目前只支持连续交易时间段
88017
+ this.GetCorssCursorIndexByDateTime=function(date, time)
88018
+ {
88019
+ var border=this.Frame.ChartBorder.GetBorder();
88020
+
88021
+ if (border.DayBorder) //多日分时主图+多日集合竞价
88022
+ {
88023
+ var corssCursorIndex=this.GetDataIndexByDatTime(date, time);
88024
+ corssCursorIndex.Type=10;
88025
+ }
88026
+ else //单日,多日
88027
+ {
88028
+ var corssCursorIndex=this.GetDataIndexByDatTime(date, time);
88029
+ corssCursorIndex.Type=1;
88030
+ corssCursorIndex.DayIndex=0;
88031
+ corssCursorIndex.DataIndex=corssCursorIndex.Index;
88032
+ }
88033
+
88034
+ return corssCursorIndex;
88035
+ }
88036
+
87894
88037
  this.LockCorssCursor=function(option)
87895
88038
  {
87896
88039
  var xItem=this.GlobalOption.LockCorssCursor.X;
88040
+
88041
+ var corssCursorIndex={ DayIndex:-1, DataIndex:-1, Type:-1, Index:this.CursorIndex };
88042
+ if (this.EnableNewIndex)
88043
+ {
88044
+ corssCursorIndex.Type=this.CorssCursorIndex.Type;
88045
+ corssCursorIndex.DayIndex=this.CorssCursorIndex.DayIndex;
88046
+ corssCursorIndex.DataIndex=this.CorssCursorIndex.DataIndex;
88047
+ }
88048
+
88049
+ if (option && option.KItem) //指定日期时间
88050
+ {
88051
+ corssCursorIndex=this.GetCorssCursorIndexByDateTime(option.KItem.Date, option.KItem.Time);
88052
+ }
87897
88053
 
87898
88054
  if (this.EnableNewIndex)
87899
88055
  {
87900
- if (this.CorssCursorIndex.Type!=1 && this.CorssCursorIndex.Type!=10) return false; //目前只支持连续交易时间段
88056
+ if (corssCursorIndex.Type!=1 && corssCursorIndex.Type!=10) return false; //目前只支持连续交易时间段
87901
88057
 
87902
88058
  xItem.Minute=
87903
88059
  {
87904
- DayIndex:this.CorssCursorIndex.DayIndex,
87905
- DataIndex:this.CorssCursorIndex.DataIndex,
87906
- Type:this.CorssCursorIndex.Type,
87907
- CursorIndex:this.CursorIndex,
88060
+ DayIndex:corssCursorIndex.DayIndex,
88061
+ DataIndex:corssCursorIndex.DataIndex,
88062
+ Type:corssCursorIndex.Type,
88063
+ CursorIndex:corssCursorIndex.Index,
87908
88064
  };
87909
88065
  }
87910
88066
  else
87911
88067
  {
87912
- xItem.Minute={ CursorIndex:this.CursorIndex };
88068
+ xItem.Minute={ CursorIndex:corssCursorIndex.Index };
87913
88069
  }
87914
88070
 
87915
88071
  xItem.Enable=true;
@@ -87985,12 +88141,16 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
87985
88141
  var x=null;
87986
88142
  var dayIndex=corssCursorIndex.DayIndex;
87987
88143
  var dataIndex=corssCursorIndex.DataIndex;
87988
- switch(corssCursorIndex.Type) //单日 1=主图 2=盘前 3=盘后 //多日 10=主图 20=盘前 30=盘后
88144
+ var frame=this.Frame.SubFrame[0].Frame;
88145
+ switch(corssCursorIndex.Type) //单日,多日 1=主图 2=盘前 3=盘后 //多日+多日集合竞价 10=主图 20=盘前 30=盘后
87989
88146
  {
87990
- case 1: //单日 1=主图
87991
- case 10: //多日 10=主图
88147
+ case 1: //单日,多日 1=主图
87992
88148
  x=this.Frame.GetXFromIndex(dataIndex)
87993
88149
  break;
88150
+ case 10: //多日+多日集合竞价 10=主图
88151
+ var cursorIndex=frame.MinuteCount*dayIndex+dataIndex;
88152
+ x=this.Frame.GetXFromIndex(cursorIndex);
88153
+ break;
87994
88154
  /*
87995
88155
  case 2: //单日 2=盘前
87996
88156
  x=this.Frame.SubFrame[0].Frame.GetLeftExtendXFromIndex(dataIndex,this.GetBeforeOpenData());
@@ -88788,6 +88948,17 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
88788
88948
  var bShowCorss=false; //十字光标十字线
88789
88949
  if (this.ChartCorssCursor) bShowCorss=this.ChartCorssCursor.IsShowCorss;
88790
88950
 
88951
+ var minItem=null;
88952
+ if (frameID>=0 && option && IFrameSplitOperator.IsNumber(option.CursorIndex))
88953
+ {
88954
+ var kData=this.GetKData();
88955
+ if (kData && IFrameSplitOperator.IsNonEmptyArray(kData.Data))
88956
+ {
88957
+ var dataIndex=kData.DataOffset+parseInt(option.CursorIndex.toFixed(0));
88958
+ if (dataIndex>=0 && dataIndex<kData.Data.length) minItem=kData.Data[dataIndex];
88959
+ }
88960
+ }
88961
+
88791
88962
  var aryMenu=
88792
88963
  [
88793
88964
  {
@@ -88919,7 +89090,14 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
88919
89090
  }
88920
89091
  else if (item.Name=="其他设置")
88921
89092
  {
88922
-
89093
+ if (minItem)
89094
+ {
89095
+ var bLocked=this.IsLockCorssCursor();
89096
+ if (bLocked)
89097
+ item.SubMenu.push({ Name:"锁十字光标", Data:{ ID: JSCHART_MENU_ID.CMD_UNLOCK_CROSSCURSOR }, Checked:bLocked });
89098
+ else
89099
+ item.SubMenu.push({ Name:"锁十字光标", Data:{ ID: JSCHART_MENU_ID.CMD_LOCK_CROSSCURSOR, Args:[{ KItem:{Date:minItem.Date, Time:minItem.Time}, Draw:true }] }, Checked:bLocked });
89100
+ }
88923
89101
  }
88924
89102
  }
88925
89103
 
@@ -88935,6 +89113,18 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
88935
89113
  {
88936
89114
  JSConsole.Chart.Log("[MinuteChartContainer::OnDoubleClick]", e);
88937
89115
 
89116
+ if (this.EnableYDrag && (this.EnableYDrag.Left || this.EnableYDrag.Right) && this.Frame && this.Frame.PtInFrameY)
89117
+ {
89118
+ var pixelTatio = GetDevicePixelRatio();
89119
+ var x = (e.clientX-this.UIElement.getBoundingClientRect().left)*pixelTatio;
89120
+ var y = (e.clientY-this.UIElement.getBoundingClientRect().top)*pixelTatio;
89121
+ var dragY=this.Frame.PtInFrameY(x,y);
89122
+ if (dragY && dragY.Index>=0)
89123
+ {
89124
+ this.CancelZoomUpDownFrameY(dragY);
89125
+ }
89126
+ }
89127
+
88938
89128
  if (this.ClickChartTimer!=null)
88939
89129
  {
88940
89130
  clearTimeout(this.ClickChartTimer);
@@ -126905,7 +127095,9 @@ function APIScriptIndex(name,script,args,option, isOverlay)
126905
127095
  drawItem.DrawData=this.FittingArray(draw.DrawData,date,time,hqChart,1);
126906
127096
 
126907
127097
  outVarItem.Draw=drawItem;
126908
- if (draw.LineWidth) outVarItem.LineWidth=draw.LineWidth;
127098
+ if (IFrameSplitOperator.IsString(draw.LineWidth)) outVarItem.LineWidth=draw.LineWidth;
127099
+ if (IFrameSplitOperator.IsBool(draw.IsDotLine)) outVarItem.IsDotLine=draw.IsDotLine;
127100
+ if (IFrameSplitOperator.IsNonEmptyArray(draw.LineDash)) outVarItem.LineDash=draw.LineDash;
126909
127101
 
126910
127102
  result.push(outVarItem);
126911
127103
  }
@@ -143166,7 +143358,7 @@ function ScrollBarBGChart()
143166
143358
 
143167
143359
 
143168
143360
 
143169
- var HQCHART_VERSION="1.1.14387";
143361
+ var HQCHART_VERSION="1.1.14403";
143170
143362
 
143171
143363
  function PrintHQChartVersion()
143172
143364
  {
@@ -5,7 +5,7 @@
5
5
 
6
6
 
7
7
 
8
- var HQCHART_VERSION="1.1.14387";
8
+ var HQCHART_VERSION="1.1.14403";
9
9
 
10
10
  function PrintHQChartVersion()
11
11
  {