hqchart 1.1.14965 → 1.1.14971

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.
@@ -6928,7 +6928,9 @@ var JSCHART_EVENT_ID=
6928
6928
  ON_RELOAD_RESOURCE:173,
6929
6929
 
6930
6930
  ON_REPORT_DATA_FILTER:174, //数据筛选
6931
- ON_REPORT_SHOW_TOOLTIP:175, //报价列表 提示信息
6931
+ ON_REPORT_SHOW_TOOLTIP:175, //报价列表 提示信息\
6932
+
6933
+ ON_FORMAT_TVLONGPOSITION_LABEL:176,
6932
6934
  }
6933
6935
 
6934
6936
  var JSCHART_OPERATOR_ID=
@@ -9091,9 +9093,14 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
9091
9093
  {
9092
9094
  drawPicture.PointStatus=drawPicture.Status;
9093
9095
  if (this.FinishChartDrawPicturePoint())
9096
+ {
9097
+ if (drawPicture.IsDrawMain) this.Draw();
9094
9098
  this.DrawDynamicInfo();
9099
+ }
9095
9100
  else
9101
+ {
9096
9102
  bClearDrawPicture=false;
9103
+ }
9097
9104
  }
9098
9105
  else if (drawPicture.Status==20)
9099
9106
  {
@@ -10648,7 +10655,12 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
10648
10655
  {
10649
10656
  var item=this.ChartDrawPicture[i];
10650
10657
  if (item.IsDrawFirst) continue;
10651
- if (item.IsDrawMain && item.IsDrawMain()) continue;
10658
+ if (item.IsDrawMain && item.IsDrawMain())
10659
+ {
10660
+ if (item.MainPartDraw) item.MainPartDraw();
10661
+ continue;
10662
+ }
10663
+
10652
10664
  if (this.SelectChartDrawPicture && this.SelectChartDrawPicture.Guid==item.Guid) continue; //当前选中在最后画
10653
10665
 
10654
10666
  item.Draw();
@@ -11212,7 +11224,11 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
11212
11224
  {
11213
11225
  var item=this.ChartDrawPicture[i];
11214
11226
  if (item.IsDrawFirst) continue;
11215
- if (item.IsDrawMain && item.IsDrawMain()) continue;
11227
+ if (item.IsDrawMain && item.IsDrawMain())
11228
+ {
11229
+ if (item.MainPartDraw) item.MainPartDraw();
11230
+ continue;
11231
+ }
11216
11232
  if (this.SelectChartDrawPicture &&item.Guid==this.SelectChartDrawPicture.Guid) continue; //选中画图最后画 确保显示在最外面
11217
11233
 
11218
11234
  item.Draw(moveonPoint, this.LastMouseStatus);
@@ -69231,6 +69247,17 @@ function IChartDrawPicture()
69231
69247
  yText+=labelInfo.LineHeight;
69232
69248
  }
69233
69249
  }
69250
+
69251
+ this.IsActive=function()
69252
+ {
69253
+ if (!this.GetActiveDrawPicture) return false;
69254
+
69255
+ var active=this.GetActiveDrawPicture();
69256
+ if (active.Move.Guid!=this.Guid && active.Select.Guid!=this.Guid && active.MoveOn.Guid!=this.Guid)
69257
+ return false;
69258
+
69259
+ return true;
69260
+ }
69234
69261
  }
69235
69262
 
69236
69263
  IChartDrawPicture.ColorToRGBA=function(color,opacity)
@@ -69378,6 +69405,8 @@ IChartDrawPicture.ArrayDrawPricture=
69378
69405
  { Name:"TrendAngle", ClassName:"ChartTrendAngle", Create:function() { return new ChartTrendAngle(); }},
69379
69406
  { Name:"ArrowMarker", ClassName:"ChartArrowMarker", Create:function() { return new ChartArrowMarker(); } },
69380
69407
  { Name:"BarsPattern", ClassName:"ChartBarsPattern", Create:function() { return new ChartBarsPattern(); } },
69408
+ { Name:"TVLongPosition", ClassName:"ChartDrawTVLongPosition", Create:function() { return new ChartDrawTVLongPosition(); } },
69409
+ { Name:"TVShortPosition", ClassName:"ChartDrawTVShortPositionn", Create:function() { return new ChartDrawTVShortPosition(); } },
69381
69410
  ];
69382
69411
 
69383
69412
  IChartDrawPicture.MapIonFont=new Map(
@@ -79348,6 +79377,483 @@ function ChartBarsPattern()
79348
79377
  }
79349
79378
  }
79350
79379
 
79380
+ function ChartDrawTVLongPosition()
79381
+ {
79382
+ this.newMethod=IChartDrawPicture; //派生
79383
+ this.newMethod();
79384
+ delete this.newMethod;
79385
+
79386
+ this.ClassName='ChartDrawTVLongPosition';
79387
+ this.PointCount=2; //起始2个点 画完4个点
79388
+
79389
+ this.TopAreaConfig=CloneData(g_JSChartResource.ChartDrawTVLongPosition.TopArea);
79390
+ this.BottomAreaConfig=CloneData(g_JSChartResource.ChartDrawTVLongPosition.BottomArea);
79391
+ this.LabelConfig=CloneData(g_JSChartResource.ChartDrawTVLongPosition.Label);
79392
+
79393
+ //内部变量
79394
+ this.AryRectArea=[];
79395
+
79396
+ this.GetXYCoordinate=this.GetXYCoordinate_default;
79397
+ this.SetOption_Backup=this.SetOption;
79398
+ this.PointToValue_Backup=this.PointToValue;
79399
+
79400
+ this.SetOption=function(option)
79401
+ {
79402
+ this.SetOption_Backup();
79403
+
79404
+ if (option)
79405
+ {
79406
+
79407
+ }
79408
+ }
79409
+
79410
+ this.PointToValue=function()
79411
+ {
79412
+ //拖拽完成 把点移动到线段头尾
79413
+ if (this.Frame.IsHScreen)
79414
+ {
79415
+ this.Point[1].X=this.Point[0].X;
79416
+ }
79417
+ else
79418
+ {
79419
+ this.Point[1].Y=this.Point[0].Y;
79420
+ }
79421
+
79422
+ this.PointToValue_Backup();
79423
+ }
79424
+
79425
+ //0-10 鼠标对应的点索引 100=鼠标在正个图形上 -1 鼠标不在图形上
79426
+ this.IsPointIn=function(x,y, option)
79427
+ {
79428
+ if (this.Status!=10) return -1;
79429
+
79430
+ var value=this.IsPointInXYValue(x,y,option);
79431
+ if (value>=0) return value;
79432
+
79433
+ for(var i=0;i<this.AryRectArea.length;++i)
79434
+ {
79435
+ var item=this.AryRectArea[i];
79436
+ if (!item) continue;
79437
+
79438
+ if (Path2DHelper.PtInRect(x, y, item.Rect))
79439
+ {
79440
+ return item.ID;
79441
+ }
79442
+ }
79443
+
79444
+ return -1;
79445
+ }
79446
+
79447
+ this.OnFinish=function()
79448
+ {
79449
+ if (!IFrameSplitOperator.IsNonEmptyArray(this.Value)) return false;
79450
+
79451
+ if (!this.Frame) return false;
79452
+ var data=this.Frame.Data;
79453
+ if (!data) return false;
79454
+
79455
+ var firstPoint=this.Point[0];
79456
+ var firstValue=this.Value[0];
79457
+ var entryPrice=firstValue.YValue;
79458
+
79459
+ var topPrice=entryPrice*(1+0.05);
79460
+ var bottomPrice=entryPrice*(1-0.05);
79461
+
79462
+ this.Value[2]={ XValue:firstValue.XValue, YValue:topPrice };
79463
+ this.Value[3]={ XValue:firstValue.XValue, YValue:bottomPrice };
79464
+ if (firstValue.DateTime)
79465
+ {
79466
+ var item=firstValue.DateTime;
79467
+ this.Value[2].DateTime={ Date:item.Date, Time:item.Time };
79468
+ this.Value[3].DateTime={ Date:item.Date, Time:item.Time };
79469
+ }
79470
+
79471
+ this.Point[2]={ X:firstPoint.X, Y:this.Frame.GetYFromData(topPrice,false)};
79472
+ this.Point[3]={ X:firstPoint.X, Y:this.Frame.GetYFromData(bottomPrice,false)};
79473
+
79474
+ this.PointCount=4;
79475
+ }
79476
+
79477
+ this.IsDrawMain=function() //选中绘制在动态绘图上, 没有选中绘制在背景上
79478
+ {
79479
+ if (!this.GetActiveDrawPicture) return true;
79480
+
79481
+ var active=this.GetActiveDrawPicture();
79482
+ if (active.Select.Guid==this.Guid) return false;
79483
+
79484
+ return true;
79485
+ }
79486
+
79487
+ this.IsSelected=function()
79488
+ {
79489
+ if (!this.GetActiveDrawPicture) return false;
79490
+
79491
+ var active=this.GetActiveDrawPicture();
79492
+ if (active.Select.Guid==this.Guid) return true;
79493
+
79494
+ return false;
79495
+ }
79496
+
79497
+ this.MainDraw=function()
79498
+ {
79499
+ this.Draw();
79500
+ }
79501
+
79502
+
79503
+ this.MainPartDraw=function()
79504
+ {
79505
+ if (this.IsFrameMinSize()) return;
79506
+
79507
+ var drawPoint=this.CalculateDrawPoint( {IsCheckX:true, IsCheckY:true} );
79508
+ if (!drawPoint) return;
79509
+ if (drawPoint.length<2) return;
79510
+ this.IsHScreen=this.Frame.IsHScreen;
79511
+ if (this.IsHScreen) return;
79512
+
79513
+ this.ClipFrame();
79514
+ this.ChartBorder=this.Frame.ChartBorder;
79515
+
79516
+ if (this.Status==10 || this.Status==20)
79517
+ {
79518
+ this.DrawLabel(drawPoint);
79519
+ this.DrawPoint(drawPoint);
79520
+ }
79521
+
79522
+ this.Canvas.restore();
79523
+ }
79524
+
79525
+ this.Draw=function()
79526
+ {
79527
+ this.AryRectArea=[]
79528
+ if (this.IsFrameMinSize()) return;
79529
+
79530
+ var drawPoint=this.CalculateDrawPoint( {IsCheckX:true, IsCheckY:true} );
79531
+ if (!drawPoint) return;
79532
+ if (drawPoint.length<2) return;
79533
+ this.IsHScreen=this.Frame.IsHScreen;
79534
+ if (this.IsHScreen) return;
79535
+
79536
+ this.ClipFrame();
79537
+ this.ChartBorder=this.Frame.ChartBorder;
79538
+
79539
+ if (this.Status==10 || this.Status==20) //0=开始画 1=完成第1个点 2=完成第2个点 3=完成第3个点 10=完成 20=移动)
79540
+ {
79541
+ this.DrawArea(drawPoint);
79542
+ this.DrawLabel(drawPoint);
79543
+ this.DrawPoint(drawPoint);
79544
+ }
79545
+ else
79546
+ {
79547
+ var ptStart=drawPoint[0];
79548
+ var ptEnd=drawPoint[1];
79549
+ this.Canvas.strokeStyle=this.LineColor;
79550
+ this.DrawVerticalLine(ptStart,ptEnd);
79551
+ }
79552
+
79553
+ this.Canvas.restore();
79554
+ }
79555
+
79556
+ this.DrawVerticalLine=function(ptStart, ptEnd)
79557
+ {
79558
+ var data=this.Frame.Data;
79559
+ if (this.IsHScreen)
79560
+ {
79561
+ var left=this.ChartBorder.GetLeft();
79562
+ var right=this.ChartBorder.GetRight();
79563
+ var xValue=Math.round(this.Frame.GetXData(ptStart.Y,false))+data.DataOffset;
79564
+ if (xValue<0) xValue=0;
79565
+ else if (xValue>=data.Data.length) xValue=data.Data.length-1;
79566
+ var yStart=this.Frame.GetXFromIndex(xValue-data.DataOffset,false);
79567
+
79568
+ xValue=Math.round(this.Frame.GetXData(ptEnd.Y,false))+data.DataOffset;
79569
+ if (xValue<0) xValue=0;
79570
+ else if (xValue>=data.Data.length) xValue=data.Data.length-1;
79571
+ var yEnd=this.Frame.GetXFromIndex(xValue-data.DataOffset,false);
79572
+
79573
+ this.Canvas.beginPath();
79574
+ this.Canvas.moveTo(left,yStart);
79575
+ this.Canvas.lineTo(right,yStart);
79576
+
79577
+ this.Canvas.moveTo(left,yEnd);
79578
+ this.Canvas.lineTo(right,yEnd);
79579
+ this.Canvas.stroke();
79580
+
79581
+ this.Canvas.beginPath();
79582
+ this.Canvas.moveTo(ptStart.X,yStart);
79583
+ this.Canvas.lineTo(ptStart.X,yEnd);
79584
+ this.Canvas.stroke();
79585
+ }
79586
+ else
79587
+ {
79588
+ var top=this.ChartBorder.GetTopEx();
79589
+ var bottom=this.ChartBorder.GetBottomEx();
79590
+
79591
+ var xValue=Math.round(this.Frame.GetXData(ptStart.X,false))+data.DataOffset;
79592
+ if (xValue<0) xValue=0;
79593
+ else if (xValue>=data.Data.length) xValue=data.Data.length-1;
79594
+ var xStart=this.Frame.GetXFromIndex(xValue-data.DataOffset,false);
79595
+
79596
+ xValue=Math.round(this.Frame.GetXData(ptEnd.X,false))+data.DataOffset;
79597
+ if (xValue<0) xValue=0;
79598
+ else if (xValue>=data.Data.length) xValue=data.Data.length-1;
79599
+ var xEnd=this.Frame.GetXFromIndex(xValue-data.DataOffset,false);
79600
+
79601
+ this.Canvas.beginPath();
79602
+ this.Canvas.moveTo(xStart,top);
79603
+ this.Canvas.lineTo(xStart,bottom);
79604
+
79605
+ this.Canvas.moveTo(xEnd,top);
79606
+ this.Canvas.lineTo(xEnd,bottom);
79607
+ this.Canvas.stroke();
79608
+
79609
+ this.Canvas.beginPath();
79610
+ this.Canvas.moveTo(xStart,ptStart.Y);
79611
+ this.Canvas.lineTo(xEnd,ptStart.Y);
79612
+ this.Canvas.stroke();
79613
+ }
79614
+ }
79615
+
79616
+ this.GetCursorType=function(ptIndex)
79617
+ {
79618
+ if (ptIndex==100) return "pointer";
79619
+ else if (ptIndex==0) return "move";
79620
+ else if (ptIndex==1) return "ew-resize";
79621
+ else if (ptIndex==2 || ptIndex==3) return "ns-resize";
79622
+
79623
+ return null;
79624
+ }
79625
+
79626
+ this.DrawArea=function(drawPoint)
79627
+ {
79628
+ var ptCenter=drawPoint[0];
79629
+ var ptRight=drawPoint[1]
79630
+ var ptTop=drawPoint[2];
79631
+ var ptBottom=drawPoint[3];
79632
+ var bSelected=this.IsSelected();
79633
+
79634
+ var rtTopArea={ Left:ptCenter.X, Top: ptTop.Y, Right:ptRight.X, Bottom:ptCenter.Y};
79635
+ rtTopArea.Width=rtTopArea.Right-rtTopArea.Left;
79636
+ rtTopArea.Height=rtTopArea.Bottom-rtTopArea.Top;
79637
+
79638
+ this.Canvas.fillStyle=bSelected ? this.TopAreaConfig.SelectedAreaColor: this.TopAreaConfig.AreaColor;
79639
+ this.Canvas.beginPath();
79640
+ this.Canvas.fillRect(rtTopArea.Left,rtTopArea.Top,rtTopArea.Width,rtTopArea.Height);
79641
+ this.AryRectArea[0]={ ID:100, Rect:rtTopArea };
79642
+
79643
+ var rtBottomArea={Left:ptCenter.X, Top: ptCenter.Y, Right:ptRight.X, Bottom:ptBottom.Y};
79644
+ rtBottomArea.Width=rtBottomArea.Right-rtBottomArea.Left;
79645
+ rtBottomArea.Height=rtBottomArea.Bottom-rtBottomArea.Top;
79646
+ this.Canvas.fillStyle=bSelected? this.BottomAreaConfig.SelectedAreaColor:this.BottomAreaConfig.AreaColor;
79647
+ this.Canvas.beginPath();
79648
+ this.Canvas.fillRect(rtBottomArea.Left,rtBottomArea.Top,rtBottomArea.Width,rtBottomArea.Height);
79649
+ this.AryRectArea[1]={ ID:100, Rect:rtBottomArea };
79650
+
79651
+ //线段
79652
+ this.Canvas.strokeStyle=this.LineColor;
79653
+ this.Canvas.beginPath();
79654
+ this.Canvas.moveTo(ptCenter.X,ToFixedPoint(ptCenter.Y));
79655
+ this.Canvas.lineTo(ptRight.X,ToFixedPoint(ptRight.Y));
79656
+ this.Canvas.stroke();
79657
+ }
79658
+
79659
+ this.DrawLabel=function(drawPoint)
79660
+ {
79661
+ if (!this.IsActive()) return; //激活状态下才显示
79662
+
79663
+ var aryLabel=this.FormatLabelText(drawPoint);
79664
+ if (!IFrameSplitOperator.IsNonEmptyArray(aryLabel)) return;
79665
+
79666
+ this.TextFontHeight=this.GetFontHeight(this.LabelConfig.Font,"擎");
79667
+
79668
+ for(var i=0;i<aryLabel.length;++i)
79669
+ {
79670
+ var item=aryLabel[i];
79671
+ if (!IFrameSplitOperator.IsNonEmptyArray(item.AryText)) continue;
79672
+
79673
+ this.CalculateLabelSize(item);
79674
+ this.DrawLabelItem(item, drawPoint);
79675
+ }
79676
+ }
79677
+
79678
+ this.DrawLabelItem=function(lableItem, drawPoint)
79679
+ {
79680
+ var ptCenter=drawPoint[0];
79681
+ var ptRight=drawPoint[1];
79682
+ var ptTop=drawPoint[2];
79683
+ var ptBottom=drawPoint[3];
79684
+ var clientWidth=ptRight.X-ptCenter.X;
79685
+ var config=this.LabelConfig;
79686
+ var margin=config.Margin;
79687
+
79688
+ var rtText={ Width:lableItem.Width+margin.Left+margin.Right, Height:lableItem.Height+margin.Top+margin.Bottom };
79689
+ if (lableItem.Type==0) //中间
79690
+ {
79691
+ rtText.Left=ptCenter.X+clientWidth/2-rtText.Width/2;
79692
+ rtText.Right=rtText.Left+rtText.Width;
79693
+ rtText.Top=ptCenter.Y-rtText.Height/2;
79694
+ rtText.Bottom=rtText.Top+rtText.Height;
79695
+ }
79696
+ else if (lableItem.Type==1) //顶部
79697
+ {
79698
+ rtText.Left=ptCenter.X+clientWidth/2-rtText.Width/2;
79699
+ rtText.Right=rtText.Left+rtText.Width;
79700
+ rtText.Top=ptTop.Y-rtText.Height;
79701
+ rtText.Bottom=rtText.Top+rtText.Height;
79702
+ }
79703
+ else if (lableItem.Type==2)
79704
+ {
79705
+ rtText.Left=ptCenter.X+clientWidth/2-rtText.Width/2;
79706
+ rtText.Right=rtText.Left+rtText.Width;
79707
+ rtText.Top=ptBottom.Y;
79708
+ rtText.Bottom=rtText.Top+rtText.Height;
79709
+ }
79710
+ else
79711
+ {
79712
+ return;
79713
+ }
79714
+
79715
+ this.Canvas.fillStyle=lableItem.BGColor;
79716
+ this.Canvas.fillRect(rtText.Left, rtText.Top, rtText.Width, rtText.Height);
79717
+
79718
+ this.Canvas.textAlign = 'left';
79719
+ this.Canvas.textBaseline = 'bottom';
79720
+ this.Canvas.fillStyle=lableItem.TextColor;
79721
+ var x=rtText.Left+margin.Left;
79722
+ var y=rtText.Top+margin.Top+this.TextFontHeight;
79723
+ for(var i=0;i<lableItem.AryText.length;++i)
79724
+ {
79725
+ var item=lableItem.AryText[i];
79726
+ var xText=x;
79727
+ var yText=y;
79728
+ if (IFrameSplitOperator.IsNumber(item.YOffset)) yText+=item.YOffset;
79729
+
79730
+ this.Canvas.fillText(item.Text, xText, yText);
79731
+
79732
+ y+=this.TextFontHeight;
79733
+ }
79734
+ }
79735
+
79736
+ this.FormatLabelText=function(drawPoint)
79737
+ {
79738
+ if (this.HQChart)
79739
+ {
79740
+ var event=this.HQChart.GetEventCallback(JSCHART_EVENT_ID.ON_FORMAT_TVLONGPOSITION_LABEL);
79741
+ if (event && event.Callback)
79742
+ {
79743
+ var sendData={ Frame:this.Frame, AryLabel:null, AryPoint:drawPoint, PreventDefault:false };
79744
+ event.Callback(event, sendData, this);
79745
+ if (sendData.PreventDefault) return sendData.AryLabel;
79746
+ }
79747
+ }
79748
+
79749
+ var ptCenter=drawPoint[0];
79750
+ var ptTop=drawPoint[2];
79751
+ var ptBottom=drawPoint[3];
79752
+ var aryData=[];
79753
+ var yValue=this.Frame.GetYData(ptCenter.Y,false);
79754
+ aryData.push(
79755
+ {
79756
+ Type:0,
79757
+ AryText:
79758
+ [
79759
+ { Text:`Open: ${yValue.toFixed(2)}`},
79760
+ //{ Text:"第2行:xxx"}
79761
+ ],
79762
+ BGColor:"rgb(112,128,144)", TextColor:"rgb(255,255,255)"
79763
+ });
79764
+
79765
+ var yValue=this.Frame.GetYData(ptTop.Y,false);
79766
+ aryData.push({ Type:1, AryText:[{ Text:`Target: ${yValue.toFixed(2)}`, YOffset:-1 } ], BGColor:this.TopAreaConfig.TextBGColor, TextColor:this.TopAreaConfig.TextColor });
79767
+
79768
+ var yValue=this.Frame.GetYData(ptBottom.Y,false);
79769
+ aryData.push({ Type:2, AryText:[{ Text:`Stop: ${yValue.toFixed(2)}`, YOffset:-1 } ], BGColor:this.BottomAreaConfig.TextBGColor, TextColor:this.BottomAreaConfig.TextColor });
79770
+
79771
+ return aryData;
79772
+ }
79773
+
79774
+ this.CalculateLabelSize=function(lableItem)
79775
+ {
79776
+ lableItem.Width=0;
79777
+ lableItem.Height=0;
79778
+ for(var i=0;i<lableItem.AryText.length;++i)
79779
+ {
79780
+ var item=lableItem.AryText[i];
79781
+ var textWidth=this.Canvas.measureText(item.Text).width;
79782
+
79783
+ item.TextWidth=textWidth;
79784
+ if (lableItem.Width<textWidth) lableItem.Width=textWidth;
79785
+ lableItem.Height+=this.TextFontHeight;
79786
+ }
79787
+ }
79788
+
79789
+ this.Move=function(xStep,yStep)
79790
+ {
79791
+ if (this.Status!=20) return false;
79792
+ if (!this.Frame) return false;
79793
+ var data=this.Frame.Data;
79794
+ if (!data) return false;
79795
+
79796
+ if (this.MovePointIndex==100) //整体移动
79797
+ {
79798
+ for(var i=0; i<this.Point.length;++i)
79799
+ {
79800
+ var item= this.Point[i];
79801
+ item.X+=xStep;
79802
+ item.Y+=yStep;
79803
+ }
79804
+ }
79805
+ else if (this.MovePointIndex===0)
79806
+ {
79807
+ for(var i=0;i<this.Point.length;++i)
79808
+ {
79809
+ var item=this.Point[i];
79810
+ if (i==0)
79811
+ {
79812
+ item.X+=xStep;
79813
+ item.Y+=yStep;
79814
+ }
79815
+ else if (i==1)
79816
+ {
79817
+ item.Y+=yStep;
79818
+ }
79819
+ else if (i==2 || i==3)
79820
+ {
79821
+ item.X+=xStep;
79822
+ }
79823
+ }
79824
+ }
79825
+ else if (this.MovePointIndex==1)
79826
+ {
79827
+ this.Point[1].X+=xStep;
79828
+ }
79829
+ else if (this.MovePointIndex==2)
79830
+ {
79831
+ var ptCenter=this.Point[0];
79832
+ var item=this.Point[2];
79833
+ if (item.Y+yStep<ptCenter.Y) item.Y+=yStep;
79834
+ }
79835
+ else if (this.MovePointIndex==3)
79836
+ {
79837
+ var ptCenter=this.Point[0];
79838
+ var item=this.Point[3];
79839
+ if (item.Y+yStep>ptCenter.Y) item.Y+=yStep;
79840
+ }
79841
+
79842
+ }
79843
+ }
79844
+
79845
+
79846
+ function ChartDrawTVShortPosition()
79847
+ {
79848
+ this.newMethod=ChartDrawTVLongPosition; //派生
79849
+ this.newMethod();
79850
+ delete this.newMethod;
79851
+
79852
+ this.ClassName='ChartDrawTVShortPosition';
79853
+ this.TopAreaConfig=CloneData(g_JSChartResource.ChartDrawTVLongPosition.BottomArea);
79854
+ this.BottomAreaConfig=CloneData(g_JSChartResource.ChartDrawTVLongPosition.TopArea);
79855
+ }
79856
+
79351
79857
 
79352
79858
  function ChartDrawStorage()
79353
79859
  {
@@ -80417,6 +80923,31 @@ function JSChartResource()
80417
80923
  DownColor:"rgb(25,158,0)"
80418
80924
  }
80419
80925
 
80926
+ this.ChartDrawTVLongPosition=
80927
+ {
80928
+ TopArea:
80929
+ {
80930
+ AreaColor:"rgba(214, 234, 230,0.8)",
80931
+ SelectedAreaColor:"rgba(214, 234, 230,0.55)",
80932
+ TextBGColor:"rgb(80, 150, 130)",
80933
+ TextColor:"rgb(255,255,255)"
80934
+ },
80935
+
80936
+ BottomArea:
80937
+ {
80938
+ AreaColor:"rgb(243, 217, 218,0.8)",
80939
+ SelectedAreaColor:"rgba(243, 217, 218,0.55)",
80940
+ TextBGColor:"rgb(214, 75, 75)",
80941
+ TextColor:"rgb(255,255,255)"
80942
+ },
80943
+
80944
+ Label:
80945
+ {
80946
+ Font:`${12*GetDevicePixelRatio()}px 微软雅黑`,
80947
+ Margin:{ Left:2, Top:2, Bottom:2, Right:2 },
80948
+ }
80949
+ }
80950
+
80420
80951
  //手机端tooltip
80421
80952
  this.TooltipPaint = {
80422
80953
  BGColor:'rgba(250,250,250,0.8)', //背景色
@@ -82244,6 +82775,42 @@ function JSChartResource()
82244
82775
 
82245
82776
  if (style.IndexLock) this.SetIndexLock(style.IndexLock);
82246
82777
  if (style.ChartScatterPlotV2) this.SetChartScatterPlotV2(style.ChartScatterPlotV2);
82778
+
82779
+ if (style.ChartDrawTVLongPosition) this.SetChartDrawTVLongPosition(style.ChartDrawTVLongPosition);
82780
+ }
82781
+
82782
+
82783
+ this.SetChartDrawTVLongPosition=function(style)
82784
+ {
82785
+ if (style.TopArea)
82786
+ {
82787
+ var item=style.TopArea;
82788
+ var dest=this.ChartDrawTVLongPosition.TopArea;
82789
+
82790
+ if (item.AreaColor) dest.AreaColor=item.AreaColor;
82791
+ if (item.SelectedAreaColor) dest.SelectedAreaColor=item.SelectedAreaColor;
82792
+ if (item.TextBGColor) dest.TextBGColor=item.TextBGColor;
82793
+ if (item.TextColor) dest.BorderColor=item.TextColor;
82794
+ }
82795
+
82796
+ if (style.BottomArea)
82797
+ {
82798
+ var item=style.BottomArea;
82799
+ var dest=this.ChartDrawTVLongPosition.BottomArea;
82800
+
82801
+ if (item.AreaColor) dest.AreaColor=item.AreaColor;
82802
+ if (item.SelectedAreaColor) dest.SelectedAreaColor=item.SelectedAreaColor;
82803
+ if (item.TextBGColor) dest.TextBGColor=item.TextBGColor;
82804
+ if (item.TextColor) dest.BorderColor=item.TextColor;
82805
+ }
82806
+
82807
+ if (style.Label)
82808
+ {
82809
+ var item=style.Label;
82810
+ var dest=this.ChartDrawTVLongPosition.Label;
82811
+ if (item.Font) dest.Font=item.Font;
82812
+ CopyMarginConfig(dest.Margin, item.Margin);
82813
+ }
82247
82814
  }
82248
82815
 
82249
82816
 
@@ -90000,7 +90567,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
90000
90567
  if (item)
90001
90568
  {
90002
90569
  drawPicture=item.Create();
90003
- if (drawPicture.ClassName=='ChartDrawPictureText' || drawPicture.ClassName=="ChartDrawVolProfile") drawPicture.HQChart=this;
90570
+ drawPicture.HQChart=this;
90004
90571
  }
90005
90572
 
90006
90573
  if (!drawPicture) //iconfont图标
@@ -107963,6 +108530,15 @@ Path2DHelper.FormatRadian=function(angle)
107963
108530
  }
107964
108531
 
107965
108532
 
108533
+ Path2DHelper.PtInRect=function(x, y, rect)
108534
+ {
108535
+ if (x>=rect.Left && x<=rect.Right && y>=rect.Top && y<=rect.Bottom) return true;
108536
+
108537
+ return false;
108538
+ }
108539
+
108540
+
108541
+
107966
108542
 
107967
108543
 
107968
108544
 
@@ -135350,6 +135926,31 @@ function GetBlackStyle()
135350
135926
 
135351
135927
  Text:{ Color: "rgb(0,0,0)" , Family:'Arial', FontMaxSize:18, FontMinSize:6 }, //文字
135352
135928
  },
135929
+
135930
+ ChartDrawTVLongPosition:
135931
+ {
135932
+ TopArea:
135933
+ {
135934
+ AreaColor:"rgba(34, 52, 48,0.8)",
135935
+ SelectedAreaColor:"rgba(34, 52, 48,0.55)",
135936
+ TextBGColor:"rgb(80, 150, 130)",
135937
+ TextColor:"rgb(255,255,255)"
135938
+ },
135939
+
135940
+ BottomArea:
135941
+ {
135942
+ AreaColor:"rgb(63, 35, 37,0.8)",
135943
+ SelectedAreaColor:"rgba(63, 35, 37,0.55)",
135944
+ TextBGColor:"rgb(214, 75, 75)",
135945
+ TextColor:"rgb(255,255,255)"
135946
+ },
135947
+
135948
+ Label:
135949
+ {
135950
+ Font:`${12*GetDevicePixelRatio()}px 微软雅黑`,
135951
+ Margin:{ Left:2, Top:2, Bottom:2, Right:2 },
135952
+ }
135953
+ },
135353
135954
 
135354
135955
  //区间选择
135355
135956
  RectSelect:
@@ -151542,7 +152143,7 @@ function ScrollBarBGChart()
151542
152143
 
151543
152144
 
151544
152145
 
151545
- var HQCHART_VERSION="1.1.14964";
152146
+ var HQCHART_VERSION="1.1.14970";
151546
152147
 
151547
152148
  function PrintHQChartVersion()
151548
152149
  {
@@ -5,7 +5,7 @@
5
5
 
6
6
 
7
7
 
8
- var HQCHART_VERSION="1.1.14964";
8
+ var HQCHART_VERSION="1.1.14970";
9
9
 
10
10
  function PrintHQChartVersion()
11
11
  {