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.
@@ -4920,6 +4920,15 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
4920
4920
  }
4921
4921
  }
4922
4922
 
4923
+ if (option.EnableYDrag)
4924
+ {
4925
+ var item=option.EnableYDrag;
4926
+ if (IFrameSplitOperator.IsBool(item.Left)) chart.EnableYDrag.Left=item.Left;
4927
+ if (IFrameSplitOperator.IsBool(item.Right)) chart.EnableYDrag.Right=item.Right;
4928
+ if (IFrameSplitOperator.IsBool(item.Wheel)) chart.EnableYDrag.Wheel=item.Wheel;
4929
+ if (IFrameSplitOperator.IsNumber(item.WheelYMove)) chart.EnableYDrag.WheelYMove=item.WheelYMove;
4930
+ }
4931
+
4923
4932
  //分页
4924
4933
  if (option.PageInfo) chart.SetPageInfo(option.PageInfo);
4925
4934
 
@@ -4995,7 +5004,6 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
4995
5004
  }
4996
5005
  if (item.Height>=0) chart.Frame.SubFrame[i].Height = item.Height;
4997
5006
  if (item.Custom) chart.Frame.SubFrame[i].Frame.YSplitOperator.Custom=item.Custom;
4998
- if (item.RightTextFormat>0) chart.Frame.SubFrame[i].Frame.YSplitOperator.RightTextFormat=item.RightTextFormat;
4999
5007
  if (IFrameSplitOperator.IsNumber(item.TitleHeight)) chart.Frame.SubFrame[i].Frame.ChartBorder.TitleHeight=item.TitleHeight;
5000
5008
  if (IFrameSplitOperator.IsNumber(item.BorderLine)) chart.Frame.SubFrame[i].Frame.BorderLine=item.BorderLine;
5001
5009
  if (IFrameSplitOperator.IsBool(item.EnableRemoveZero)) chart.Frame.SubFrame[i].Frame.YSplitOperator.EnableRemoveZero=item.EnableRemoveZero;
@@ -5013,6 +5021,15 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
5013
5021
 
5014
5022
  if (item.ClientBGColor) subFrame.ClientBGColor=item.ClientBGColor;
5015
5023
  if (!IFrameSplitOperator.IsUndefined(item.HorizontalReserved)) subFrame.HorizontalReserved=item.HorizontalReserved;
5024
+
5025
+ if (i==0)
5026
+ {
5027
+ if (IFrameSplitOperator.IsNumber(item.RightTextFormat))
5028
+ {
5029
+ subFrame.YSplitOperator.RightTextFormat=item.RightTextFormat;
5030
+ if (item.RightTextFormat==2) subFrame.MultiTextFormat=1;
5031
+ }
5032
+ }
5016
5033
  }
5017
5034
 
5018
5035
  chart.UpdateXShowText();
@@ -16405,7 +16422,7 @@ function AverageWidthFrame()
16405
16422
  var item=aryText[i];
16406
16423
  var message=item.Item;
16407
16424
 
16408
- this.Canvas.textBaseline=message.TextBaseline;
16425
+ this.Canvas.textBaseline=item.TextBaseline;
16409
16426
  if (message.ExtendData && message.ExtendData.Font) this.Canvas.font=message.ExtendData.Font;
16410
16427
  else if (message.Font) this.Canvas.font=message.Font;
16411
16428
 
@@ -18028,20 +18045,17 @@ function AverageWidthFrame()
18028
18045
 
18029
18046
  if (Array.isArray(item.Message[1]))
18030
18047
  {
18031
- if (this.MultiTextFormat==1) //显示1行 格式:价格/百分比
18048
+ if (this.MultiTextFormat==1 && IFrameSplitOperator.IsNonEmptyArray(item.Message[1])) //显示1行 格式:价格/百分比
18032
18049
  {
18033
- if (item.ExtendData)
18034
- {
18035
- if (item.ExtendData.Font) this.Canvas.font=item.ExtendData.Font;
18036
- var width1=this.Canvas.measureText(item.Message[1][0]).width;
18037
- var width2=this.Canvas.measureText(item.Message[1][1]).width;
18038
- var width3=this.Canvas.measureText('/').width;
18039
- textWidth=width1+width3;
18040
-
18041
- if (rightExtendWidth<width2) rightExtendWidth=width2;
18050
+ if (item.ExtendData && item.ExtendData.Font) this.Canvas.font=item.ExtendData.Font;
18051
+
18052
+ var width1=this.Canvas.measureText(item.Message[1][0]).width;
18053
+ var width2=this.Canvas.measureText(item.Message[1][1]).width;
18054
+ var width3=this.Canvas.measureText('/').width;
18055
+ textWidth=width1+width3;
18056
+ if (rightExtendWidth<width2) rightExtendWidth=width2;
18042
18057
 
18043
- //JSConsole.Chart.Log(`[ChartData::GetScaleTextWidth] ${item.Message[1][1]}/${item.Message[1][0]} ${textWidth}, ${rightExtendWidth}`);
18044
- }
18058
+ //JSConsole.Chart.Log(`[ChartData::GetScaleTextWidth] ${item.Message[1][1]}/${item.Message[1][0]} ${textWidth}, ${rightExtendWidth}`);
18045
18059
  }
18046
18060
  else if (this.MultiTextFormat==2) //显示2行
18047
18061
  {
@@ -32362,9 +32376,10 @@ function ChartKLine()
32362
32376
  var item=this.TradeIconTooltipRect[i];
32363
32377
  if (!item.Rect) continue;
32364
32378
  var rect=item.Rect;
32365
- this.Canvas.beginPath();
32366
- this.Canvas.rect(rect.X,rect.Y,rect.Width,rect.Height);
32367
- if (this.Canvas.isPointInPath(x,y))
32379
+ var left=rect.X, top=rect.Y;
32380
+ var right=left+rect.Width;
32381
+ var bottom=top+rect.Height;
32382
+ if (x>=left && x<=right && y>=top && y<=bottom)
32368
32383
  {
32369
32384
  JSConsole.Chart.Log('[ChartKLine::GetTooltipData] trade icon ', item);
32370
32385
  tooltip.Data=item;
@@ -32379,9 +32394,10 @@ function ChartKLine()
32379
32394
  var item=this.InfoTooltipRect[i];
32380
32395
  if (!item.Rect) continue;
32381
32396
  var rect=item.Rect;
32382
- this.Canvas.beginPath();
32383
- this.Canvas.rect(rect.X,rect.Y,rect.Width,rect.Height);
32384
- if (this.Canvas.isPointInPath(x,y))
32397
+ var left=rect.X, top=rect.Y;
32398
+ var right=left+rect.Width;
32399
+ var bottom=top+rect.Height;
32400
+ if (x>=left && x<=right && y>=top && y<=bottom)
32385
32401
  {
32386
32402
  //JSConsole.Chart.Log('[ChartKLine::GetTooltipData] info ', item);
32387
32403
  tooltip.Data=item;
@@ -32391,18 +32407,22 @@ function ChartKLine()
32391
32407
  }
32392
32408
  }
32393
32409
 
32394
- for(var i in this.TooltipRect)
32410
+ if (IFrameSplitOperator.IsNonEmptyArray(this.TooltipRect))
32395
32411
  {
32396
- var rect=this.TooltipRect[i][1];
32397
- this.Canvas.beginPath();
32398
- this.Canvas.rect(rect.X,rect.Y,rect.Width,rect.Height);
32399
- if (this.Canvas.isPointInPath(x,y))
32412
+ for(var i=0; i<this.TooltipRect.length; ++i)
32400
32413
  {
32401
- var index=this.TooltipRect[i][0];
32402
- tooltip.Data=this.Data.Data[index];
32403
- tooltip.ChartPaint=this;
32404
- tooltip.Type=0; //K线信息
32405
- return true;
32414
+ var rect=this.TooltipRect[i][1];
32415
+ var left=rect.X, top=rect.Y;
32416
+ var right=left+rect.Width;
32417
+ var bottom=top+rect.Height;
32418
+ if (x>=left && x<=right && y>=top && y<=bottom)
32419
+ {
32420
+ var index=this.TooltipRect[i][0];
32421
+ tooltip.Data=this.Data.Data[index];
32422
+ tooltip.ChartPaint=this;
32423
+ tooltip.Type=0; //K线信息
32424
+ return true;
32425
+ }
32406
32426
  }
32407
32427
  }
32408
32428
 
@@ -41060,7 +41080,7 @@ function ChartMinutePriceLine()
41060
41080
  if (value==null) continue;
41061
41081
 
41062
41082
  var x=this.ChartFrame.GetXFromIndex(j);
41063
- var y=this.ChartFrame.GetYFromData(value);
41083
+ var y=this.ChartFrame.GetYFromData(value,false);
41064
41084
 
41065
41085
  if (bFirstPoint)
41066
41086
  {
@@ -56297,7 +56317,7 @@ function FrameSplitMinutePriceY()
56297
56317
  this.DefaultSplitType=0;
56298
56318
  this.LimitPrice; //{Max: Min:} 涨跌停价
56299
56319
  this.Custom;
56300
- this.RightTextFormat=0; //右边刻度显示模式 0=百分比 1=价格
56320
+ this.RightTextFormat=0; //右边刻度显示模式 0=百分比 1=价格 2=价格 | 百分比
56301
56321
 
56302
56322
  this.BeforeOpenData;
56303
56323
  this.IsBeforeData=false;
@@ -56313,9 +56333,12 @@ function FrameSplitMinutePriceY()
56313
56333
  this.GlobalOption;
56314
56334
  this.HQChart;
56315
56335
 
56336
+ this.FixedYMaxMin; //{ Max, Min} 固定Y轴最大最小值
56337
+ this.EnableZoomUpDown=false;
56338
+
56316
56339
  this.IsEnableDragY=function()
56317
56340
  {
56318
- return false;
56341
+ return true;
56319
56342
  }
56320
56343
 
56321
56344
  this.Operator=function()
@@ -56324,23 +56347,35 @@ function FrameSplitMinutePriceY()
56324
56347
  this.Frame.CustomHorizontalInfo=[];
56325
56348
  if (!this.Data) return;
56326
56349
 
56327
- var range=this.GetMaxMin();
56350
+ var range=null;
56351
+ var isFixedMaxMin=(this.FixedYMaxMin && IFrameSplitOperator.IsNumber(this.FixedYMaxMin.Max) && IFrameSplitOperator.IsNumber(this.FixedYMaxMin.Min));
56352
+ if (isFixedMaxMin)
56353
+ {
56354
+ range={ Max:this.FixedYMaxMin.Max, Min:this.FixedYMaxMin.Min };
56355
+ JSConsole.Chart.Log(`[FrameSplitMinutePriceY::Operator] FixedYMaxMin.Max=${this.FixedYMaxMin.Max} FixedYMaxMin.Min=${this.FixedYMaxMin.Min} `);
56356
+ }
56357
+ else
56358
+ {
56359
+ range=this.GetMaxMin();
56360
+ }
56328
56361
 
56329
56362
  if (this.Symbol && MARKET_SUFFIX_NAME.IsUSA(this.Symbol.toUpperCase()))
56330
56363
  {
56331
- this.USASplit(range);
56364
+ this.USASplit(range,isFixedMaxMin);
56332
56365
  }
56333
56366
  else if (this.SplitType==2)
56334
56367
  {
56335
- this.USASplit(range);
56368
+ this.USASplit(range,isFixedMaxMin);
56336
56369
  }
56337
56370
  else
56338
56371
  {
56339
- this.DefaultSplit(range);
56372
+ this.DefaultSplit(range,isFixedMaxMin);
56340
56373
  }
56341
56374
 
56342
56375
  this.CustomCoordinate();
56343
56376
 
56377
+ if (this.EnableZoomUpDown==true && !this.FixedYMaxMin) this.FixedYMaxMin={ Max:range.Max, Min:range.Min };
56378
+
56344
56379
  this.ReservedHeight({ Max:this.Frame.HorizontalMax, Min:this.Frame.HorizontalMin }); //预留高度
56345
56380
 
56346
56381
  if (this.GetEventCallback)
@@ -56736,10 +56771,21 @@ function FrameSplitMinutePriceY()
56736
56771
  var per=(price/this.YClose-1)*100;
56737
56772
  if (per>0) coordinate.TextColor=g_JSChartResource.UpTextColor;
56738
56773
  else if (per<0) coordinate.TextColor=g_JSChartResource.DownTextColor;
56774
+ var strPer=IFrameSplitOperator.FormatValueString(per,2)+'%';
56739
56775
  if (this.IsShowRightText)
56740
56776
  {
56741
- if (this.RightTextFormat==1) coordinate.Message[1]=strPrice;
56742
- else coordinate.Message[1]=IFrameSplitOperator.FormatValueString(per,2)+'%'; //百分比
56777
+ if (this.RightTextFormat==1)
56778
+ {
56779
+ coordinate.Message[1]=strPrice;
56780
+ }
56781
+ else if (this.RightTextFormat==2) //价格/百分比
56782
+ {
56783
+ coordinate.Message[1]=[strPrice,strPer];
56784
+ }
56785
+ else
56786
+ {
56787
+ coordinate.Message[1]=strPer; //百分比
56788
+ }
56743
56789
  }
56744
56790
  }
56745
56791
 
@@ -56771,22 +56817,25 @@ function FrameSplitMinutePriceY()
56771
56817
  this.Frame.HorizontalMin=min;
56772
56818
  }
56773
56819
 
56774
- this.DefaultSplit=function(range)
56820
+ this.DefaultSplit=function(range,isFixedMaxMin)
56775
56821
  {
56776
56822
  var max=range.Max;
56777
56823
  var min=range.Min;
56778
56824
 
56779
- if (this.YClose==max && this.YClose==min)
56780
- {
56781
- max=this.YClose+this.YClose*0.1;
56782
- min=this.YClose-this.YClose*0.1
56783
- }
56784
- else
56825
+ if (!isFixedMaxMin)
56785
56826
  {
56786
- var distanceValue=Math.max(Math.abs(this.YClose-max),Math.abs(this.YClose-min));
56787
- max=this.YClose+distanceValue;
56788
- min=this.YClose-distanceValue;
56789
- if (min<0) min=range.Min;
56827
+ if (this.YClose==max && this.YClose==min)
56828
+ {
56829
+ max=this.YClose+this.YClose*0.1;
56830
+ min=this.YClose-this.YClose*0.1
56831
+ }
56832
+ else
56833
+ {
56834
+ var distanceValue=Math.max(Math.abs(this.YClose-max),Math.abs(this.YClose-min));
56835
+ max=this.YClose+distanceValue;
56836
+ min=this.YClose-distanceValue;
56837
+ if (min<0) min=range.Min;
56838
+ }
56790
56839
  }
56791
56840
 
56792
56841
  var pixelTatio = GetDevicePixelRatio(); //获取设备的分辨率
@@ -56799,7 +56848,7 @@ function FrameSplitMinutePriceY()
56799
56848
  const minDistance=[1, 0.1, 0.01, 0.001, 0.0001];
56800
56849
  var defaultfloatPrecision=GetfloatPrecision(this.Symbol);
56801
56850
  if (isPhoneModel && MARKET_SUFFIX_NAME.IsSHSZIndex(this.Symbol)) defaultfloatPrecision = 0; //手机端指数不显示小数位数,太长了
56802
- if (distance<minDistance[defaultfloatPrecision])
56851
+ if (distance<minDistance[defaultfloatPrecision] && !isFixedMaxMin)
56803
56852
  {
56804
56853
  distance=minDistance[defaultfloatPrecision];
56805
56854
  max=this.YClose+(distance*(showCount-1)/2);
@@ -56820,11 +56869,21 @@ function FrameSplitMinutePriceY()
56820
56869
  var per=(price/this.YClose-1)*100;
56821
56870
  if (per>0) coordinate.TextColor=g_JSChartResource.UpTextColor;
56822
56871
  else if (per<0) coordinate.TextColor=g_JSChartResource.DownTextColor;
56823
-
56872
+ var strPer=`${IFrameSplitOperator.FormatValueString(per,2)}%`;
56824
56873
  if (this.IsShowRightText)
56825
56874
  {
56826
- if (this.RightTextFormat==1) coordinate.Message[1]=strPrice;
56827
- else coordinate.Message[1]=IFrameSplitOperator.FormatValueString(per,2)+'%'; //百分比
56875
+ if (this.RightTextFormat==1)
56876
+ {
56877
+ coordinate.Message[1]=strPrice;
56878
+ }
56879
+ else if (this.RightTextFormat==2) //价格/百分比
56880
+ {
56881
+ coordinate.Message[1]=[strPer,strPrice];
56882
+ }
56883
+ else
56884
+ {
56885
+ coordinate.Message[1]=strPer; //百分比
56886
+ }
56828
56887
  }
56829
56888
 
56830
56889
  if (Math.abs(price-this.YClose) <0.00000000001) //小数有精度问题 使用差值
@@ -79673,7 +79732,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
79673
79732
 
79674
79733
  this.ChartOperator_Temp_Update();
79675
79734
  }
79676
- else if (id==JSCHART_OPERATOR_ID.OP_CORSSCURSOR_GOTO) //移动十字光标{ Date:, Time }
79735
+ else if (id==JSCHART_OPERATOR_ID.OP_CORSSCURSOR_GOTO) //移动十字光标{ Date:, Time, Type:1=如果不存在 就隐藏十字光标 }
79677
79736
  {
79678
79737
  if (!IFrameSplitOperator.IsNumber(obj.Date)) return;
79679
79738
  var bTime=IFrameSplitOperator.IsNumber(obj.Time);
@@ -79714,6 +79773,23 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
79714
79773
 
79715
79774
  if (findIndex<0)
79716
79775
  {
79776
+ if (obj.Type==1) // 如果不存在 就隐藏十字光标
79777
+ {
79778
+ var x=-1,y=-1;
79779
+ var MoveStatus={ X:x, Y:y, IsInClient: this.IsMouseOnClient(x,y) };
79780
+ this.LastMouseStatus.OnMouseMove=MoveStatus;
79781
+ this.LastMouseStatus.MoveOnPoint={X:x, Y:y}; //鼠标移动的位置
79782
+
79783
+ var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_MOUSE_MOVE);
79784
+ var titleChart=this.TitlePaint[0];
79785
+ if (event && titleChart) titleChart.OnMouseMoveEvent=event;
79786
+
79787
+ var e={clientX:x, clientY:y};
79788
+ this.MoveOnPoint={X:x, Y:y};
79789
+ this.OnMouseMove(x,y,e);
79790
+ this.LastMouseStatus.MoveOnPoint=null;
79791
+ if (titleChart) titleChart.OnMouseMoveEvent=null;
79792
+ }
79717
79793
  return;
79718
79794
  }
79719
79795
 
@@ -87521,14 +87597,30 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
87521
87597
  var moveSetp=moveData.X;
87522
87598
  var yMoveSetp=moveData.Y;
87523
87599
 
87524
- if (this.RectSelectDrag && this.RectSelectDrag.Index>=0) //区间选择
87600
+ var bNeedDraw=true;
87601
+ if (this.UpDownDrag && this.UpDownDrag.Index>=0)
87602
+ {
87603
+ if (yMoveSetp>=5)
87604
+ {
87605
+ var yMove=e.clientY-drag.LastMove.Y;
87606
+ JSConsole.Chart.Log("[MinuteChartContainer::OnDragMode_One] UpDownDrag ",this.UpDownDrag,yMove);
87607
+ //this.UIElement.style.cursor="pointer";
87608
+ this.SetCursor({Cursor:"pointer"});
87609
+ if (this.OnUpDonwFrameY(this.UpDownDrag, yMove))
87610
+ {
87611
+ drag.LastMove.Y=e.clientY;
87612
+ bNeedDraw=true;
87613
+ }
87614
+ }
87615
+ }
87616
+ else if (this.RectSelectDrag && this.RectSelectDrag.Index>=0) //区间选择
87525
87617
  {
87526
87618
  if (moveSetp<5) return;
87527
87619
  var obj={ X:e.clientX, Y:e.clientY, PointIndex:this.RectSelectDrag.Index, Name:"MoveRectSelectLine" };
87528
87620
  if (this.MoveRectSelectPoint(obj))
87529
87621
  {
87530
87622
  drag.LastMove.X=e.clientX;
87531
- this.Draw();
87623
+ bNeedDraw=true;
87532
87624
  }
87533
87625
  }
87534
87626
  else
@@ -87546,6 +87638,8 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
87546
87638
  drag.LastMove.X=e.clientX;
87547
87639
  drag.LastMove.Y=e.clientY;
87548
87640
  }
87641
+
87642
+ if (bNeedDraw) this.Draw();
87549
87643
  }
87550
87644
 
87551
87645
  this.OnMinuteSelectRectMouseUp=function(e)
@@ -87563,8 +87657,12 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
87563
87657
  selectData.YEnd=(drag.LastMove.Y-uielement.getBoundingClientRect().top)*pixelTatio;
87564
87658
  selectData.JSChartContainer=this;
87565
87659
  selectData.Stock={Symbol:this.Symbol, Name:this.Name};
87660
+
87661
+ if (this.UpDownDrag)
87662
+ {
87566
87663
 
87567
- if (this.EnableSelectRect && !this.BorderDrag && this.GetSelectRectData(selectData))
87664
+ }
87665
+ else if (this.EnableSelectRect && !this.BorderDrag && this.GetSelectRectData(selectData))
87568
87666
  {
87569
87667
  var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_SELECT_RECT);
87570
87668
  var paint=this.GetRectSelectPaint();
@@ -87935,25 +88033,83 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
87935
88033
  }
87936
88034
  }
87937
88035
 
88036
+
88037
+ this.GetDataIndexByDatTime=function(date, time)
88038
+ {
88039
+ var result={ DayIndex:-1, DataIndex:-1, Index:-1 };
88040
+ var frame=this.Frame.SubFrame[0].Frame;
88041
+ var minCount=frame.MinuteCount; //每天的分钟个数
88042
+ var kData=this.GetKData();
88043
+ for(var i=0;i<kData.Data.length;++i)
88044
+ {
88045
+ var minItem=kData.Data[i];
88046
+ if (!minItem) continue;
88047
+
88048
+ if (minItem.Date==date && minItem.Time==time)
88049
+ {
88050
+ result.Index=i;
88051
+ result.DayIndex=parseInt(i/minCount);
88052
+ result.DataIndex=i%minCount;
88053
+ break;
88054
+ }
88055
+ }
88056
+
88057
+ return result;
88058
+ }
88059
+
88060
+ //获取十字光标位置 通过日期和时间 目前只支持连续交易时间段
88061
+ this.GetCorssCursorIndexByDateTime=function(date, time)
88062
+ {
88063
+ var border=this.Frame.ChartBorder.GetBorder();
88064
+
88065
+ if (border.DayBorder) //多日分时主图+多日集合竞价
88066
+ {
88067
+ var corssCursorIndex=this.GetDataIndexByDatTime(date, time);
88068
+ corssCursorIndex.Type=10;
88069
+ }
88070
+ else //单日,多日
88071
+ {
88072
+ var corssCursorIndex=this.GetDataIndexByDatTime(date, time);
88073
+ corssCursorIndex.Type=1;
88074
+ corssCursorIndex.DayIndex=0;
88075
+ corssCursorIndex.DataIndex=corssCursorIndex.Index;
88076
+ }
88077
+
88078
+ return corssCursorIndex;
88079
+ }
88080
+
87938
88081
  this.LockCorssCursor=function(option)
87939
88082
  {
87940
88083
  var xItem=this.GlobalOption.LockCorssCursor.X;
88084
+
88085
+ var corssCursorIndex={ DayIndex:-1, DataIndex:-1, Type:-1, Index:this.CursorIndex };
88086
+ if (this.EnableNewIndex)
88087
+ {
88088
+ corssCursorIndex.Type=this.CorssCursorIndex.Type;
88089
+ corssCursorIndex.DayIndex=this.CorssCursorIndex.DayIndex;
88090
+ corssCursorIndex.DataIndex=this.CorssCursorIndex.DataIndex;
88091
+ }
88092
+
88093
+ if (option && option.KItem) //指定日期时间
88094
+ {
88095
+ corssCursorIndex=this.GetCorssCursorIndexByDateTime(option.KItem.Date, option.KItem.Time);
88096
+ }
87941
88097
 
87942
88098
  if (this.EnableNewIndex)
87943
88099
  {
87944
- if (this.CorssCursorIndex.Type!=1 && this.CorssCursorIndex.Type!=10) return false; //目前只支持连续交易时间段
88100
+ if (corssCursorIndex.Type!=1 && corssCursorIndex.Type!=10) return false; //目前只支持连续交易时间段
87945
88101
 
87946
88102
  xItem.Minute=
87947
88103
  {
87948
- DayIndex:this.CorssCursorIndex.DayIndex,
87949
- DataIndex:this.CorssCursorIndex.DataIndex,
87950
- Type:this.CorssCursorIndex.Type,
87951
- CursorIndex:this.CursorIndex,
88104
+ DayIndex:corssCursorIndex.DayIndex,
88105
+ DataIndex:corssCursorIndex.DataIndex,
88106
+ Type:corssCursorIndex.Type,
88107
+ CursorIndex:corssCursorIndex.Index,
87952
88108
  };
87953
88109
  }
87954
88110
  else
87955
88111
  {
87956
- xItem.Minute={ CursorIndex:this.CursorIndex };
88112
+ xItem.Minute={ CursorIndex:corssCursorIndex.Index };
87957
88113
  }
87958
88114
 
87959
88115
  xItem.Enable=true;
@@ -88029,12 +88185,16 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
88029
88185
  var x=null;
88030
88186
  var dayIndex=corssCursorIndex.DayIndex;
88031
88187
  var dataIndex=corssCursorIndex.DataIndex;
88032
- switch(corssCursorIndex.Type) //单日 1=主图 2=盘前 3=盘后 //多日 10=主图 20=盘前 30=盘后
88188
+ var frame=this.Frame.SubFrame[0].Frame;
88189
+ switch(corssCursorIndex.Type) //单日,多日 1=主图 2=盘前 3=盘后 //多日+多日集合竞价 10=主图 20=盘前 30=盘后
88033
88190
  {
88034
- case 1: //单日 1=主图
88035
- case 10: //多日 10=主图
88191
+ case 1: //单日,多日 1=主图
88036
88192
  x=this.Frame.GetXFromIndex(dataIndex)
88037
88193
  break;
88194
+ case 10: //多日+多日集合竞价 10=主图
88195
+ var cursorIndex=frame.MinuteCount*dayIndex+dataIndex;
88196
+ x=this.Frame.GetXFromIndex(cursorIndex);
88197
+ break;
88038
88198
  /*
88039
88199
  case 2: //单日 2=盘前
88040
88200
  x=this.Frame.SubFrame[0].Frame.GetLeftExtendXFromIndex(dataIndex,this.GetBeforeOpenData());
@@ -88832,6 +88992,17 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
88832
88992
  var bShowCorss=false; //十字光标十字线
88833
88993
  if (this.ChartCorssCursor) bShowCorss=this.ChartCorssCursor.IsShowCorss;
88834
88994
 
88995
+ var minItem=null;
88996
+ if (frameID>=0 && option && IFrameSplitOperator.IsNumber(option.CursorIndex))
88997
+ {
88998
+ var kData=this.GetKData();
88999
+ if (kData && IFrameSplitOperator.IsNonEmptyArray(kData.Data))
89000
+ {
89001
+ var dataIndex=kData.DataOffset+parseInt(option.CursorIndex.toFixed(0));
89002
+ if (dataIndex>=0 && dataIndex<kData.Data.length) minItem=kData.Data[dataIndex];
89003
+ }
89004
+ }
89005
+
88835
89006
  var aryMenu=
88836
89007
  [
88837
89008
  {
@@ -88963,7 +89134,14 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
88963
89134
  }
88964
89135
  else if (item.Name=="其他设置")
88965
89136
  {
88966
-
89137
+ if (minItem)
89138
+ {
89139
+ var bLocked=this.IsLockCorssCursor();
89140
+ if (bLocked)
89141
+ item.SubMenu.push({ Name:"锁十字光标", Data:{ ID: JSCHART_MENU_ID.CMD_UNLOCK_CROSSCURSOR }, Checked:bLocked });
89142
+ else
89143
+ item.SubMenu.push({ Name:"锁十字光标", Data:{ ID: JSCHART_MENU_ID.CMD_LOCK_CROSSCURSOR, Args:[{ KItem:{Date:minItem.Date, Time:minItem.Time}, Draw:true }] }, Checked:bLocked });
89144
+ }
88967
89145
  }
88968
89146
  }
88969
89147
 
@@ -88979,6 +89157,18 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
88979
89157
  {
88980
89158
  JSConsole.Chart.Log("[MinuteChartContainer::OnDoubleClick]", e);
88981
89159
 
89160
+ if (this.EnableYDrag && (this.EnableYDrag.Left || this.EnableYDrag.Right) && this.Frame && this.Frame.PtInFrameY)
89161
+ {
89162
+ var pixelTatio = GetDevicePixelRatio();
89163
+ var x = (e.clientX-this.UIElement.getBoundingClientRect().left)*pixelTatio;
89164
+ var y = (e.clientY-this.UIElement.getBoundingClientRect().top)*pixelTatio;
89165
+ var dragY=this.Frame.PtInFrameY(x,y);
89166
+ if (dragY && dragY.Index>=0)
89167
+ {
89168
+ this.CancelZoomUpDownFrameY(dragY);
89169
+ }
89170
+ }
89171
+
88982
89172
  if (this.ClickChartTimer!=null)
88983
89173
  {
88984
89174
  clearTimeout(this.ClickChartTimer);
@@ -126949,7 +127139,9 @@ function APIScriptIndex(name,script,args,option, isOverlay)
126949
127139
  drawItem.DrawData=this.FittingArray(draw.DrawData,date,time,hqChart,1);
126950
127140
 
126951
127141
  outVarItem.Draw=drawItem;
126952
- if (draw.LineWidth) outVarItem.LineWidth=draw.LineWidth;
127142
+ if (IFrameSplitOperator.IsString(draw.LineWidth)) outVarItem.LineWidth=draw.LineWidth;
127143
+ if (IFrameSplitOperator.IsBool(draw.IsDotLine)) outVarItem.IsDotLine=draw.IsDotLine;
127144
+ if (IFrameSplitOperator.IsNonEmptyArray(draw.LineDash)) outVarItem.LineDash=draw.LineDash;
126953
127145
 
126954
127146
  result.push(outVarItem);
126955
127147
  }
@@ -152961,7 +153153,7 @@ function HQChartScriptWorker()
152961
153153
 
152962
153154
 
152963
153155
 
152964
- var HQCHART_VERSION="1.1.14387";
153156
+ var HQCHART_VERSION="1.1.14403";
152965
153157
 
152966
153158
  function PrintHQChartVersion()
152967
153159
  {