hqchart 1.1.13253 → 1.1.13259

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.
@@ -6641,6 +6641,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
6641
6641
  this.CurrentChartDrawPicture=null; //当前的画图工具
6642
6642
  this.SelectChartDrawPicture=null; //当前选中的画图
6643
6643
  this.MoveOnChartDrawPicture=null; //鼠标在画图上
6644
+ this.EnableEraseChartDrawPicture=false; //擦除画图
6644
6645
  this.IsDrawPictureXY=false; //选中的画图工具是否显示X,Y轴对应数值
6645
6646
  this.EnableShowCorssCursor={ DrawPicture:true }; //DrawPicture=画图是否显示十字光标
6646
6647
  this.ChartPictureMenu; //画图工具 单个图形设置菜单
@@ -7378,7 +7379,13 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
7378
7379
  drawPictrueData.Y=(e.clientY-this.UIElement.getBoundingClientRect().top)*pixelTatio;
7379
7380
  if (this.GetChartDrawPictureByPoint(drawPictrueData))
7380
7381
  {
7381
- if (drawPictrueData.ChartDrawPicture.EnableMove==true)
7382
+ if (this.EnableEraseChartDrawPicture) //擦掉画线
7383
+ {
7384
+ this.CurrentChartDrawPicture=null;
7385
+ this.SelectChartDrawPicture=null;
7386
+ this.ClearChartDrawPicture(drawPictrueData.ChartDrawPicture);
7387
+ }
7388
+ else if (drawPictrueData.ChartDrawPicture.EnableMove==true)
7382
7389
  {
7383
7390
  this.UpDownDrag=null; //画图优先
7384
7391
  this.CurrentChartDrawPicture=drawPictrueData.ChartDrawPicture;
@@ -7921,6 +7928,13 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
7921
7928
  this.MouseDrag=null;
7922
7929
  this.ClickDownPoint=null;
7923
7930
  this.IsOnTouch=false;
7931
+ if (this.EnableEraseChartDrawPicture==true)
7932
+ {
7933
+ this.EnableEraseChartDrawPicture=false;
7934
+ //更改画图工具对话框橡皮状态
7935
+ if (this.DialogDrawTool && this.DialogDrawTool.SetEraseChartButtonStatus) this.DialogDrawTool.SetEraseChartButtonStatus(false);
7936
+ }
7937
+
7924
7938
  if (this.BorderDrag && this.BorderDrag.Index>=0) this.Frame.SaveSubFrameHeightRate(); //拖拽指标窗口高度以后保存
7925
7939
  this.BorderDrag=null;
7926
7940
  this.YDrag=null;
@@ -9981,22 +9995,31 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
9981
9995
  var drawPictrueData={};
9982
9996
  drawPictrueData.X=x;
9983
9997
  drawPictrueData.Y=y;
9984
- if (this.GetChartDrawPictureByPoint(drawPictrueData) &&
9985
- drawPictrueData.ChartDrawPicture && drawPictrueData.ChartDrawPicture.EnableMove==true)
9998
+ if (this.GetChartDrawPictureByPoint(drawPictrueData) && drawPictrueData.ChartDrawPicture)
9986
9999
  {
9987
-
9988
- if (drawPictrueData.PointIndex===100)
10000
+ if (this.EnableEraseChartDrawPicture)
9989
10001
  {
9990
- if (drawPictrueData.Cursor) this.SetCursor(drawPictrueData); //this.UIElement.style.cursor=drawPictrueData.Cursor;
9991
- else this.SetCursor({Cursor:"move"}); //this.UIElement.style.cursor="move";
10002
+ this.SetCursor({Cursor:"grabbing"});
9992
10003
  }
9993
- else
10004
+ else
9994
10005
  {
9995
- if (drawPictrueData.Cursor) this.SetCursor(drawPictrueData); //this.UIElement.style.cursor=drawPictrueData.Cursor
9996
- else this.SetCursor({Cursor:"pointer"}); //this.UIElement.style.cursor="pointer";
9997
- }
10006
+ if (drawPictrueData.ChartDrawPicture.EnableMove==true)
10007
+ {
10008
+ if (drawPictrueData.PointIndex===100)
10009
+ {
10010
+ if (drawPictrueData.Cursor) this.SetCursor(drawPictrueData); //this.UIElement.style.cursor=drawPictrueData.Cursor;
10011
+ else this.SetCursor({Cursor:"move"}); //this.UIElement.style.cursor="move";
10012
+ }
10013
+ else
10014
+ {
10015
+ if (drawPictrueData.Cursor) this.SetCursor(drawPictrueData); //this.UIElement.style.cursor=drawPictrueData.Cursor
10016
+ else this.SetCursor({Cursor:"pointer"}); //this.UIElement.style.cursor="pointer";
10017
+ }
9998
10018
 
9999
- bDrawPicture=true;
10019
+ bDrawPicture=true;
10020
+ }
10021
+ }
10022
+
10000
10023
  this.MoveOnChartDrawPicture=drawPictrueData.ChartDrawPicture;
10001
10024
  }
10002
10025
  else
@@ -40857,6 +40880,8 @@ function ChartMultiLine()
40857
40880
  this.Draw=function()
40858
40881
  {
40859
40882
  if (!this.IsShow || this.ChartFrame.IsMinSize || !this.IsVisible) return;
40883
+ if (this.IsShowIndexTitleOnly()) return;
40884
+ if (this.IsHideScriptIndex()) return;
40860
40885
  if (!this.Data || this.Data.length<=0) return;
40861
40886
  if (!IFrameSplitOperator.IsNonEmptyArray(this.Lines)) return;
40862
40887
 
@@ -41376,7 +41401,7 @@ function ChartMultiText()
41376
41401
  var y=top;
41377
41402
  if (item.Value=="TOP") y=top;
41378
41403
  else if (item.Value=="BOTTOM") y=bottom;
41379
- else y=this.ChartFrame.GetYFromData(item.Value);
41404
+ else y=this.ChartFrame.GetYFromData(item.Value, false);
41380
41405
 
41381
41406
  if (item.Color) this.Canvas.fillStyle = item.Color;
41382
41407
  else this.Canvas.fillStyle = this.Color;
@@ -41417,7 +41442,7 @@ function ChartMultiText()
41417
41442
  {
41418
41443
  var kItem=this.Data.Data[item.Index];
41419
41444
  var price=item.Line.KData=="H"? kItem.High:kItem.Low;
41420
- var yPrice=this.ChartFrame.GetYFromData(price);
41445
+ var yPrice=this.ChartFrame.GetYFromData(price, false);
41421
41446
  var yText=y;
41422
41447
  if (Array.isArray(item.Line.Offset) && item.Line.Offset.length==2)
41423
41448
  {
@@ -41457,7 +41482,9 @@ function ChartMultiText()
41457
41482
 
41458
41483
  this.Draw=function()
41459
41484
  {
41460
- if (!this.IsShow || this.ChartFrame.IsMinSize) return;
41485
+ if (!this.IsShow || this.ChartFrame.IsMinSize || !this.IsVisible) return;
41486
+ if (this.IsShowIndexTitleOnly()) return;
41487
+ if (this.IsHideScriptIndex()) return;
41461
41488
  if (!this.Data || this.Data.length<=0) return;
41462
41489
  if (!this.Texts) return;
41463
41490
 
@@ -41466,7 +41493,12 @@ function ChartMultiText()
41466
41493
  var mapText=this.GetShowTextData();
41467
41494
  if (mapText.size<=0) return;
41468
41495
 
41496
+ this.Canvas.save();
41497
+ this.ClipClient(this.IsHScreen);
41498
+
41469
41499
  this.DrawAllText(mapText);
41500
+
41501
+ this.Canvas.restore();
41470
41502
  }
41471
41503
 
41472
41504
  this.GetMaxMin=function()
@@ -41514,7 +41546,9 @@ function ChartMultiSVGIcon()
41514
41546
  this.Draw=function()
41515
41547
  {
41516
41548
  this.IconRect=[];
41517
- if (!this.IsShow || this.ChartFrame.IsMinSize) return;
41549
+ if (!this.IsShow || this.ChartFrame.IsMinSize || !this.IsVisible) return;
41550
+ if (this.IsShowIndexTitleOnly()) return;
41551
+ if (this.IsHideScriptIndex()) return;
41518
41552
  if (!this.Data || this.Data.length<=0) return;
41519
41553
  if (!this.Family || !this.Icon) return;
41520
41554
  if (!IFrameSplitOperator.IsNonEmptyArray(this.Icon)) return;
@@ -60486,6 +60520,15 @@ function ChartDrawHLine()
60486
60520
  if (this.ButtonPosition==1)
60487
60521
  {
60488
60522
  drawTop-=drawHeight;
60523
+ var chartWidth=this.Frame.ChartBorder.GetChartWidth();
60524
+ var chartLeft=this.Frame.ChartBorder.GetRight()+this.RightSpaceWidth;
60525
+ if (drawLeft+this.ButtonBGWidth>chartWidth) //右边不够了 往左移动
60526
+ {
60527
+ drawLeft=chartWidth-this.ButtonBGWidth;
60528
+ }
60529
+
60530
+ if (chartLeft>drawLeft) drawLeft=chartLeft;
60531
+
60489
60532
  }
60490
60533
  else if (this.ButtonPosition==2)
60491
60534
  {
@@ -115900,6 +115943,7 @@ function ScriptIndex(name,script,args,option)
115900
115943
 
115901
115944
  this.ReloadChartResource(hqChart, windowIndex, chart);
115902
115945
 
115946
+ this.SetChartIndexName(chart);
115903
115947
  hqChart.ChartPaint.push(chart);
115904
115948
 
115905
115949
  var titleIndex=windowIndex+1;
@@ -115920,6 +115964,7 @@ function ScriptIndex(name,script,args,option)
115920
115964
  chart.Data=hqChart.ChartPaint[0].Data;//绑定K线
115921
115965
  chart.PointGroup=varItem.Draw.DrawData;
115922
115966
  if (varItem.Draw.Name) chart.Name=varItem.Draw.Name;
115967
+ this.SetChartIndexName(chart);
115923
115968
  hqChart.ChartPaint.push(chart);
115924
115969
 
115925
115970
  var titleIndex=windowIndex+1;
@@ -115946,6 +115991,7 @@ function ScriptIndex(name,script,args,option)
115946
115991
  titleData.DataType="MULTI_BAR";
115947
115992
  hqChart.TitlePaint[titleIndex].Data[id]=titleData;
115948
115993
 
115994
+ this.SetChartIndexName(chart);
115949
115995
  hqChart.ChartPaint.push(chart);
115950
115996
  }
115951
115997
 
@@ -115959,6 +116005,7 @@ function ScriptIndex(name,script,args,option)
115959
116005
 
115960
116006
  chart.Data=hqChart.ChartPaint[0].Data;//绑定K线
115961
116007
  chart.Texts=varItem.Draw.DrawData;
116008
+ this.SetChartIndexName(chart);
115962
116009
  hqChart.ChartPaint.push(chart);
115963
116010
  }
115964
116011
 
@@ -115974,6 +116021,7 @@ function ScriptIndex(name,script,args,option)
115974
116021
  chart.Family=varItem.Draw.DrawData.Family;
115975
116022
  chart.AryIcon= varItem.Draw.DrawData.Icon;
115976
116023
  chart.BuildCacheData();
116024
+ this.SetChartIndexName(chart);
115977
116025
  hqChart.ChartPaint.push(chart);
115978
116026
  }
115979
116027
 
@@ -117547,6 +117595,7 @@ function OverlayScriptIndex(name,script,args,option)
117547
117595
 
117548
117596
  this.ReloadChartResource(hqChart, windowIndex, chart);
117549
117597
 
117598
+ this.SetChartIndexName(chart);
117550
117599
  frame.ChartPaint.push(chart);
117551
117600
  }
117552
117601
 
@@ -117610,6 +117659,7 @@ function OverlayScriptIndex(name,script,args,option)
117610
117659
  titleData.DataType="MULTI_BAR";
117611
117660
  titlePaint.OverlayIndex.get(overlayIndex.Identify).Data[id]=titleData;
117612
117661
 
117662
+ this.SetChartIndexName(chart);
117613
117663
  frame.ChartPaint.push(chart);
117614
117664
  }
117615
117665
 
@@ -117626,6 +117676,7 @@ function OverlayScriptIndex(name,script,args,option)
117626
117676
 
117627
117677
  chart.Data=hqChart.ChartPaint[0].Data;//绑定K线
117628
117678
  chart.Texts=varItem.Draw.DrawData;
117679
+ this.SetChartIndexName(chart);
117629
117680
  frame.ChartPaint.push(chart);
117630
117681
  }
117631
117682
 
@@ -117644,6 +117695,7 @@ function OverlayScriptIndex(name,script,args,option)
117644
117695
  chart.Family=varItem.Draw.DrawData.Family;
117645
117696
  chart.AryIcon= varItem.Draw.DrawData.Icon;
117646
117697
  chart.BuildCacheData();
117698
+ this.SetChartIndexName(chart);
117647
117699
  frame.ChartPaint.push(chart);
117648
117700
  }
117649
117701
 
@@ -117672,6 +117724,7 @@ function OverlayScriptIndex(name,script,args,option)
117672
117724
 
117673
117725
  this.ReloadChartResource(hqChart, windowIndex, chart);
117674
117726
 
117727
+ this.SetChartIndexName(chart);
117675
117728
  frame.ChartPaint.push(chart);
117676
117729
  }
117677
117730
 
@@ -131955,7 +132008,7 @@ function ScrollBarBGChart()
131955
132008
 
131956
132009
 
131957
132010
 
131958
- var HQCHART_VERSION="1.1.13252";
132011
+ var HQCHART_VERSION="1.1.13258";
131959
132012
 
131960
132013
  function PrintHQChartVersion()
131961
132014
  {
@@ -5,7 +5,7 @@
5
5
 
6
6
 
7
7
 
8
- var HQCHART_VERSION="1.1.13252";
8
+ var HQCHART_VERSION="1.1.13258";
9
9
 
10
10
  function PrintHQChartVersion()
11
11
  {
@@ -6685,6 +6685,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
6685
6685
  this.CurrentChartDrawPicture=null; //当前的画图工具
6686
6686
  this.SelectChartDrawPicture=null; //当前选中的画图
6687
6687
  this.MoveOnChartDrawPicture=null; //鼠标在画图上
6688
+ this.EnableEraseChartDrawPicture=false; //擦除画图
6688
6689
  this.IsDrawPictureXY=false; //选中的画图工具是否显示X,Y轴对应数值
6689
6690
  this.EnableShowCorssCursor={ DrawPicture:true }; //DrawPicture=画图是否显示十字光标
6690
6691
  this.ChartPictureMenu; //画图工具 单个图形设置菜单
@@ -7422,7 +7423,13 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
7422
7423
  drawPictrueData.Y=(e.clientY-this.UIElement.getBoundingClientRect().top)*pixelTatio;
7423
7424
  if (this.GetChartDrawPictureByPoint(drawPictrueData))
7424
7425
  {
7425
- if (drawPictrueData.ChartDrawPicture.EnableMove==true)
7426
+ if (this.EnableEraseChartDrawPicture) //擦掉画线
7427
+ {
7428
+ this.CurrentChartDrawPicture=null;
7429
+ this.SelectChartDrawPicture=null;
7430
+ this.ClearChartDrawPicture(drawPictrueData.ChartDrawPicture);
7431
+ }
7432
+ else if (drawPictrueData.ChartDrawPicture.EnableMove==true)
7426
7433
  {
7427
7434
  this.UpDownDrag=null; //画图优先
7428
7435
  this.CurrentChartDrawPicture=drawPictrueData.ChartDrawPicture;
@@ -7965,6 +7972,13 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
7965
7972
  this.MouseDrag=null;
7966
7973
  this.ClickDownPoint=null;
7967
7974
  this.IsOnTouch=false;
7975
+ if (this.EnableEraseChartDrawPicture==true)
7976
+ {
7977
+ this.EnableEraseChartDrawPicture=false;
7978
+ //更改画图工具对话框橡皮状态
7979
+ if (this.DialogDrawTool && this.DialogDrawTool.SetEraseChartButtonStatus) this.DialogDrawTool.SetEraseChartButtonStatus(false);
7980
+ }
7981
+
7968
7982
  if (this.BorderDrag && this.BorderDrag.Index>=0) this.Frame.SaveSubFrameHeightRate(); //拖拽指标窗口高度以后保存
7969
7983
  this.BorderDrag=null;
7970
7984
  this.YDrag=null;
@@ -10025,22 +10039,31 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
10025
10039
  var drawPictrueData={};
10026
10040
  drawPictrueData.X=x;
10027
10041
  drawPictrueData.Y=y;
10028
- if (this.GetChartDrawPictureByPoint(drawPictrueData) &&
10029
- drawPictrueData.ChartDrawPicture && drawPictrueData.ChartDrawPicture.EnableMove==true)
10042
+ if (this.GetChartDrawPictureByPoint(drawPictrueData) && drawPictrueData.ChartDrawPicture)
10030
10043
  {
10031
-
10032
- if (drawPictrueData.PointIndex===100)
10044
+ if (this.EnableEraseChartDrawPicture)
10033
10045
  {
10034
- if (drawPictrueData.Cursor) this.SetCursor(drawPictrueData); //this.UIElement.style.cursor=drawPictrueData.Cursor;
10035
- else this.SetCursor({Cursor:"move"}); //this.UIElement.style.cursor="move";
10046
+ this.SetCursor({Cursor:"grabbing"});
10036
10047
  }
10037
- else
10048
+ else
10038
10049
  {
10039
- if (drawPictrueData.Cursor) this.SetCursor(drawPictrueData); //this.UIElement.style.cursor=drawPictrueData.Cursor
10040
- else this.SetCursor({Cursor:"pointer"}); //this.UIElement.style.cursor="pointer";
10041
- }
10050
+ if (drawPictrueData.ChartDrawPicture.EnableMove==true)
10051
+ {
10052
+ if (drawPictrueData.PointIndex===100)
10053
+ {
10054
+ if (drawPictrueData.Cursor) this.SetCursor(drawPictrueData); //this.UIElement.style.cursor=drawPictrueData.Cursor;
10055
+ else this.SetCursor({Cursor:"move"}); //this.UIElement.style.cursor="move";
10056
+ }
10057
+ else
10058
+ {
10059
+ if (drawPictrueData.Cursor) this.SetCursor(drawPictrueData); //this.UIElement.style.cursor=drawPictrueData.Cursor
10060
+ else this.SetCursor({Cursor:"pointer"}); //this.UIElement.style.cursor="pointer";
10061
+ }
10042
10062
 
10043
- bDrawPicture=true;
10063
+ bDrawPicture=true;
10064
+ }
10065
+ }
10066
+
10044
10067
  this.MoveOnChartDrawPicture=drawPictrueData.ChartDrawPicture;
10045
10068
  }
10046
10069
  else
@@ -40901,6 +40924,8 @@ function ChartMultiLine()
40901
40924
  this.Draw=function()
40902
40925
  {
40903
40926
  if (!this.IsShow || this.ChartFrame.IsMinSize || !this.IsVisible) return;
40927
+ if (this.IsShowIndexTitleOnly()) return;
40928
+ if (this.IsHideScriptIndex()) return;
40904
40929
  if (!this.Data || this.Data.length<=0) return;
40905
40930
  if (!IFrameSplitOperator.IsNonEmptyArray(this.Lines)) return;
40906
40931
 
@@ -41420,7 +41445,7 @@ function ChartMultiText()
41420
41445
  var y=top;
41421
41446
  if (item.Value=="TOP") y=top;
41422
41447
  else if (item.Value=="BOTTOM") y=bottom;
41423
- else y=this.ChartFrame.GetYFromData(item.Value);
41448
+ else y=this.ChartFrame.GetYFromData(item.Value, false);
41424
41449
 
41425
41450
  if (item.Color) this.Canvas.fillStyle = item.Color;
41426
41451
  else this.Canvas.fillStyle = this.Color;
@@ -41461,7 +41486,7 @@ function ChartMultiText()
41461
41486
  {
41462
41487
  var kItem=this.Data.Data[item.Index];
41463
41488
  var price=item.Line.KData=="H"? kItem.High:kItem.Low;
41464
- var yPrice=this.ChartFrame.GetYFromData(price);
41489
+ var yPrice=this.ChartFrame.GetYFromData(price, false);
41465
41490
  var yText=y;
41466
41491
  if (Array.isArray(item.Line.Offset) && item.Line.Offset.length==2)
41467
41492
  {
@@ -41501,7 +41526,9 @@ function ChartMultiText()
41501
41526
 
41502
41527
  this.Draw=function()
41503
41528
  {
41504
- if (!this.IsShow || this.ChartFrame.IsMinSize) return;
41529
+ if (!this.IsShow || this.ChartFrame.IsMinSize || !this.IsVisible) return;
41530
+ if (this.IsShowIndexTitleOnly()) return;
41531
+ if (this.IsHideScriptIndex()) return;
41505
41532
  if (!this.Data || this.Data.length<=0) return;
41506
41533
  if (!this.Texts) return;
41507
41534
 
@@ -41510,7 +41537,12 @@ function ChartMultiText()
41510
41537
  var mapText=this.GetShowTextData();
41511
41538
  if (mapText.size<=0) return;
41512
41539
 
41540
+ this.Canvas.save();
41541
+ this.ClipClient(this.IsHScreen);
41542
+
41513
41543
  this.DrawAllText(mapText);
41544
+
41545
+ this.Canvas.restore();
41514
41546
  }
41515
41547
 
41516
41548
  this.GetMaxMin=function()
@@ -41558,7 +41590,9 @@ function ChartMultiSVGIcon()
41558
41590
  this.Draw=function()
41559
41591
  {
41560
41592
  this.IconRect=[];
41561
- if (!this.IsShow || this.ChartFrame.IsMinSize) return;
41593
+ if (!this.IsShow || this.ChartFrame.IsMinSize || !this.IsVisible) return;
41594
+ if (this.IsShowIndexTitleOnly()) return;
41595
+ if (this.IsHideScriptIndex()) return;
41562
41596
  if (!this.Data || this.Data.length<=0) return;
41563
41597
  if (!this.Family || !this.Icon) return;
41564
41598
  if (!IFrameSplitOperator.IsNonEmptyArray(this.Icon)) return;
@@ -60530,6 +60564,15 @@ function ChartDrawHLine()
60530
60564
  if (this.ButtonPosition==1)
60531
60565
  {
60532
60566
  drawTop-=drawHeight;
60567
+ var chartWidth=this.Frame.ChartBorder.GetChartWidth();
60568
+ var chartLeft=this.Frame.ChartBorder.GetRight()+this.RightSpaceWidth;
60569
+ if (drawLeft+this.ButtonBGWidth>chartWidth) //右边不够了 往左移动
60570
+ {
60571
+ drawLeft=chartWidth-this.ButtonBGWidth;
60572
+ }
60573
+
60574
+ if (chartLeft>drawLeft) drawLeft=chartLeft;
60575
+
60533
60576
  }
60534
60577
  else if (this.ButtonPosition==2)
60535
60578
  {
@@ -115944,6 +115987,7 @@ function ScriptIndex(name,script,args,option)
115944
115987
 
115945
115988
  this.ReloadChartResource(hqChart, windowIndex, chart);
115946
115989
 
115990
+ this.SetChartIndexName(chart);
115947
115991
  hqChart.ChartPaint.push(chart);
115948
115992
 
115949
115993
  var titleIndex=windowIndex+1;
@@ -115964,6 +116008,7 @@ function ScriptIndex(name,script,args,option)
115964
116008
  chart.Data=hqChart.ChartPaint[0].Data;//绑定K线
115965
116009
  chart.PointGroup=varItem.Draw.DrawData;
115966
116010
  if (varItem.Draw.Name) chart.Name=varItem.Draw.Name;
116011
+ this.SetChartIndexName(chart);
115967
116012
  hqChart.ChartPaint.push(chart);
115968
116013
 
115969
116014
  var titleIndex=windowIndex+1;
@@ -115990,6 +116035,7 @@ function ScriptIndex(name,script,args,option)
115990
116035
  titleData.DataType="MULTI_BAR";
115991
116036
  hqChart.TitlePaint[titleIndex].Data[id]=titleData;
115992
116037
 
116038
+ this.SetChartIndexName(chart);
115993
116039
  hqChart.ChartPaint.push(chart);
115994
116040
  }
115995
116041
 
@@ -116003,6 +116049,7 @@ function ScriptIndex(name,script,args,option)
116003
116049
 
116004
116050
  chart.Data=hqChart.ChartPaint[0].Data;//绑定K线
116005
116051
  chart.Texts=varItem.Draw.DrawData;
116052
+ this.SetChartIndexName(chart);
116006
116053
  hqChart.ChartPaint.push(chart);
116007
116054
  }
116008
116055
 
@@ -116018,6 +116065,7 @@ function ScriptIndex(name,script,args,option)
116018
116065
  chart.Family=varItem.Draw.DrawData.Family;
116019
116066
  chart.AryIcon= varItem.Draw.DrawData.Icon;
116020
116067
  chart.BuildCacheData();
116068
+ this.SetChartIndexName(chart);
116021
116069
  hqChart.ChartPaint.push(chart);
116022
116070
  }
116023
116071
 
@@ -117591,6 +117639,7 @@ function OverlayScriptIndex(name,script,args,option)
117591
117639
 
117592
117640
  this.ReloadChartResource(hqChart, windowIndex, chart);
117593
117641
 
117642
+ this.SetChartIndexName(chart);
117594
117643
  frame.ChartPaint.push(chart);
117595
117644
  }
117596
117645
 
@@ -117654,6 +117703,7 @@ function OverlayScriptIndex(name,script,args,option)
117654
117703
  titleData.DataType="MULTI_BAR";
117655
117704
  titlePaint.OverlayIndex.get(overlayIndex.Identify).Data[id]=titleData;
117656
117705
 
117706
+ this.SetChartIndexName(chart);
117657
117707
  frame.ChartPaint.push(chart);
117658
117708
  }
117659
117709
 
@@ -117670,6 +117720,7 @@ function OverlayScriptIndex(name,script,args,option)
117670
117720
 
117671
117721
  chart.Data=hqChart.ChartPaint[0].Data;//绑定K线
117672
117722
  chart.Texts=varItem.Draw.DrawData;
117723
+ this.SetChartIndexName(chart);
117673
117724
  frame.ChartPaint.push(chart);
117674
117725
  }
117675
117726
 
@@ -117688,6 +117739,7 @@ function OverlayScriptIndex(name,script,args,option)
117688
117739
  chart.Family=varItem.Draw.DrawData.Family;
117689
117740
  chart.AryIcon= varItem.Draw.DrawData.Icon;
117690
117741
  chart.BuildCacheData();
117742
+ this.SetChartIndexName(chart);
117691
117743
  frame.ChartPaint.push(chart);
117692
117744
  }
117693
117745
 
@@ -117716,6 +117768,7 @@ function OverlayScriptIndex(name,script,args,option)
117716
117768
 
117717
117769
  this.ReloadChartResource(hqChart, windowIndex, chart);
117718
117770
 
117771
+ this.SetChartIndexName(chart);
117719
117772
  frame.ChartPaint.push(chart);
117720
117773
  }
117721
117774
 
@@ -134782,7 +134835,8 @@ var JS_DRAWTOOL_MENU_ID=
134782
134835
  {
134783
134836
  CMD_SELECTED_ID:1,
134784
134837
  CMD_CHANGE_LINE_COLOR_ID:2,
134785
- CMD_DELETE_ALL_RAW_CHART_ID:3
134838
+ CMD_DELETE_ALL_DRAW_CHART_ID:3,
134839
+ CMD_ERASE_DRAW_CHART_ID:4,
134786
134840
  };
134787
134841
 
134788
134842
  function JSDialogDrawTool()
@@ -134870,7 +134924,8 @@ function JSDialogDrawTool()
134870
134924
  { Title:"选中", ClassName:'hqchart_drawtool icon-arrow', Type:1, Data:{ID:JS_DRAWTOOL_MENU_ID.CMD_SELECTED_ID} },
134871
134925
  { Title:'尺子', ClassName: 'hqchart_drawtool icon-ruler', Type:0, Data:{ ID:"尺子" } },
134872
134926
  { Title:"点击切换颜色", ClassName: 'hqchart_drawtool icon-fangkuai', Type:2, Data:{ ID:JS_DRAWTOOL_MENU_ID.CMD_CHANGE_LINE_COLOR_ID }},
134873
- { Title:"删除所有画线", ClassName: 'hqchart_drawtool icon-recycle_bin', Type:2, Data:{ ID:JS_DRAWTOOL_MENU_ID.CMD_DELETE_ALL_RAW_CHART_ID }}
134927
+ { Title:"擦除画线", ClassName: 'hqchart_drawtool icon-a-xiangpicachuxiangpica', Type:2, Data:{ ID:JS_DRAWTOOL_MENU_ID.CMD_ERASE_DRAW_CHART_ID }},
134928
+ { Title:"删除所有画线", ClassName: 'hqchart_drawtool icon-recycle_bin', Type:2, Data:{ ID:JS_DRAWTOOL_MENU_ID.CMD_DELETE_ALL_DRAW_CHART_ID }}
134874
134929
  ]
134875
134930
  };
134876
134931
 
@@ -135003,18 +135058,27 @@ function JSDialogDrawTool()
135003
135058
  {
135004
135059
  this.OnChangeLineColor(data);
135005
135060
  }
135006
- else if (type==2 && id==JS_DRAWTOOL_MENU_ID.CMD_DELETE_ALL_RAW_CHART_ID)
135061
+ else if (type==2 && id==JS_DRAWTOOL_MENU_ID.CMD_DELETE_ALL_DRAW_CHART_ID)
135007
135062
  {
135008
135063
  this.DeleteAllChart();
135009
135064
  }
135065
+ else if (type==2 && id==JS_DRAWTOOL_MENU_ID.CMD_ERASE_DRAW_CHART_ID)
135066
+ {
135067
+ this.ClearAllSelectedChart();
135068
+ this.ClearCurrnetDrawPicture();
135069
+ this.EnableEraseChart(true);
135070
+ }
135010
135071
  else if (type==1 && id==JS_DRAWTOOL_MENU_ID.CMD_SELECTED_ID)
135011
135072
  {
135012
135073
  this.ClearAllSelectedChart();
135013
135074
  this.ClearCurrnetDrawPicture();
135075
+ this.EnableEraseChart(false);
135014
135076
  }
135015
135077
  else if (type==0)
135016
135078
  {
135017
135079
  this.ClearAllSelectedChart();
135080
+ this.EnableEraseChart(false);
135081
+ data.Span.classList.remove("UMyChart_DrawTool_Span");
135018
135082
  data.Span.classList.add("UMyChart_DrawTool_Span_Selected");
135019
135083
  this.CreateDrawPicture(data);
135020
135084
  }
@@ -135027,6 +135091,7 @@ function JSDialogDrawTool()
135027
135091
  {
135028
135092
  var item=this.AryDivChart[i];
135029
135093
  item.Span.classList.remove("UMyChart_DrawTool_Span_Selected");
135094
+ item.Span.classList.add("UMyChart_DrawTool_Span");
135030
135095
  }
135031
135096
  }
135032
135097
 
@@ -135100,6 +135165,43 @@ function JSDialogDrawTool()
135100
135165
  this.HQChart.ClearChartDrawPicture();
135101
135166
  }
135102
135167
 
135168
+ this.SetEraseChartButtonStatus=function(enable)
135169
+ {
135170
+ for(var i=0;i<this.AryDivChart.length;++i)
135171
+ {
135172
+ var item=this.AryDivChart[i];
135173
+ if (item.Item.Type==2 && item.Item.Data && item.Item.Data.ID==JS_DRAWTOOL_MENU_ID.CMD_ERASE_DRAW_CHART_ID)
135174
+ {
135175
+ if (enable)
135176
+ {
135177
+ if (item.Span.classList.contains("UMyChart_DrawTool_Span"))
135178
+ {
135179
+ item.Span.classList.replace("UMyChart_DrawTool_Span", "UMyChart_DrawTool_Span_Selected");
135180
+ }
135181
+ }
135182
+ else
135183
+ {
135184
+ if (item.Span.classList.contains("UMyChart_DrawTool_Span_Selected"))
135185
+ {
135186
+ item.Span.classList.replace("UMyChart_DrawTool_Span_Selected","UMyChart_DrawTool_Span");
135187
+ }
135188
+ }
135189
+ break;
135190
+ }
135191
+ }
135192
+ }
135193
+
135194
+ this.EnableEraseChart=function(enable)
135195
+ {
135196
+ if (!this.HQChart) return;
135197
+
135198
+ if (this.HQChart.EnableEraseChartDrawPicture==enable) return;
135199
+
135200
+ this.HQChart.EnableEraseChartDrawPicture=enable;
135201
+
135202
+ this.SetEraseChartButtonStatus(enable);
135203
+ }
135204
+
135103
135205
  this.CreateDrawPicture=function(data)
135104
135206
  {
135105
135207
  if (!this.HQChart) return null;
@@ -135126,6 +135228,7 @@ function JSDialogDrawTool()
135126
135228
  this.OnFinishDrawPicture=function(chart, data)
135127
135229
  {
135128
135230
  data.Span.classList.remove("UMyChart_DrawTool_Span_Selected");
135231
+ data.Span.classList.add("UMyChart_DrawTool_Span");
135129
135232
  }
135130
135233
 
135131
135234
  this.Show=function(x, y)
@@ -135314,7 +135417,7 @@ function HQChartScriptWorker()
135314
135417
 
135315
135418
 
135316
135419
 
135317
- var HQCHART_VERSION="1.1.13252";
135420
+ var HQCHART_VERSION="1.1.13258";
135318
135421
 
135319
135422
  function PrintHQChartVersion()
135320
135423
  {