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.
@@ -6585,7 +6585,7 @@ var JSCHART_MENU_ID=
6585
6585
  CMD_CHANGE_SCRIPT_INDEX_ID:34, //切换成自定义的脚本指标
6586
6586
 
6587
6587
  CMD_CHANGE_BASELINE_ID:35, //分时图切换基准线
6588
-
6588
+ CMD_ADD_OVERLAY_INDEX_ID:36, //添加叠加指标
6589
6589
  }
6590
6590
 
6591
6591
 
@@ -13364,6 +13364,13 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
13364
13364
  this.DefaultCursor=srcParam;
13365
13365
  this.UIElement.style.cursor=this.DefaultCursor;
13366
13366
  break;
13367
+
13368
+ case JSCHART_MENU_ID.CMD_ADD_OVERLAY_INDEX_ID: //叠加指标 0=windowIndex, 1=indexinfo
13369
+ if (param==null || !aryArgs[1]) return false;
13370
+ var obj=aryArgs[1];
13371
+ obj.WindowIndex=param;
13372
+ this.AddOverlayIndex(obj);
13373
+ break;
13367
13374
  }
13368
13375
  }
13369
13376
 
@@ -15680,6 +15687,8 @@ function AverageWidthFrame()
15680
15687
 
15681
15688
  this.Canvas.font=this.DrawPicture.Font;
15682
15689
  var fontHeight=this.GetFontHeight();
15690
+ this.Canvas.textAlign="left";
15691
+ this.Canvas.textBaseline = "bottom";
15683
15692
 
15684
15693
  if (range.X)
15685
15694
  {
@@ -19092,6 +19101,7 @@ function KLineFrame()
19092
19101
  if (this.BeforeDrawXYCallback) this.BeforeDrawXYCallback(this);
19093
19102
 
19094
19103
  this.DrawTitleBG();
19104
+ this.DrawCustomHorizontalArea(); //Y轴背景区域 在刻度前面绘制
19095
19105
  this.DrawHorizontal();
19096
19106
  this.DrawVertical();
19097
19107
  }
@@ -19884,13 +19894,24 @@ function KLineFrame()
19884
19894
  case 4: //叠加K线涨幅刻度
19885
19895
  this.DrawCustomItem(item, mapTextRect);
19886
19896
  break;
19887
- case 5:
19888
- this.DrawCustomAreaItem(item);
19889
- break;
19890
19897
  }
19891
19898
  }
19892
19899
  }
19893
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
+
19894
19915
  this.DrawCustomVerticalItem=function(item)
19895
19916
  {
19896
19917
  this.Canvas.save();
@@ -22517,7 +22538,14 @@ function HQTradeFrame()
22517
22538
  if (!drawPicture.GetXYCoordinate) return false;
22518
22539
 
22519
22540
  var range=drawPicture.GetXYCoordinate();
22520
- 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
+ }
22521
22549
 
22522
22550
  for(var i=0;i<this.SubFrame.length;++i)
22523
22551
  {
@@ -59592,6 +59620,7 @@ IChartDrawPicture.ArrayDrawPricture=
59592
59620
  { Name:"射线", ClassName:'ChartDrawPictureHaflLine', Create:function() { return new ChartDrawPictureHaflLine(); } },
59593
59621
  { Name:"箭头", ClassName:"ChartDrawArrowLine", Create:function() { return new ChartDrawArrowLine(); } },
59594
59622
  { Name:"水平线", ClassName:'ChartDrawPictureHorizontalLine', Create:function() { return new ChartDrawPictureHorizontalLine(); }},
59623
+ { Name:"水平射线", ClassName:"ChartDrawPictureHorizontalRay", Create:function() { return new ChartDrawPictureHorizontalRay(); }},
59595
59624
  { Name:"趋势线", ClassName:'ChartDrawPictureTrendLine', Create:function() { return new ChartDrawPictureTrendLine(); }},
59596
59625
  { Name:"矩形", ClassName:'ChartDrawPictureRect', Create:function() { return new ChartDrawPictureRect(); }},
59597
59626
  { Name:"圆弧线", ClassName:'ChartDrawPictureArc', Create:function() { return new ChartDrawPictureArc(); }},
@@ -60268,17 +60297,67 @@ function ChartDrawPictureHorizontalLine()
60268
60297
  this.newMethod();
60269
60298
  delete this.newMethod;
60270
60299
 
60300
+ this.ClassName='ChartDrawPictureHorizontalLine';
60301
+ this.PointCount=1;
60302
+ this.IsPointIn=this.IsPointIn_XYValue_Line;
60303
+ this.IsDrawFirst=true;
60304
+ this.LineWidth=1;
60271
60305
  this.Super_SetOption=this.SetOption; //父类函数
60272
60306
  this.Super_ExportStorageData=this.ExportStorageData;
60273
60307
 
60274
- 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;
60275
60325
 
60276
60326
  this.SetOption=function(option)
60277
60327
  {
60278
60328
  if (this.Super_SetOption) this.Super_SetOption(option);
60279
60329
  if (option)
60280
60330
  {
60281
- 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
+ }
60282
60361
  }
60283
60362
  }
60284
60363
 
@@ -60288,17 +60367,13 @@ function ChartDrawPictureHorizontalLine()
60288
60367
  if (this.Super_ExportStorageData)
60289
60368
  {
60290
60369
  storageData=this.Super_ExportStorageData();
60291
- if (this.Label) storageData.Label=this.Label;
60370
+ if (this.LabelTitle) storageData.LabelTitle=this.LabelTitle;
60292
60371
  }
60293
60372
 
60294
60373
  return storageData;
60295
60374
  }
60296
60375
 
60297
- this.PointCount=1;
60298
- this.ClassName='ChartDrawPictureHorizontalLine';
60299
- this.IsPointIn=this.IsPointIn_XYValue_Line;
60300
- this.Font=16*GetDevicePixelRatio() +"px 微软雅黑";
60301
-
60376
+ /*
60302
60377
  this.GetXYCoordinate=function()
60303
60378
  {
60304
60379
  if (this.IsFrameMinSize()) return null;
@@ -60306,6 +60381,7 @@ function ChartDrawPictureHorizontalLine()
60306
60381
 
60307
60382
  return this.PointRange(drawPoint);
60308
60383
  }
60384
+ */
60309
60385
 
60310
60386
  this.Draw=function()
60311
60387
  {
@@ -60339,8 +60415,9 @@ function ChartDrawPictureHorizontalLine()
60339
60415
  }
60340
60416
  else
60341
60417
  {
60342
- this.Canvas.moveTo(left,drawPoint[0].Y);
60343
- 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);
60344
60421
  }
60345
60422
  this.Canvas.stroke();
60346
60423
  this.RestoreLineWidth();
@@ -60366,89 +60443,317 @@ function ChartDrawPictureHorizontalLine()
60366
60443
  this.DrawPoint(drawPoint);
60367
60444
 
60368
60445
  //显示价格
60369
- this.LineText(drawPoint[0])
60370
- /*
60371
- this.Canvas.fillStyle=this.LineColor;
60372
- this.Canvas.font=this.Font;
60373
- 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)
60374
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
+
60375
60480
  this.Canvas.textAlign="left";
60376
- this.Canvas.textBaseline="bottom";
60377
- var xText=drawPoint[0].X;
60378
- var yText=left;
60379
- this.Canvas.translate(xText, yText);
60380
- this.Canvas.rotate(90 * Math.PI / 180); //数据和框子旋转180度
60381
- var yValue=this.Frame.GetYData(drawPoint[0].X);
60382
- var text=yValue.toFixed(2);
60383
- if (this.Label)
60384
- {
60385
- if (this.Label.Position==0) text=this.Label.Text+yValue.toFixed(2);
60386
- else if (this.Label.Position==1) text=yValue.toFixed(2)+this.Label.Text;
60387
- }
60388
- 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);
60389
60486
  }
60390
- else
60487
+
60488
+ if (config.Right.IsShow && this.Frame.ChartBorder.Right>5)
60391
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
+
60392
60498
  this.Canvas.textAlign="left";
60393
- this.Canvas.textBaseline="bottom";
60394
- var yValue=this.Frame.GetYData(drawPoint[0].Y);
60395
- var text=yValue.toFixed(2);
60396
- if (this.Label)
60397
- {
60398
- if (this.Label.Position==0) text=this.Label.Text+yValue.toFixed(2);
60399
- else if (this.Label.Position==1) text=yValue.toFixed(2)+this.Label.Text;
60400
- }
60401
- 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);
60402
60504
  }
60403
- */
60404
-
60405
- this.Canvas.restore();
60406
60505
  }
60407
60506
 
60408
- this.LineText=function(point)
60507
+ this.DrawInsideLabel=function(point)
60409
60508
  {
60410
60509
  if (!point) return;
60411
60510
 
60412
60511
  var isHScreen=this.Frame.IsHScreen;
60413
- 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;
60414
60515
 
60415
60516
  this.Canvas.fillStyle=this.LineColor;
60416
- this.Canvas.font=this.Font;
60517
+ this.Canvas.font=config.Font;
60518
+ var textHeight=this.Canvas.measureText("擎").width;
60519
+ var border=this.Frame.GetBorder();
60417
60520
 
60418
60521
  if (isHScreen)
60419
60522
  {
60420
- left=this.Frame.ChartBorder.GetTop();
60421
- this.Canvas.textAlign="left";
60422
- this.Canvas.textBaseline="bottom";
60423
- var xText=point.X;
60424
- var yText=left;
60425
- this.Canvas.translate(xText, yText);
60426
- this.Canvas.rotate(90 * Math.PI / 180); //数据和框子旋转180度
60427
60523
  var yValue=this.Frame.GetYData(point.X);
60428
60524
  var text=yValue.toFixed(2);
60429
- 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) //右
60430
60536
  {
60431
- if (this.Label.Position==0) text=this.Label.Text+yValue.toFixed(2);
60432
- 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;
60433
60540
  }
60434
- 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);
60435
60556
  }
60436
60557
  else
60437
60558
  {
60438
- this.Canvas.textAlign="left";
60439
- this.Canvas.textBaseline="bottom";
60440
60559
  var yValue=this.Frame.GetYData(point.Y);
60441
60560
  var text=yValue.toFixed(2);
60442
- 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) //左
60443
60566
  {
60444
- if (this.Label.Position==0) text=this.Label.Text+yValue.toFixed(2);
60445
- else if (this.Label.Position==1) text=yValue.toFixed(2)+this.Label.Text;
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;
60446
60570
  }
60447
- this.Canvas.fillText(text,left,point.Y);
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)
60622
+ {
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;
60632
+ }
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);
60448
60752
  }
60449
60753
  }
60450
60754
  }
60451
60755
 
60756
+
60452
60757
  //水平线2
60453
60758
  function ChartDrawHLine()
60454
60759
  {
@@ -133272,7 +133577,7 @@ function ScrollBarBGChart()
133272
133577
 
133273
133578
 
133274
133579
 
133275
- var HQCHART_VERSION="1.1.13359";
133580
+ var HQCHART_VERSION="1.1.13369";
133276
133581
 
133277
133582
  function PrintHQChartVersion()
133278
133583
  {
@@ -5,7 +5,7 @@
5
5
 
6
6
 
7
7
 
8
- var HQCHART_VERSION="1.1.13359";
8
+ var HQCHART_VERSION="1.1.13369";
9
9
 
10
10
  function PrintHQChartVersion()
11
11
  {