hqchart 1.1.13162 → 1.1.13171
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 +50 -18
- package/package.json +1 -1
- package/src/jscommon/umychart.complier.js +4 -2
- package/src/jscommon/umychart.index.data.js +1 -1
- package/src/jscommon/umychart.js +300 -3
- package/src/jscommon/umychart.style.js +13 -0
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +319 -7
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +319 -7
|
@@ -245,7 +245,7 @@ JSIndexScript.ModifyAttribute=function(indexInfo, attribute)
|
|
|
245
245
|
if (IFrameSplitOperator.IsNumber(item.FloatPrecision)) indexInfo.YAxis.FloatPrecision=item.FloatPrecision;
|
|
246
246
|
if (IFrameSplitOperator.IsNumber(item.StringFormat)) indexInfo.YAxis.StringFormat=item.StringFormat;
|
|
247
247
|
if (IFrameSplitOperator.IsBool(item.EnableRemoveZero)) indexInfo.YAxis.EnableRemoveZero=item.EnableRemoveZero;
|
|
248
|
-
if (IFrameSplitOperator.IsBool(item.ExcludeValue)) indexInfo.YAxis.ExcludeValue=
|
|
248
|
+
if (IFrameSplitOperator.IsBool(item.ExcludeValue)) indexInfo.YAxis.ExcludeValue=item.ExcludeValue; //不参数Y轴的计算
|
|
249
249
|
}
|
|
250
250
|
}
|
|
251
251
|
|
|
@@ -6430,6 +6430,9 @@ var JSCHART_EVENT_ID=
|
|
|
6430
6430
|
ON_RCLICK_TREPORT_HEADER:125, //右键点击T型报价表头
|
|
6431
6431
|
ON_TREPORT_LOCAL_SORT:126, //T型报价列表本地排序
|
|
6432
6432
|
ON_CLICK_TREPORT_ROW:127, //左键点击点击T型报价列表
|
|
6433
|
+
|
|
6434
|
+
|
|
6435
|
+
ON_CHANGE_INDEX:150, //切换指标
|
|
6433
6436
|
}
|
|
6434
6437
|
|
|
6435
6438
|
var JSCHART_OPERATOR_ID=
|
|
@@ -9168,10 +9171,13 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9168
9171
|
var item=this.ChartDrawPicture[i];
|
|
9169
9172
|
if (item.IsDrawFirst) continue;
|
|
9170
9173
|
if (item.IsDrawMain && item.IsDrawMain()) continue;
|
|
9174
|
+
if (this.SelectChartDrawPicture && this.SelectChartDrawPicture.Guid==item.Guid) continue; //当前选中在最后画
|
|
9171
9175
|
|
|
9172
9176
|
item.Draw();
|
|
9173
9177
|
}
|
|
9174
9178
|
|
|
9179
|
+
if (this.SelectChartDrawPicture) this.SelectChartDrawPicture.Draw();
|
|
9180
|
+
|
|
9175
9181
|
if (this.CurrentChartDrawPicture && this.CurrentChartDrawPicture.Status!=10)
|
|
9176
9182
|
{
|
|
9177
9183
|
this.CurrentChartDrawPicture.Draw();
|
|
@@ -9594,7 +9600,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9594
9600
|
if (option.Point) item.LatestPoint=option.Point;
|
|
9595
9601
|
}
|
|
9596
9602
|
|
|
9597
|
-
if (item.IsDynamic && item.DrawAfterTitle===true) item.Draw();
|
|
9603
|
+
if (item.IsDynamic && item.DrawAfterTitle===true) item.Draw(moveonPoint, this.LastMouseStatus);
|
|
9598
9604
|
}
|
|
9599
9605
|
|
|
9600
9606
|
if (this.EnableAnimation)
|
|
@@ -9611,10 +9617,16 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9611
9617
|
var item=this.ChartDrawPicture[i];
|
|
9612
9618
|
if (item.IsDrawFirst) continue;
|
|
9613
9619
|
if (item.IsDrawMain && item.IsDrawMain()) continue;
|
|
9620
|
+
if (this.SelectChartDrawPicture &&item.Guid==this.SelectChartDrawPicture.Guid) continue; //选中画图最后画 确保显示在最外面
|
|
9614
9621
|
|
|
9615
9622
|
item.Draw(moveonPoint, this.LastMouseStatus);
|
|
9616
9623
|
}
|
|
9617
9624
|
|
|
9625
|
+
if (this.SelectChartDrawPicture)
|
|
9626
|
+
{
|
|
9627
|
+
this.SelectChartDrawPicture.Draw(moveonPoint, this.LastMouseStatus);
|
|
9628
|
+
}
|
|
9629
|
+
|
|
9618
9630
|
if (this.CurrentChartDrawPicture && this.CurrentChartDrawPicture.Status!=10)
|
|
9619
9631
|
{
|
|
9620
9632
|
this.CurrentChartDrawPicture.Draw();
|
|
@@ -43381,7 +43393,8 @@ function ExtendChartPaintFactory()
|
|
|
43381
43393
|
["FrameSplitPaint", { Create:function() { return new FrameSplitPaint(); } }],
|
|
43382
43394
|
["RectSelectPaint", { Create:function() { return new RectSelectPaint(); } }],
|
|
43383
43395
|
["DragMovePaint", { Create:function() { return new DragMovePaint(); } }],
|
|
43384
|
-
["SessionBreaksPaint", { Create:function() { return new SessionBreaksPaint(); }}]
|
|
43396
|
+
["SessionBreaksPaint", { Create:function() { return new SessionBreaksPaint(); }}],
|
|
43397
|
+
["FrameButtomToolbarPaint", {Create:function() { return new FrameButtomToolbarPaint(); }}]
|
|
43385
43398
|
]
|
|
43386
43399
|
);
|
|
43387
43400
|
|
|
@@ -47898,6 +47911,207 @@ function SessionBreaksPaint()
|
|
|
47898
47911
|
}
|
|
47899
47912
|
}
|
|
47900
47913
|
|
|
47914
|
+
//窗口底部工具栏
|
|
47915
|
+
function FrameButtomToolbarPaint()
|
|
47916
|
+
{
|
|
47917
|
+
this.newMethod=IExtendChartPainting; //派生
|
|
47918
|
+
this.newMethod();
|
|
47919
|
+
delete this.newMethod;
|
|
47920
|
+
|
|
47921
|
+
this.ClassName='FrameButtomToolbarPaint';
|
|
47922
|
+
this.FrameID=-1;
|
|
47923
|
+
this.FrameGuid=null;
|
|
47924
|
+
this.IsDynamic=true;
|
|
47925
|
+
this.DrawAfterTitle=true;
|
|
47926
|
+
|
|
47927
|
+
this.AryButton=[]; // { Title:, ID:, Data:数据, TooltipText:提示信息 }
|
|
47928
|
+
this.SelectedID=null; // 选中按钮ID
|
|
47929
|
+
this.AryRectButton=[];
|
|
47930
|
+
|
|
47931
|
+
this.BGColor=g_JSChartResource.FrameButtomToolbar.BGColor;
|
|
47932
|
+
this.BorderColor=g_JSChartResource.FrameButtomToolbar.BorderColor;
|
|
47933
|
+
this.ButtonConfig=CloneData(g_JSChartResource.FrameButtomToolbar.Button);
|
|
47934
|
+
/*
|
|
47935
|
+
{
|
|
47936
|
+
Font:{ Family:"微软雅黑" },
|
|
47937
|
+
TitleColor:
|
|
47938
|
+
{
|
|
47939
|
+
Selected:"rgb(255,255,255)", Default:"rgb(140,140,140)", MoveOn:"rgb(255,255,255)"
|
|
47940
|
+
},
|
|
47941
|
+
BGColor: { Selected:"rgb(234,85,4)", Default:"rgb(25,25,25)", MoveOn:"rgb(59,59,59)" },
|
|
47942
|
+
BorderColor:"rgb(60,60,60)",
|
|
47943
|
+
|
|
47944
|
+
Mergin: { Left:5*GetDevicePixelRatio(), Right:5*GetDevicePixelRatio(), Top:4*GetDevicePixelRatio(), Bottom:2*GetDevicePixelRatio() }
|
|
47945
|
+
};
|
|
47946
|
+
*/
|
|
47947
|
+
|
|
47948
|
+
/*
|
|
47949
|
+
this.AryButton=
|
|
47950
|
+
[
|
|
47951
|
+
{ Title:"MACD", ID:"A", TooltipText:"切换MACD指标", Data:{ IndexID:"MACD"}},
|
|
47952
|
+
{ Title:"RSI", ID:"A1", TooltipText:"切换RSI指标", Data:{ IndexID:"RSI"} },
|
|
47953
|
+
{ Title:"大狗棍法", ID:"B1" },
|
|
47954
|
+
{ Title:"降龙掌", ID:"B3"}
|
|
47955
|
+
];
|
|
47956
|
+
this.SelectedID="A1"
|
|
47957
|
+
*/
|
|
47958
|
+
|
|
47959
|
+
this.ReloadResource=function(resource)
|
|
47960
|
+
{
|
|
47961
|
+
this.BGColor=g_JSChartResource.FrameButtomToolbar.BGColor;
|
|
47962
|
+
this.BorderColor=g_JSChartResource.FrameButtomToolbar.BorderColor;
|
|
47963
|
+
|
|
47964
|
+
this.ButtonConfig=CloneData(g_JSChartResource.FrameButtomToolbar.Button);
|
|
47965
|
+
}
|
|
47966
|
+
|
|
47967
|
+
this.SetOption=function(option)
|
|
47968
|
+
{
|
|
47969
|
+
if (option)
|
|
47970
|
+
{
|
|
47971
|
+
if (IFrameSplitOperator.IsNumber(option.FrameID)) this.FrameID=option.FrameID;
|
|
47972
|
+
if (option.FrameGuid) this.FrameGuid=option.FrameGuid;
|
|
47973
|
+
if (IFrameSplitOperator.IsNonEmptyArray(option.AryButton)) this.AryButton=option.AryButton.slice();
|
|
47974
|
+
if (option.SelectedID) this.SelectedID=option.SelectedID;
|
|
47975
|
+
}
|
|
47976
|
+
}
|
|
47977
|
+
|
|
47978
|
+
//设置当前选中的菜单ID
|
|
47979
|
+
this.SetSelectedID=function(id)
|
|
47980
|
+
{
|
|
47981
|
+
this.SelectedID=id;
|
|
47982
|
+
}
|
|
47983
|
+
|
|
47984
|
+
this.Draw=function(moveonPoint, mouseStatus)
|
|
47985
|
+
{
|
|
47986
|
+
this.AryRectButton=[];
|
|
47987
|
+
|
|
47988
|
+
var frame=this.GetFrame();
|
|
47989
|
+
if (!frame) return;
|
|
47990
|
+
if (frame.IsHScreen) return; //不支持横屏
|
|
47991
|
+
if (frame.IsMinSize) return;
|
|
47992
|
+
if (frame.ChartBorder.IsShowTitleOnly) return;
|
|
47993
|
+
|
|
47994
|
+
var border=frame.ChartBorder.GetBorder();
|
|
47995
|
+
var rtBG={ Left:border.Left+1, Right:border.Right-1, Top:border.BottomEx+1, Bottom:border.Bottom-1 };
|
|
47996
|
+
rtBG.Width=rtBG.Right-rtBG.Left;
|
|
47997
|
+
rtBG.Height=rtBG.Bottom-rtBG.Top;
|
|
47998
|
+
if (rtBG.Height<10) return;
|
|
47999
|
+
|
|
48000
|
+
if (this.BGColor)
|
|
48001
|
+
{
|
|
48002
|
+
this.Canvas.fillStyle=this.BGColor;
|
|
48003
|
+
this.Canvas.fillRect(rtBG.Left,rtBG.Top,rtBG.Width,rtBG.Height);
|
|
48004
|
+
}
|
|
48005
|
+
|
|
48006
|
+
var font=this.TitleFont(rtBG.Height-this.ButtonConfig.Mergin.Top-this.ButtonConfig.Mergin.Bottom);
|
|
48007
|
+
this.Canvas.textBaseline='middle';
|
|
48008
|
+
this.Canvas.textAlign='center';
|
|
48009
|
+
this.Canvas.font=font;
|
|
48010
|
+
var xBotton=rtBG.Left;
|
|
48011
|
+
for(var i=0;i<this.AryButton.length;++i)
|
|
48012
|
+
{
|
|
48013
|
+
var item=this.AryButton[i];
|
|
48014
|
+
if (!item.Title) return;
|
|
48015
|
+
var textWidth=this.Canvas.measureText(item.Title).width+2;
|
|
48016
|
+
var buttonWidth=textWidth+this.ButtonConfig.Mergin.Left+this.ButtonConfig.Mergin.Right;
|
|
48017
|
+
var rtButton={ Left:xBotton, Top:rtBG.Top, Bottom:rtBG.Bottom, Height:rtBG.Height, Width:buttonWidth };
|
|
48018
|
+
rtButton.Right=rtButton.Left+rtButton.Width;
|
|
48019
|
+
|
|
48020
|
+
//鼠标是否在按钮上
|
|
48021
|
+
var bgColor=this.ButtonConfig.BGColor.Default;
|
|
48022
|
+
var titleColor=this.ButtonConfig.TitleColor.Default;
|
|
48023
|
+
if (moveonPoint && (moveonPoint.X>=rtButton.Left && moveonPoint.X<rtButton.Right && moveonPoint.Y>=rtButton.Top && moveonPoint.Y<=rtButton.Bottom))
|
|
48024
|
+
{
|
|
48025
|
+
bgColor=this.ButtonConfig.BGColor.MoveOn;
|
|
48026
|
+
titleColor=this.ButtonConfig.TitleColor.MoveOn;
|
|
48027
|
+
if (mouseStatus)
|
|
48028
|
+
mouseStatus.MouseOnToolbar={ Rect:rtButton, Item:item, Frame:frame, Point:{X:moveonPoint.X, Y:moveonPoint.Y}, ID:"TitleButton" };
|
|
48029
|
+
}
|
|
48030
|
+
|
|
48031
|
+
if (this.SelectedID && this.SelectedID==item.ID)
|
|
48032
|
+
{
|
|
48033
|
+
bgColor=this.ButtonConfig.BGColor.Selected;
|
|
48034
|
+
titleColor=this.ButtonConfig.TitleColor.Selected;
|
|
48035
|
+
}
|
|
48036
|
+
|
|
48037
|
+
|
|
48038
|
+
if (bgColor)
|
|
48039
|
+
{
|
|
48040
|
+
this.Canvas.fillStyle=bgColor;
|
|
48041
|
+
this.Canvas.fillRect(rtButton.Left,rtButton.Top,rtButton.Width,rtButton.Height);
|
|
48042
|
+
}
|
|
48043
|
+
|
|
48044
|
+
if (this.ButtonConfig.BorderColor)
|
|
48045
|
+
{
|
|
48046
|
+
this.Canvas.strokeStyle=this.ButtonConfig.BorderColor;
|
|
48047
|
+
this.Canvas.beginPath();
|
|
48048
|
+
this.Canvas.moveTo(ToFixedPoint(rtButton.Right),rtButton.Top);
|
|
48049
|
+
this.Canvas.lineTo(ToFixedPoint(rtButton.Right),rtButton.Bottom);
|
|
48050
|
+
this.Canvas.stroke();
|
|
48051
|
+
}
|
|
48052
|
+
|
|
48053
|
+
this.Canvas.fillStyle=titleColor;
|
|
48054
|
+
var xText=rtButton.Left+rtButton.Width/2; //居中
|
|
48055
|
+
var yText=rtButton.Top+this.ButtonConfig.Mergin.Top+(rtButton.Height-this.ButtonConfig.Mergin.Top-this.ButtonConfig.Mergin.Bottom)/2;
|
|
48056
|
+
this.Canvas.fillText(item.Title,xText,yText);
|
|
48057
|
+
|
|
48058
|
+
this.AryRectButton.push({ Rect:rtButton, ID:item.ID, Data:item });
|
|
48059
|
+
|
|
48060
|
+
xBotton+=buttonWidth+1;
|
|
48061
|
+
}
|
|
48062
|
+
|
|
48063
|
+
if (this.BorderColor)
|
|
48064
|
+
{
|
|
48065
|
+
this.Canvas.strokeStyle=this.BorderColor;
|
|
48066
|
+
this.Canvas.beginPath();
|
|
48067
|
+
this.Canvas.moveTo(border.Left,ToFixedPoint(border.BottomEx));
|
|
48068
|
+
this.Canvas.lineTo(border.Right,ToFixedPoint(border.BottomEx));
|
|
48069
|
+
this.Canvas.stroke();
|
|
48070
|
+
}
|
|
48071
|
+
}
|
|
48072
|
+
|
|
48073
|
+
this.GetFrame=function()
|
|
48074
|
+
{
|
|
48075
|
+
if (!this.ChartFrame) return null;
|
|
48076
|
+
if (this.FrameID>=0)
|
|
48077
|
+
{
|
|
48078
|
+
var subFrame=this.ChartFrame.SubFrame[this.FrameID];
|
|
48079
|
+
if (!subFrame || !subFrame.Frame) return null;
|
|
48080
|
+
|
|
48081
|
+
return subFrame.Frame;
|
|
48082
|
+
}
|
|
48083
|
+
|
|
48084
|
+
return null;
|
|
48085
|
+
}
|
|
48086
|
+
|
|
48087
|
+
this.TitleFont=function(height)
|
|
48088
|
+
{
|
|
48089
|
+
var config=this.ButtonConfig.Font;
|
|
48090
|
+
var fontSize=height;
|
|
48091
|
+
if (IFrameSplitOperator.IsPlusNumber(config.Size)) fontSize=config.Size;
|
|
48092
|
+
|
|
48093
|
+
var font=`${fontSize*GetDevicePixelRatio()}px ${config.Family}`;
|
|
48094
|
+
return font;
|
|
48095
|
+
}
|
|
48096
|
+
|
|
48097
|
+
this.PtInButtons=function(x,y)
|
|
48098
|
+
{
|
|
48099
|
+
for(var i=0;i<this.AryRectButton.length;++i)
|
|
48100
|
+
{
|
|
48101
|
+
var item=this.AryRectButton[i];
|
|
48102
|
+
var rect=item.Rect;
|
|
48103
|
+
if (x>rect.Left && x<rect.Right && y>rect.Top && y<rect.Bottom)
|
|
48104
|
+
{
|
|
48105
|
+
var frame=this.GetFrame();
|
|
48106
|
+
var result={ ID:item.Data.ID, Rect:rect, FrameID:this.FrameID, Frame:frame, Data:item.Data };
|
|
48107
|
+
return result;
|
|
48108
|
+
}
|
|
48109
|
+
}
|
|
48110
|
+
|
|
48111
|
+
return null;
|
|
48112
|
+
}
|
|
48113
|
+
}
|
|
48114
|
+
|
|
47901
48115
|
|
|
47902
48116
|
|
|
47903
48117
|
//弹幕数据 { X:X偏移, Y:Y偏移, Text:内容, Color:颜色 }
|
|
@@ -68550,6 +68764,21 @@ function JSChartResource()
|
|
|
68550
68764
|
}
|
|
68551
68765
|
},
|
|
68552
68766
|
|
|
68767
|
+
this.FrameButtomToolbar=
|
|
68768
|
+
{
|
|
68769
|
+
BGColor:"rgb(235,235,235)",
|
|
68770
|
+
BorderColor:"rgb(204,204,204)",
|
|
68771
|
+
Button:
|
|
68772
|
+
{
|
|
68773
|
+
Font:{ Family:"微软雅黑" },
|
|
68774
|
+
TitleColor: { Selected:"rgb(255,255,255)", Default:"rgb(125,125,125)", MoveOn:"rgb(234,85,4)" },
|
|
68775
|
+
BGColor: { Selected:"rgb(234,85,4)", Default:"rgb(235,235,235)", MoveOn:"rgb(242,242,242)" },
|
|
68776
|
+
BorderColor:"rgb(204,204,204)",
|
|
68777
|
+
|
|
68778
|
+
Mergin: { Left:5*GetDevicePixelRatio(), Right:5*GetDevicePixelRatio(), Top:4*GetDevicePixelRatio(), Bottom:2*GetDevicePixelRatio() }
|
|
68779
|
+
}
|
|
68780
|
+
}
|
|
68781
|
+
|
|
68553
68782
|
|
|
68554
68783
|
//自定义风格
|
|
68555
68784
|
this.SetStyle=function(style)
|
|
@@ -69205,6 +69434,9 @@ function JSChartResource()
|
|
|
69205
69434
|
}
|
|
69206
69435
|
|
|
69207
69436
|
}
|
|
69437
|
+
|
|
69438
|
+
if (style.FrameButtomToolbar)
|
|
69439
|
+
this.SetFrameButtomToolbar(style.FrameButtomToolbar);
|
|
69208
69440
|
}
|
|
69209
69441
|
|
|
69210
69442
|
this.SetReportStyle=function(style)
|
|
@@ -69515,6 +69747,57 @@ function JSChartResource()
|
|
|
69515
69747
|
}
|
|
69516
69748
|
|
|
69517
69749
|
}
|
|
69750
|
+
|
|
69751
|
+
this.SetFrameButtomToolbar=function(style)
|
|
69752
|
+
{
|
|
69753
|
+
var dest=this.FrameButtomToolbar;
|
|
69754
|
+
|
|
69755
|
+
if (style.BGColor) dest.BGColor=style.BGColor;
|
|
69756
|
+
if (style.BorderColor) dest.BorderColor=style.BorderColor;
|
|
69757
|
+
if (style.Button)
|
|
69758
|
+
{
|
|
69759
|
+
var button=style.Button;
|
|
69760
|
+
if (button.BorderColor) dest.Button.BorderColor=button.BorderColor;
|
|
69761
|
+
|
|
69762
|
+
if (button.Font)
|
|
69763
|
+
{
|
|
69764
|
+
var item=button.Font;
|
|
69765
|
+
var destItem=this.FrameButtomToolbar.Button.Font;
|
|
69766
|
+
if (item.Family) destItem.Family=item.Family;
|
|
69767
|
+
if (IFrameSplitOperator.IsNumber(item.Size)) destItem.Size=item.Size;
|
|
69768
|
+
}
|
|
69769
|
+
|
|
69770
|
+
if (button.TitleColor)
|
|
69771
|
+
{
|
|
69772
|
+
var item=button.TitleColor;
|
|
69773
|
+
var destItem=this.FrameButtomToolbar.Button.TitleColor;
|
|
69774
|
+
if (item.Selected) destItem.Selected=item.Selected;
|
|
69775
|
+
if (item.Default) destItem.Default=item.Default;
|
|
69776
|
+
if (item.MoveOn) destItem.MoveOn=item.MoveOn;
|
|
69777
|
+
}
|
|
69778
|
+
|
|
69779
|
+
if (button.BGColor)
|
|
69780
|
+
{
|
|
69781
|
+
var item=button.BGColor;
|
|
69782
|
+
var destItem=this.FrameButtomToolbar.Button.BGColor;
|
|
69783
|
+
if (item.Selected) destItem.Selected=item.Selected;
|
|
69784
|
+
if (item.Default) destItem.Default=item.Default;
|
|
69785
|
+
if (item.MoveOn) destItem.MoveOn=item.MoveOn;
|
|
69786
|
+
}
|
|
69787
|
+
|
|
69788
|
+
if (button.Mergin)
|
|
69789
|
+
{
|
|
69790
|
+
var item=button.Mergin;
|
|
69791
|
+
var destItem=this.FrameButtomToolbar.Button.Mergin;
|
|
69792
|
+
if (IFrameSplitOperator.IsNumber(item.Left)) destItem.Left=item.Left;
|
|
69793
|
+
if (IFrameSplitOperator.IsNumber(item.Right)) destItem.Left=item.Right;
|
|
69794
|
+
if (IFrameSplitOperator.IsNumber(item.Top)) destItem.Top=item.Top;
|
|
69795
|
+
if (IFrameSplitOperator.IsNumber(item.Bottom)) destItem.Bottom=item.Bottom;
|
|
69796
|
+
}
|
|
69797
|
+
}
|
|
69798
|
+
|
|
69799
|
+
}
|
|
69800
|
+
|
|
69518
69801
|
}
|
|
69519
69802
|
|
|
69520
69803
|
var g_JSChartResource=new JSChartResource();
|
|
@@ -73887,6 +74170,8 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
73887
74170
|
if (option.Window) this.SetFrameToolbar(windowIndex,option.Window);
|
|
73888
74171
|
}
|
|
73889
74172
|
|
|
74173
|
+
this.OnChangeIndexEvent(windowIndex, { ID:indexData.ID, Name:indexData.Name, FunctionName:"ChangeScriptIndex" });
|
|
74174
|
+
|
|
73890
74175
|
this.Frame.ClearUpDonwFrameYData({ Index:windowIndex });
|
|
73891
74176
|
var bindData=this.ChartPaint[0].Data;
|
|
73892
74177
|
this.BindIndexData(windowIndex,bindData); //执行脚本
|
|
@@ -73930,6 +74215,8 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
73930
74215
|
var apiItem=indexData.API;
|
|
73931
74216
|
this.WindowIndex[windowIndex]=new APIScriptIndex(apiItem.Name,apiItem.Script,apiItem.Args,indexData);
|
|
73932
74217
|
|
|
74218
|
+
this.OnChangeIndexEvent(windowIndex, { ID:indexData.ID, Name:indexData.Name, FunctionName:"ChangeAPIIndex" });
|
|
74219
|
+
|
|
73933
74220
|
if (indexData)
|
|
73934
74221
|
{
|
|
73935
74222
|
if (indexData.Window) this.SetFrameToolbar(windowIndex,indexData.Window);
|
|
@@ -73944,6 +74231,16 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
73944
74231
|
this.Draw();
|
|
73945
74232
|
}
|
|
73946
74233
|
|
|
74234
|
+
this.OnChangeIndexEvent=function(windowIndex, indexInfo)
|
|
74235
|
+
{
|
|
74236
|
+
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CHANGE_INDEX);
|
|
74237
|
+
if (event && event.Callback)
|
|
74238
|
+
{
|
|
74239
|
+
var data={ IndexInfo:indexInfo, WindowIndex:windowIndex };
|
|
74240
|
+
event.Callback(event,data,this);
|
|
74241
|
+
}
|
|
74242
|
+
}
|
|
74243
|
+
|
|
73947
74244
|
//切换指标 指定切换窗口指标
|
|
73948
74245
|
this.ChangeIndex=function(windowIndex,indexName,option)
|
|
73949
74246
|
{
|
|
@@ -73966,7 +74263,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
73966
74263
|
if (windowIndex == 0) windowIndex = 1; //幅图指标,不能再主图显示
|
|
73967
74264
|
}
|
|
73968
74265
|
|
|
73969
|
-
JSIndexScript.ModifyAttribute(indexInfo, option)
|
|
74266
|
+
JSIndexScript.ModifyAttribute(indexInfo, option);
|
|
73970
74267
|
return this.ChangeScriptIndex(windowIndex, indexInfo, option);
|
|
73971
74268
|
}
|
|
73972
74269
|
|
|
@@ -115332,7 +115629,7 @@ function ScriptIndex(name,script,args,option)
|
|
|
115332
115629
|
if (varItem.Background) chartText.TextBG=varItem.Background;
|
|
115333
115630
|
|
|
115334
115631
|
//hqChart.TitlePaint[titleIndex].Data[id]=new DynamicTitleData(bar.Data,varItem.Name,bar.Color);
|
|
115335
|
-
|
|
115632
|
+
this.SetChartIndexName(chartText);
|
|
115336
115633
|
hqChart.ChartPaint.push(chartText);
|
|
115337
115634
|
}
|
|
115338
115635
|
|
|
@@ -115996,6 +116293,7 @@ function ScriptIndex(name,script,args,option)
|
|
|
115996
116293
|
|
|
115997
116294
|
//hqChart.TitlePaint[titleIndex].Data[id]=new DynamicTitleData(bar.Data,varItem.Name,bar.Color);
|
|
115998
116295
|
|
|
116296
|
+
this.SetChartIndexName(chartText);
|
|
115999
116297
|
hqChart.ChartPaint.push(chartText);
|
|
116000
116298
|
}
|
|
116001
116299
|
|
|
@@ -117385,6 +117683,7 @@ function OverlayScriptIndex(name,script,args,option)
|
|
|
117385
117683
|
var titlePaint=hqChart.TitlePaint[titleIndex];
|
|
117386
117684
|
titlePaint.OverlayIndex.get(overlayIndex.Identify).Data[id]=new DynamicTitleData(chart.Data,varItem.Name,chart.Color);
|
|
117387
117685
|
|
|
117686
|
+
this.SetChartIndexName(chart);
|
|
117388
117687
|
frame.ChartPaint.push(chart);
|
|
117389
117688
|
}
|
|
117390
117689
|
|
|
@@ -117603,7 +117902,7 @@ function OverlayScriptIndex(name,script,args,option)
|
|
|
117603
117902
|
chart.Text=varItem.Draw.DrawData.Text;
|
|
117604
117903
|
|
|
117605
117904
|
//hqChart.TitlePaint[titleIndex].Data[id]=new DynamicTitleData(bar.Data,varItem.Name,bar.Color);
|
|
117606
|
-
|
|
117905
|
+
this.SetChartIndexName(chart);
|
|
117607
117906
|
frame.ChartPaint.push(chart);
|
|
117608
117907
|
}
|
|
117609
117908
|
|
|
@@ -121471,6 +121770,19 @@ function GetBlackStyle()
|
|
|
121471
121770
|
AreaColor:"rgba(24,28,42,0.5)",
|
|
121472
121771
|
},
|
|
121473
121772
|
},
|
|
121773
|
+
|
|
121774
|
+
FrameButtomToolbar:
|
|
121775
|
+
{
|
|
121776
|
+
BGColor:"rgb(25,25,25)",
|
|
121777
|
+
BorderColor:"rgb(60,60,60)",
|
|
121778
|
+
Button:
|
|
121779
|
+
{
|
|
121780
|
+
Font:{ Family:"微软雅黑" },
|
|
121781
|
+
TitleColor: { Selected:"rgb(255,255,255)", Default:"rgb(140,140,140)", MoveOn:"rgb(255,255,255)" },
|
|
121782
|
+
BGColor: { Selected:"rgb(234,85,4)", Default:"rgb(25,25,25)", MoveOn:"rgb(59,59,59)" },
|
|
121783
|
+
BorderColor:"rgb(60,60,60)",
|
|
121784
|
+
}
|
|
121785
|
+
}
|
|
121474
121786
|
|
|
121475
121787
|
};
|
|
121476
121788
|
|
|
@@ -134758,7 +135070,7 @@ function HQChartScriptWorker()
|
|
|
134758
135070
|
|
|
134759
135071
|
|
|
134760
135072
|
|
|
134761
|
-
var HQCHART_VERSION="1.1.
|
|
135073
|
+
var HQCHART_VERSION="1.1.13170";
|
|
134762
135074
|
|
|
134763
135075
|
function PrintHQChartVersion()
|
|
134764
135076
|
{
|