hqchart 1.1.14367 → 1.1.14372
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 +28 -18
- package/package.json +1 -1
- package/src/jscommon/umychart.NetworkFilterTest.js +48 -0
- package/src/jscommon/umychart.complier.js +76 -2
- package/src/jscommon/umychart.js +213 -11
- 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 +295 -14
- 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 +295 -14
|
@@ -15043,7 +15043,7 @@ function ChartFrameFactory()
|
|
|
15043
15043
|
{
|
|
15044
15044
|
if (!this.DataMap.has(name))
|
|
15045
15045
|
{
|
|
15046
|
-
JSConsole.Warn(`[ChartFrameFactory::Create] can't find class=${name}.`);
|
|
15046
|
+
JSConsole.Chart.Warn(`[ChartFrameFactory::Create] can't find class=${name}.`);
|
|
15047
15047
|
return null;
|
|
15048
15048
|
}
|
|
15049
15049
|
|
|
@@ -28344,7 +28344,7 @@ function ChartPaintFactory()
|
|
|
28344
28344
|
{
|
|
28345
28345
|
if (!this.DataMap.has(name))
|
|
28346
28346
|
{
|
|
28347
|
-
JSConsole.Warn(`[ChartPaintFactory::Create] can't find class=${name}.`);
|
|
28347
|
+
JSConsole.Chart.Warn(`[ChartPaintFactory::Create] can't find class=${name}.`);
|
|
28348
28348
|
return null;
|
|
28349
28349
|
}
|
|
28350
28350
|
|
|
@@ -35795,10 +35795,11 @@ function ChartSimplePie()
|
|
|
35795
35795
|
this.RectClient.Left-=xOffset;
|
|
35796
35796
|
this.RectClient.Right-=xOffset;
|
|
35797
35797
|
|
|
35798
|
-
|
|
35798
|
+
var pixelRatio=GetDevicePixelRatio();
|
|
35799
|
+
var radius=this.Radius*pixelRatio;
|
|
35799
35800
|
var start=0, end=0;
|
|
35800
|
-
var x=this.RectClient.Left+
|
|
35801
|
-
var y=this.RectClient.Top+
|
|
35801
|
+
var x=this.RectClient.Left+radius;
|
|
35802
|
+
var y=this.RectClient.Top+radius;
|
|
35802
35803
|
|
|
35803
35804
|
for(var i=0;i<this.Data.Data.length;++i)
|
|
35804
35805
|
{
|
|
@@ -35814,7 +35815,178 @@ function ChartSimplePie()
|
|
|
35814
35815
|
end += rate*2*Math.PI;//终止角度
|
|
35815
35816
|
this.Canvas.strokeStyle = this.BorderColor;
|
|
35816
35817
|
this.Canvas.fillStyle = item.Color;
|
|
35817
|
-
this.Canvas.arc(x,y,
|
|
35818
|
+
this.Canvas.arc(x,y,radius,start,end);
|
|
35819
|
+
this.Canvas.fill();
|
|
35820
|
+
this.Canvas.closePath();
|
|
35821
|
+
this.Canvas.stroke();
|
|
35822
|
+
|
|
35823
|
+
if (item.Text)
|
|
35824
|
+
{
|
|
35825
|
+
// 绘制直线
|
|
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);
|
|
35818
35990
|
this.Canvas.fill();
|
|
35819
35991
|
this.Canvas.closePath();
|
|
35820
35992
|
this.Canvas.stroke();
|
|
@@ -35822,10 +35994,10 @@ function ChartSimplePie()
|
|
|
35822
35994
|
if (item.Text)
|
|
35823
35995
|
{
|
|
35824
35996
|
// 绘制直线
|
|
35825
|
-
var xLine=
|
|
35826
|
-
var yLine=
|
|
35827
|
-
var xEnd = (
|
|
35828
|
-
var yEnd = (
|
|
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;
|
|
35829
36001
|
|
|
35830
36002
|
this.Canvas.beginPath();
|
|
35831
36003
|
if (item.LineColor) this.Canvas.strokeStyle =item.LineColor;
|
|
@@ -75389,6 +75561,13 @@ function JSChartResource()
|
|
|
75389
75561
|
Offset:{ X:-5, Y:5 }
|
|
75390
75562
|
}
|
|
75391
75563
|
|
|
75564
|
+
this.ChartSimpleDoughnut=
|
|
75565
|
+
{
|
|
75566
|
+
TextFont:{ Family:'微软雅黑' , Size:12 },
|
|
75567
|
+
BorderColor:"rgb(169,169,169)",
|
|
75568
|
+
Offset:{ X:-5, Y:5 }
|
|
75569
|
+
}
|
|
75570
|
+
|
|
75392
75571
|
this.ChartSimpleRadar=
|
|
75393
75572
|
{
|
|
75394
75573
|
TextFont:{ Family:'微软雅黑' , Size:12 },
|
|
@@ -76634,6 +76813,8 @@ function JSChartResource()
|
|
|
76634
76813
|
|
|
76635
76814
|
if (style.ChartSimpleTable) this.SetChartSimpleTable(style.ChartSimpleTable);
|
|
76636
76815
|
if (style.ChartSimplePie) this.SetChartSimplePie(style.ChartSimplePie);
|
|
76816
|
+
if (style.ChartSimpleDoughnut) this.SetChartSimpleDoughnut(style.ChartSimpleDoughnut);
|
|
76817
|
+
|
|
76637
76818
|
if (style.ChartSimpleRadar) this.SetChartSimpleRadar(style.ChartSimpleRadar);
|
|
76638
76819
|
|
|
76639
76820
|
if (style.DRAWICON)
|
|
@@ -77728,6 +77909,27 @@ function JSChartResource()
|
|
|
77728
77909
|
}
|
|
77729
77910
|
}
|
|
77730
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
|
+
|
|
77731
77933
|
this.SetChartSimpleRadar=function(style)
|
|
77732
77934
|
{
|
|
77733
77935
|
var dest=this.ChartSimpleRadar;
|
|
@@ -96864,7 +97066,7 @@ function DialogFactory()
|
|
|
96864
97066
|
{
|
|
96865
97067
|
if (!this.DataMap.has(name))
|
|
96866
97068
|
{
|
|
96867
|
-
JSConsole.Warn(`[DialogFactory::Create] can't find class=${name}.`);
|
|
97069
|
+
JSConsole.Chart.Warn(`[DialogFactory::Create] can't find class=${name}.`);
|
|
96868
97070
|
return null;
|
|
96869
97071
|
}
|
|
96870
97072
|
|
|
@@ -113043,6 +113245,18 @@ function JSDraw(errorHandler,symbolData)
|
|
|
113043
113245
|
|
|
113044
113246
|
return result={ DrawData:{ Data:aryData, AryIndex:aryIndex, Radius:radius, AryArea:[{ LineColor:color }] }, DrawType:"DRAW_SIMPLE_RADAR" };
|
|
113045
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
|
+
}
|
|
113046
113260
|
}
|
|
113047
113261
|
|
|
113048
113262
|
|
|
@@ -113097,7 +113311,7 @@ JSDraw.prototype.IsDrawFunction=function(name)
|
|
|
113097
113311
|
'DRAWOVERLAYLINE',"FILLRGN", "FILLRGN2","FILLTOPRGN", "FILLBOTTOMRGN", "FILLVERTICALRGN","FLOATRGN","DRAWSL", "DRAWGBK2","DRAWGBK_DIV",
|
|
113098
113312
|
"VERTLINE","HORLINE","TIPICON",
|
|
113099
113313
|
"BUY","SELL","SELLSHORT","BUYSHORT",
|
|
113100
|
-
"DRAWLASTBARICON","DRAWLASTBARNUMBER", "DRAWLASTBARTEXT","DRAWTABLE","DRAWPIE","DRAWRADAR",
|
|
113314
|
+
"DRAWLASTBARICON","DRAWLASTBARNUMBER", "DRAWLASTBARTEXT","DRAWTABLE","DRAWPIE","DRAWRADAR","DRAWDOUGHNUT",
|
|
113101
113315
|
]);
|
|
113102
113316
|
if (setFunctionName.has(name)) return true;
|
|
113103
113317
|
|
|
@@ -119986,6 +120200,10 @@ function JSExecute(ast,option)
|
|
|
119986
120200
|
node.Draw=this.Draw.DRAWPIE(args);
|
|
119987
120201
|
node.Out=[];
|
|
119988
120202
|
break;
|
|
120203
|
+
case "DRAWDOUGHNUT":
|
|
120204
|
+
node.Draw=this.Draw.DRAWDOUGHNUT(args);
|
|
120205
|
+
node.Out=[];
|
|
120206
|
+
break;
|
|
119989
120207
|
//雷达图
|
|
119990
120208
|
case "RADAR_CELL":
|
|
119991
120209
|
node.Out=this.Draw.RADAR_CELL(args[0],args[1],args[2],args[3]);
|
|
@@ -123039,6 +123257,30 @@ function ScriptIndex(name,script,args,option)
|
|
|
123039
123257
|
hqChart.ChartPaint.push(chart);
|
|
123040
123258
|
}
|
|
123041
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
|
+
|
|
123042
123284
|
this.CreateTradeIcon=function(hqChart,windowIndex,varItem,id)
|
|
123043
123285
|
{
|
|
123044
123286
|
var chart=new ChartTradeIcon();
|
|
@@ -123921,6 +124163,9 @@ function ScriptIndex(name,script,args,option)
|
|
|
123921
124163
|
case "DRAW_SIMPLE_RADAR":
|
|
123922
124164
|
this.CreateSimpleRadar(hqChart,windowIndex,item,i);
|
|
123923
124165
|
break;
|
|
124166
|
+
case "DRAW_SIMPLE_DOUGHNUT":
|
|
124167
|
+
this.CreateSimpleDoughnut(hqChart,windowIndex,item,i);
|
|
124168
|
+
break;
|
|
123924
124169
|
case "BUY":
|
|
123925
124170
|
case "SELL":
|
|
123926
124171
|
case "SELLSHORT":
|
|
@@ -124274,6 +124519,9 @@ function OverlayScriptIndex(name,script,args,option)
|
|
|
124274
124519
|
case "DRAW_SIMPLE_PIE":
|
|
124275
124520
|
this.CreateSimplePie(hqChart,windowIndex,item,i);
|
|
124276
124521
|
break;
|
|
124522
|
+
case "DRAW_SIMPLE_DOUGHNUT":
|
|
124523
|
+
this.CreateSimpleDoughnut(hqChart,windowIndex,item,i);
|
|
124524
|
+
break;
|
|
124277
124525
|
case "DRAW_SIMPLE_RADAR":
|
|
124278
124526
|
this.CreateSimpleRadar(hqChart,windowIndex,item,i);
|
|
124279
124527
|
break;
|
|
@@ -125352,6 +125600,34 @@ function OverlayScriptIndex(name,script,args,option)
|
|
|
125352
125600
|
frame.ChartPaint.push(chart);
|
|
125353
125601
|
}
|
|
125354
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
|
+
|
|
125355
125631
|
this.CreateSimpleRadar=function(hqChart,windowIndex,varItem,id)
|
|
125356
125632
|
{
|
|
125357
125633
|
var overlayIndex=this.OverlayIndex;
|
|
@@ -126579,7 +126855,7 @@ function APIScriptIndex(name,script,args,option, isOverlay)
|
|
|
126579
126855
|
outVarItem.Draw=drawItem;
|
|
126580
126856
|
result.push(outVarItem);
|
|
126581
126857
|
}
|
|
126582
|
-
else if (draw.DrawType=="DRAW_SIMPLE_PIE")
|
|
126858
|
+
else if (draw.DrawType=="DRAW_SIMPLE_PIE" || draw.DrawType=="DRAW_SIMPLE_DOUGHNUT")
|
|
126583
126859
|
{
|
|
126584
126860
|
drawItem.Name=draw.Name;
|
|
126585
126861
|
drawItem.Type=draw.Type;
|
|
@@ -128219,6 +128495,11 @@ function GetBlackStyle()
|
|
|
128219
128495
|
BorderColor:"rgb(220,220,220)",
|
|
128220
128496
|
},
|
|
128221
128497
|
|
|
128498
|
+
ChartSimpleDoughnut:
|
|
128499
|
+
{
|
|
128500
|
+
BorderColor:"rgb(220,220,220)",
|
|
128501
|
+
},
|
|
128502
|
+
|
|
128222
128503
|
ChartSimpleRadar:
|
|
128223
128504
|
{
|
|
128224
128505
|
//TextFont:{ Family:'微软雅黑' , Size:12 },
|
|
@@ -142768,7 +143049,7 @@ function ScrollBarBGChart()
|
|
|
142768
143049
|
|
|
142769
143050
|
|
|
142770
143051
|
|
|
142771
|
-
var HQCHART_VERSION="1.1.
|
|
143052
|
+
var HQCHART_VERSION="1.1.14371";
|
|
142772
143053
|
|
|
142773
143054
|
function PrintHQChartVersion()
|
|
142774
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
|
{
|