hqchart 1.1.13253 → 1.1.13263
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.
- package/lib/umychart.vue.js +41 -32
- package/package.json +1 -1
- package/src/jscommon/umychart.DialogDrawTool.js +53 -3
- package/src/jscommon/umychart.complier.js +10 -0
- package/src/jscommon/umychart.js +124 -22
- package/src/jscommon/umychart.resource/css/tools.css +10 -5
- package/src/jscommon/umychart.resource/font/drawtool/demo_index.html +26 -3
- package/src/jscommon/umychart.resource/font/drawtool/iconfont.css +7 -3
- package/src/jscommon/umychart.resource/font/drawtool/iconfont.js +1 -1
- package/src/jscommon/umychart.resource/font/drawtool/iconfont.json +7 -0
- package/src/jscommon/umychart.resource/font/drawtool/iconfont.ttf +0 -0
- package/src/jscommon/umychart.resource/font/drawtool/iconfont.woff +0 -0
- package/src/jscommon/umychart.resource/font/drawtool/iconfont.woff2 +0 -0
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +135 -23
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +188 -26
|
@@ -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 (
|
|
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
|
-
|
|
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.
|
|
10040
|
-
|
|
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
|
-
|
|
10063
|
+
bDrawPicture=true;
|
|
10064
|
+
}
|
|
10065
|
+
}
|
|
10066
|
+
|
|
10044
10067
|
this.MoveOnChartDrawPicture=drawPictrueData.ChartDrawPicture;
|
|
10045
10068
|
}
|
|
10046
10069
|
else
|
|
@@ -40724,7 +40747,9 @@ function ChartMultiBar()
|
|
|
40724
40747
|
|
|
40725
40748
|
this.Draw=function()
|
|
40726
40749
|
{
|
|
40727
|
-
if (!this.IsShow || this.ChartFrame.IsMinSize) return;
|
|
40750
|
+
if (!this.IsShow || this.ChartFrame.IsMinSize || !this.IsVisible) return;
|
|
40751
|
+
if (this.IsShowIndexTitleOnly()) return;
|
|
40752
|
+
if (this.IsHideScriptIndex()) return;
|
|
40728
40753
|
if (!this.Data || this.Data.length<=0) return;
|
|
40729
40754
|
|
|
40730
40755
|
this.IsHScreen=(this.ChartFrame.IsHScreen===true);
|
|
@@ -40901,6 +40926,8 @@ function ChartMultiLine()
|
|
|
40901
40926
|
this.Draw=function()
|
|
40902
40927
|
{
|
|
40903
40928
|
if (!this.IsShow || this.ChartFrame.IsMinSize || !this.IsVisible) return;
|
|
40929
|
+
if (this.IsShowIndexTitleOnly()) return;
|
|
40930
|
+
if (this.IsHideScriptIndex()) return;
|
|
40904
40931
|
if (!this.Data || this.Data.length<=0) return;
|
|
40905
40932
|
if (!IFrameSplitOperator.IsNonEmptyArray(this.Lines)) return;
|
|
40906
40933
|
|
|
@@ -41420,7 +41447,7 @@ function ChartMultiText()
|
|
|
41420
41447
|
var y=top;
|
|
41421
41448
|
if (item.Value=="TOP") y=top;
|
|
41422
41449
|
else if (item.Value=="BOTTOM") y=bottom;
|
|
41423
|
-
else y=this.ChartFrame.GetYFromData(item.Value);
|
|
41450
|
+
else y=this.ChartFrame.GetYFromData(item.Value, false);
|
|
41424
41451
|
|
|
41425
41452
|
if (item.Color) this.Canvas.fillStyle = item.Color;
|
|
41426
41453
|
else this.Canvas.fillStyle = this.Color;
|
|
@@ -41461,7 +41488,7 @@ function ChartMultiText()
|
|
|
41461
41488
|
{
|
|
41462
41489
|
var kItem=this.Data.Data[item.Index];
|
|
41463
41490
|
var price=item.Line.KData=="H"? kItem.High:kItem.Low;
|
|
41464
|
-
var yPrice=this.ChartFrame.GetYFromData(price);
|
|
41491
|
+
var yPrice=this.ChartFrame.GetYFromData(price, false);
|
|
41465
41492
|
var yText=y;
|
|
41466
41493
|
if (Array.isArray(item.Line.Offset) && item.Line.Offset.length==2)
|
|
41467
41494
|
{
|
|
@@ -41501,7 +41528,9 @@ function ChartMultiText()
|
|
|
41501
41528
|
|
|
41502
41529
|
this.Draw=function()
|
|
41503
41530
|
{
|
|
41504
|
-
if (!this.IsShow || this.ChartFrame.IsMinSize) return;
|
|
41531
|
+
if (!this.IsShow || this.ChartFrame.IsMinSize || !this.IsVisible) return;
|
|
41532
|
+
if (this.IsShowIndexTitleOnly()) return;
|
|
41533
|
+
if (this.IsHideScriptIndex()) return;
|
|
41505
41534
|
if (!this.Data || this.Data.length<=0) return;
|
|
41506
41535
|
if (!this.Texts) return;
|
|
41507
41536
|
|
|
@@ -41510,7 +41539,12 @@ function ChartMultiText()
|
|
|
41510
41539
|
var mapText=this.GetShowTextData();
|
|
41511
41540
|
if (mapText.size<=0) return;
|
|
41512
41541
|
|
|
41542
|
+
this.Canvas.save();
|
|
41543
|
+
this.ClipClient(this.IsHScreen);
|
|
41544
|
+
|
|
41513
41545
|
this.DrawAllText(mapText);
|
|
41546
|
+
|
|
41547
|
+
this.Canvas.restore();
|
|
41514
41548
|
}
|
|
41515
41549
|
|
|
41516
41550
|
this.GetMaxMin=function()
|
|
@@ -41558,7 +41592,9 @@ function ChartMultiSVGIcon()
|
|
|
41558
41592
|
this.Draw=function()
|
|
41559
41593
|
{
|
|
41560
41594
|
this.IconRect=[];
|
|
41561
|
-
if (!this.IsShow || this.ChartFrame.IsMinSize) return;
|
|
41595
|
+
if (!this.IsShow || this.ChartFrame.IsMinSize || !this.IsVisible) return;
|
|
41596
|
+
if (this.IsShowIndexTitleOnly()) return;
|
|
41597
|
+
if (this.IsHideScriptIndex()) return;
|
|
41562
41598
|
if (!this.Data || this.Data.length<=0) return;
|
|
41563
41599
|
if (!this.Family || !this.Icon) return;
|
|
41564
41600
|
if (!IFrameSplitOperator.IsNonEmptyArray(this.Icon)) return;
|
|
@@ -59957,7 +59993,7 @@ function ChartDrawHLine()
|
|
|
59957
59993
|
this.TextFont=12*GetDevicePixelRatio() +"px 微软雅黑";
|
|
59958
59994
|
this.RightSpaceWidth=50;
|
|
59959
59995
|
|
|
59960
|
-
this.ButtonPosition=0; //按钮位置, 0=价格后面, 1=价格上面 2=价格上面 左对齐
|
|
59996
|
+
this.ButtonPosition=0; //按钮位置, 0=价格后面, 1=价格上面 2=价格上面 左对齐 3=垂直排列
|
|
59961
59997
|
this.ButtonBGColor='rgb(190,190,190)';
|
|
59962
59998
|
this.ButtonSpace=3;
|
|
59963
59999
|
|
|
@@ -59989,6 +60025,8 @@ function ChartDrawHLine()
|
|
|
59989
60025
|
this.ColseButtonSize=0;
|
|
59990
60026
|
this.SettingButtonSize=0;
|
|
59991
60027
|
this.ButtonBGWidth=0;
|
|
60028
|
+
this.VerticalButtonInfo={ Width:0, Height:0 }; //垂直按钮信息
|
|
60029
|
+
|
|
59992
60030
|
|
|
59993
60031
|
|
|
59994
60032
|
this.SetOption=function(option)
|
|
@@ -60125,6 +60163,9 @@ function ChartDrawHLine()
|
|
|
60125
60163
|
this.SettingButtonSize=0;
|
|
60126
60164
|
this.ButtonBGWidth=0;
|
|
60127
60165
|
|
|
60166
|
+
this.VerticalButtonInfo.Width=0;
|
|
60167
|
+
this.VerticalButtonInfo.Height=0;
|
|
60168
|
+
|
|
60128
60169
|
if (this.IsFrameMinSize()) return;
|
|
60129
60170
|
if (!this.IsShow) return;
|
|
60130
60171
|
|
|
@@ -60326,15 +60367,16 @@ function ChartDrawHLine()
|
|
|
60326
60367
|
if (IFrameSplitOperator.IsNumber(labInfo.LineSpace)) lineSpace=labInfo.LineSpace;
|
|
60327
60368
|
|
|
60328
60369
|
//背景色
|
|
60370
|
+
var rtLab={ Left:drawLeft, Top:drawTop, Width:labSize.Width, Height:labSize.Height }
|
|
60371
|
+
rtLab.Right=rtLab.Left+rtLab.Width;
|
|
60372
|
+
rtLab.Bottom=rtLab.Top+rtLab.Height;
|
|
60329
60373
|
if (labInfo.BGColor)
|
|
60330
60374
|
{
|
|
60331
60375
|
this.Canvas.fillStyle=labInfo.BGColor;
|
|
60332
|
-
|
|
60333
|
-
this.Canvas.fillRect(ToFixedRect(drawLeft),ToFixedRect(rtTop),ToFixedRect(labSize.Width),ToFixedRect(labSize.Height));
|
|
60376
|
+
this.Canvas.fillRect(ToFixedRect(rtLab.Left),ToFixedRect(rtLab.Top),ToFixedRect(rtLab.Width),ToFixedRect(rtLab.Height));
|
|
60334
60377
|
}
|
|
60335
60378
|
|
|
60336
60379
|
var yText=drawTop+1+lineSpace;
|
|
60337
|
-
|
|
60338
60380
|
this.Canvas.textBaseline="top";
|
|
60339
60381
|
for(var i=0;i<labInfo.AryText.length;++i)
|
|
60340
60382
|
{
|
|
@@ -60355,6 +60397,8 @@ function ChartDrawHLine()
|
|
|
60355
60397
|
|
|
60356
60398
|
yText+=labSize.LineHeight+lineSpace;
|
|
60357
60399
|
}
|
|
60400
|
+
|
|
60401
|
+
this.DrawVerticalButton(rtLab);
|
|
60358
60402
|
}
|
|
60359
60403
|
|
|
60360
60404
|
this.DrawCustomHLine=function(labInfo, yLine)
|
|
@@ -60509,27 +60553,83 @@ function ChartDrawHLine()
|
|
|
60509
60553
|
var font=`${icon.Size*pixelRatio}px ${icon.Family}`;
|
|
60510
60554
|
this.Canvas.font=font;
|
|
60511
60555
|
item.Width=this.Canvas.measureText(icon.Text).width+2;
|
|
60556
|
+
item.Height=item.Width;
|
|
60512
60557
|
|
|
60513
60558
|
if (icon.Margin)
|
|
60514
60559
|
{
|
|
60515
60560
|
var margin=icon.Margin;
|
|
60516
60561
|
if (IFrameSplitOperator.IsNumber(margin.Left)) item.Width+=margin.Left;
|
|
60517
60562
|
if (IFrameSplitOperator.IsNumber(margin.Right)) item.Width+=margin.Right;
|
|
60563
|
+
|
|
60564
|
+
if (IFrameSplitOperator.IsNumber(margin.Top)) item.Height+=margin.Top;
|
|
60565
|
+
if (IFrameSplitOperator.IsNumber(margin.Bottom)) item.Height+=margin.Bottom;
|
|
60518
60566
|
}
|
|
60519
60567
|
|
|
60568
|
+
if (this.VerticalButtonInfo.Width<item.Width) this.VerticalButtonInfo.Width=item.Width;
|
|
60569
|
+
this.VerticalButtonInfo.Height+=item.Height;
|
|
60570
|
+
|
|
60520
60571
|
totalWidth+=item.Width;
|
|
60521
60572
|
}
|
|
60522
60573
|
|
|
60523
60574
|
this.ButtonBGWidth=totalWidth;
|
|
60524
60575
|
}
|
|
60525
60576
|
|
|
60526
|
-
|
|
60577
|
+
//垂直排列按钮
|
|
60578
|
+
this.DrawVerticalButton=function(rtLab)
|
|
60527
60579
|
{
|
|
60580
|
+
if (this.ButtonPosition!=3) return;
|
|
60528
60581
|
if (!IFrameSplitOperator.IsNonEmptyArray(this.AryShowButton)) return;
|
|
60582
|
+
if (this.VerticalButtonInfo.Height<=0) return;
|
|
60529
60583
|
|
|
60584
|
+
var rtBG={ Left:rtLab.Right, Top:rtLab.Top, Width:this.VerticalButtonInfo.Width, Height:this.VerticalButtonInfo.Height };
|
|
60585
|
+
rtBG.Right=rtBG.Left+rtBG.Width;
|
|
60586
|
+
rtBG.Bottom=rtBG.Top+rtBG.Height;
|
|
60587
|
+
this.Canvas.fillStyle=this.ButtonBGColor;
|
|
60588
|
+
this.Canvas.fillRect(ToFixedRect(rtBG.Left),ToFixedRect(rtBG.Top), ToFixedRect(rtBG.Width),ToFixedRect(rtBG.Height));
|
|
60589
|
+
|
|
60590
|
+
var pixelRatio=GetDevicePixelRatio();
|
|
60591
|
+
var yTop=rtLab.Top;
|
|
60592
|
+
for(var i=0;i<this.AryShowButton.length;++i)
|
|
60593
|
+
{
|
|
60594
|
+
var item=this.AryShowButton[i];
|
|
60595
|
+
var icon=item.Data;
|
|
60596
|
+
|
|
60597
|
+
var rtButton={Left:rtBG.Left, Top:yTop, Width:this.VerticalButtonInfo.Width, Height:item.Height };
|
|
60598
|
+
rtButton.Right=rtButton.Left+rtButton.Width;
|
|
60599
|
+
rtButton.Bottom=rtButton.Top+rtButton.Height;
|
|
60600
|
+
var yCenter=rtButton.Top+rtButton.Height/2;
|
|
60601
|
+
var xCenter=rtButton.Left+rtButton.Width/2;
|
|
60602
|
+
|
|
60603
|
+
var font=`${icon.Size*pixelRatio}px ${icon.Family}`;
|
|
60604
|
+
this.Canvas.font=font;
|
|
60605
|
+
this.Canvas.textAlign="center";
|
|
60606
|
+
this.Canvas.textBaseline="middle";
|
|
60607
|
+
this.Canvas.fillStyle=icon.Color;
|
|
60608
|
+
this.Canvas.fillText(icon.Text,xCenter,yCenter);
|
|
60609
|
+
|
|
60610
|
+
this.AryButton.push({Rect:rtButton,ID:icon.ID, TooltipText:icon.TooltipText, Data:icon.Data });
|
|
60611
|
+
|
|
60612
|
+
yTop=rtButton.Bottom;
|
|
60613
|
+
}
|
|
60614
|
+
}
|
|
60615
|
+
|
|
60616
|
+
this.DrawButton=function(drawTop, drawLeft, drawHeight, rtDraw)
|
|
60617
|
+
{
|
|
60618
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(this.AryShowButton)) return;
|
|
60619
|
+
if (this.ButtonPosition==3) return; //垂直按钮在DrawVerticalButton()调用
|
|
60620
|
+
|
|
60530
60621
|
if (this.ButtonPosition==1)
|
|
60531
60622
|
{
|
|
60532
60623
|
drawTop-=drawHeight;
|
|
60624
|
+
var chartWidth=this.Frame.ChartBorder.GetChartWidth();
|
|
60625
|
+
var chartLeft=this.Frame.ChartBorder.GetRight()+this.RightSpaceWidth;
|
|
60626
|
+
if (drawLeft+this.ButtonBGWidth>chartWidth) //右边不够了 往左移动
|
|
60627
|
+
{
|
|
60628
|
+
drawLeft=chartWidth-this.ButtonBGWidth;
|
|
60629
|
+
}
|
|
60630
|
+
|
|
60631
|
+
if (rtDraw.Left>drawLeft) drawLeft=rtDraw.Left;
|
|
60632
|
+
|
|
60533
60633
|
}
|
|
60534
60634
|
else if (this.ButtonPosition==2)
|
|
60535
60635
|
{
|
|
@@ -71961,6 +72061,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
71961
72061
|
{
|
|
71962
72062
|
var cursorIndex={ ZoomType:this.ZoomType, IsLockRight:this.IsZoomLockRight };
|
|
71963
72063
|
cursorIndex.Index=parseInt(Math.abs(this.CursorIndex-0.5).toFixed(0));
|
|
72064
|
+
if (e.ctrlKey) cursorIndex.ZoomType=1; //ctrl+滚轴 十字中心缩放
|
|
71964
72065
|
if (this.Frame.ZoomDown(cursorIndex, { ZoomDownloadDataCallback:(requestData)=>{ this.ZoomDownloadData(requestData) } } ))
|
|
71965
72066
|
{
|
|
71966
72067
|
this.CursorIndex=cursorIndex.Index;
|
|
@@ -71983,6 +72084,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
71983
72084
|
{
|
|
71984
72085
|
var cursorIndex={ ZoomType:this.ZoomType, IsLockRight:this.IsZoomLockRight };
|
|
71985
72086
|
cursorIndex.Index=parseInt(Math.abs(this.CursorIndex-0.5).toFixed(0));
|
|
72087
|
+
if (e.ctrlKey) cursorIndex.ZoomType=1; //ctrl+滚轴 十字中心缩放
|
|
71986
72088
|
if (this.Frame.ZoomUp(cursorIndex))
|
|
71987
72089
|
{
|
|
71988
72090
|
JSConsole.Chart.Log("[KLineChartContainer::OnWheel] cursorIndex ",cursorIndex)
|
|
@@ -115944,6 +116046,7 @@ function ScriptIndex(name,script,args,option)
|
|
|
115944
116046
|
|
|
115945
116047
|
this.ReloadChartResource(hqChart, windowIndex, chart);
|
|
115946
116048
|
|
|
116049
|
+
this.SetChartIndexName(chart);
|
|
115947
116050
|
hqChart.ChartPaint.push(chart);
|
|
115948
116051
|
|
|
115949
116052
|
var titleIndex=windowIndex+1;
|
|
@@ -115964,6 +116067,7 @@ function ScriptIndex(name,script,args,option)
|
|
|
115964
116067
|
chart.Data=hqChart.ChartPaint[0].Data;//绑定K线
|
|
115965
116068
|
chart.PointGroup=varItem.Draw.DrawData;
|
|
115966
116069
|
if (varItem.Draw.Name) chart.Name=varItem.Draw.Name;
|
|
116070
|
+
this.SetChartIndexName(chart);
|
|
115967
116071
|
hqChart.ChartPaint.push(chart);
|
|
115968
116072
|
|
|
115969
116073
|
var titleIndex=windowIndex+1;
|
|
@@ -115990,6 +116094,7 @@ function ScriptIndex(name,script,args,option)
|
|
|
115990
116094
|
titleData.DataType="MULTI_BAR";
|
|
115991
116095
|
hqChart.TitlePaint[titleIndex].Data[id]=titleData;
|
|
115992
116096
|
|
|
116097
|
+
this.SetChartIndexName(chart);
|
|
115993
116098
|
hqChart.ChartPaint.push(chart);
|
|
115994
116099
|
}
|
|
115995
116100
|
|
|
@@ -116003,6 +116108,7 @@ function ScriptIndex(name,script,args,option)
|
|
|
116003
116108
|
|
|
116004
116109
|
chart.Data=hqChart.ChartPaint[0].Data;//绑定K线
|
|
116005
116110
|
chart.Texts=varItem.Draw.DrawData;
|
|
116111
|
+
this.SetChartIndexName(chart);
|
|
116006
116112
|
hqChart.ChartPaint.push(chart);
|
|
116007
116113
|
}
|
|
116008
116114
|
|
|
@@ -116018,6 +116124,7 @@ function ScriptIndex(name,script,args,option)
|
|
|
116018
116124
|
chart.Family=varItem.Draw.DrawData.Family;
|
|
116019
116125
|
chart.AryIcon= varItem.Draw.DrawData.Icon;
|
|
116020
116126
|
chart.BuildCacheData();
|
|
116127
|
+
this.SetChartIndexName(chart);
|
|
116021
116128
|
hqChart.ChartPaint.push(chart);
|
|
116022
116129
|
}
|
|
116023
116130
|
|
|
@@ -117591,6 +117698,7 @@ function OverlayScriptIndex(name,script,args,option)
|
|
|
117591
117698
|
|
|
117592
117699
|
this.ReloadChartResource(hqChart, windowIndex, chart);
|
|
117593
117700
|
|
|
117701
|
+
this.SetChartIndexName(chart);
|
|
117594
117702
|
frame.ChartPaint.push(chart);
|
|
117595
117703
|
}
|
|
117596
117704
|
|
|
@@ -117654,6 +117762,7 @@ function OverlayScriptIndex(name,script,args,option)
|
|
|
117654
117762
|
titleData.DataType="MULTI_BAR";
|
|
117655
117763
|
titlePaint.OverlayIndex.get(overlayIndex.Identify).Data[id]=titleData;
|
|
117656
117764
|
|
|
117765
|
+
this.SetChartIndexName(chart);
|
|
117657
117766
|
frame.ChartPaint.push(chart);
|
|
117658
117767
|
}
|
|
117659
117768
|
|
|
@@ -117670,6 +117779,7 @@ function OverlayScriptIndex(name,script,args,option)
|
|
|
117670
117779
|
|
|
117671
117780
|
chart.Data=hqChart.ChartPaint[0].Data;//绑定K线
|
|
117672
117781
|
chart.Texts=varItem.Draw.DrawData;
|
|
117782
|
+
this.SetChartIndexName(chart);
|
|
117673
117783
|
frame.ChartPaint.push(chart);
|
|
117674
117784
|
}
|
|
117675
117785
|
|
|
@@ -117688,6 +117798,7 @@ function OverlayScriptIndex(name,script,args,option)
|
|
|
117688
117798
|
chart.Family=varItem.Draw.DrawData.Family;
|
|
117689
117799
|
chart.AryIcon= varItem.Draw.DrawData.Icon;
|
|
117690
117800
|
chart.BuildCacheData();
|
|
117801
|
+
this.SetChartIndexName(chart);
|
|
117691
117802
|
frame.ChartPaint.push(chart);
|
|
117692
117803
|
}
|
|
117693
117804
|
|
|
@@ -117716,6 +117827,7 @@ function OverlayScriptIndex(name,script,args,option)
|
|
|
117716
117827
|
|
|
117717
117828
|
this.ReloadChartResource(hqChart, windowIndex, chart);
|
|
117718
117829
|
|
|
117830
|
+
this.SetChartIndexName(chart);
|
|
117719
117831
|
frame.ChartPaint.push(chart);
|
|
117720
117832
|
}
|
|
117721
117833
|
|
|
@@ -134782,7 +134894,8 @@ var JS_DRAWTOOL_MENU_ID=
|
|
|
134782
134894
|
{
|
|
134783
134895
|
CMD_SELECTED_ID:1,
|
|
134784
134896
|
CMD_CHANGE_LINE_COLOR_ID:2,
|
|
134785
|
-
|
|
134897
|
+
CMD_DELETE_ALL_DRAW_CHART_ID:3,
|
|
134898
|
+
CMD_ERASE_DRAW_CHART_ID:4,
|
|
134786
134899
|
};
|
|
134787
134900
|
|
|
134788
134901
|
function JSDialogDrawTool()
|
|
@@ -134870,7 +134983,8 @@ function JSDialogDrawTool()
|
|
|
134870
134983
|
{ Title:"选中", ClassName:'hqchart_drawtool icon-arrow', Type:1, Data:{ID:JS_DRAWTOOL_MENU_ID.CMD_SELECTED_ID} },
|
|
134871
134984
|
{ Title:'尺子', ClassName: 'hqchart_drawtool icon-ruler', Type:0, Data:{ ID:"尺子" } },
|
|
134872
134985
|
{ Title:"点击切换颜色", ClassName: 'hqchart_drawtool icon-fangkuai', Type:2, Data:{ ID:JS_DRAWTOOL_MENU_ID.CMD_CHANGE_LINE_COLOR_ID }},
|
|
134873
|
-
{ Title:"
|
|
134986
|
+
{ Title:"擦除画线", ClassName: 'hqchart_drawtool icon-a-xiangpicachuxiangpica', Type:2, Data:{ ID:JS_DRAWTOOL_MENU_ID.CMD_ERASE_DRAW_CHART_ID }},
|
|
134987
|
+
{ Title:"删除所有画线", ClassName: 'hqchart_drawtool icon-recycle_bin', Type:2, Data:{ ID:JS_DRAWTOOL_MENU_ID.CMD_DELETE_ALL_DRAW_CHART_ID }}
|
|
134874
134988
|
]
|
|
134875
134989
|
};
|
|
134876
134990
|
|
|
@@ -135003,18 +135117,27 @@ function JSDialogDrawTool()
|
|
|
135003
135117
|
{
|
|
135004
135118
|
this.OnChangeLineColor(data);
|
|
135005
135119
|
}
|
|
135006
|
-
else if (type==2 && id==JS_DRAWTOOL_MENU_ID.
|
|
135120
|
+
else if (type==2 && id==JS_DRAWTOOL_MENU_ID.CMD_DELETE_ALL_DRAW_CHART_ID)
|
|
135007
135121
|
{
|
|
135008
135122
|
this.DeleteAllChart();
|
|
135009
135123
|
}
|
|
135124
|
+
else if (type==2 && id==JS_DRAWTOOL_MENU_ID.CMD_ERASE_DRAW_CHART_ID)
|
|
135125
|
+
{
|
|
135126
|
+
this.ClearAllSelectedChart();
|
|
135127
|
+
this.ClearCurrnetDrawPicture();
|
|
135128
|
+
this.EnableEraseChart(true);
|
|
135129
|
+
}
|
|
135010
135130
|
else if (type==1 && id==JS_DRAWTOOL_MENU_ID.CMD_SELECTED_ID)
|
|
135011
135131
|
{
|
|
135012
135132
|
this.ClearAllSelectedChart();
|
|
135013
135133
|
this.ClearCurrnetDrawPicture();
|
|
135134
|
+
this.EnableEraseChart(false);
|
|
135014
135135
|
}
|
|
135015
135136
|
else if (type==0)
|
|
135016
135137
|
{
|
|
135017
135138
|
this.ClearAllSelectedChart();
|
|
135139
|
+
this.EnableEraseChart(false);
|
|
135140
|
+
data.Span.classList.remove("UMyChart_DrawTool_Span");
|
|
135018
135141
|
data.Span.classList.add("UMyChart_DrawTool_Span_Selected");
|
|
135019
135142
|
this.CreateDrawPicture(data);
|
|
135020
135143
|
}
|
|
@@ -135027,6 +135150,7 @@ function JSDialogDrawTool()
|
|
|
135027
135150
|
{
|
|
135028
135151
|
var item=this.AryDivChart[i];
|
|
135029
135152
|
item.Span.classList.remove("UMyChart_DrawTool_Span_Selected");
|
|
135153
|
+
item.Span.classList.add("UMyChart_DrawTool_Span");
|
|
135030
135154
|
}
|
|
135031
135155
|
}
|
|
135032
135156
|
|
|
@@ -135100,6 +135224,43 @@ function JSDialogDrawTool()
|
|
|
135100
135224
|
this.HQChart.ClearChartDrawPicture();
|
|
135101
135225
|
}
|
|
135102
135226
|
|
|
135227
|
+
this.SetEraseChartButtonStatus=function(enable)
|
|
135228
|
+
{
|
|
135229
|
+
for(var i=0;i<this.AryDivChart.length;++i)
|
|
135230
|
+
{
|
|
135231
|
+
var item=this.AryDivChart[i];
|
|
135232
|
+
if (item.Item.Type==2 && item.Item.Data && item.Item.Data.ID==JS_DRAWTOOL_MENU_ID.CMD_ERASE_DRAW_CHART_ID)
|
|
135233
|
+
{
|
|
135234
|
+
if (enable)
|
|
135235
|
+
{
|
|
135236
|
+
if (item.Span.classList.contains("UMyChart_DrawTool_Span"))
|
|
135237
|
+
{
|
|
135238
|
+
item.Span.classList.replace("UMyChart_DrawTool_Span", "UMyChart_DrawTool_Span_Selected");
|
|
135239
|
+
}
|
|
135240
|
+
}
|
|
135241
|
+
else
|
|
135242
|
+
{
|
|
135243
|
+
if (item.Span.classList.contains("UMyChart_DrawTool_Span_Selected"))
|
|
135244
|
+
{
|
|
135245
|
+
item.Span.classList.replace("UMyChart_DrawTool_Span_Selected","UMyChart_DrawTool_Span");
|
|
135246
|
+
}
|
|
135247
|
+
}
|
|
135248
|
+
break;
|
|
135249
|
+
}
|
|
135250
|
+
}
|
|
135251
|
+
}
|
|
135252
|
+
|
|
135253
|
+
this.EnableEraseChart=function(enable)
|
|
135254
|
+
{
|
|
135255
|
+
if (!this.HQChart) return;
|
|
135256
|
+
|
|
135257
|
+
if (this.HQChart.EnableEraseChartDrawPicture==enable) return;
|
|
135258
|
+
|
|
135259
|
+
this.HQChart.EnableEraseChartDrawPicture=enable;
|
|
135260
|
+
|
|
135261
|
+
this.SetEraseChartButtonStatus(enable);
|
|
135262
|
+
}
|
|
135263
|
+
|
|
135103
135264
|
this.CreateDrawPicture=function(data)
|
|
135104
135265
|
{
|
|
135105
135266
|
if (!this.HQChart) return null;
|
|
@@ -135126,6 +135287,7 @@ function JSDialogDrawTool()
|
|
|
135126
135287
|
this.OnFinishDrawPicture=function(chart, data)
|
|
135127
135288
|
{
|
|
135128
135289
|
data.Span.classList.remove("UMyChart_DrawTool_Span_Selected");
|
|
135290
|
+
data.Span.classList.add("UMyChart_DrawTool_Span");
|
|
135129
135291
|
}
|
|
135130
135292
|
|
|
135131
135293
|
this.Show=function(x, y)
|
|
@@ -135314,7 +135476,7 @@ function HQChartScriptWorker()
|
|
|
135314
135476
|
|
|
135315
135477
|
|
|
135316
135478
|
|
|
135317
|
-
var HQCHART_VERSION="1.1.
|
|
135479
|
+
var HQCHART_VERSION="1.1.13262";
|
|
135318
135480
|
|
|
135319
135481
|
function PrintHQChartVersion()
|
|
135320
135482
|
{
|