hqchart 1.1.14363 → 1.1.14370
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 +34 -24
- package/package.json +1 -1
- package/src/jscommon/umychart.DialogTooltip.js +2 -2
- package/src/jscommon/umychart.NetworkFilterTest.js +48 -0
- package/src/jscommon/umychart.complier.js +76 -2
- package/src/jscommon/umychart.js +235 -22
- package/src/jscommon/umychart.style.js +5 -0
- package/src/jscommon/umychart.testdata.js +48 -0
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +317 -25
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.NetworkFilterTest.vue.js +48 -0
- package/src/jscommon/umychart.vue/umychart.vue.js +319 -27
|
@@ -8512,11 +8512,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
8512
8512
|
var y=(e.clientY-uielement.getBoundingClientRect().top)*pixelTatio;
|
|
8513
8513
|
var data= { X:e.clientX, Y:e.clientY, FrameID:-1 };
|
|
8514
8514
|
|
|
8515
|
-
var
|
|
8516
|
-
|
|
8517
|
-
this.Canvas.rect(this.Frame.ChartBorder.GetLeft(),this.Frame.ChartBorder.GetTop(),this.Frame.ChartBorder.GetWidth(),this.Frame.ChartBorder.GetHeight());
|
|
8518
|
-
isInClient=this.Canvas.isPointInPath(x,y);
|
|
8519
|
-
if (isInClient)
|
|
8515
|
+
var clientPos=this.PtInClient(x,y);
|
|
8516
|
+
if (clientPos>0)
|
|
8520
8517
|
{
|
|
8521
8518
|
var yValueExtend={};
|
|
8522
8519
|
var yValue=this.Frame.GetYData(y,yValueExtend);
|
|
@@ -35798,10 +35795,11 @@ function ChartSimplePie()
|
|
|
35798
35795
|
this.RectClient.Left-=xOffset;
|
|
35799
35796
|
this.RectClient.Right-=xOffset;
|
|
35800
35797
|
|
|
35801
|
-
|
|
35798
|
+
var pixelRatio=GetDevicePixelRatio();
|
|
35799
|
+
var radius=this.Radius*pixelRatio;
|
|
35802
35800
|
var start=0, end=0;
|
|
35803
|
-
var x=this.RectClient.Left+
|
|
35804
|
-
var y=this.RectClient.Top+
|
|
35801
|
+
var x=this.RectClient.Left+radius;
|
|
35802
|
+
var y=this.RectClient.Top+radius;
|
|
35805
35803
|
|
|
35806
35804
|
for(var i=0;i<this.Data.Data.length;++i)
|
|
35807
35805
|
{
|
|
@@ -35817,7 +35815,7 @@ function ChartSimplePie()
|
|
|
35817
35815
|
end += rate*2*Math.PI;//终止角度
|
|
35818
35816
|
this.Canvas.strokeStyle = this.BorderColor;
|
|
35819
35817
|
this.Canvas.fillStyle = item.Color;
|
|
35820
|
-
this.Canvas.arc(x,y,
|
|
35818
|
+
this.Canvas.arc(x,y,radius,start,end);
|
|
35821
35819
|
this.Canvas.fill();
|
|
35822
35820
|
this.Canvas.closePath();
|
|
35823
35821
|
this.Canvas.stroke();
|
|
@@ -35825,10 +35823,181 @@ function ChartSimplePie()
|
|
|
35825
35823
|
if (item.Text)
|
|
35826
35824
|
{
|
|
35827
35825
|
// 绘制直线
|
|
35828
|
-
var xLine=
|
|
35829
|
-
var yLine=
|
|
35830
|
-
var xEnd = (
|
|
35831
|
-
var yEnd = (
|
|
35826
|
+
var xLine=radius*Math.cos(end- (end-start)/2)+x;
|
|
35827
|
+
var yLine=radius*Math.sin(end - (end-start)/2)+y;
|
|
35828
|
+
var xEnd = (radius + this.LineExtendWidth)*Math.cos(end- (end-start)/2)+x;
|
|
35829
|
+
var yEnd = (radius + this.LineExtendWidth)*Math.sin(end - (end-start)/2)+y;
|
|
35830
|
+
|
|
35831
|
+
this.Canvas.beginPath();
|
|
35832
|
+
if (item.LineColor) this.Canvas.strokeStyle =item.LineColor;
|
|
35833
|
+
else this.Canvas.strokeStyle = item.Color;
|
|
35834
|
+
this.Canvas.moveTo(xLine,yLine);
|
|
35835
|
+
this.Canvas.lineTo(xEnd,yEnd);
|
|
35836
|
+
|
|
35837
|
+
var textWidth=aryText[i].Width;
|
|
35838
|
+
var yText=xEnd;
|
|
35839
|
+
if( end - (end-start)/2 < 1.5*Math.PI && end - (end-start)/2 > 0.5*Math.PI )
|
|
35840
|
+
{
|
|
35841
|
+
this.Canvas.lineTo( xEnd - textWidth, yEnd );
|
|
35842
|
+
yText=xEnd - textWidth;
|
|
35843
|
+
}
|
|
35844
|
+
else
|
|
35845
|
+
{
|
|
35846
|
+
this.Canvas.lineTo( xEnd + textWidth, yEnd );
|
|
35847
|
+
}
|
|
35848
|
+
this.Canvas.stroke();
|
|
35849
|
+
|
|
35850
|
+
if (item.TextColor) this.Canvas.fillStyle = item.TextColor;
|
|
35851
|
+
else this.Canvas.fillStyle=item.Color;
|
|
35852
|
+
this.Canvas.fillText(item.Text, yText, yEnd);
|
|
35853
|
+
}
|
|
35854
|
+
|
|
35855
|
+
start += rate*2*Math.PI;//起始角度
|
|
35856
|
+
}
|
|
35857
|
+
}
|
|
35858
|
+
|
|
35859
|
+
this.Draw=function()
|
|
35860
|
+
{
|
|
35861
|
+
if (!this.Data || !this.Data.Data || !(this.Data.Data.length>0)) return this.DrawEmptyData();
|
|
35862
|
+
|
|
35863
|
+
this.CalculateTotalValue();
|
|
35864
|
+
if (!IFrameSplitOperator.IsPlusNumber(this.TotalValue)) this.DrawEmptyData();
|
|
35865
|
+
this.CalculateSize();
|
|
35866
|
+
|
|
35867
|
+
this.Canvas.save();
|
|
35868
|
+
|
|
35869
|
+
this.DrawPie();
|
|
35870
|
+
|
|
35871
|
+
this.Canvas.restore();
|
|
35872
|
+
}
|
|
35873
|
+
|
|
35874
|
+
//空数据
|
|
35875
|
+
this.DrawEmptyData=function()
|
|
35876
|
+
{
|
|
35877
|
+
JSConsole.Chart.Log('[ChartSimplePie::DrawEmptyData]')
|
|
35878
|
+
}
|
|
35879
|
+
|
|
35880
|
+
this.GetMaxMin=function()
|
|
35881
|
+
{
|
|
35882
|
+
return { Min:null, Max:null };
|
|
35883
|
+
}
|
|
35884
|
+
}
|
|
35885
|
+
|
|
35886
|
+
|
|
35887
|
+
//圆环
|
|
35888
|
+
function ChartSimpleDoughnut()
|
|
35889
|
+
{
|
|
35890
|
+
this.newMethod=IChartPainting; //派生
|
|
35891
|
+
this.newMethod();
|
|
35892
|
+
delete this.newMethod;
|
|
35893
|
+
|
|
35894
|
+
this.ClassName='ChartSimpleDoughnut'; //类名
|
|
35895
|
+
|
|
35896
|
+
this.BorderColor=g_JSChartResource.ChartSimpleDoughnut.BorderColor;
|
|
35897
|
+
this.Offset=CloneData(g_JSChartResource.ChartSimpleDoughnut.Offset);
|
|
35898
|
+
this.LineExtendWidth=10;
|
|
35899
|
+
this.TextFontConfig=CloneData(g_JSChartResource.ChartSimpleDoughnut.TextFont);
|
|
35900
|
+
|
|
35901
|
+
this.RectClient={ };
|
|
35902
|
+
this.TotalValue=1;
|
|
35903
|
+
this.Radius = 50; //外圈半径默认值
|
|
35904
|
+
this.InnerRadius=30; //内圈半径
|
|
35905
|
+
this.TextFont;
|
|
35906
|
+
|
|
35907
|
+
|
|
35908
|
+
this.ReloadResource=function(resource)
|
|
35909
|
+
{
|
|
35910
|
+
this.BorderColor=g_JSChartResource.ChartSimpleDoughnut.BorderColor;
|
|
35911
|
+
this.Offset=CloneData(g_JSChartResource.ChartSimpleDoughnut.Offset);
|
|
35912
|
+
this.TextFontConfig=CloneData(g_JSChartResource.ChartSimpleDoughnut.TextFont);
|
|
35913
|
+
}
|
|
35914
|
+
|
|
35915
|
+
this.CalculateSize=function()
|
|
35916
|
+
{
|
|
35917
|
+
var border=this.ChartFrame.GetBorder();
|
|
35918
|
+
var pixelRatio=GetDevicePixelRatio();
|
|
35919
|
+
this.TextFont=`${this.TextFontConfig.Size*pixelRatio}px ${ this.TextFontConfig.Name}`;
|
|
35920
|
+
this.LineExtendWidth=this.GetFontHeight(this.TextFont,"擎")+1;
|
|
35921
|
+
|
|
35922
|
+
|
|
35923
|
+
this.RectClient={ Width:this.Radius*2*pixelRatio, Height:this.Radius*2*pixelRatio };
|
|
35924
|
+
|
|
35925
|
+
this.RectClient.Right=border.Right+this.Offset.X;
|
|
35926
|
+
this.RectClient.Top=border.TopEx+this.Offset.Y;
|
|
35927
|
+
this.RectClient.Left=this.RectClient.Right-this.RectClient.Width;
|
|
35928
|
+
this.RectClient.Bottom=this.RectClient.Top+this.RectClient.Height;
|
|
35929
|
+
}
|
|
35930
|
+
|
|
35931
|
+
this.CalculateTotalValue=function()
|
|
35932
|
+
{
|
|
35933
|
+
var totalValue=0;
|
|
35934
|
+
for(var i=0; i<this.Data.Data.length; ++i)
|
|
35935
|
+
{
|
|
35936
|
+
var item=this.Data.Data[i];
|
|
35937
|
+
if (!IFrameSplitOperator.IsPlusNumber(item.Value)) continue;
|
|
35938
|
+
totalValue += item.Value;
|
|
35939
|
+
}
|
|
35940
|
+
|
|
35941
|
+
this.TotalValue=totalValue;
|
|
35942
|
+
}
|
|
35943
|
+
|
|
35944
|
+
this.DrawPie=function()
|
|
35945
|
+
{
|
|
35946
|
+
this.Canvas.font=this.TextFont;
|
|
35947
|
+
this.Canvas.textBaseline='bottom';
|
|
35948
|
+
this.Canvas.textAlign = 'left';
|
|
35949
|
+
|
|
35950
|
+
var aryText=[];
|
|
35951
|
+
var maxTextWidth=0;
|
|
35952
|
+
for(var i=0;i<this.Data.Data.length;++i)
|
|
35953
|
+
{
|
|
35954
|
+
var item=this.Data.Data[i];
|
|
35955
|
+
if (!IFrameSplitOperator.IsPlusNumber(item.Value)) continue;
|
|
35956
|
+
if (!item.Text) continue;
|
|
35957
|
+
var textWidth=this.Canvas.measureText(item.Text).width;
|
|
35958
|
+
|
|
35959
|
+
aryText[i]={ Width:textWidth };
|
|
35960
|
+
|
|
35961
|
+
if (maxTextWidth<textWidth) maxTextWidth=textWidth;
|
|
35962
|
+
}
|
|
35963
|
+
|
|
35964
|
+
var xOffset=maxTextWidth+this.LineExtendWidth;
|
|
35965
|
+
this.RectClient.Left-=xOffset;
|
|
35966
|
+
this.RectClient.Right-=xOffset;
|
|
35967
|
+
|
|
35968
|
+
var pixelRatio=GetDevicePixelRatio();
|
|
35969
|
+
var radius=this.Radius*pixelRatio;
|
|
35970
|
+
var innerRadius=this.InnerRadius*pixelRatio;
|
|
35971
|
+
var start=0, end=0;
|
|
35972
|
+
var x=this.RectClient.Left+radius;
|
|
35973
|
+
var y=this.RectClient.Top+radius;
|
|
35974
|
+
|
|
35975
|
+
for(var i=0;i<this.Data.Data.length;++i)
|
|
35976
|
+
{
|
|
35977
|
+
var item=this.Data.Data[i];
|
|
35978
|
+
if (!IFrameSplitOperator.IsPlusNumber(item.Value)) continue;
|
|
35979
|
+
|
|
35980
|
+
var rate=item.Value/this.TotalValue;
|
|
35981
|
+
|
|
35982
|
+
// 绘制扇形
|
|
35983
|
+
this.Canvas.beginPath();
|
|
35984
|
+
|
|
35985
|
+
end += rate*2*Math.PI;//终止角度
|
|
35986
|
+
this.Canvas.strokeStyle = this.BorderColor;
|
|
35987
|
+
this.Canvas.fillStyle = item.Color;
|
|
35988
|
+
this.Canvas.arc(x,y,radius,start,end);
|
|
35989
|
+
this.Canvas.arc(x,y,innerRadius,end-2*Math.PI,start-2*Math.PI, true);
|
|
35990
|
+
this.Canvas.fill();
|
|
35991
|
+
this.Canvas.closePath();
|
|
35992
|
+
this.Canvas.stroke();
|
|
35993
|
+
|
|
35994
|
+
if (item.Text)
|
|
35995
|
+
{
|
|
35996
|
+
// 绘制直线
|
|
35997
|
+
var xLine=radius*Math.cos(end- (end-start)/2)+x;
|
|
35998
|
+
var yLine=radius*Math.sin(end - (end-start)/2)+y;
|
|
35999
|
+
var xEnd = (radius + this.LineExtendWidth)*Math.cos(end- (end-start)/2)+x;
|
|
36000
|
+
var yEnd = (radius + this.LineExtendWidth)*Math.sin(end - (end-start)/2)+y;
|
|
35832
36001
|
|
|
35833
36002
|
this.Canvas.beginPath();
|
|
35834
36003
|
if (item.LineColor) this.Canvas.strokeStyle =item.LineColor;
|
|
@@ -48298,11 +48467,15 @@ function KLineTooltipPaint()
|
|
|
48298
48467
|
}
|
|
48299
48468
|
|
|
48300
48469
|
//换手率
|
|
48301
|
-
if (
|
|
48470
|
+
if (IFrameSplitOperator.IsNumber(item.FlowCapital))
|
|
48302
48471
|
{
|
|
48472
|
+
var text="--.--"
|
|
48303
48473
|
title=g_JSChartLocalization.GetText('Tooltip-Exchange',this.LanguageID);
|
|
48304
|
-
|
|
48305
|
-
|
|
48474
|
+
if (item.FlowCapital!=0)
|
|
48475
|
+
{
|
|
48476
|
+
var value=item.Vol/item.FlowCapital*100;
|
|
48477
|
+
var text=value.toFixed(2)+'%';
|
|
48478
|
+
}
|
|
48306
48479
|
aryText.push({Title:title, TitleColor:this.TitleColor, Text:text, Color:this.TitleColor });
|
|
48307
48480
|
}
|
|
48308
48481
|
|
|
@@ -59494,13 +59667,19 @@ function HistoryDataStringFormat()
|
|
|
59494
59667
|
aryText.push(item);
|
|
59495
59668
|
}
|
|
59496
59669
|
|
|
59497
|
-
if(
|
|
59670
|
+
if(IFrameSplitOperator.IsNumber(data.FlowCapital)) //换手率
|
|
59498
59671
|
{
|
|
59499
|
-
var
|
|
59672
|
+
var text="--.--";
|
|
59673
|
+
if (data.FlowCapital!=0)
|
|
59674
|
+
{
|
|
59675
|
+
var value=data.Vol/data.FlowCapital*100;
|
|
59676
|
+
var text=`${value.toFixed(2)}%`;
|
|
59677
|
+
}
|
|
59678
|
+
|
|
59500
59679
|
var item=
|
|
59501
59680
|
{
|
|
59502
59681
|
Title:g_JSChartLocalization.GetText('DivTooltip-Exchange',this.LanguageID),
|
|
59503
|
-
Text
|
|
59682
|
+
Text:text,
|
|
59504
59683
|
Color:this.TurnoverRateColor
|
|
59505
59684
|
}
|
|
59506
59685
|
aryText.push(item);
|
|
@@ -60197,10 +60376,14 @@ function DynamicKLineTitlePainting()
|
|
|
60197
60376
|
aryText.push({ Text:text, Color:this.AmountColor});
|
|
60198
60377
|
}
|
|
60199
60378
|
|
|
60200
|
-
if (
|
|
60379
|
+
if (IFrameSplitOperator.IsNumber(item.FlowCapital)) //换手率
|
|
60201
60380
|
{
|
|
60202
|
-
var
|
|
60203
|
-
|
|
60381
|
+
var text="--.--";
|
|
60382
|
+
if (item.FlowCapital!=0)
|
|
60383
|
+
{
|
|
60384
|
+
var value=item.Vol/item.FlowCapital*100; //成交量/流通A股*100
|
|
60385
|
+
var text=g_JSChartLocalization.GetText('KTitle-Exchange',this.LanguageID)+IFrameSplitOperator.FormatValueString(value,2,this.LanguageID)+'%';
|
|
60386
|
+
}
|
|
60204
60387
|
aryText.push({ Text:text, Color:this.TurnoverRateColor});
|
|
60205
60388
|
}
|
|
60206
60389
|
|
|
@@ -75378,6 +75561,13 @@ function JSChartResource()
|
|
|
75378
75561
|
Offset:{ X:-5, Y:5 }
|
|
75379
75562
|
}
|
|
75380
75563
|
|
|
75564
|
+
this.ChartSimpleDoughnut=
|
|
75565
|
+
{
|
|
75566
|
+
TextFont:{ Family:'微软雅黑' , Size:12 },
|
|
75567
|
+
BorderColor:"rgb(169,169,169)",
|
|
75568
|
+
Offset:{ X:-5, Y:5 }
|
|
75569
|
+
}
|
|
75570
|
+
|
|
75381
75571
|
this.ChartSimpleRadar=
|
|
75382
75572
|
{
|
|
75383
75573
|
TextFont:{ Family:'微软雅黑' , Size:12 },
|
|
@@ -76623,6 +76813,8 @@ function JSChartResource()
|
|
|
76623
76813
|
|
|
76624
76814
|
if (style.ChartSimpleTable) this.SetChartSimpleTable(style.ChartSimpleTable);
|
|
76625
76815
|
if (style.ChartSimplePie) this.SetChartSimplePie(style.ChartSimplePie);
|
|
76816
|
+
if (style.ChartSimpleDoughnut) this.SetChartSimpleDoughnut(style.ChartSimpleDoughnut);
|
|
76817
|
+
|
|
76626
76818
|
if (style.ChartSimpleRadar) this.SetChartSimpleRadar(style.ChartSimpleRadar);
|
|
76627
76819
|
|
|
76628
76820
|
if (style.DRAWICON)
|
|
@@ -77717,6 +77909,27 @@ function JSChartResource()
|
|
|
77717
77909
|
}
|
|
77718
77910
|
}
|
|
77719
77911
|
|
|
77912
|
+
this.SetChartSimpleDoughnut=function(style)
|
|
77913
|
+
{
|
|
77914
|
+
var dest=this.ChartSimpleDoughnut;
|
|
77915
|
+
|
|
77916
|
+
if (style.TextFont)
|
|
77917
|
+
{
|
|
77918
|
+
var item=style.TextFont;
|
|
77919
|
+
if (item.Name) dest.TextFont.Name=item.Name;
|
|
77920
|
+
if (IFrameSplitOperator.IsNumber(item.Size)) dest.TextFont.Size=item.Size;
|
|
77921
|
+
}
|
|
77922
|
+
|
|
77923
|
+
if (style.BorderColor) dest.BorderColor=style.BorderColor;
|
|
77924
|
+
|
|
77925
|
+
if (style.Offset)
|
|
77926
|
+
{
|
|
77927
|
+
var item=style.Offset;
|
|
77928
|
+
if (IFrameSplitOperator.IsNumber(item.X)) dest.Offset.X=item.X;
|
|
77929
|
+
if (IFrameSplitOperator.IsNumber(item.Y)) dest.Offset.Y=item.Y;
|
|
77930
|
+
}
|
|
77931
|
+
}
|
|
77932
|
+
|
|
77720
77933
|
this.SetChartSimpleRadar=function(style)
|
|
77721
77934
|
{
|
|
77722
77935
|
var dest=this.ChartSimpleRadar;
|
|
@@ -113032,6 +113245,18 @@ function JSDraw(errorHandler,symbolData)
|
|
|
113032
113245
|
|
|
113033
113246
|
return result={ DrawData:{ Data:aryData, AryIndex:aryIndex, Radius:radius, AryArea:[{ LineColor:color }] }, DrawType:"DRAW_SIMPLE_RADAR" };
|
|
113034
113247
|
}
|
|
113248
|
+
|
|
113249
|
+
this.DRAWDOUGHNUT=function(aryData)
|
|
113250
|
+
{
|
|
113251
|
+
var radius=aryData[0];
|
|
113252
|
+
var aryCell=[];
|
|
113253
|
+
for(var i=1;i<aryData.length;++i)
|
|
113254
|
+
{
|
|
113255
|
+
aryCell.push(aryData[i]);
|
|
113256
|
+
}
|
|
113257
|
+
|
|
113258
|
+
return result={ DrawData:{ Data:aryCell, Radius:radius , InnerRadius:radius/2 }, DrawType:"DRAW_SIMPLE_DOUGHNUT" };
|
|
113259
|
+
}
|
|
113035
113260
|
}
|
|
113036
113261
|
|
|
113037
113262
|
|
|
@@ -113086,7 +113311,7 @@ JSDraw.prototype.IsDrawFunction=function(name)
|
|
|
113086
113311
|
'DRAWOVERLAYLINE',"FILLRGN", "FILLRGN2","FILLTOPRGN", "FILLBOTTOMRGN", "FILLVERTICALRGN","FLOATRGN","DRAWSL", "DRAWGBK2","DRAWGBK_DIV",
|
|
113087
113312
|
"VERTLINE","HORLINE","TIPICON",
|
|
113088
113313
|
"BUY","SELL","SELLSHORT","BUYSHORT",
|
|
113089
|
-
"DRAWLASTBARICON","DRAWLASTBARNUMBER", "DRAWLASTBARTEXT","DRAWTABLE","DRAWPIE","DRAWRADAR",
|
|
113314
|
+
"DRAWLASTBARICON","DRAWLASTBARNUMBER", "DRAWLASTBARTEXT","DRAWTABLE","DRAWPIE","DRAWRADAR","DRAWDOUGHNUT",
|
|
113090
113315
|
]);
|
|
113091
113316
|
if (setFunctionName.has(name)) return true;
|
|
113092
113317
|
|
|
@@ -119975,6 +120200,10 @@ function JSExecute(ast,option)
|
|
|
119975
120200
|
node.Draw=this.Draw.DRAWPIE(args);
|
|
119976
120201
|
node.Out=[];
|
|
119977
120202
|
break;
|
|
120203
|
+
case "DRAWDOUGHNUT":
|
|
120204
|
+
node.Draw=this.Draw.DRAWDOUGHNUT(args);
|
|
120205
|
+
node.Out=[];
|
|
120206
|
+
break;
|
|
119978
120207
|
//雷达图
|
|
119979
120208
|
case "RADAR_CELL":
|
|
119980
120209
|
node.Out=this.Draw.RADAR_CELL(args[0],args[1],args[2],args[3]);
|
|
@@ -123028,6 +123257,30 @@ function ScriptIndex(name,script,args,option)
|
|
|
123028
123257
|
hqChart.ChartPaint.push(chart);
|
|
123029
123258
|
}
|
|
123030
123259
|
|
|
123260
|
+
this.CreateSimpleDoughnut=function(hqChart,windowIndex,varItem,id)
|
|
123261
|
+
{
|
|
123262
|
+
var chart=new ChartSimpleDoughnut();
|
|
123263
|
+
chart.Canvas=hqChart.Canvas;
|
|
123264
|
+
chart.Name=varItem.Name;
|
|
123265
|
+
chart.ChartBorder=hqChart.Frame.SubFrame[windowIndex].Frame.ChartBorder;
|
|
123266
|
+
chart.ChartFrame=hqChart.Frame.SubFrame[windowIndex].Frame;
|
|
123267
|
+
|
|
123268
|
+
if (varItem.Draw && varItem.Draw.DrawData)
|
|
123269
|
+
{
|
|
123270
|
+
var drawData=varItem.Draw.DrawData;
|
|
123271
|
+
if (drawData.Data) chart.Data.Data=drawData.Data;
|
|
123272
|
+
if (drawData.BorderColor) chart.BorderColor=drawData.BorderColor;
|
|
123273
|
+
if (drawData.TextFont) chart.TextFontConfig=drawData.TextFont;
|
|
123274
|
+
if (drawData.TextColor) chart.TextColor=drawData.TextColor;
|
|
123275
|
+
if (IFrameSplitOperator.IsNumber(drawData.XOffset)) chart.Offset.X=drawData.XOffset;
|
|
123276
|
+
if (IFrameSplitOperator.IsNumber(drawData.YOffset)) chart.Offset.Y=drawData.YOffset;
|
|
123277
|
+
if (IFrameSplitOperator.IsPlusNumber(drawData.Radius)) chart.Radius=drawData.Radius;
|
|
123278
|
+
if (IFrameSplitOperator.IsPlusNumber(drawData.InnerRadius)) chart.InnerRadius=drawData.InnerRadius;
|
|
123279
|
+
}
|
|
123280
|
+
|
|
123281
|
+
hqChart.ChartPaint.push(chart);
|
|
123282
|
+
}
|
|
123283
|
+
|
|
123031
123284
|
this.CreateTradeIcon=function(hqChart,windowIndex,varItem,id)
|
|
123032
123285
|
{
|
|
123033
123286
|
var chart=new ChartTradeIcon();
|
|
@@ -123910,6 +124163,9 @@ function ScriptIndex(name,script,args,option)
|
|
|
123910
124163
|
case "DRAW_SIMPLE_RADAR":
|
|
123911
124164
|
this.CreateSimpleRadar(hqChart,windowIndex,item,i);
|
|
123912
124165
|
break;
|
|
124166
|
+
case "DRAW_SIMPLE_DOUGHNUT":
|
|
124167
|
+
this.CreateSimpleDoughnut(hqChart,windowIndex,item,i);
|
|
124168
|
+
break;
|
|
123913
124169
|
case "BUY":
|
|
123914
124170
|
case "SELL":
|
|
123915
124171
|
case "SELLSHORT":
|
|
@@ -124263,6 +124519,9 @@ function OverlayScriptIndex(name,script,args,option)
|
|
|
124263
124519
|
case "DRAW_SIMPLE_PIE":
|
|
124264
124520
|
this.CreateSimplePie(hqChart,windowIndex,item,i);
|
|
124265
124521
|
break;
|
|
124522
|
+
case "DRAW_SIMPLE_DOUGHNUT":
|
|
124523
|
+
this.CreateSimpleDoughnut(hqChart,windowIndex,item,i);
|
|
124524
|
+
break;
|
|
124266
124525
|
case "DRAW_SIMPLE_RADAR":
|
|
124267
124526
|
this.CreateSimpleRadar(hqChart,windowIndex,item,i);
|
|
124268
124527
|
break;
|
|
@@ -125341,6 +125600,34 @@ function OverlayScriptIndex(name,script,args,option)
|
|
|
125341
125600
|
frame.ChartPaint.push(chart);
|
|
125342
125601
|
}
|
|
125343
125602
|
|
|
125603
|
+
this.CreateSimpleDoughnut=function(hqChart,windowIndex,varItem,id)
|
|
125604
|
+
{
|
|
125605
|
+
var overlayIndex=this.OverlayIndex;
|
|
125606
|
+
var frame=overlayIndex.Frame;
|
|
125607
|
+
var chart=new ChartSimpleDoughnut();
|
|
125608
|
+
chart.Canvas=hqChart.Canvas;
|
|
125609
|
+
chart.Name=varItem.Name;
|
|
125610
|
+
chart.ChartBorder=frame.Frame.ChartBorder;
|
|
125611
|
+
chart.ChartFrame=frame.Frame;
|
|
125612
|
+
chart.Identify=overlayIndex.Identify;
|
|
125613
|
+
chart.HQChart=hqChart;
|
|
125614
|
+
|
|
125615
|
+
if (varItem.Draw && varItem.Draw.DrawData)
|
|
125616
|
+
{
|
|
125617
|
+
var drawData=varItem.Draw.DrawData;
|
|
125618
|
+
if (drawData.Data) chart.Data.Data=drawData.Data;
|
|
125619
|
+
if (drawData.BorderColor) chart.BorderColor=drawData.BorderColor;
|
|
125620
|
+
if (drawData.TextFont) chart.TextFontConfig=drawData.TextFont;
|
|
125621
|
+
if (drawData.TextColor) chart.TextColor=drawData.TextColor;
|
|
125622
|
+
if (IFrameSplitOperator.IsNumber(drawData.XOffset)) chart.Offset.X=drawData.XOffset;
|
|
125623
|
+
if (IFrameSplitOperator.IsNumber(drawData.YOffset)) chart.Offset.Y=drawData.YOffset;
|
|
125624
|
+
if (IFrameSplitOperator.IsPlusNumber(drawData.Radius)) chart.Radius=drawData.Radius;
|
|
125625
|
+
if (IFrameSplitOperator.IsPlusNumber(drawData.InnerRadius)) chart.InnerRadius=drawData.InnerRadius;
|
|
125626
|
+
}
|
|
125627
|
+
|
|
125628
|
+
frame.ChartPaint.push(chart);
|
|
125629
|
+
}
|
|
125630
|
+
|
|
125344
125631
|
this.CreateSimpleRadar=function(hqChart,windowIndex,varItem,id)
|
|
125345
125632
|
{
|
|
125346
125633
|
var overlayIndex=this.OverlayIndex;
|
|
@@ -126568,7 +126855,7 @@ function APIScriptIndex(name,script,args,option, isOverlay)
|
|
|
126568
126855
|
outVarItem.Draw=drawItem;
|
|
126569
126856
|
result.push(outVarItem);
|
|
126570
126857
|
}
|
|
126571
|
-
else if (draw.DrawType=="DRAW_SIMPLE_PIE")
|
|
126858
|
+
else if (draw.DrawType=="DRAW_SIMPLE_PIE" || draw.DrawType=="DRAW_SIMPLE_DOUGHNUT")
|
|
126572
126859
|
{
|
|
126573
126860
|
drawItem.Name=draw.Name;
|
|
126574
126861
|
drawItem.Type=draw.Type;
|
|
@@ -128208,6 +128495,11 @@ function GetBlackStyle()
|
|
|
128208
128495
|
BorderColor:"rgb(220,220,220)",
|
|
128209
128496
|
},
|
|
128210
128497
|
|
|
128498
|
+
ChartSimpleDoughnut:
|
|
128499
|
+
{
|
|
128500
|
+
BorderColor:"rgb(220,220,220)",
|
|
128501
|
+
},
|
|
128502
|
+
|
|
128211
128503
|
ChartSimpleRadar:
|
|
128212
128504
|
{
|
|
128213
128505
|
//TextFont:{ Family:'微软雅黑' , Size:12 },
|
|
@@ -142757,7 +143049,7 @@ function ScrollBarBGChart()
|
|
|
142757
143049
|
|
|
142758
143050
|
|
|
142759
143051
|
|
|
142760
|
-
var HQCHART_VERSION="1.1.
|
|
143052
|
+
var HQCHART_VERSION="1.1.14369";
|
|
142761
143053
|
|
|
142762
143054
|
function PrintHQChartVersion()
|
|
142763
143055
|
{
|
|
@@ -57394,6 +57394,8 @@ HQData.Report_APIIndex=function(data, callback)
|
|
|
57394
57394
|
HQData.APIIndex_DRAW_SIMPLE_TABLE(data, callback);
|
|
57395
57395
|
else if (request.Data.indexname=="API_DRAW_SIMPLE_PIE")
|
|
57396
57396
|
HQData.APIIndex_DRAW_SIMPLE_PIE(data, callback);
|
|
57397
|
+
else if (request.Data.indexname=="API_DRAW_SIMPLE_DOUGHNUT")
|
|
57398
|
+
HQData.APIIndex_DRAW_SIMPLE_DOUGHNUT(data, callback);
|
|
57397
57399
|
else if (request.Data.indexname=="API_DRAW_SIMPLE_RADAR")
|
|
57398
57400
|
HQData.APIIndex_DRAW_SIMPLE_RADAR(data, callback);
|
|
57399
57401
|
else if (request.Data.indexname=="API_MULTI_BAR")
|
|
@@ -57927,6 +57929,52 @@ HQData.APIIndex_DRAW_SIMPLE_PIE=function(data, callback)
|
|
|
57927
57929
|
callback(apiData);
|
|
57928
57930
|
}
|
|
57929
57931
|
|
|
57932
|
+
HQData.APIIndex_DRAW_SIMPLE_DOUGHNUT=function(data, callback)
|
|
57933
|
+
{
|
|
57934
|
+
data.PreventDefault=true;
|
|
57935
|
+
var hqchart=data.HQChart;
|
|
57936
|
+
var kData=hqchart.GetKData();
|
|
57937
|
+
|
|
57938
|
+
var tableData=
|
|
57939
|
+
{
|
|
57940
|
+
name:'DRAW_SIMPLE_DOUGHNUT', type:1,
|
|
57941
|
+
Draw:
|
|
57942
|
+
{
|
|
57943
|
+
DrawType:'DRAW_SIMPLE_DOUGHNUT',
|
|
57944
|
+
DrawData:
|
|
57945
|
+
{
|
|
57946
|
+
//BGColor:"rgba(250,250,210,0.8)",
|
|
57947
|
+
//BorderColor:"rgb(110,110,110)",
|
|
57948
|
+
//TextColor:"rgb(0,191,255)",
|
|
57949
|
+
Data:
|
|
57950
|
+
[
|
|
57951
|
+
{ Value:100, Text:"数据1:10", Color:"rgba(255,182,193,0.8)", TextColor:"rgb(250,250,250)", LineColor:"rgb(255,182,193)"},
|
|
57952
|
+
{ Value:70, Text:"数据2:70", Color:"rgba(255,0,255,0.8)",TextColor:"rgb(250,250,250)", LineColor:"rgb(255,0,255)"},
|
|
57953
|
+
{ Value:110, Text:"数据3:110", Color:"rgba(72,61,139,0.8)",TextColor:"rgb(250,250,250)", LineColor:"rgb(72,61,139)"},
|
|
57954
|
+
{ Value:210, Text:"数据4:210", Color:"rgba(0,191,255,0.8)",TextColor:"rgb(250,250,250)", LineColor:"rgb(0,191,255)"},
|
|
57955
|
+
{ Value:310, Text:"数据5:310", Color:"rgba(255,140,0,0.8)",TextColor:"rgb(250,250,250)", LineColor:"rgb(255,140,0)"},
|
|
57956
|
+
],
|
|
57957
|
+
|
|
57958
|
+
//TextFont:{ Size:16, Name:"微软雅黑"},
|
|
57959
|
+
//XOffset:-10,
|
|
57960
|
+
//YOffset:-15,
|
|
57961
|
+
Radius:80,
|
|
57962
|
+
}
|
|
57963
|
+
}
|
|
57964
|
+
};
|
|
57965
|
+
|
|
57966
|
+
var apiData=
|
|
57967
|
+
{
|
|
57968
|
+
code:0,
|
|
57969
|
+
stock:{ name:hqchart.Name, symbol:hqchart.Symbol },
|
|
57970
|
+
outdata: { date:kData.GetDate(), time:kData.GetTime() , outvar:[tableData] }
|
|
57971
|
+
};
|
|
57972
|
+
|
|
57973
|
+
|
|
57974
|
+
console.log('[HQData.APIIndex_DRAW_SIMPLE_PIE] apiData ', apiData);
|
|
57975
|
+
callback(apiData);
|
|
57976
|
+
}
|
|
57977
|
+
|
|
57930
57978
|
|
|
57931
57979
|
HQData.APIIndex_DRAW_SIMPLE_RADAR=function(data, callback)
|
|
57932
57980
|
{
|