hqchart 1.1.13364 → 1.1.13375

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.
@@ -15687,6 +15687,8 @@ function AverageWidthFrame()
15687
15687
 
15688
15688
  this.Canvas.font=this.DrawPicture.Font;
15689
15689
  var fontHeight=this.GetFontHeight();
15690
+ this.Canvas.textAlign="left";
15691
+ this.Canvas.textBaseline = "bottom";
15690
15692
 
15691
15693
  if (range.X)
15692
15694
  {
@@ -19099,6 +19101,7 @@ function KLineFrame()
19099
19101
  if (this.BeforeDrawXYCallback) this.BeforeDrawXYCallback(this);
19100
19102
 
19101
19103
  this.DrawTitleBG();
19104
+ this.DrawCustomHorizontalArea(); //Y轴背景区域 在刻度前面绘制
19102
19105
  this.DrawHorizontal();
19103
19106
  this.DrawVertical();
19104
19107
  }
@@ -19891,13 +19894,24 @@ function KLineFrame()
19891
19894
  case 4: //叠加K线涨幅刻度
19892
19895
  this.DrawCustomItem(item, mapTextRect);
19893
19896
  break;
19894
- case 5:
19895
- this.DrawCustomAreaItem(item);
19896
- break;
19897
19897
  }
19898
19898
  }
19899
19899
  }
19900
19900
 
19901
+ //Y轴面积背景
19902
+ this.DrawCustomHorizontalArea=function()
19903
+ {
19904
+ if (this.IsMinSize) return;
19905
+ if (this.ChartBorder.IsShowTitleOnly) return;
19906
+ if (!IFrameSplitOperator.IsNonEmptyArray(this.CustomHorizontalInfo)) return;
19907
+
19908
+ for(var i=0;i<this.CustomHorizontalInfo.length;++i)
19909
+ {
19910
+ var item=this.CustomHorizontalInfo[i];
19911
+ if (item.Type==5) this.DrawCustomAreaItem(item);
19912
+ }
19913
+ }
19914
+
19901
19915
  this.DrawCustomVerticalItem=function(item)
19902
19916
  {
19903
19917
  this.Canvas.save();
@@ -22524,7 +22538,14 @@ function HQTradeFrame()
22524
22538
  if (!drawPicture.GetXYCoordinate) return false;
22525
22539
 
22526
22540
  var range=drawPicture.GetXYCoordinate();
22527
- drawPicture.Frame.DrawPictureYCoordinate(drawPicture, range, option);
22541
+ if (range && range.IsShowYCoordinate===false) //隐藏Y轴刻度信息
22542
+ {
22543
+
22544
+ }
22545
+ else
22546
+ {
22547
+ drawPicture.Frame.DrawPictureYCoordinate(drawPicture, range, option);
22548
+ }
22528
22549
 
22529
22550
  for(var i=0;i<this.SubFrame.length;++i)
22530
22551
  {
@@ -59599,6 +59620,7 @@ IChartDrawPicture.ArrayDrawPricture=
59599
59620
  { Name:"射线", ClassName:'ChartDrawPictureHaflLine', Create:function() { return new ChartDrawPictureHaflLine(); } },
59600
59621
  { Name:"箭头", ClassName:"ChartDrawArrowLine", Create:function() { return new ChartDrawArrowLine(); } },
59601
59622
  { Name:"水平线", ClassName:'ChartDrawPictureHorizontalLine', Create:function() { return new ChartDrawPictureHorizontalLine(); }},
59623
+ { Name:"水平射线", ClassName:"ChartDrawPictureHorizontalRay", Create:function() { return new ChartDrawPictureHorizontalRay(); }},
59602
59624
  { Name:"趋势线", ClassName:'ChartDrawPictureTrendLine', Create:function() { return new ChartDrawPictureTrendLine(); }},
59603
59625
  { Name:"矩形", ClassName:'ChartDrawPictureRect', Create:function() { return new ChartDrawPictureRect(); }},
59604
59626
  { Name:"圆弧线", ClassName:'ChartDrawPictureArc', Create:function() { return new ChartDrawPictureArc(); }},
@@ -60275,17 +60297,67 @@ function ChartDrawPictureHorizontalLine()
60275
60297
  this.newMethod();
60276
60298
  delete this.newMethod;
60277
60299
 
60300
+ this.ClassName='ChartDrawPictureHorizontalLine';
60301
+ this.PointCount=1;
60302
+ this.IsPointIn=this.IsPointIn_XYValue_Line;
60303
+ this.IsDrawFirst=true;
60304
+ this.LineWidth=1;
60278
60305
  this.Super_SetOption=this.SetOption; //父类函数
60279
60306
  this.Super_ExportStorageData=this.ExportStorageData;
60280
60307
 
60281
- this.Label; //{Text:文本, Position: 0=左, 1=右 }
60308
+ this.LabelConfig=
60309
+ {
60310
+ Left:{ IsShow:true, Margin:{ Left:5, Top:4, Bottom:2, Right:5 } },
60311
+ Right:{ IsShow:true, Margin:{ Left:5, Top:4, Bottom:2, Right:5 } },
60312
+ Font:`${12*GetDevicePixelRatio()}px 微软雅黑`, TextColor:"rgb(255,255,255)"
60313
+ };
60314
+
60315
+ this.InsideLabelConfig=
60316
+ {
60317
+ Position:0, //0=左, 1=右
60318
+ Font:`${14*GetDevicePixelRatio()}px 微软雅黑`,
60319
+ Margin:{ Left:5, Top:4, Bottom:2, Right:5 },
60320
+ TextColor:"rgb(255,255,255)",
60321
+ BGAlpha:0.8, //背景色透明度
60322
+ }
60323
+
60324
+ this.LabelTitle;
60282
60325
 
60283
60326
  this.SetOption=function(option)
60284
60327
  {
60285
60328
  if (this.Super_SetOption) this.Super_SetOption(option);
60286
60329
  if (option)
60287
60330
  {
60288
- if (option.Label) this.Label=option.Label;
60331
+ if (option.LabelTitle) this.LabelTitle=option.LabelTitle;
60332
+
60333
+ if (option.Label)
60334
+ {
60335
+ var item=option.Label;
60336
+ if (item.Left)
60337
+ {
60338
+ var subItem=item.Left;
60339
+ if (IFrameSplitOperator.IsBool(subItem.IsShow)) this.LabelConfig.Left.IsShow=subItem.IsShow;
60340
+ }
60341
+
60342
+
60343
+ if (item.Right)
60344
+ {
60345
+ var subItem=item.Right;
60346
+ if (IFrameSplitOperator.IsBool(subItem.IsShow)) this.LabelConfig.Right.IsShow=subItem.IsShow;
60347
+ }
60348
+
60349
+ if (item.Font) this.LabelConfig.Font=item.Font;
60350
+ if (item.TextColor) this.LabelConfig.FoTextColornt=item.TextColor;
60351
+ }
60352
+
60353
+ if (option.InsideLabel)
60354
+ {
60355
+ var item=option.InsideLabel;
60356
+ if (item.Font) this.InsideLabelConfig.Font=item.Font;
60357
+ if (item.TextColor) this.InsideLabelConfig.TextColor=item.TextColor;
60358
+ if (IFrameSplitOperator.IsNumber(item.Position)) this.InsideLabelConfig.Position=item.Position;
60359
+ if (IFrameSplitOperator.IsNumber(item.BGAlpha)) this.InsideLabelConfig.BGAlpha=item.BGAlpha;
60360
+ }
60289
60361
  }
60290
60362
  }
60291
60363
 
@@ -60295,17 +60367,13 @@ function ChartDrawPictureHorizontalLine()
60295
60367
  if (this.Super_ExportStorageData)
60296
60368
  {
60297
60369
  storageData=this.Super_ExportStorageData();
60298
- if (this.Label) storageData.Label=this.Label;
60370
+ if (this.LabelTitle) storageData.LabelTitle=this.LabelTitle;
60299
60371
  }
60300
60372
 
60301
60373
  return storageData;
60302
60374
  }
60303
60375
 
60304
- this.PointCount=1;
60305
- this.ClassName='ChartDrawPictureHorizontalLine';
60306
- this.IsPointIn=this.IsPointIn_XYValue_Line;
60307
- this.Font=16*GetDevicePixelRatio() +"px 微软雅黑";
60308
-
60376
+ /*
60309
60377
  this.GetXYCoordinate=function()
60310
60378
  {
60311
60379
  if (this.IsFrameMinSize()) return null;
@@ -60313,6 +60381,7 @@ function ChartDrawPictureHorizontalLine()
60313
60381
 
60314
60382
  return this.PointRange(drawPoint);
60315
60383
  }
60384
+ */
60316
60385
 
60317
60386
  this.Draw=function()
60318
60387
  {
@@ -60346,8 +60415,9 @@ function ChartDrawPictureHorizontalLine()
60346
60415
  }
60347
60416
  else
60348
60417
  {
60349
- this.Canvas.moveTo(left,drawPoint[0].Y);
60350
- this.Canvas.lineTo(right,drawPoint[0].Y);
60418
+ var yFixed=ToFixedPoint2(this.LineWidth,drawPoint[0].Y);
60419
+ this.Canvas.moveTo(left,yFixed);
60420
+ this.Canvas.lineTo(right,yFixed);
60351
60421
  }
60352
60422
  this.Canvas.stroke();
60353
60423
  this.RestoreLineWidth();
@@ -60373,89 +60443,317 @@ function ChartDrawPictureHorizontalLine()
60373
60443
  this.DrawPoint(drawPoint);
60374
60444
 
60375
60445
  //显示价格
60376
- this.LineText(drawPoint[0])
60377
- /*
60378
- this.Canvas.fillStyle=this.LineColor;
60379
- this.Canvas.font=this.Font;
60380
- if (isHScreen)
60446
+ this.DrawInsideLabel(drawPoint[0])
60447
+
60448
+ this.Canvas.restore();
60449
+
60450
+ this.DrawValueLabel(drawPoint[0]);
60451
+ }
60452
+
60453
+ this.DrawValueLabel=function(point)
60454
+ {
60455
+ if (!point) return;
60456
+ if (this.Frame.IsHScreen) return; //不支持横屏
60457
+
60458
+ var y=point.Y;
60459
+ var yValue=this.Frame.GetYData(y);
60460
+ var text=yValue.toFixed(2);
60461
+
60462
+ var border=this.Frame.GetBorder();
60463
+ var config=this.LabelConfig;
60464
+
60465
+ this.Canvas.font=config.Font;
60466
+ var textHeight=this.Canvas.measureText("擎").width;
60467
+ var textWidth=this.Canvas.measureText(text).width;
60468
+
60469
+ if (config.Left.IsShow && this.Frame.ChartBorder.Left>5)
60381
60470
  {
60471
+ var margin=config.Left.Margin;
60472
+ var rtBG={ Right:border.Left-1, Height:textHeight+margin.Top+margin.Bottom, Width:textWidth+margin.Left+margin.Right };
60473
+ rtBG.Top=y-textHeight/2-margin.Top;
60474
+ rtBG.Bottom=rtBG.Top+rtBG.Height;
60475
+ rtBG.Left=rtBG.Right-rtBG.Width;
60476
+
60477
+ this.Canvas.fillStyle=this.LineColor;
60478
+ this.Canvas.fillRect(rtBG.Left, rtBG.Top, rtBG.Width, rtBG.Height);
60479
+
60382
60480
  this.Canvas.textAlign="left";
60383
- this.Canvas.textBaseline="bottom";
60384
- var xText=drawPoint[0].X;
60385
- var yText=left;
60386
- this.Canvas.translate(xText, yText);
60387
- this.Canvas.rotate(90 * Math.PI / 180); //数据和框子旋转180度
60388
- var yValue=this.Frame.GetYData(drawPoint[0].X);
60389
- var text=yValue.toFixed(2);
60390
- if (this.Label)
60391
- {
60392
- if (this.Label.Position==0) text=this.Label.Text+yValue.toFixed(2);
60393
- else if (this.Label.Position==1) text=yValue.toFixed(2)+this.Label.Text;
60394
- }
60395
- this.Canvas.fillText(text,0,0);
60481
+ this.Canvas.textBaseline = "top";
60482
+ var xText=rtBG.Left+margin.Left;
60483
+ var yText=rtBG.Top+margin.Top;
60484
+ this.Canvas.fillStyle=config.TextColor;
60485
+ this.Canvas.fillText(text,xText,yText);
60396
60486
  }
60397
- else
60487
+
60488
+ if (config.Right.IsShow && this.Frame.ChartBorder.Right>5)
60398
60489
  {
60490
+ var margin=config.Right.Margin;
60491
+ var rtBG={ Left:border.Right+1, Height:textHeight+margin.Top+margin.Bottom, Width:textWidth+margin.Left+margin.Right };
60492
+ rtBG.Top=y-textHeight/2-margin.Top;
60493
+ rtBG.Bottom=rtBG.Top+rtBG.Height;
60494
+ rtBG.Right=rtBG.Left+rtBG.Width;
60495
+ this.Canvas.fillStyle=this.LineColor;
60496
+ this.Canvas.fillRect(rtBG.Left, rtBG.Top, rtBG.Width, rtBG.Height);
60497
+
60399
60498
  this.Canvas.textAlign="left";
60400
- this.Canvas.textBaseline="bottom";
60401
- var yValue=this.Frame.GetYData(drawPoint[0].Y);
60402
- var text=yValue.toFixed(2);
60403
- if (this.Label)
60404
- {
60405
- if (this.Label.Position==0) text=this.Label.Text+yValue.toFixed(2);
60406
- else if (this.Label.Position==1) text=yValue.toFixed(2)+this.Label.Text;
60407
- }
60408
- this.Canvas.fillText(text,left,drawPoint[0].Y);
60499
+ this.Canvas.textBaseline = "top";
60500
+ var xText=rtBG.Left+margin.Left;
60501
+ var yText=rtBG.Top+margin.Top;
60502
+ this.Canvas.fillStyle=config.TextColor;
60503
+ this.Canvas.fillText(text,xText,yText);
60409
60504
  }
60410
- */
60411
-
60412
- this.Canvas.restore();
60413
60505
  }
60414
60506
 
60415
- this.LineText=function(point)
60507
+ this.DrawInsideLabel=function(point)
60416
60508
  {
60417
60509
  if (!point) return;
60418
60510
 
60419
60511
  var isHScreen=this.Frame.IsHScreen;
60420
- var left=this.Frame.ChartBorder.GetLeft();
60512
+ var config=this.InsideLabelConfig;
60513
+ if (config.Position!=0 && config.Position!=1) return;
60514
+ var margin=config.Margin;
60421
60515
 
60422
60516
  this.Canvas.fillStyle=this.LineColor;
60423
- this.Canvas.font=this.Font;
60517
+ this.Canvas.font=config.Font;
60518
+ var textHeight=this.Canvas.measureText("擎").width;
60519
+ var border=this.Frame.GetBorder();
60424
60520
 
60425
60521
  if (isHScreen)
60426
60522
  {
60427
- left=this.Frame.ChartBorder.GetTop();
60428
- this.Canvas.textAlign="left";
60429
- this.Canvas.textBaseline="bottom";
60430
- var xText=point.X;
60431
- var yText=left;
60432
- this.Canvas.translate(xText, yText);
60433
- this.Canvas.rotate(90 * Math.PI / 180); //数据和框子旋转180度
60434
60523
  var yValue=this.Frame.GetYData(point.X);
60435
60524
  var text=yValue.toFixed(2);
60436
- if (this.Label)
60525
+ if (this.LabelTitle) text=this.LabelTitle+text;
60526
+ var textWidth=this.Canvas.measureText(text).width;
60527
+
60528
+ var rtBG=null;
60529
+ if (config.Position==0) //左
60530
+ {
60531
+ var rtBG={ Top:border.Top+1, Width:textHeight+margin.Top+margin.Bottom, Height:textWidth+margin.Left+margin.Right, Left:point.X };
60532
+ rtBG.Bottom=rtBG.Top+rtBG.Height;
60533
+ rtBG.Right=rtBG.Left+rtBG.Width;
60534
+ }
60535
+ else if (config.Position==1) //右
60437
60536
  {
60438
- if (this.Label.Position==0) text=this.Label.Text+yValue.toFixed(2);
60439
- else if (this.Label.Position==1) text=yValue.toFixed(2)+this.Label.Text;
60537
+ var rtBG={ Bottom:border.Bottom-1, Width:textHeight+margin.Top+margin.Bottom, Height:textWidth+margin.Left+margin.Right, Left:point.X };
60538
+ rtBG.Top=rtBG.Bottom-rtBG.Height;
60539
+ rtBG.Right=rtBG.Left+rtBG.Width;
60440
60540
  }
60441
- this.Canvas.fillText(text,2,0);
60541
+
60542
+ var bgColor=this.LineColor;
60543
+ if (config.BGAlpha<1) bgColor=IChartDrawPicture.ColorToRGBA(this.LineColor, config.BGAlpha);
60544
+ this.Canvas.fillStyle=bgColor;
60545
+ this.Canvas.fillRect(rtBG.Left, rtBG.Top, rtBG.Width, rtBG.Height);
60546
+
60547
+ var xText=rtBG.Right-margin.Top;
60548
+ var yText=rtBG.Top+margin.Left;
60549
+ this.Canvas.translate(xText, yText);
60550
+ this.Canvas.rotate(90 * Math.PI / 180); //数据和框子旋转180度
60551
+
60552
+ this.Canvas.textAlign="left";
60553
+ this.Canvas.textBaseline="top";
60554
+ this.Canvas.fillStyle=config.TextColor;
60555
+ this.Canvas.fillText(text,0,0);
60442
60556
  }
60443
60557
  else
60444
60558
  {
60445
- this.Canvas.textAlign="left";
60446
- this.Canvas.textBaseline="bottom";
60447
60559
  var yValue=this.Frame.GetYData(point.Y);
60448
60560
  var text=yValue.toFixed(2);
60449
- if (this.Label)
60561
+ if (this.LabelTitle) text=this.LabelTitle+text;
60562
+ var textWidth=this.Canvas.measureText(text).width;
60563
+
60564
+ var rtBG=null;
60565
+ if (config.Position==0) //左
60566
+ {
60567
+ var rtBG={ Left:border.Left+1, Height:textHeight+margin.Top+margin.Bottom, Width:textWidth+margin.Left+margin.Right, Bottom:point.Y };
60568
+ rtBG.Top=rtBG.Bottom-rtBG.Height;
60569
+ rtBG.Right=rtBG.Left+rtBG.Width;
60570
+ }
60571
+ else if (config.Position==1) //右
60572
+ {
60573
+ var rtBG={ Right:border.Right-1, Height:textHeight+margin.Top+margin.Bottom, Width:textWidth+margin.Left+margin.Right, Bottom:point.Y };
60574
+ rtBG.Top=rtBG.Bottom-rtBG.Height;
60575
+ rtBG.Left=rtBG.Right-rtBG.Width;
60576
+ }
60577
+
60578
+ var bgColor=this.LineColor;
60579
+ if (config.BGAlpha<1) bgColor=IChartDrawPicture.ColorToRGBA(this.LineColor, config.BGAlpha);
60580
+ this.Canvas.fillStyle=bgColor;
60581
+ this.Canvas.fillRect(rtBG.Left, rtBG.Top, rtBG.Width, rtBG.Height);
60582
+
60583
+ var xText=rtBG.Left+margin.Left;
60584
+ var yText=rtBG.Top+margin.Top;
60585
+ this.Canvas.textAlign="left";
60586
+ this.Canvas.textBaseline = "top";
60587
+ this.Canvas.fillStyle=config.TextColor;
60588
+ this.Canvas.fillText(text,xText,yText);
60589
+ }
60590
+ }
60591
+ }
60592
+
60593
+ // 画图工具-水平射线线 支持横屏
60594
+ function ChartDrawPictureHorizontalRay()
60595
+ {
60596
+ this.newMethod=IChartDrawPicture; //派生
60597
+ this.newMethod();
60598
+ delete this.newMethod;
60599
+
60600
+ this.ClassName='ChartDrawPictureHorizontalRay';
60601
+ this.PointCount=1;
60602
+ this.IsPointIn=this.IsPointIn_XYValue_Line;
60603
+ this.IsDrawFirst=true;
60604
+ this.LineWidth=1;
60605
+ this.Super_SetOption=this.SetOption; //父类函数
60606
+ this.Super_ExportStorageData=this.ExportStorageData;
60607
+
60608
+ this.LabelConfig=
60609
+ {
60610
+ Right:{ IsShow:true, Margin:{ Left:5, Top:4, Bottom:2, Right:5 } },
60611
+ Font:`${12*GetDevicePixelRatio()}px 微软雅黑`, TextColor:"rgb(255,255,255)"
60612
+ };
60613
+
60614
+ this.SetOption=function(option)
60615
+ {
60616
+ if (this.Super_SetOption) this.Super_SetOption(option);
60617
+ if (option)
60618
+ {
60619
+ if (option.LabelTitle) this.LabelTitle=option.LabelTitle;
60620
+
60621
+ if (option.Label)
60450
60622
  {
60451
- if (this.Label.Position==0) text=this.Label.Text+yValue.toFixed(2);
60452
- else if (this.Label.Position==1) text=yValue.toFixed(2)+this.Label.Text;
60623
+ var item=option.Label;
60624
+ if (item.Right)
60625
+ {
60626
+ var subItem=item.Right;
60627
+ if (IFrameSplitOperator.IsBool(subItem.IsShow)) this.LabelConfig.Right.IsShow=subItem.IsShow;
60628
+ }
60629
+
60630
+ if (item.Font) this.LabelConfig.Font=item.Font;
60631
+ if (item.TextColor) this.LabelConfig.FoTextColornt=item.TextColor;
60453
60632
  }
60454
- this.Canvas.fillText(text,left,point.Y);
60633
+ }
60634
+ }
60635
+
60636
+ this.ExportStorageData=function()
60637
+ {
60638
+ var storageData;
60639
+ if (this.Super_ExportStorageData)
60640
+ {
60641
+ storageData=this.Super_ExportStorageData();
60642
+ }
60643
+ return storageData;
60644
+ }
60645
+
60646
+ this.GetXYCoordinate=function()
60647
+ {
60648
+ if (this.IsFrameMinSize()) return null;
60649
+ var drawPoint=this.CalculateDrawPoint();
60650
+
60651
+ var data=this.PointRange(drawPoint);
60652
+ if (data) data.IsShowYCoordinate=false;
60653
+ return data;
60654
+ }
60655
+
60656
+ this.Draw=function()
60657
+ {
60658
+ this.LinePoint=[];
60659
+ if (this.IsFrameMinSize()) return;
60660
+ if (!this.IsShow) return;
60661
+
60662
+ var drawPoint=this.CalculateDrawPoint();
60663
+ if (!drawPoint || drawPoint.length!=1) return;
60664
+ if (!this.Frame) return;
60665
+ if (this.Value.length!=1) return;
60666
+ if (!this.IsYValueInFrame(this.Value[0].YValue)) return null;
60667
+
60668
+ var isHScreen=this.Frame.IsHScreen;
60669
+ var left=this.Frame.ChartBorder.GetLeft();
60670
+ var right=this.Frame.ChartBorder.GetRight();
60671
+ if (isHScreen)
60672
+ {
60673
+ left=this.Frame.ChartBorder.GetTop();
60674
+ right=this.Frame.ChartBorder.GetBottom();
60675
+ }
60676
+ this.ClipFrame();
60677
+
60678
+ this.Canvas.strokeStyle=this.LineColor;
60679
+ this.SetLineWidth();
60680
+ this.Canvas.beginPath();
60681
+ if (isHScreen)
60682
+ {
60683
+ this.Canvas.moveTo(drawPoint[0].X,drawPoint[0].Y);
60684
+ this.Canvas.lineTo(drawPoint[0].X,right);
60685
+ }
60686
+ else
60687
+ {
60688
+ var yFixed=ToFixedPoint2(this.LineWidth,drawPoint[0].Y);
60689
+ this.Canvas.moveTo(drawPoint[0].X,yFixed);
60690
+ this.Canvas.lineTo(right,yFixed);
60691
+ }
60692
+ this.Canvas.stroke();
60693
+ this.RestoreLineWidth();
60694
+
60695
+ var line={Start:new Point(), End:new Point()};
60696
+ if (isHScreen)
60697
+ {
60698
+ line.Start.X=drawPoint[0].X;
60699
+ line.Start.Y=drawPoint[0].Y;
60700
+ line.End.X=drawPoint[0].X;
60701
+ line.End.Y=right;
60702
+ }
60703
+ else
60704
+ {
60705
+ line.Start.X=drawPoint[0].X;
60706
+ line.Start.Y=drawPoint[0].Y;
60707
+ line.End.X=right;
60708
+ line.End.Y=drawPoint[0].Y;
60709
+ }
60710
+ this.LinePoint.push(line);
60711
+
60712
+ //画点
60713
+ this.DrawPoint(drawPoint);
60714
+
60715
+ this.Canvas.restore();
60716
+
60717
+ this.DrawValueLabel(drawPoint[0]);
60718
+ }
60719
+
60720
+ this.DrawValueLabel=function(point)
60721
+ {
60722
+ if (!point) return;
60723
+ if (this.Frame.IsHScreen) return; //不支持横屏
60724
+
60725
+ var y=point.Y;
60726
+ var yValue=this.Frame.GetYData(y);
60727
+ var text=yValue.toFixed(2);
60728
+
60729
+ var border=this.Frame.GetBorder();
60730
+ var config=this.LabelConfig;
60731
+
60732
+ this.Canvas.font=config.Font;
60733
+ var textHeight=this.Canvas.measureText("擎").width;
60734
+ var textWidth=this.Canvas.measureText(text).width;
60735
+
60736
+ if (config.Right.IsShow && this.Frame.ChartBorder.Right>5)
60737
+ {
60738
+ var margin=config.Right.Margin;
60739
+ var rtBG={ Left:border.Right+1, Height:textHeight+margin.Top+margin.Bottom, Width:textWidth+margin.Left+margin.Right };
60740
+ rtBG.Top=y-textHeight/2-margin.Top;
60741
+ rtBG.Bottom=rtBG.Top+rtBG.Height;
60742
+ rtBG.Right=rtBG.Left+rtBG.Width;
60743
+ this.Canvas.fillStyle=this.LineColor;
60744
+ this.Canvas.fillRect(rtBG.Left, rtBG.Top, rtBG.Width, rtBG.Height);
60745
+
60746
+ this.Canvas.textAlign="left";
60747
+ this.Canvas.textBaseline = "top";
60748
+ var xText=rtBG.Left+margin.Left;
60749
+ var yText=rtBG.Top+margin.Top;
60750
+ this.Canvas.fillStyle=config.TextColor;
60751
+ this.Canvas.fillText(text,xText,yText);
60455
60752
  }
60456
60753
  }
60457
60754
  }
60458
60755
 
60756
+
60459
60757
  //水平线2
60460
60758
  function ChartDrawHLine()
60461
60759
  {
@@ -133279,7 +133577,7 @@ function ScrollBarBGChart()
133279
133577
 
133280
133578
 
133281
133579
 
133282
- var HQCHART_VERSION="1.1.13363";
133580
+ var HQCHART_VERSION="1.1.13374";
133283
133581
 
133284
133582
  function PrintHQChartVersion()
133285
133583
  {
@@ -5,7 +5,7 @@
5
5
 
6
6
 
7
7
 
8
- var HQCHART_VERSION="1.1.13363";
8
+ var HQCHART_VERSION="1.1.13374";
9
9
 
10
10
  function PrintHQChartVersion()
11
11
  {