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.
@@ -951,6 +951,15 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
951
951
  }
952
952
  }
953
953
 
954
+ if (option.EnableYDrag)
955
+ {
956
+ var item=option.EnableYDrag;
957
+ if (IFrameSplitOperator.IsBool(item.Left)) chart.EnableYDrag.Left=item.Left;
958
+ if (IFrameSplitOperator.IsBool(item.Right)) chart.EnableYDrag.Right=item.Right;
959
+ if (IFrameSplitOperator.IsBool(item.Wheel)) chart.EnableYDrag.Wheel=item.Wheel;
960
+ if (IFrameSplitOperator.IsNumber(item.WheelYMove)) chart.EnableYDrag.WheelYMove=item.WheelYMove;
961
+ }
962
+
954
963
  //分页
955
964
  if (option.PageInfo) chart.SetPageInfo(option.PageInfo);
956
965
 
@@ -1026,7 +1035,6 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
1026
1035
  }
1027
1036
  if (item.Height>=0) chart.Frame.SubFrame[i].Height = item.Height;
1028
1037
  if (item.Custom) chart.Frame.SubFrame[i].Frame.YSplitOperator.Custom=item.Custom;
1029
- if (item.RightTextFormat>0) chart.Frame.SubFrame[i].Frame.YSplitOperator.RightTextFormat=item.RightTextFormat;
1030
1038
  if (IFrameSplitOperator.IsNumber(item.TitleHeight)) chart.Frame.SubFrame[i].Frame.ChartBorder.TitleHeight=item.TitleHeight;
1031
1039
  if (IFrameSplitOperator.IsNumber(item.BorderLine)) chart.Frame.SubFrame[i].Frame.BorderLine=item.BorderLine;
1032
1040
  if (IFrameSplitOperator.IsBool(item.EnableRemoveZero)) chart.Frame.SubFrame[i].Frame.YSplitOperator.EnableRemoveZero=item.EnableRemoveZero;
@@ -1044,6 +1052,15 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
1044
1052
 
1045
1053
  if (item.ClientBGColor) subFrame.ClientBGColor=item.ClientBGColor;
1046
1054
  if (!IFrameSplitOperator.IsUndefined(item.HorizontalReserved)) subFrame.HorizontalReserved=item.HorizontalReserved;
1055
+
1056
+ if (i==0)
1057
+ {
1058
+ if (IFrameSplitOperator.IsNumber(item.RightTextFormat))
1059
+ {
1060
+ subFrame.YSplitOperator.RightTextFormat=item.RightTextFormat;
1061
+ if (item.RightTextFormat==2) subFrame.MultiTextFormat=1;
1062
+ }
1063
+ }
1047
1064
  }
1048
1065
 
1049
1066
  chart.UpdateXShowText();
@@ -12436,7 +12453,7 @@ function AverageWidthFrame()
12436
12453
  var item=aryText[i];
12437
12454
  var message=item.Item;
12438
12455
 
12439
- this.Canvas.textBaseline=message.TextBaseline;
12456
+ this.Canvas.textBaseline=item.TextBaseline;
12440
12457
  if (message.ExtendData && message.ExtendData.Font) this.Canvas.font=message.ExtendData.Font;
12441
12458
  else if (message.Font) this.Canvas.font=message.Font;
12442
12459
 
@@ -14059,20 +14076,17 @@ function AverageWidthFrame()
14059
14076
 
14060
14077
  if (Array.isArray(item.Message[1]))
14061
14078
  {
14062
- if (this.MultiTextFormat==1) //显示1行 格式:价格/百分比
14079
+ if (this.MultiTextFormat==1 && IFrameSplitOperator.IsNonEmptyArray(item.Message[1])) //显示1行 格式:价格/百分比
14063
14080
  {
14064
- if (item.ExtendData)
14065
- {
14066
- if (item.ExtendData.Font) this.Canvas.font=item.ExtendData.Font;
14067
- var width1=this.Canvas.measureText(item.Message[1][0]).width;
14068
- var width2=this.Canvas.measureText(item.Message[1][1]).width;
14069
- var width3=this.Canvas.measureText('/').width;
14070
- textWidth=width1+width3;
14071
-
14072
- if (rightExtendWidth<width2) rightExtendWidth=width2;
14081
+ if (item.ExtendData && item.ExtendData.Font) this.Canvas.font=item.ExtendData.Font;
14082
+
14083
+ var width1=this.Canvas.measureText(item.Message[1][0]).width;
14084
+ var width2=this.Canvas.measureText(item.Message[1][1]).width;
14085
+ var width3=this.Canvas.measureText('/').width;
14086
+ textWidth=width1+width3;
14087
+ if (rightExtendWidth<width2) rightExtendWidth=width2;
14073
14088
 
14074
- //JSConsole.Chart.Log(`[ChartData::GetScaleTextWidth] ${item.Message[1][1]}/${item.Message[1][0]} ${textWidth}, ${rightExtendWidth}`);
14075
- }
14089
+ //JSConsole.Chart.Log(`[ChartData::GetScaleTextWidth] ${item.Message[1][1]}/${item.Message[1][0]} ${textWidth}, ${rightExtendWidth}`);
14076
14090
  }
14077
14091
  else if (this.MultiTextFormat==2) //显示2行
14078
14092
  {
@@ -28393,9 +28407,10 @@ function ChartKLine()
28393
28407
  var item=this.TradeIconTooltipRect[i];
28394
28408
  if (!item.Rect) continue;
28395
28409
  var rect=item.Rect;
28396
- this.Canvas.beginPath();
28397
- this.Canvas.rect(rect.X,rect.Y,rect.Width,rect.Height);
28398
- if (this.Canvas.isPointInPath(x,y))
28410
+ var left=rect.X, top=rect.Y;
28411
+ var right=left+rect.Width;
28412
+ var bottom=top+rect.Height;
28413
+ if (x>=left && x<=right && y>=top && y<=bottom)
28399
28414
  {
28400
28415
  JSConsole.Chart.Log('[ChartKLine::GetTooltipData] trade icon ', item);
28401
28416
  tooltip.Data=item;
@@ -28410,9 +28425,10 @@ function ChartKLine()
28410
28425
  var item=this.InfoTooltipRect[i];
28411
28426
  if (!item.Rect) continue;
28412
28427
  var rect=item.Rect;
28413
- this.Canvas.beginPath();
28414
- this.Canvas.rect(rect.X,rect.Y,rect.Width,rect.Height);
28415
- if (this.Canvas.isPointInPath(x,y))
28428
+ var left=rect.X, top=rect.Y;
28429
+ var right=left+rect.Width;
28430
+ var bottom=top+rect.Height;
28431
+ if (x>=left && x<=right && y>=top && y<=bottom)
28416
28432
  {
28417
28433
  //JSConsole.Chart.Log('[ChartKLine::GetTooltipData] info ', item);
28418
28434
  tooltip.Data=item;
@@ -28422,18 +28438,22 @@ function ChartKLine()
28422
28438
  }
28423
28439
  }
28424
28440
 
28425
- for(var i in this.TooltipRect)
28441
+ if (IFrameSplitOperator.IsNonEmptyArray(this.TooltipRect))
28426
28442
  {
28427
- var rect=this.TooltipRect[i][1];
28428
- this.Canvas.beginPath();
28429
- this.Canvas.rect(rect.X,rect.Y,rect.Width,rect.Height);
28430
- if (this.Canvas.isPointInPath(x,y))
28443
+ for(var i=0; i<this.TooltipRect.length; ++i)
28431
28444
  {
28432
- var index=this.TooltipRect[i][0];
28433
- tooltip.Data=this.Data.Data[index];
28434
- tooltip.ChartPaint=this;
28435
- tooltip.Type=0; //K线信息
28436
- return true;
28445
+ var rect=this.TooltipRect[i][1];
28446
+ var left=rect.X, top=rect.Y;
28447
+ var right=left+rect.Width;
28448
+ var bottom=top+rect.Height;
28449
+ if (x>=left && x<=right && y>=top && y<=bottom)
28450
+ {
28451
+ var index=this.TooltipRect[i][0];
28452
+ tooltip.Data=this.Data.Data[index];
28453
+ tooltip.ChartPaint=this;
28454
+ tooltip.Type=0; //K线信息
28455
+ return true;
28456
+ }
28437
28457
  }
28438
28458
  }
28439
28459
 
@@ -37091,7 +37111,7 @@ function ChartMinutePriceLine()
37091
37111
  if (value==null) continue;
37092
37112
 
37093
37113
  var x=this.ChartFrame.GetXFromIndex(j);
37094
- var y=this.ChartFrame.GetYFromData(value);
37114
+ var y=this.ChartFrame.GetYFromData(value,false);
37095
37115
 
37096
37116
  if (bFirstPoint)
37097
37117
  {
@@ -52328,7 +52348,7 @@ function FrameSplitMinutePriceY()
52328
52348
  this.DefaultSplitType=0;
52329
52349
  this.LimitPrice; //{Max: Min:} 涨跌停价
52330
52350
  this.Custom;
52331
- this.RightTextFormat=0; //右边刻度显示模式 0=百分比 1=价格
52351
+ this.RightTextFormat=0; //右边刻度显示模式 0=百分比 1=价格 2=价格 | 百分比
52332
52352
 
52333
52353
  this.BeforeOpenData;
52334
52354
  this.IsBeforeData=false;
@@ -52344,9 +52364,12 @@ function FrameSplitMinutePriceY()
52344
52364
  this.GlobalOption;
52345
52365
  this.HQChart;
52346
52366
 
52367
+ this.FixedYMaxMin; //{ Max, Min} 固定Y轴最大最小值
52368
+ this.EnableZoomUpDown=false;
52369
+
52347
52370
  this.IsEnableDragY=function()
52348
52371
  {
52349
- return false;
52372
+ return true;
52350
52373
  }
52351
52374
 
52352
52375
  this.Operator=function()
@@ -52355,23 +52378,35 @@ function FrameSplitMinutePriceY()
52355
52378
  this.Frame.CustomHorizontalInfo=[];
52356
52379
  if (!this.Data) return;
52357
52380
 
52358
- var range=this.GetMaxMin();
52381
+ var range=null;
52382
+ var isFixedMaxMin=(this.FixedYMaxMin && IFrameSplitOperator.IsNumber(this.FixedYMaxMin.Max) && IFrameSplitOperator.IsNumber(this.FixedYMaxMin.Min));
52383
+ if (isFixedMaxMin)
52384
+ {
52385
+ range={ Max:this.FixedYMaxMin.Max, Min:this.FixedYMaxMin.Min };
52386
+ JSConsole.Chart.Log(`[FrameSplitMinutePriceY::Operator] FixedYMaxMin.Max=${this.FixedYMaxMin.Max} FixedYMaxMin.Min=${this.FixedYMaxMin.Min} `);
52387
+ }
52388
+ else
52389
+ {
52390
+ range=this.GetMaxMin();
52391
+ }
52359
52392
 
52360
52393
  if (this.Symbol && MARKET_SUFFIX_NAME.IsUSA(this.Symbol.toUpperCase()))
52361
52394
  {
52362
- this.USASplit(range);
52395
+ this.USASplit(range,isFixedMaxMin);
52363
52396
  }
52364
52397
  else if (this.SplitType==2)
52365
52398
  {
52366
- this.USASplit(range);
52399
+ this.USASplit(range,isFixedMaxMin);
52367
52400
  }
52368
52401
  else
52369
52402
  {
52370
- this.DefaultSplit(range);
52403
+ this.DefaultSplit(range,isFixedMaxMin);
52371
52404
  }
52372
52405
 
52373
52406
  this.CustomCoordinate();
52374
52407
 
52408
+ if (this.EnableZoomUpDown==true && !this.FixedYMaxMin) this.FixedYMaxMin={ Max:range.Max, Min:range.Min };
52409
+
52375
52410
  this.ReservedHeight({ Max:this.Frame.HorizontalMax, Min:this.Frame.HorizontalMin }); //预留高度
52376
52411
 
52377
52412
  if (this.GetEventCallback)
@@ -52767,10 +52802,21 @@ function FrameSplitMinutePriceY()
52767
52802
  var per=(price/this.YClose-1)*100;
52768
52803
  if (per>0) coordinate.TextColor=g_JSChartResource.UpTextColor;
52769
52804
  else if (per<0) coordinate.TextColor=g_JSChartResource.DownTextColor;
52805
+ var strPer=IFrameSplitOperator.FormatValueString(per,2)+'%';
52770
52806
  if (this.IsShowRightText)
52771
52807
  {
52772
- if (this.RightTextFormat==1) coordinate.Message[1]=strPrice;
52773
- else coordinate.Message[1]=IFrameSplitOperator.FormatValueString(per,2)+'%'; //百分比
52808
+ if (this.RightTextFormat==1)
52809
+ {
52810
+ coordinate.Message[1]=strPrice;
52811
+ }
52812
+ else if (this.RightTextFormat==2) //价格/百分比
52813
+ {
52814
+ coordinate.Message[1]=[strPrice,strPer];
52815
+ }
52816
+ else
52817
+ {
52818
+ coordinate.Message[1]=strPer; //百分比
52819
+ }
52774
52820
  }
52775
52821
  }
52776
52822
 
@@ -52802,22 +52848,25 @@ function FrameSplitMinutePriceY()
52802
52848
  this.Frame.HorizontalMin=min;
52803
52849
  }
52804
52850
 
52805
- this.DefaultSplit=function(range)
52851
+ this.DefaultSplit=function(range,isFixedMaxMin)
52806
52852
  {
52807
52853
  var max=range.Max;
52808
52854
  var min=range.Min;
52809
52855
 
52810
- if (this.YClose==max && this.YClose==min)
52811
- {
52812
- max=this.YClose+this.YClose*0.1;
52813
- min=this.YClose-this.YClose*0.1
52814
- }
52815
- else
52856
+ if (!isFixedMaxMin)
52816
52857
  {
52817
- var distanceValue=Math.max(Math.abs(this.YClose-max),Math.abs(this.YClose-min));
52818
- max=this.YClose+distanceValue;
52819
- min=this.YClose-distanceValue;
52820
- if (min<0) min=range.Min;
52858
+ if (this.YClose==max && this.YClose==min)
52859
+ {
52860
+ max=this.YClose+this.YClose*0.1;
52861
+ min=this.YClose-this.YClose*0.1
52862
+ }
52863
+ else
52864
+ {
52865
+ var distanceValue=Math.max(Math.abs(this.YClose-max),Math.abs(this.YClose-min));
52866
+ max=this.YClose+distanceValue;
52867
+ min=this.YClose-distanceValue;
52868
+ if (min<0) min=range.Min;
52869
+ }
52821
52870
  }
52822
52871
 
52823
52872
  var pixelTatio = GetDevicePixelRatio(); //获取设备的分辨率
@@ -52830,7 +52879,7 @@ function FrameSplitMinutePriceY()
52830
52879
  const minDistance=[1, 0.1, 0.01, 0.001, 0.0001];
52831
52880
  var defaultfloatPrecision=GetfloatPrecision(this.Symbol);
52832
52881
  if (isPhoneModel && MARKET_SUFFIX_NAME.IsSHSZIndex(this.Symbol)) defaultfloatPrecision = 0; //手机端指数不显示小数位数,太长了
52833
- if (distance<minDistance[defaultfloatPrecision])
52882
+ if (distance<minDistance[defaultfloatPrecision] && !isFixedMaxMin)
52834
52883
  {
52835
52884
  distance=minDistance[defaultfloatPrecision];
52836
52885
  max=this.YClose+(distance*(showCount-1)/2);
@@ -52851,11 +52900,21 @@ function FrameSplitMinutePriceY()
52851
52900
  var per=(price/this.YClose-1)*100;
52852
52901
  if (per>0) coordinate.TextColor=g_JSChartResource.UpTextColor;
52853
52902
  else if (per<0) coordinate.TextColor=g_JSChartResource.DownTextColor;
52854
-
52903
+ var strPer=`${IFrameSplitOperator.FormatValueString(per,2)}%`;
52855
52904
  if (this.IsShowRightText)
52856
52905
  {
52857
- if (this.RightTextFormat==1) coordinate.Message[1]=strPrice;
52858
- else coordinate.Message[1]=IFrameSplitOperator.FormatValueString(per,2)+'%'; //百分比
52906
+ if (this.RightTextFormat==1)
52907
+ {
52908
+ coordinate.Message[1]=strPrice;
52909
+ }
52910
+ else if (this.RightTextFormat==2) //价格/百分比
52911
+ {
52912
+ coordinate.Message[1]=[strPer,strPrice];
52913
+ }
52914
+ else
52915
+ {
52916
+ coordinate.Message[1]=strPer; //百分比
52917
+ }
52859
52918
  }
52860
52919
 
52861
52920
  if (Math.abs(price-this.YClose) <0.00000000001) //小数有精度问题 使用差值
@@ -75704,7 +75763,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
75704
75763
 
75705
75764
  this.ChartOperator_Temp_Update();
75706
75765
  }
75707
- else if (id==JSCHART_OPERATOR_ID.OP_CORSSCURSOR_GOTO) //移动十字光标{ Date:, Time }
75766
+ else if (id==JSCHART_OPERATOR_ID.OP_CORSSCURSOR_GOTO) //移动十字光标{ Date:, Time, Type:1=如果不存在 就隐藏十字光标 }
75708
75767
  {
75709
75768
  if (!IFrameSplitOperator.IsNumber(obj.Date)) return;
75710
75769
  var bTime=IFrameSplitOperator.IsNumber(obj.Time);
@@ -75745,6 +75804,23 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
75745
75804
 
75746
75805
  if (findIndex<0)
75747
75806
  {
75807
+ if (obj.Type==1) // 如果不存在 就隐藏十字光标
75808
+ {
75809
+ var x=-1,y=-1;
75810
+ var MoveStatus={ X:x, Y:y, IsInClient: this.IsMouseOnClient(x,y) };
75811
+ this.LastMouseStatus.OnMouseMove=MoveStatus;
75812
+ this.LastMouseStatus.MoveOnPoint={X:x, Y:y}; //鼠标移动的位置
75813
+
75814
+ var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_MOUSE_MOVE);
75815
+ var titleChart=this.TitlePaint[0];
75816
+ if (event && titleChart) titleChart.OnMouseMoveEvent=event;
75817
+
75818
+ var e={clientX:x, clientY:y};
75819
+ this.MoveOnPoint={X:x, Y:y};
75820
+ this.OnMouseMove(x,y,e);
75821
+ this.LastMouseStatus.MoveOnPoint=null;
75822
+ if (titleChart) titleChart.OnMouseMoveEvent=null;
75823
+ }
75748
75824
  return;
75749
75825
  }
75750
75826
 
@@ -83552,14 +83628,30 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
83552
83628
  var moveSetp=moveData.X;
83553
83629
  var yMoveSetp=moveData.Y;
83554
83630
 
83555
- if (this.RectSelectDrag && this.RectSelectDrag.Index>=0) //区间选择
83631
+ var bNeedDraw=true;
83632
+ if (this.UpDownDrag && this.UpDownDrag.Index>=0)
83633
+ {
83634
+ if (yMoveSetp>=5)
83635
+ {
83636
+ var yMove=e.clientY-drag.LastMove.Y;
83637
+ JSConsole.Chart.Log("[MinuteChartContainer::OnDragMode_One] UpDownDrag ",this.UpDownDrag,yMove);
83638
+ //this.UIElement.style.cursor="pointer";
83639
+ this.SetCursor({Cursor:"pointer"});
83640
+ if (this.OnUpDonwFrameY(this.UpDownDrag, yMove))
83641
+ {
83642
+ drag.LastMove.Y=e.clientY;
83643
+ bNeedDraw=true;
83644
+ }
83645
+ }
83646
+ }
83647
+ else if (this.RectSelectDrag && this.RectSelectDrag.Index>=0) //区间选择
83556
83648
  {
83557
83649
  if (moveSetp<5) return;
83558
83650
  var obj={ X:e.clientX, Y:e.clientY, PointIndex:this.RectSelectDrag.Index, Name:"MoveRectSelectLine" };
83559
83651
  if (this.MoveRectSelectPoint(obj))
83560
83652
  {
83561
83653
  drag.LastMove.X=e.clientX;
83562
- this.Draw();
83654
+ bNeedDraw=true;
83563
83655
  }
83564
83656
  }
83565
83657
  else
@@ -83577,6 +83669,8 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
83577
83669
  drag.LastMove.X=e.clientX;
83578
83670
  drag.LastMove.Y=e.clientY;
83579
83671
  }
83672
+
83673
+ if (bNeedDraw) this.Draw();
83580
83674
  }
83581
83675
 
83582
83676
  this.OnMinuteSelectRectMouseUp=function(e)
@@ -83594,8 +83688,12 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
83594
83688
  selectData.YEnd=(drag.LastMove.Y-uielement.getBoundingClientRect().top)*pixelTatio;
83595
83689
  selectData.JSChartContainer=this;
83596
83690
  selectData.Stock={Symbol:this.Symbol, Name:this.Name};
83691
+
83692
+ if (this.UpDownDrag)
83693
+ {
83597
83694
 
83598
- if (this.EnableSelectRect && !this.BorderDrag && this.GetSelectRectData(selectData))
83695
+ }
83696
+ else if (this.EnableSelectRect && !this.BorderDrag && this.GetSelectRectData(selectData))
83599
83697
  {
83600
83698
  var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_SELECT_RECT);
83601
83699
  var paint=this.GetRectSelectPaint();
@@ -83966,25 +84064,83 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
83966
84064
  }
83967
84065
  }
83968
84066
 
84067
+
84068
+ this.GetDataIndexByDatTime=function(date, time)
84069
+ {
84070
+ var result={ DayIndex:-1, DataIndex:-1, Index:-1 };
84071
+ var frame=this.Frame.SubFrame[0].Frame;
84072
+ var minCount=frame.MinuteCount; //每天的分钟个数
84073
+ var kData=this.GetKData();
84074
+ for(var i=0;i<kData.Data.length;++i)
84075
+ {
84076
+ var minItem=kData.Data[i];
84077
+ if (!minItem) continue;
84078
+
84079
+ if (minItem.Date==date && minItem.Time==time)
84080
+ {
84081
+ result.Index=i;
84082
+ result.DayIndex=parseInt(i/minCount);
84083
+ result.DataIndex=i%minCount;
84084
+ break;
84085
+ }
84086
+ }
84087
+
84088
+ return result;
84089
+ }
84090
+
84091
+ //获取十字光标位置 通过日期和时间 目前只支持连续交易时间段
84092
+ this.GetCorssCursorIndexByDateTime=function(date, time)
84093
+ {
84094
+ var border=this.Frame.ChartBorder.GetBorder();
84095
+
84096
+ if (border.DayBorder) //多日分时主图+多日集合竞价
84097
+ {
84098
+ var corssCursorIndex=this.GetDataIndexByDatTime(date, time);
84099
+ corssCursorIndex.Type=10;
84100
+ }
84101
+ else //单日,多日
84102
+ {
84103
+ var corssCursorIndex=this.GetDataIndexByDatTime(date, time);
84104
+ corssCursorIndex.Type=1;
84105
+ corssCursorIndex.DayIndex=0;
84106
+ corssCursorIndex.DataIndex=corssCursorIndex.Index;
84107
+ }
84108
+
84109
+ return corssCursorIndex;
84110
+ }
84111
+
83969
84112
  this.LockCorssCursor=function(option)
83970
84113
  {
83971
84114
  var xItem=this.GlobalOption.LockCorssCursor.X;
84115
+
84116
+ var corssCursorIndex={ DayIndex:-1, DataIndex:-1, Type:-1, Index:this.CursorIndex };
84117
+ if (this.EnableNewIndex)
84118
+ {
84119
+ corssCursorIndex.Type=this.CorssCursorIndex.Type;
84120
+ corssCursorIndex.DayIndex=this.CorssCursorIndex.DayIndex;
84121
+ corssCursorIndex.DataIndex=this.CorssCursorIndex.DataIndex;
84122
+ }
84123
+
84124
+ if (option && option.KItem) //指定日期时间
84125
+ {
84126
+ corssCursorIndex=this.GetCorssCursorIndexByDateTime(option.KItem.Date, option.KItem.Time);
84127
+ }
83972
84128
 
83973
84129
  if (this.EnableNewIndex)
83974
84130
  {
83975
- if (this.CorssCursorIndex.Type!=1 && this.CorssCursorIndex.Type!=10) return false; //目前只支持连续交易时间段
84131
+ if (corssCursorIndex.Type!=1 && corssCursorIndex.Type!=10) return false; //目前只支持连续交易时间段
83976
84132
 
83977
84133
  xItem.Minute=
83978
84134
  {
83979
- DayIndex:this.CorssCursorIndex.DayIndex,
83980
- DataIndex:this.CorssCursorIndex.DataIndex,
83981
- Type:this.CorssCursorIndex.Type,
83982
- CursorIndex:this.CursorIndex,
84135
+ DayIndex:corssCursorIndex.DayIndex,
84136
+ DataIndex:corssCursorIndex.DataIndex,
84137
+ Type:corssCursorIndex.Type,
84138
+ CursorIndex:corssCursorIndex.Index,
83983
84139
  };
83984
84140
  }
83985
84141
  else
83986
84142
  {
83987
- xItem.Minute={ CursorIndex:this.CursorIndex };
84143
+ xItem.Minute={ CursorIndex:corssCursorIndex.Index };
83988
84144
  }
83989
84145
 
83990
84146
  xItem.Enable=true;
@@ -84060,12 +84216,16 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
84060
84216
  var x=null;
84061
84217
  var dayIndex=corssCursorIndex.DayIndex;
84062
84218
  var dataIndex=corssCursorIndex.DataIndex;
84063
- switch(corssCursorIndex.Type) //单日 1=主图 2=盘前 3=盘后 //多日 10=主图 20=盘前 30=盘后
84219
+ var frame=this.Frame.SubFrame[0].Frame;
84220
+ switch(corssCursorIndex.Type) //单日,多日 1=主图 2=盘前 3=盘后 //多日+多日集合竞价 10=主图 20=盘前 30=盘后
84064
84221
  {
84065
- case 1: //单日 1=主图
84066
- case 10: //多日 10=主图
84222
+ case 1: //单日,多日 1=主图
84067
84223
  x=this.Frame.GetXFromIndex(dataIndex)
84068
84224
  break;
84225
+ case 10: //多日+多日集合竞价 10=主图
84226
+ var cursorIndex=frame.MinuteCount*dayIndex+dataIndex;
84227
+ x=this.Frame.GetXFromIndex(cursorIndex);
84228
+ break;
84069
84229
  /*
84070
84230
  case 2: //单日 2=盘前
84071
84231
  x=this.Frame.SubFrame[0].Frame.GetLeftExtendXFromIndex(dataIndex,this.GetBeforeOpenData());
@@ -84863,6 +85023,17 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
84863
85023
  var bShowCorss=false; //十字光标十字线
84864
85024
  if (this.ChartCorssCursor) bShowCorss=this.ChartCorssCursor.IsShowCorss;
84865
85025
 
85026
+ var minItem=null;
85027
+ if (frameID>=0 && option && IFrameSplitOperator.IsNumber(option.CursorIndex))
85028
+ {
85029
+ var kData=this.GetKData();
85030
+ if (kData && IFrameSplitOperator.IsNonEmptyArray(kData.Data))
85031
+ {
85032
+ var dataIndex=kData.DataOffset+parseInt(option.CursorIndex.toFixed(0));
85033
+ if (dataIndex>=0 && dataIndex<kData.Data.length) minItem=kData.Data[dataIndex];
85034
+ }
85035
+ }
85036
+
84866
85037
  var aryMenu=
84867
85038
  [
84868
85039
  {
@@ -84994,7 +85165,14 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
84994
85165
  }
84995
85166
  else if (item.Name=="其他设置")
84996
85167
  {
84997
-
85168
+ if (minItem)
85169
+ {
85170
+ var bLocked=this.IsLockCorssCursor();
85171
+ if (bLocked)
85172
+ item.SubMenu.push({ Name:"锁十字光标", Data:{ ID: JSCHART_MENU_ID.CMD_UNLOCK_CROSSCURSOR }, Checked:bLocked });
85173
+ else
85174
+ item.SubMenu.push({ Name:"锁十字光标", Data:{ ID: JSCHART_MENU_ID.CMD_LOCK_CROSSCURSOR, Args:[{ KItem:{Date:minItem.Date, Time:minItem.Time}, Draw:true }] }, Checked:bLocked });
85175
+ }
84998
85176
  }
84999
85177
  }
85000
85178
 
@@ -85010,6 +85188,18 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
85010
85188
  {
85011
85189
  JSConsole.Chart.Log("[MinuteChartContainer::OnDoubleClick]", e);
85012
85190
 
85191
+ if (this.EnableYDrag && (this.EnableYDrag.Left || this.EnableYDrag.Right) && this.Frame && this.Frame.PtInFrameY)
85192
+ {
85193
+ var pixelTatio = GetDevicePixelRatio();
85194
+ var x = (e.clientX-this.UIElement.getBoundingClientRect().left)*pixelTatio;
85195
+ var y = (e.clientY-this.UIElement.getBoundingClientRect().top)*pixelTatio;
85196
+ var dragY=this.Frame.PtInFrameY(x,y);
85197
+ if (dragY && dragY.Index>=0)
85198
+ {
85199
+ this.CancelZoomUpDownFrameY(dragY);
85200
+ }
85201
+ }
85202
+
85013
85203
  if (this.ClickChartTimer!=null)
85014
85204
  {
85015
85205
  clearTimeout(this.ClickChartTimer);
@@ -2191,7 +2191,7 @@ var SH_600000_1DAY_MINUTE={
2191
2191
  "low": 8.51,
2192
2192
  "high": 8.51,
2193
2193
  "vol": 0,
2194
- "amount": 47285797,
2194
+ "amount": 4728579,
2195
2195
  "time": 1500
2196
2196
  }
2197
2197
  ],