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
|
@@ -201,7 +201,7 @@ JSIndexScript.ModifyAttribute=function(indexInfo, attribute)
|
|
|
201
201
|
if (IFrameSplitOperator.IsNumber(item.FloatPrecision)) indexInfo.YAxis.FloatPrecision=item.FloatPrecision;
|
|
202
202
|
if (IFrameSplitOperator.IsNumber(item.StringFormat)) indexInfo.YAxis.StringFormat=item.StringFormat;
|
|
203
203
|
if (IFrameSplitOperator.IsBool(item.EnableRemoveZero)) indexInfo.YAxis.EnableRemoveZero=item.EnableRemoveZero;
|
|
204
|
-
if (IFrameSplitOperator.IsBool(item.ExcludeValue)) indexInfo.YAxis.ExcludeValue=
|
|
204
|
+
if (IFrameSplitOperator.IsBool(item.ExcludeValue)) indexInfo.YAxis.ExcludeValue=item.ExcludeValue; //不参数Y轴的计算
|
|
205
205
|
}
|
|
206
206
|
}
|
|
207
207
|
|
|
@@ -6386,6 +6386,9 @@ var JSCHART_EVENT_ID=
|
|
|
6386
6386
|
ON_RCLICK_TREPORT_HEADER:125, //右键点击T型报价表头
|
|
6387
6387
|
ON_TREPORT_LOCAL_SORT:126, //T型报价列表本地排序
|
|
6388
6388
|
ON_CLICK_TREPORT_ROW:127, //左键点击点击T型报价列表
|
|
6389
|
+
|
|
6390
|
+
|
|
6391
|
+
ON_CHANGE_INDEX:150, //切换指标
|
|
6389
6392
|
}
|
|
6390
6393
|
|
|
6391
6394
|
var JSCHART_OPERATOR_ID=
|
|
@@ -9124,10 +9127,13 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9124
9127
|
var item=this.ChartDrawPicture[i];
|
|
9125
9128
|
if (item.IsDrawFirst) continue;
|
|
9126
9129
|
if (item.IsDrawMain && item.IsDrawMain()) continue;
|
|
9130
|
+
if (this.SelectChartDrawPicture && this.SelectChartDrawPicture.Guid==item.Guid) continue; //当前选中在最后画
|
|
9127
9131
|
|
|
9128
9132
|
item.Draw();
|
|
9129
9133
|
}
|
|
9130
9134
|
|
|
9135
|
+
if (this.SelectChartDrawPicture) this.SelectChartDrawPicture.Draw();
|
|
9136
|
+
|
|
9131
9137
|
if (this.CurrentChartDrawPicture && this.CurrentChartDrawPicture.Status!=10)
|
|
9132
9138
|
{
|
|
9133
9139
|
this.CurrentChartDrawPicture.Draw();
|
|
@@ -9550,7 +9556,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9550
9556
|
if (option.Point) item.LatestPoint=option.Point;
|
|
9551
9557
|
}
|
|
9552
9558
|
|
|
9553
|
-
if (item.IsDynamic && item.DrawAfterTitle===true) item.Draw();
|
|
9559
|
+
if (item.IsDynamic && item.DrawAfterTitle===true) item.Draw(moveonPoint, this.LastMouseStatus);
|
|
9554
9560
|
}
|
|
9555
9561
|
|
|
9556
9562
|
if (this.EnableAnimation)
|
|
@@ -9567,10 +9573,16 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9567
9573
|
var item=this.ChartDrawPicture[i];
|
|
9568
9574
|
if (item.IsDrawFirst) continue;
|
|
9569
9575
|
if (item.IsDrawMain && item.IsDrawMain()) continue;
|
|
9576
|
+
if (this.SelectChartDrawPicture &&item.Guid==this.SelectChartDrawPicture.Guid) continue; //选中画图最后画 确保显示在最外面
|
|
9570
9577
|
|
|
9571
9578
|
item.Draw(moveonPoint, this.LastMouseStatus);
|
|
9572
9579
|
}
|
|
9573
9580
|
|
|
9581
|
+
if (this.SelectChartDrawPicture)
|
|
9582
|
+
{
|
|
9583
|
+
this.SelectChartDrawPicture.Draw(moveonPoint, this.LastMouseStatus);
|
|
9584
|
+
}
|
|
9585
|
+
|
|
9574
9586
|
if (this.CurrentChartDrawPicture && this.CurrentChartDrawPicture.Status!=10)
|
|
9575
9587
|
{
|
|
9576
9588
|
this.CurrentChartDrawPicture.Draw();
|
|
@@ -43337,7 +43349,8 @@ function ExtendChartPaintFactory()
|
|
|
43337
43349
|
["FrameSplitPaint", { Create:function() { return new FrameSplitPaint(); } }],
|
|
43338
43350
|
["RectSelectPaint", { Create:function() { return new RectSelectPaint(); } }],
|
|
43339
43351
|
["DragMovePaint", { Create:function() { return new DragMovePaint(); } }],
|
|
43340
|
-
["SessionBreaksPaint", { Create:function() { return new SessionBreaksPaint(); }}]
|
|
43352
|
+
["SessionBreaksPaint", { Create:function() { return new SessionBreaksPaint(); }}],
|
|
43353
|
+
["FrameButtomToolbarPaint", {Create:function() { return new FrameButtomToolbarPaint(); }}]
|
|
43341
43354
|
]
|
|
43342
43355
|
);
|
|
43343
43356
|
|
|
@@ -47854,6 +47867,207 @@ function SessionBreaksPaint()
|
|
|
47854
47867
|
}
|
|
47855
47868
|
}
|
|
47856
47869
|
|
|
47870
|
+
//窗口底部工具栏
|
|
47871
|
+
function FrameButtomToolbarPaint()
|
|
47872
|
+
{
|
|
47873
|
+
this.newMethod=IExtendChartPainting; //派生
|
|
47874
|
+
this.newMethod();
|
|
47875
|
+
delete this.newMethod;
|
|
47876
|
+
|
|
47877
|
+
this.ClassName='FrameButtomToolbarPaint';
|
|
47878
|
+
this.FrameID=-1;
|
|
47879
|
+
this.FrameGuid=null;
|
|
47880
|
+
this.IsDynamic=true;
|
|
47881
|
+
this.DrawAfterTitle=true;
|
|
47882
|
+
|
|
47883
|
+
this.AryButton=[]; // { Title:, ID:, Data:数据, TooltipText:提示信息 }
|
|
47884
|
+
this.SelectedID=null; // 选中按钮ID
|
|
47885
|
+
this.AryRectButton=[];
|
|
47886
|
+
|
|
47887
|
+
this.BGColor=g_JSChartResource.FrameButtomToolbar.BGColor;
|
|
47888
|
+
this.BorderColor=g_JSChartResource.FrameButtomToolbar.BorderColor;
|
|
47889
|
+
this.ButtonConfig=CloneData(g_JSChartResource.FrameButtomToolbar.Button);
|
|
47890
|
+
/*
|
|
47891
|
+
{
|
|
47892
|
+
Font:{ Family:"微软雅黑" },
|
|
47893
|
+
TitleColor:
|
|
47894
|
+
{
|
|
47895
|
+
Selected:"rgb(255,255,255)", Default:"rgb(140,140,140)", MoveOn:"rgb(255,255,255)"
|
|
47896
|
+
},
|
|
47897
|
+
BGColor: { Selected:"rgb(234,85,4)", Default:"rgb(25,25,25)", MoveOn:"rgb(59,59,59)" },
|
|
47898
|
+
BorderColor:"rgb(60,60,60)",
|
|
47899
|
+
|
|
47900
|
+
Mergin: { Left:5*GetDevicePixelRatio(), Right:5*GetDevicePixelRatio(), Top:4*GetDevicePixelRatio(), Bottom:2*GetDevicePixelRatio() }
|
|
47901
|
+
};
|
|
47902
|
+
*/
|
|
47903
|
+
|
|
47904
|
+
/*
|
|
47905
|
+
this.AryButton=
|
|
47906
|
+
[
|
|
47907
|
+
{ Title:"MACD", ID:"A", TooltipText:"切换MACD指标", Data:{ IndexID:"MACD"}},
|
|
47908
|
+
{ Title:"RSI", ID:"A1", TooltipText:"切换RSI指标", Data:{ IndexID:"RSI"} },
|
|
47909
|
+
{ Title:"大狗棍法", ID:"B1" },
|
|
47910
|
+
{ Title:"降龙掌", ID:"B3"}
|
|
47911
|
+
];
|
|
47912
|
+
this.SelectedID="A1"
|
|
47913
|
+
*/
|
|
47914
|
+
|
|
47915
|
+
this.ReloadResource=function(resource)
|
|
47916
|
+
{
|
|
47917
|
+
this.BGColor=g_JSChartResource.FrameButtomToolbar.BGColor;
|
|
47918
|
+
this.BorderColor=g_JSChartResource.FrameButtomToolbar.BorderColor;
|
|
47919
|
+
|
|
47920
|
+
this.ButtonConfig=CloneData(g_JSChartResource.FrameButtomToolbar.Button);
|
|
47921
|
+
}
|
|
47922
|
+
|
|
47923
|
+
this.SetOption=function(option)
|
|
47924
|
+
{
|
|
47925
|
+
if (option)
|
|
47926
|
+
{
|
|
47927
|
+
if (IFrameSplitOperator.IsNumber(option.FrameID)) this.FrameID=option.FrameID;
|
|
47928
|
+
if (option.FrameGuid) this.FrameGuid=option.FrameGuid;
|
|
47929
|
+
if (IFrameSplitOperator.IsNonEmptyArray(option.AryButton)) this.AryButton=option.AryButton.slice();
|
|
47930
|
+
if (option.SelectedID) this.SelectedID=option.SelectedID;
|
|
47931
|
+
}
|
|
47932
|
+
}
|
|
47933
|
+
|
|
47934
|
+
//设置当前选中的菜单ID
|
|
47935
|
+
this.SetSelectedID=function(id)
|
|
47936
|
+
{
|
|
47937
|
+
this.SelectedID=id;
|
|
47938
|
+
}
|
|
47939
|
+
|
|
47940
|
+
this.Draw=function(moveonPoint, mouseStatus)
|
|
47941
|
+
{
|
|
47942
|
+
this.AryRectButton=[];
|
|
47943
|
+
|
|
47944
|
+
var frame=this.GetFrame();
|
|
47945
|
+
if (!frame) return;
|
|
47946
|
+
if (frame.IsHScreen) return; //不支持横屏
|
|
47947
|
+
if (frame.IsMinSize) return;
|
|
47948
|
+
if (frame.ChartBorder.IsShowTitleOnly) return;
|
|
47949
|
+
|
|
47950
|
+
var border=frame.ChartBorder.GetBorder();
|
|
47951
|
+
var rtBG={ Left:border.Left+1, Right:border.Right-1, Top:border.BottomEx+1, Bottom:border.Bottom-1 };
|
|
47952
|
+
rtBG.Width=rtBG.Right-rtBG.Left;
|
|
47953
|
+
rtBG.Height=rtBG.Bottom-rtBG.Top;
|
|
47954
|
+
if (rtBG.Height<10) return;
|
|
47955
|
+
|
|
47956
|
+
if (this.BGColor)
|
|
47957
|
+
{
|
|
47958
|
+
this.Canvas.fillStyle=this.BGColor;
|
|
47959
|
+
this.Canvas.fillRect(rtBG.Left,rtBG.Top,rtBG.Width,rtBG.Height);
|
|
47960
|
+
}
|
|
47961
|
+
|
|
47962
|
+
var font=this.TitleFont(rtBG.Height-this.ButtonConfig.Mergin.Top-this.ButtonConfig.Mergin.Bottom);
|
|
47963
|
+
this.Canvas.textBaseline='middle';
|
|
47964
|
+
this.Canvas.textAlign='center';
|
|
47965
|
+
this.Canvas.font=font;
|
|
47966
|
+
var xBotton=rtBG.Left;
|
|
47967
|
+
for(var i=0;i<this.AryButton.length;++i)
|
|
47968
|
+
{
|
|
47969
|
+
var item=this.AryButton[i];
|
|
47970
|
+
if (!item.Title) return;
|
|
47971
|
+
var textWidth=this.Canvas.measureText(item.Title).width+2;
|
|
47972
|
+
var buttonWidth=textWidth+this.ButtonConfig.Mergin.Left+this.ButtonConfig.Mergin.Right;
|
|
47973
|
+
var rtButton={ Left:xBotton, Top:rtBG.Top, Bottom:rtBG.Bottom, Height:rtBG.Height, Width:buttonWidth };
|
|
47974
|
+
rtButton.Right=rtButton.Left+rtButton.Width;
|
|
47975
|
+
|
|
47976
|
+
//鼠标是否在按钮上
|
|
47977
|
+
var bgColor=this.ButtonConfig.BGColor.Default;
|
|
47978
|
+
var titleColor=this.ButtonConfig.TitleColor.Default;
|
|
47979
|
+
if (moveonPoint && (moveonPoint.X>=rtButton.Left && moveonPoint.X<rtButton.Right && moveonPoint.Y>=rtButton.Top && moveonPoint.Y<=rtButton.Bottom))
|
|
47980
|
+
{
|
|
47981
|
+
bgColor=this.ButtonConfig.BGColor.MoveOn;
|
|
47982
|
+
titleColor=this.ButtonConfig.TitleColor.MoveOn;
|
|
47983
|
+
if (mouseStatus)
|
|
47984
|
+
mouseStatus.MouseOnToolbar={ Rect:rtButton, Item:item, Frame:frame, Point:{X:moveonPoint.X, Y:moveonPoint.Y}, ID:"TitleButton" };
|
|
47985
|
+
}
|
|
47986
|
+
|
|
47987
|
+
if (this.SelectedID && this.SelectedID==item.ID)
|
|
47988
|
+
{
|
|
47989
|
+
bgColor=this.ButtonConfig.BGColor.Selected;
|
|
47990
|
+
titleColor=this.ButtonConfig.TitleColor.Selected;
|
|
47991
|
+
}
|
|
47992
|
+
|
|
47993
|
+
|
|
47994
|
+
if (bgColor)
|
|
47995
|
+
{
|
|
47996
|
+
this.Canvas.fillStyle=bgColor;
|
|
47997
|
+
this.Canvas.fillRect(rtButton.Left,rtButton.Top,rtButton.Width,rtButton.Height);
|
|
47998
|
+
}
|
|
47999
|
+
|
|
48000
|
+
if (this.ButtonConfig.BorderColor)
|
|
48001
|
+
{
|
|
48002
|
+
this.Canvas.strokeStyle=this.ButtonConfig.BorderColor;
|
|
48003
|
+
this.Canvas.beginPath();
|
|
48004
|
+
this.Canvas.moveTo(ToFixedPoint(rtButton.Right),rtButton.Top);
|
|
48005
|
+
this.Canvas.lineTo(ToFixedPoint(rtButton.Right),rtButton.Bottom);
|
|
48006
|
+
this.Canvas.stroke();
|
|
48007
|
+
}
|
|
48008
|
+
|
|
48009
|
+
this.Canvas.fillStyle=titleColor;
|
|
48010
|
+
var xText=rtButton.Left+rtButton.Width/2; //居中
|
|
48011
|
+
var yText=rtButton.Top+this.ButtonConfig.Mergin.Top+(rtButton.Height-this.ButtonConfig.Mergin.Top-this.ButtonConfig.Mergin.Bottom)/2;
|
|
48012
|
+
this.Canvas.fillText(item.Title,xText,yText);
|
|
48013
|
+
|
|
48014
|
+
this.AryRectButton.push({ Rect:rtButton, ID:item.ID, Data:item });
|
|
48015
|
+
|
|
48016
|
+
xBotton+=buttonWidth+1;
|
|
48017
|
+
}
|
|
48018
|
+
|
|
48019
|
+
if (this.BorderColor)
|
|
48020
|
+
{
|
|
48021
|
+
this.Canvas.strokeStyle=this.BorderColor;
|
|
48022
|
+
this.Canvas.beginPath();
|
|
48023
|
+
this.Canvas.moveTo(border.Left,ToFixedPoint(border.BottomEx));
|
|
48024
|
+
this.Canvas.lineTo(border.Right,ToFixedPoint(border.BottomEx));
|
|
48025
|
+
this.Canvas.stroke();
|
|
48026
|
+
}
|
|
48027
|
+
}
|
|
48028
|
+
|
|
48029
|
+
this.GetFrame=function()
|
|
48030
|
+
{
|
|
48031
|
+
if (!this.ChartFrame) return null;
|
|
48032
|
+
if (this.FrameID>=0)
|
|
48033
|
+
{
|
|
48034
|
+
var subFrame=this.ChartFrame.SubFrame[this.FrameID];
|
|
48035
|
+
if (!subFrame || !subFrame.Frame) return null;
|
|
48036
|
+
|
|
48037
|
+
return subFrame.Frame;
|
|
48038
|
+
}
|
|
48039
|
+
|
|
48040
|
+
return null;
|
|
48041
|
+
}
|
|
48042
|
+
|
|
48043
|
+
this.TitleFont=function(height)
|
|
48044
|
+
{
|
|
48045
|
+
var config=this.ButtonConfig.Font;
|
|
48046
|
+
var fontSize=height;
|
|
48047
|
+
if (IFrameSplitOperator.IsPlusNumber(config.Size)) fontSize=config.Size;
|
|
48048
|
+
|
|
48049
|
+
var font=`${fontSize*GetDevicePixelRatio()}px ${config.Family}`;
|
|
48050
|
+
return font;
|
|
48051
|
+
}
|
|
48052
|
+
|
|
48053
|
+
this.PtInButtons=function(x,y)
|
|
48054
|
+
{
|
|
48055
|
+
for(var i=0;i<this.AryRectButton.length;++i)
|
|
48056
|
+
{
|
|
48057
|
+
var item=this.AryRectButton[i];
|
|
48058
|
+
var rect=item.Rect;
|
|
48059
|
+
if (x>rect.Left && x<rect.Right && y>rect.Top && y<rect.Bottom)
|
|
48060
|
+
{
|
|
48061
|
+
var frame=this.GetFrame();
|
|
48062
|
+
var result={ ID:item.Data.ID, Rect:rect, FrameID:this.FrameID, Frame:frame, Data:item.Data };
|
|
48063
|
+
return result;
|
|
48064
|
+
}
|
|
48065
|
+
}
|
|
48066
|
+
|
|
48067
|
+
return null;
|
|
48068
|
+
}
|
|
48069
|
+
}
|
|
48070
|
+
|
|
47857
48071
|
|
|
47858
48072
|
|
|
47859
48073
|
//弹幕数据 { X:X偏移, Y:Y偏移, Text:内容, Color:颜色 }
|
|
@@ -68506,6 +68720,21 @@ function JSChartResource()
|
|
|
68506
68720
|
}
|
|
68507
68721
|
},
|
|
68508
68722
|
|
|
68723
|
+
this.FrameButtomToolbar=
|
|
68724
|
+
{
|
|
68725
|
+
BGColor:"rgb(235,235,235)",
|
|
68726
|
+
BorderColor:"rgb(204,204,204)",
|
|
68727
|
+
Button:
|
|
68728
|
+
{
|
|
68729
|
+
Font:{ Family:"微软雅黑" },
|
|
68730
|
+
TitleColor: { Selected:"rgb(255,255,255)", Default:"rgb(125,125,125)", MoveOn:"rgb(234,85,4)" },
|
|
68731
|
+
BGColor: { Selected:"rgb(234,85,4)", Default:"rgb(235,235,235)", MoveOn:"rgb(242,242,242)" },
|
|
68732
|
+
BorderColor:"rgb(204,204,204)",
|
|
68733
|
+
|
|
68734
|
+
Mergin: { Left:5*GetDevicePixelRatio(), Right:5*GetDevicePixelRatio(), Top:4*GetDevicePixelRatio(), Bottom:2*GetDevicePixelRatio() }
|
|
68735
|
+
}
|
|
68736
|
+
}
|
|
68737
|
+
|
|
68509
68738
|
|
|
68510
68739
|
//自定义风格
|
|
68511
68740
|
this.SetStyle=function(style)
|
|
@@ -69161,6 +69390,9 @@ function JSChartResource()
|
|
|
69161
69390
|
}
|
|
69162
69391
|
|
|
69163
69392
|
}
|
|
69393
|
+
|
|
69394
|
+
if (style.FrameButtomToolbar)
|
|
69395
|
+
this.SetFrameButtomToolbar(style.FrameButtomToolbar);
|
|
69164
69396
|
}
|
|
69165
69397
|
|
|
69166
69398
|
this.SetReportStyle=function(style)
|
|
@@ -69471,6 +69703,57 @@ function JSChartResource()
|
|
|
69471
69703
|
}
|
|
69472
69704
|
|
|
69473
69705
|
}
|
|
69706
|
+
|
|
69707
|
+
this.SetFrameButtomToolbar=function(style)
|
|
69708
|
+
{
|
|
69709
|
+
var dest=this.FrameButtomToolbar;
|
|
69710
|
+
|
|
69711
|
+
if (style.BGColor) dest.BGColor=style.BGColor;
|
|
69712
|
+
if (style.BorderColor) dest.BorderColor=style.BorderColor;
|
|
69713
|
+
if (style.Button)
|
|
69714
|
+
{
|
|
69715
|
+
var button=style.Button;
|
|
69716
|
+
if (button.BorderColor) dest.Button.BorderColor=button.BorderColor;
|
|
69717
|
+
|
|
69718
|
+
if (button.Font)
|
|
69719
|
+
{
|
|
69720
|
+
var item=button.Font;
|
|
69721
|
+
var destItem=this.FrameButtomToolbar.Button.Font;
|
|
69722
|
+
if (item.Family) destItem.Family=item.Family;
|
|
69723
|
+
if (IFrameSplitOperator.IsNumber(item.Size)) destItem.Size=item.Size;
|
|
69724
|
+
}
|
|
69725
|
+
|
|
69726
|
+
if (button.TitleColor)
|
|
69727
|
+
{
|
|
69728
|
+
var item=button.TitleColor;
|
|
69729
|
+
var destItem=this.FrameButtomToolbar.Button.TitleColor;
|
|
69730
|
+
if (item.Selected) destItem.Selected=item.Selected;
|
|
69731
|
+
if (item.Default) destItem.Default=item.Default;
|
|
69732
|
+
if (item.MoveOn) destItem.MoveOn=item.MoveOn;
|
|
69733
|
+
}
|
|
69734
|
+
|
|
69735
|
+
if (button.BGColor)
|
|
69736
|
+
{
|
|
69737
|
+
var item=button.BGColor;
|
|
69738
|
+
var destItem=this.FrameButtomToolbar.Button.BGColor;
|
|
69739
|
+
if (item.Selected) destItem.Selected=item.Selected;
|
|
69740
|
+
if (item.Default) destItem.Default=item.Default;
|
|
69741
|
+
if (item.MoveOn) destItem.MoveOn=item.MoveOn;
|
|
69742
|
+
}
|
|
69743
|
+
|
|
69744
|
+
if (button.Mergin)
|
|
69745
|
+
{
|
|
69746
|
+
var item=button.Mergin;
|
|
69747
|
+
var destItem=this.FrameButtomToolbar.Button.Mergin;
|
|
69748
|
+
if (IFrameSplitOperator.IsNumber(item.Left)) destItem.Left=item.Left;
|
|
69749
|
+
if (IFrameSplitOperator.IsNumber(item.Right)) destItem.Left=item.Right;
|
|
69750
|
+
if (IFrameSplitOperator.IsNumber(item.Top)) destItem.Top=item.Top;
|
|
69751
|
+
if (IFrameSplitOperator.IsNumber(item.Bottom)) destItem.Bottom=item.Bottom;
|
|
69752
|
+
}
|
|
69753
|
+
}
|
|
69754
|
+
|
|
69755
|
+
}
|
|
69756
|
+
|
|
69474
69757
|
}
|
|
69475
69758
|
|
|
69476
69759
|
var g_JSChartResource=new JSChartResource();
|
|
@@ -73843,6 +74126,8 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
73843
74126
|
if (option.Window) this.SetFrameToolbar(windowIndex,option.Window);
|
|
73844
74127
|
}
|
|
73845
74128
|
|
|
74129
|
+
this.OnChangeIndexEvent(windowIndex, { ID:indexData.ID, Name:indexData.Name, FunctionName:"ChangeScriptIndex" });
|
|
74130
|
+
|
|
73846
74131
|
this.Frame.ClearUpDonwFrameYData({ Index:windowIndex });
|
|
73847
74132
|
var bindData=this.ChartPaint[0].Data;
|
|
73848
74133
|
this.BindIndexData(windowIndex,bindData); //执行脚本
|
|
@@ -73886,6 +74171,8 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
73886
74171
|
var apiItem=indexData.API;
|
|
73887
74172
|
this.WindowIndex[windowIndex]=new APIScriptIndex(apiItem.Name,apiItem.Script,apiItem.Args,indexData);
|
|
73888
74173
|
|
|
74174
|
+
this.OnChangeIndexEvent(windowIndex, { ID:indexData.ID, Name:indexData.Name, FunctionName:"ChangeAPIIndex" });
|
|
74175
|
+
|
|
73889
74176
|
if (indexData)
|
|
73890
74177
|
{
|
|
73891
74178
|
if (indexData.Window) this.SetFrameToolbar(windowIndex,indexData.Window);
|
|
@@ -73900,6 +74187,16 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
73900
74187
|
this.Draw();
|
|
73901
74188
|
}
|
|
73902
74189
|
|
|
74190
|
+
this.OnChangeIndexEvent=function(windowIndex, indexInfo)
|
|
74191
|
+
{
|
|
74192
|
+
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CHANGE_INDEX);
|
|
74193
|
+
if (event && event.Callback)
|
|
74194
|
+
{
|
|
74195
|
+
var data={ IndexInfo:indexInfo, WindowIndex:windowIndex };
|
|
74196
|
+
event.Callback(event,data,this);
|
|
74197
|
+
}
|
|
74198
|
+
}
|
|
74199
|
+
|
|
73903
74200
|
//切换指标 指定切换窗口指标
|
|
73904
74201
|
this.ChangeIndex=function(windowIndex,indexName,option)
|
|
73905
74202
|
{
|
|
@@ -73922,7 +74219,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
73922
74219
|
if (windowIndex == 0) windowIndex = 1; //幅图指标,不能再主图显示
|
|
73923
74220
|
}
|
|
73924
74221
|
|
|
73925
|
-
JSIndexScript.ModifyAttribute(indexInfo, option)
|
|
74222
|
+
JSIndexScript.ModifyAttribute(indexInfo, option);
|
|
73926
74223
|
return this.ChangeScriptIndex(windowIndex, indexInfo, option);
|
|
73927
74224
|
}
|
|
73928
74225
|
|
|
@@ -115288,7 +115585,7 @@ function ScriptIndex(name,script,args,option)
|
|
|
115288
115585
|
if (varItem.Background) chartText.TextBG=varItem.Background;
|
|
115289
115586
|
|
|
115290
115587
|
//hqChart.TitlePaint[titleIndex].Data[id]=new DynamicTitleData(bar.Data,varItem.Name,bar.Color);
|
|
115291
|
-
|
|
115588
|
+
this.SetChartIndexName(chartText);
|
|
115292
115589
|
hqChart.ChartPaint.push(chartText);
|
|
115293
115590
|
}
|
|
115294
115591
|
|
|
@@ -115952,6 +116249,7 @@ function ScriptIndex(name,script,args,option)
|
|
|
115952
116249
|
|
|
115953
116250
|
//hqChart.TitlePaint[titleIndex].Data[id]=new DynamicTitleData(bar.Data,varItem.Name,bar.Color);
|
|
115954
116251
|
|
|
116252
|
+
this.SetChartIndexName(chartText);
|
|
115955
116253
|
hqChart.ChartPaint.push(chartText);
|
|
115956
116254
|
}
|
|
115957
116255
|
|
|
@@ -117341,6 +117639,7 @@ function OverlayScriptIndex(name,script,args,option)
|
|
|
117341
117639
|
var titlePaint=hqChart.TitlePaint[titleIndex];
|
|
117342
117640
|
titlePaint.OverlayIndex.get(overlayIndex.Identify).Data[id]=new DynamicTitleData(chart.Data,varItem.Name,chart.Color);
|
|
117343
117641
|
|
|
117642
|
+
this.SetChartIndexName(chart);
|
|
117344
117643
|
frame.ChartPaint.push(chart);
|
|
117345
117644
|
}
|
|
117346
117645
|
|
|
@@ -117559,7 +117858,7 @@ function OverlayScriptIndex(name,script,args,option)
|
|
|
117559
117858
|
chart.Text=varItem.Draw.DrawData.Text;
|
|
117560
117859
|
|
|
117561
117860
|
//hqChart.TitlePaint[titleIndex].Data[id]=new DynamicTitleData(bar.Data,varItem.Name,bar.Color);
|
|
117562
|
-
|
|
117861
|
+
this.SetChartIndexName(chart);
|
|
117563
117862
|
frame.ChartPaint.push(chart);
|
|
117564
117863
|
}
|
|
117565
117864
|
|
|
@@ -121427,6 +121726,19 @@ function GetBlackStyle()
|
|
|
121427
121726
|
AreaColor:"rgba(24,28,42,0.5)",
|
|
121428
121727
|
},
|
|
121429
121728
|
},
|
|
121729
|
+
|
|
121730
|
+
FrameButtomToolbar:
|
|
121731
|
+
{
|
|
121732
|
+
BGColor:"rgb(25,25,25)",
|
|
121733
|
+
BorderColor:"rgb(60,60,60)",
|
|
121734
|
+
Button:
|
|
121735
|
+
{
|
|
121736
|
+
Font:{ Family:"微软雅黑" },
|
|
121737
|
+
TitleColor: { Selected:"rgb(255,255,255)", Default:"rgb(140,140,140)", MoveOn:"rgb(255,255,255)" },
|
|
121738
|
+
BGColor: { Selected:"rgb(234,85,4)", Default:"rgb(25,25,25)", MoveOn:"rgb(59,59,59)" },
|
|
121739
|
+
BorderColor:"rgb(60,60,60)",
|
|
121740
|
+
}
|
|
121741
|
+
}
|
|
121430
121742
|
|
|
121431
121743
|
};
|
|
121432
121744
|
|
|
@@ -132194,7 +132506,7 @@ function ScrollBarBGChart()
|
|
|
132194
132506
|
|
|
132195
132507
|
|
|
132196
132508
|
|
|
132197
|
-
var HQCHART_VERSION="1.1.
|
|
132509
|
+
var HQCHART_VERSION="1.1.13170";
|
|
132198
132510
|
|
|
132199
132511
|
function PrintHQChartVersion()
|
|
132200
132512
|
{
|