hqchart 1.1.13360 → 1.1.13370

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.
@@ -6629,7 +6629,7 @@ var JSCHART_MENU_ID=
6629
6629
  CMD_CHANGE_SCRIPT_INDEX_ID:34, //切换成自定义的脚本指标
6630
6630
 
6631
6631
  CMD_CHANGE_BASELINE_ID:35, //分时图切换基准线
6632
-
6632
+ CMD_ADD_OVERLAY_INDEX_ID:36, //添加叠加指标
6633
6633
  }
6634
6634
 
6635
6635
 
@@ -13408,6 +13408,13 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
13408
13408
  this.DefaultCursor=srcParam;
13409
13409
  this.UIElement.style.cursor=this.DefaultCursor;
13410
13410
  break;
13411
+
13412
+ case JSCHART_MENU_ID.CMD_ADD_OVERLAY_INDEX_ID: //叠加指标 0=windowIndex, 1=indexinfo
13413
+ if (param==null || !aryArgs[1]) return false;
13414
+ var obj=aryArgs[1];
13415
+ obj.WindowIndex=param;
13416
+ this.AddOverlayIndex(obj);
13417
+ break;
13411
13418
  }
13412
13419
  }
13413
13420
 
@@ -15724,6 +15731,8 @@ function AverageWidthFrame()
15724
15731
 
15725
15732
  this.Canvas.font=this.DrawPicture.Font;
15726
15733
  var fontHeight=this.GetFontHeight();
15734
+ this.Canvas.textAlign="left";
15735
+ this.Canvas.textBaseline = "bottom";
15727
15736
 
15728
15737
  if (range.X)
15729
15738
  {
@@ -19136,6 +19145,7 @@ function KLineFrame()
19136
19145
  if (this.BeforeDrawXYCallback) this.BeforeDrawXYCallback(this);
19137
19146
 
19138
19147
  this.DrawTitleBG();
19148
+ this.DrawCustomHorizontalArea(); //Y轴背景区域 在刻度前面绘制
19139
19149
  this.DrawHorizontal();
19140
19150
  this.DrawVertical();
19141
19151
  }
@@ -19928,13 +19938,24 @@ function KLineFrame()
19928
19938
  case 4: //叠加K线涨幅刻度
19929
19939
  this.DrawCustomItem(item, mapTextRect);
19930
19940
  break;
19931
- case 5:
19932
- this.DrawCustomAreaItem(item);
19933
- break;
19934
19941
  }
19935
19942
  }
19936
19943
  }
19937
19944
 
19945
+ //Y轴面积背景
19946
+ this.DrawCustomHorizontalArea=function()
19947
+ {
19948
+ if (this.IsMinSize) return;
19949
+ if (this.ChartBorder.IsShowTitleOnly) return;
19950
+ if (!IFrameSplitOperator.IsNonEmptyArray(this.CustomHorizontalInfo)) return;
19951
+
19952
+ for(var i=0;i<this.CustomHorizontalInfo.length;++i)
19953
+ {
19954
+ var item=this.CustomHorizontalInfo[i];
19955
+ if (item.Type==5) this.DrawCustomAreaItem(item);
19956
+ }
19957
+ }
19958
+
19938
19959
  this.DrawCustomVerticalItem=function(item)
19939
19960
  {
19940
19961
  this.Canvas.save();
@@ -22561,7 +22582,14 @@ function HQTradeFrame()
22561
22582
  if (!drawPicture.GetXYCoordinate) return false;
22562
22583
 
22563
22584
  var range=drawPicture.GetXYCoordinate();
22564
- drawPicture.Frame.DrawPictureYCoordinate(drawPicture, range, option);
22585
+ if (range && range.IsShowYCoordinate===false) //隐藏Y轴刻度信息
22586
+ {
22587
+
22588
+ }
22589
+ else
22590
+ {
22591
+ drawPicture.Frame.DrawPictureYCoordinate(drawPicture, range, option);
22592
+ }
22565
22593
 
22566
22594
  for(var i=0;i<this.SubFrame.length;++i)
22567
22595
  {
@@ -59636,6 +59664,7 @@ IChartDrawPicture.ArrayDrawPricture=
59636
59664
  { Name:"射线", ClassName:'ChartDrawPictureHaflLine', Create:function() { return new ChartDrawPictureHaflLine(); } },
59637
59665
  { Name:"箭头", ClassName:"ChartDrawArrowLine", Create:function() { return new ChartDrawArrowLine(); } },
59638
59666
  { Name:"水平线", ClassName:'ChartDrawPictureHorizontalLine', Create:function() { return new ChartDrawPictureHorizontalLine(); }},
59667
+ { Name:"水平射线", ClassName:"ChartDrawPictureHorizontalRay", Create:function() { return new ChartDrawPictureHorizontalRay(); }},
59639
59668
  { Name:"趋势线", ClassName:'ChartDrawPictureTrendLine', Create:function() { return new ChartDrawPictureTrendLine(); }},
59640
59669
  { Name:"矩形", ClassName:'ChartDrawPictureRect', Create:function() { return new ChartDrawPictureRect(); }},
59641
59670
  { Name:"圆弧线", ClassName:'ChartDrawPictureArc', Create:function() { return new ChartDrawPictureArc(); }},
@@ -60312,17 +60341,67 @@ function ChartDrawPictureHorizontalLine()
60312
60341
  this.newMethod();
60313
60342
  delete this.newMethod;
60314
60343
 
60344
+ this.ClassName='ChartDrawPictureHorizontalLine';
60345
+ this.PointCount=1;
60346
+ this.IsPointIn=this.IsPointIn_XYValue_Line;
60347
+ this.IsDrawFirst=true;
60348
+ this.LineWidth=1;
60315
60349
  this.Super_SetOption=this.SetOption; //父类函数
60316
60350
  this.Super_ExportStorageData=this.ExportStorageData;
60317
60351
 
60318
- this.Label; //{Text:文本, Position: 0=左, 1=右 }
60352
+ this.LabelConfig=
60353
+ {
60354
+ Left:{ IsShow:true, Margin:{ Left:5, Top:4, Bottom:2, Right:5 } },
60355
+ Right:{ IsShow:true, Margin:{ Left:5, Top:4, Bottom:2, Right:5 } },
60356
+ Font:`${12*GetDevicePixelRatio()}px 微软雅黑`, TextColor:"rgb(255,255,255)"
60357
+ };
60358
+
60359
+ this.InsideLabelConfig=
60360
+ {
60361
+ Position:0, //0=左, 1=右
60362
+ Font:`${14*GetDevicePixelRatio()}px 微软雅黑`,
60363
+ Margin:{ Left:5, Top:4, Bottom:2, Right:5 },
60364
+ TextColor:"rgb(255,255,255)",
60365
+ BGAlpha:0.8, //背景色透明度
60366
+ }
60367
+
60368
+ this.LabelTitle;
60319
60369
 
60320
60370
  this.SetOption=function(option)
60321
60371
  {
60322
60372
  if (this.Super_SetOption) this.Super_SetOption(option);
60323
60373
  if (option)
60324
60374
  {
60325
- if (option.Label) this.Label=option.Label;
60375
+ if (option.LabelTitle) this.LabelTitle=option.LabelTitle;
60376
+
60377
+ if (option.Label)
60378
+ {
60379
+ var item=option.Label;
60380
+ if (item.Left)
60381
+ {
60382
+ var subItem=item.Left;
60383
+ if (IFrameSplitOperator.IsBool(subItem.IsShow)) this.LabelConfig.Left.IsShow=subItem.IsShow;
60384
+ }
60385
+
60386
+
60387
+ if (item.Right)
60388
+ {
60389
+ var subItem=item.Right;
60390
+ if (IFrameSplitOperator.IsBool(subItem.IsShow)) this.LabelConfig.Right.IsShow=subItem.IsShow;
60391
+ }
60392
+
60393
+ if (item.Font) this.LabelConfig.Font=item.Font;
60394
+ if (item.TextColor) this.LabelConfig.FoTextColornt=item.TextColor;
60395
+ }
60396
+
60397
+ if (option.InsideLabel)
60398
+ {
60399
+ var item=option.InsideLabel;
60400
+ if (item.Font) this.InsideLabelConfig.Font=item.Font;
60401
+ if (item.TextColor) this.InsideLabelConfig.TextColor=item.TextColor;
60402
+ if (IFrameSplitOperator.IsNumber(item.Position)) this.InsideLabelConfig.Position=item.Position;
60403
+ if (IFrameSplitOperator.IsNumber(item.BGAlpha)) this.InsideLabelConfig.BGAlpha=item.BGAlpha;
60404
+ }
60326
60405
  }
60327
60406
  }
60328
60407
 
@@ -60332,17 +60411,13 @@ function ChartDrawPictureHorizontalLine()
60332
60411
  if (this.Super_ExportStorageData)
60333
60412
  {
60334
60413
  storageData=this.Super_ExportStorageData();
60335
- if (this.Label) storageData.Label=this.Label;
60414
+ if (this.LabelTitle) storageData.LabelTitle=this.LabelTitle;
60336
60415
  }
60337
60416
 
60338
60417
  return storageData;
60339
60418
  }
60340
60419
 
60341
- this.PointCount=1;
60342
- this.ClassName='ChartDrawPictureHorizontalLine';
60343
- this.IsPointIn=this.IsPointIn_XYValue_Line;
60344
- this.Font=16*GetDevicePixelRatio() +"px 微软雅黑";
60345
-
60420
+ /*
60346
60421
  this.GetXYCoordinate=function()
60347
60422
  {
60348
60423
  if (this.IsFrameMinSize()) return null;
@@ -60350,6 +60425,7 @@ function ChartDrawPictureHorizontalLine()
60350
60425
 
60351
60426
  return this.PointRange(drawPoint);
60352
60427
  }
60428
+ */
60353
60429
 
60354
60430
  this.Draw=function()
60355
60431
  {
@@ -60383,8 +60459,9 @@ function ChartDrawPictureHorizontalLine()
60383
60459
  }
60384
60460
  else
60385
60461
  {
60386
- this.Canvas.moveTo(left,drawPoint[0].Y);
60387
- this.Canvas.lineTo(right,drawPoint[0].Y);
60462
+ var yFixed=ToFixedPoint2(this.LineWidth,drawPoint[0].Y);
60463
+ this.Canvas.moveTo(left,yFixed);
60464
+ this.Canvas.lineTo(right,yFixed);
60388
60465
  }
60389
60466
  this.Canvas.stroke();
60390
60467
  this.RestoreLineWidth();
@@ -60410,89 +60487,317 @@ function ChartDrawPictureHorizontalLine()
60410
60487
  this.DrawPoint(drawPoint);
60411
60488
 
60412
60489
  //显示价格
60413
- this.LineText(drawPoint[0])
60414
- /*
60415
- this.Canvas.fillStyle=this.LineColor;
60416
- this.Canvas.font=this.Font;
60417
- if (isHScreen)
60490
+ this.DrawInsideLabel(drawPoint[0])
60491
+
60492
+ this.Canvas.restore();
60493
+
60494
+ this.DrawValueLabel(drawPoint[0]);
60495
+ }
60496
+
60497
+ this.DrawValueLabel=function(point)
60498
+ {
60499
+ if (!point) return;
60500
+ if (this.Frame.IsHScreen) return; //不支持横屏
60501
+
60502
+ var y=point.Y;
60503
+ var yValue=this.Frame.GetYData(y);
60504
+ var text=yValue.toFixed(2);
60505
+
60506
+ var border=this.Frame.GetBorder();
60507
+ var config=this.LabelConfig;
60508
+
60509
+ this.Canvas.font=config.Font;
60510
+ var textHeight=this.Canvas.measureText("擎").width;
60511
+ var textWidth=this.Canvas.measureText(text).width;
60512
+
60513
+ if (config.Left.IsShow && this.Frame.ChartBorder.Left>5)
60418
60514
  {
60515
+ var margin=config.Left.Margin;
60516
+ var rtBG={ Right:border.Left-1, Height:textHeight+margin.Top+margin.Bottom, Width:textWidth+margin.Left+margin.Right };
60517
+ rtBG.Top=y-textHeight/2-margin.Top;
60518
+ rtBG.Bottom=rtBG.Top+rtBG.Height;
60519
+ rtBG.Left=rtBG.Right-rtBG.Width;
60520
+
60521
+ this.Canvas.fillStyle=this.LineColor;
60522
+ this.Canvas.fillRect(rtBG.Left, rtBG.Top, rtBG.Width, rtBG.Height);
60523
+
60419
60524
  this.Canvas.textAlign="left";
60420
- this.Canvas.textBaseline="bottom";
60421
- var xText=drawPoint[0].X;
60422
- var yText=left;
60423
- this.Canvas.translate(xText, yText);
60424
- this.Canvas.rotate(90 * Math.PI / 180); //数据和框子旋转180度
60425
- var yValue=this.Frame.GetYData(drawPoint[0].X);
60426
- var text=yValue.toFixed(2);
60427
- if (this.Label)
60428
- {
60429
- if (this.Label.Position==0) text=this.Label.Text+yValue.toFixed(2);
60430
- else if (this.Label.Position==1) text=yValue.toFixed(2)+this.Label.Text;
60431
- }
60432
- this.Canvas.fillText(text,0,0);
60525
+ this.Canvas.textBaseline = "top";
60526
+ var xText=rtBG.Left+margin.Left;
60527
+ var yText=rtBG.Top+margin.Top;
60528
+ this.Canvas.fillStyle=config.TextColor;
60529
+ this.Canvas.fillText(text,xText,yText);
60433
60530
  }
60434
- else
60531
+
60532
+ if (config.Right.IsShow && this.Frame.ChartBorder.Right>5)
60435
60533
  {
60534
+ var margin=config.Right.Margin;
60535
+ var rtBG={ Left:border.Right+1, Height:textHeight+margin.Top+margin.Bottom, Width:textWidth+margin.Left+margin.Right };
60536
+ rtBG.Top=y-textHeight/2-margin.Top;
60537
+ rtBG.Bottom=rtBG.Top+rtBG.Height;
60538
+ rtBG.Right=rtBG.Left+rtBG.Width;
60539
+ this.Canvas.fillStyle=this.LineColor;
60540
+ this.Canvas.fillRect(rtBG.Left, rtBG.Top, rtBG.Width, rtBG.Height);
60541
+
60436
60542
  this.Canvas.textAlign="left";
60437
- this.Canvas.textBaseline="bottom";
60438
- var yValue=this.Frame.GetYData(drawPoint[0].Y);
60439
- var text=yValue.toFixed(2);
60440
- if (this.Label)
60441
- {
60442
- if (this.Label.Position==0) text=this.Label.Text+yValue.toFixed(2);
60443
- else if (this.Label.Position==1) text=yValue.toFixed(2)+this.Label.Text;
60444
- }
60445
- this.Canvas.fillText(text,left,drawPoint[0].Y);
60543
+ this.Canvas.textBaseline = "top";
60544
+ var xText=rtBG.Left+margin.Left;
60545
+ var yText=rtBG.Top+margin.Top;
60546
+ this.Canvas.fillStyle=config.TextColor;
60547
+ this.Canvas.fillText(text,xText,yText);
60446
60548
  }
60447
- */
60448
-
60449
- this.Canvas.restore();
60450
60549
  }
60451
60550
 
60452
- this.LineText=function(point)
60551
+ this.DrawInsideLabel=function(point)
60453
60552
  {
60454
60553
  if (!point) return;
60455
60554
 
60456
60555
  var isHScreen=this.Frame.IsHScreen;
60457
- var left=this.Frame.ChartBorder.GetLeft();
60556
+ var config=this.InsideLabelConfig;
60557
+ if (config.Position!=0 && config.Position!=1) return;
60558
+ var margin=config.Margin;
60458
60559
 
60459
60560
  this.Canvas.fillStyle=this.LineColor;
60460
- this.Canvas.font=this.Font;
60561
+ this.Canvas.font=config.Font;
60562
+ var textHeight=this.Canvas.measureText("擎").width;
60563
+ var border=this.Frame.GetBorder();
60461
60564
 
60462
60565
  if (isHScreen)
60463
60566
  {
60464
- left=this.Frame.ChartBorder.GetTop();
60465
- this.Canvas.textAlign="left";
60466
- this.Canvas.textBaseline="bottom";
60467
- var xText=point.X;
60468
- var yText=left;
60469
- this.Canvas.translate(xText, yText);
60470
- this.Canvas.rotate(90 * Math.PI / 180); //数据和框子旋转180度
60471
60567
  var yValue=this.Frame.GetYData(point.X);
60472
60568
  var text=yValue.toFixed(2);
60473
- if (this.Label)
60569
+ if (this.LabelTitle) text=this.LabelTitle+text;
60570
+ var textWidth=this.Canvas.measureText(text).width;
60571
+
60572
+ var rtBG=null;
60573
+ if (config.Position==0) //左
60574
+ {
60575
+ var rtBG={ Top:border.Top+1, Width:textHeight+margin.Top+margin.Bottom, Height:textWidth+margin.Left+margin.Right, Left:point.X };
60576
+ rtBG.Bottom=rtBG.Top+rtBG.Height;
60577
+ rtBG.Right=rtBG.Left+rtBG.Width;
60578
+ }
60579
+ else if (config.Position==1) //右
60474
60580
  {
60475
- if (this.Label.Position==0) text=this.Label.Text+yValue.toFixed(2);
60476
- else if (this.Label.Position==1) text=yValue.toFixed(2)+this.Label.Text;
60581
+ var rtBG={ Bottom:border.Bottom-1, Width:textHeight+margin.Top+margin.Bottom, Height:textWidth+margin.Left+margin.Right, Left:point.X };
60582
+ rtBG.Top=rtBG.Bottom-rtBG.Height;
60583
+ rtBG.Right=rtBG.Left+rtBG.Width;
60477
60584
  }
60478
- this.Canvas.fillText(text,2,0);
60585
+
60586
+ var bgColor=this.LineColor;
60587
+ if (config.BGAlpha<1) bgColor=IChartDrawPicture.ColorToRGBA(this.LineColor, config.BGAlpha);
60588
+ this.Canvas.fillStyle=bgColor;
60589
+ this.Canvas.fillRect(rtBG.Left, rtBG.Top, rtBG.Width, rtBG.Height);
60590
+
60591
+ var xText=rtBG.Right-margin.Top;
60592
+ var yText=rtBG.Top+margin.Left;
60593
+ this.Canvas.translate(xText, yText);
60594
+ this.Canvas.rotate(90 * Math.PI / 180); //数据和框子旋转180度
60595
+
60596
+ this.Canvas.textAlign="left";
60597
+ this.Canvas.textBaseline="top";
60598
+ this.Canvas.fillStyle=config.TextColor;
60599
+ this.Canvas.fillText(text,0,0);
60479
60600
  }
60480
60601
  else
60481
60602
  {
60482
- this.Canvas.textAlign="left";
60483
- this.Canvas.textBaseline="bottom";
60484
60603
  var yValue=this.Frame.GetYData(point.Y);
60485
60604
  var text=yValue.toFixed(2);
60486
- if (this.Label)
60605
+ if (this.LabelTitle) text=this.LabelTitle+text;
60606
+ var textWidth=this.Canvas.measureText(text).width;
60607
+
60608
+ var rtBG=null;
60609
+ if (config.Position==0) //左
60487
60610
  {
60488
- if (this.Label.Position==0) text=this.Label.Text+yValue.toFixed(2);
60489
- else if (this.Label.Position==1) text=yValue.toFixed(2)+this.Label.Text;
60611
+ var rtBG={ Left:border.Left+1, Height:textHeight+margin.Top+margin.Bottom, Width:textWidth+margin.Left+margin.Right, Bottom:point.Y };
60612
+ rtBG.Top=rtBG.Bottom-rtBG.Height;
60613
+ rtBG.Right=rtBG.Left+rtBG.Width;
60490
60614
  }
60491
- this.Canvas.fillText(text,left,point.Y);
60615
+ else if (config.Position==1) //右
60616
+ {
60617
+ var rtBG={ Right:border.Right-1, Height:textHeight+margin.Top+margin.Bottom, Width:textWidth+margin.Left+margin.Right, Bottom:point.Y };
60618
+ rtBG.Top=rtBG.Bottom-rtBG.Height;
60619
+ rtBG.Left=rtBG.Right-rtBG.Width;
60620
+ }
60621
+
60622
+ var bgColor=this.LineColor;
60623
+ if (config.BGAlpha<1) bgColor=IChartDrawPicture.ColorToRGBA(this.LineColor, config.BGAlpha);
60624
+ this.Canvas.fillStyle=bgColor;
60625
+ this.Canvas.fillRect(rtBG.Left, rtBG.Top, rtBG.Width, rtBG.Height);
60626
+
60627
+ var xText=rtBG.Left+margin.Left;
60628
+ var yText=rtBG.Top+margin.Top;
60629
+ this.Canvas.textAlign="left";
60630
+ this.Canvas.textBaseline = "top";
60631
+ this.Canvas.fillStyle=config.TextColor;
60632
+ this.Canvas.fillText(text,xText,yText);
60633
+ }
60634
+ }
60635
+ }
60636
+
60637
+ // 画图工具-水平射线线 支持横屏
60638
+ function ChartDrawPictureHorizontalRay()
60639
+ {
60640
+ this.newMethod=IChartDrawPicture; //派生
60641
+ this.newMethod();
60642
+ delete this.newMethod;
60643
+
60644
+ this.ClassName='ChartDrawPictureHorizontalRay';
60645
+ this.PointCount=1;
60646
+ this.IsPointIn=this.IsPointIn_XYValue_Line;
60647
+ this.IsDrawFirst=true;
60648
+ this.LineWidth=1;
60649
+ this.Super_SetOption=this.SetOption; //父类函数
60650
+ this.Super_ExportStorageData=this.ExportStorageData;
60651
+
60652
+ this.LabelConfig=
60653
+ {
60654
+ Right:{ IsShow:true, Margin:{ Left:5, Top:4, Bottom:2, Right:5 } },
60655
+ Font:`${12*GetDevicePixelRatio()}px 微软雅黑`, TextColor:"rgb(255,255,255)"
60656
+ };
60657
+
60658
+ this.SetOption=function(option)
60659
+ {
60660
+ if (this.Super_SetOption) this.Super_SetOption(option);
60661
+ if (option)
60662
+ {
60663
+ if (option.LabelTitle) this.LabelTitle=option.LabelTitle;
60664
+
60665
+ if (option.Label)
60666
+ {
60667
+ var item=option.Label;
60668
+ if (item.Right)
60669
+ {
60670
+ var subItem=item.Right;
60671
+ if (IFrameSplitOperator.IsBool(subItem.IsShow)) this.LabelConfig.Right.IsShow=subItem.IsShow;
60672
+ }
60673
+
60674
+ if (item.Font) this.LabelConfig.Font=item.Font;
60675
+ if (item.TextColor) this.LabelConfig.FoTextColornt=item.TextColor;
60676
+ }
60677
+ }
60678
+ }
60679
+
60680
+ this.ExportStorageData=function()
60681
+ {
60682
+ var storageData;
60683
+ if (this.Super_ExportStorageData)
60684
+ {
60685
+ storageData=this.Super_ExportStorageData();
60686
+ }
60687
+ return storageData;
60688
+ }
60689
+
60690
+ this.GetXYCoordinate=function()
60691
+ {
60692
+ if (this.IsFrameMinSize()) return null;
60693
+ var drawPoint=this.CalculateDrawPoint();
60694
+
60695
+ var data=this.PointRange(drawPoint);
60696
+ if (data) data.IsShowYCoordinate=false;
60697
+ return data;
60698
+ }
60699
+
60700
+ this.Draw=function()
60701
+ {
60702
+ this.LinePoint=[];
60703
+ if (this.IsFrameMinSize()) return;
60704
+ if (!this.IsShow) return;
60705
+
60706
+ var drawPoint=this.CalculateDrawPoint();
60707
+ if (!drawPoint || drawPoint.length!=1) return;
60708
+ if (!this.Frame) return;
60709
+ if (this.Value.length!=1) return;
60710
+ if (!this.IsYValueInFrame(this.Value[0].YValue)) return null;
60711
+
60712
+ var isHScreen=this.Frame.IsHScreen;
60713
+ var left=this.Frame.ChartBorder.GetLeft();
60714
+ var right=this.Frame.ChartBorder.GetRight();
60715
+ if (isHScreen)
60716
+ {
60717
+ left=this.Frame.ChartBorder.GetTop();
60718
+ right=this.Frame.ChartBorder.GetBottom();
60719
+ }
60720
+ this.ClipFrame();
60721
+
60722
+ this.Canvas.strokeStyle=this.LineColor;
60723
+ this.SetLineWidth();
60724
+ this.Canvas.beginPath();
60725
+ if (isHScreen)
60726
+ {
60727
+ this.Canvas.moveTo(drawPoint[0].X,drawPoint[0].Y);
60728
+ this.Canvas.lineTo(drawPoint[0].X,right);
60729
+ }
60730
+ else
60731
+ {
60732
+ var yFixed=ToFixedPoint2(this.LineWidth,drawPoint[0].Y);
60733
+ this.Canvas.moveTo(drawPoint[0].X,yFixed);
60734
+ this.Canvas.lineTo(right,yFixed);
60735
+ }
60736
+ this.Canvas.stroke();
60737
+ this.RestoreLineWidth();
60738
+
60739
+ var line={Start:new Point(), End:new Point()};
60740
+ if (isHScreen)
60741
+ {
60742
+ line.Start.X=drawPoint[0].X;
60743
+ line.Start.Y=drawPoint[0].Y;
60744
+ line.End.X=drawPoint[0].X;
60745
+ line.End.Y=right;
60746
+ }
60747
+ else
60748
+ {
60749
+ line.Start.X=drawPoint[0].X;
60750
+ line.Start.Y=drawPoint[0].Y;
60751
+ line.End.X=right;
60752
+ line.End.Y=drawPoint[0].Y;
60753
+ }
60754
+ this.LinePoint.push(line);
60755
+
60756
+ //画点
60757
+ this.DrawPoint(drawPoint);
60758
+
60759
+ this.Canvas.restore();
60760
+
60761
+ this.DrawValueLabel(drawPoint[0]);
60762
+ }
60763
+
60764
+ this.DrawValueLabel=function(point)
60765
+ {
60766
+ if (!point) return;
60767
+ if (this.Frame.IsHScreen) return; //不支持横屏
60768
+
60769
+ var y=point.Y;
60770
+ var yValue=this.Frame.GetYData(y);
60771
+ var text=yValue.toFixed(2);
60772
+
60773
+ var border=this.Frame.GetBorder();
60774
+ var config=this.LabelConfig;
60775
+
60776
+ this.Canvas.font=config.Font;
60777
+ var textHeight=this.Canvas.measureText("擎").width;
60778
+ var textWidth=this.Canvas.measureText(text).width;
60779
+
60780
+ if (config.Right.IsShow && this.Frame.ChartBorder.Right>5)
60781
+ {
60782
+ var margin=config.Right.Margin;
60783
+ var rtBG={ Left:border.Right+1, Height:textHeight+margin.Top+margin.Bottom, Width:textWidth+margin.Left+margin.Right };
60784
+ rtBG.Top=y-textHeight/2-margin.Top;
60785
+ rtBG.Bottom=rtBG.Top+rtBG.Height;
60786
+ rtBG.Right=rtBG.Left+rtBG.Width;
60787
+ this.Canvas.fillStyle=this.LineColor;
60788
+ this.Canvas.fillRect(rtBG.Left, rtBG.Top, rtBG.Width, rtBG.Height);
60789
+
60790
+ this.Canvas.textAlign="left";
60791
+ this.Canvas.textBaseline = "top";
60792
+ var xText=rtBG.Left+margin.Left;
60793
+ var yText=rtBG.Top+margin.Top;
60794
+ this.Canvas.fillStyle=config.TextColor;
60795
+ this.Canvas.fillText(text,xText,yText);
60492
60796
  }
60493
60797
  }
60494
60798
  }
60495
60799
 
60800
+
60496
60801
  //水平线2
60497
60802
  function ChartDrawHLine()
60498
60803
  {
@@ -136126,6 +136431,7 @@ function JSDialogDrawTool()
136126
136431
  { Title: '箭头', ClassName: 'hqchart_drawtool icon-draw_rays', Type:0, Data:{ ID:"箭头" } },
136127
136432
  { Title: '趋势线', ClassName: 'hqchart_drawtool icon-draw_trendline', Type:0, Data:{ ID:"趋势线" } },
136128
136433
  { Title: '水平线', ClassName: 'hqchart_drawtool icon-draw_hline', Type:0, Data:{ ID:"水平线" } },
136434
+ { Title: '水平射线', ClassName: 'hqchart_drawtool icon-tubiao_shuipingshexian', Type:0, Data:{ ID:"水平射线" } },
136129
136435
  { Title: '涂鸦线段', ClassName: 'hqchart_drawtool icon-draw_line', Type:0, Data:{ ID:"涂鸦线段" } },
136130
136436
  { Title: '阻速线', ClassName: 'hqchart_drawtool icon-draw_resline', Type:0, Data:{ ID:"阻速线" } },
136131
136437
  { Title: '江恩角度线', ClassName: 'hqchart_drawtool icon-jiangenjiaoduxian', Type:0, Data:{ ID:"江恩角度线" } },
@@ -137141,7 +137447,7 @@ function HQChartScriptWorker()
137141
137447
 
137142
137448
 
137143
137449
 
137144
- var HQCHART_VERSION="1.1.13359";
137450
+ var HQCHART_VERSION="1.1.13369";
137145
137451
 
137146
137452
  function PrintHQChartVersion()
137147
137453
  {