hqchart 1.1.13569 → 1.1.13577
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 +22 -15
- package/package.json +1 -1
- package/src/jscommon/umychart.DialogDrawTool.js +1 -0
- package/src/jscommon/umychart.js +67 -6
- package/src/jscommon/umychart.report.js +101 -2
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +169 -9
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +170 -9
|
@@ -60327,6 +60327,7 @@ IChartDrawPicture.ArrayDrawPricture=
|
|
|
60327
60327
|
{ Name:"价格通道线", ClassName:'ChartDrawPicturePriceChannel', Create:function() { return new ChartDrawPicturePriceChannel(); }},
|
|
60328
60328
|
{ Name:"文本", ClassName:'ChartDrawPictureText', Create:function() { return new ChartDrawPictureText(); }},
|
|
60329
60329
|
{ Name:"江恩角度线", ClassName:'ChartDrawPictureGannFan', Create:function() { return new ChartDrawPictureGannFan(); }},
|
|
60330
|
+
{ Name:"江恩角度线2", ClassName:'ChartDrawPictureGannFan', Create:function() { return new ChartDrawPictureGannFanV2(); }},
|
|
60330
60331
|
{ Name:"阻速线", ClassName:'ChartDrawPictureResistanceLine', Create:function() { return new ChartDrawPictureResistanceLine(); }},
|
|
60331
60332
|
{ Name:"阻速线2", ClassName:'ChartDrawPictureResistanceLineV2', Create:function() { return new ChartDrawPictureResistanceLineV2(); }},
|
|
60332
60333
|
{ Name:"黄金分割", ClassName:'ChartDrawPictureGoldenSection', Create:function() { return new ChartDrawPictureGoldenSection(); }},
|
|
@@ -63725,6 +63726,7 @@ function ChartDrawPictureGannFan()
|
|
|
63725
63726
|
this.LineDash=[5,10];
|
|
63726
63727
|
this.EnableDottedLine=false; //辅助线是否使用虚线
|
|
63727
63728
|
this.EnableArea=true; //是否绘制面积图
|
|
63729
|
+
this.IsShowTitle=true;
|
|
63728
63730
|
|
|
63729
63731
|
this.Super_SetOption=this.SetOption; //父类函数
|
|
63730
63732
|
|
|
@@ -63737,10 +63739,10 @@ function ChartDrawPictureGannFan()
|
|
|
63737
63739
|
if (Array.isArray(option.LineDash)) this.LineDash=option.LineDash;
|
|
63738
63740
|
if (IFrameSplitOperator.IsBool(option.EnableDottedLine)) this.EnableDottedLine=option.EnableDottedLine;
|
|
63739
63741
|
if (IFrameSplitOperator.IsBool(option.EnableArea)) this.EnableArea=option.EnableArea;
|
|
63742
|
+
if (IFrameSplitOperator.IsBool(option.IsShowTitle)) this.IsShowTitle=option.IsShowTitle;
|
|
63740
63743
|
}
|
|
63741
63744
|
}
|
|
63742
63745
|
|
|
63743
|
-
|
|
63744
63746
|
this.Draw=function()
|
|
63745
63747
|
{
|
|
63746
63748
|
this.LinePoint=[];
|
|
@@ -63761,16 +63763,19 @@ function ChartDrawPictureGannFan()
|
|
|
63761
63763
|
this.CalculateLines(drawPoint[0],drawPoint[1],quadrant);
|
|
63762
63764
|
if (this.EnableArea) this.DrawArea();
|
|
63763
63765
|
|
|
63764
|
-
for(var i
|
|
63766
|
+
for(var i=0; i<this.LinePoint.length; ++i)
|
|
63765
63767
|
{
|
|
63766
63768
|
var item=this.LinePoint[i];
|
|
63767
63769
|
this.DrawLine(item.Start,item.End,item.IsDottedLine);
|
|
63768
63770
|
}
|
|
63769
63771
|
|
|
63770
|
-
|
|
63772
|
+
if (this.IsShowTitle)
|
|
63771
63773
|
{
|
|
63772
|
-
var
|
|
63773
|
-
|
|
63774
|
+
for(var i=0; i<this.LinePoint.length; ++i)
|
|
63775
|
+
{
|
|
63776
|
+
var item =this.LinePoint[i];
|
|
63777
|
+
if (item.Text && item.PtEnd) this.DrawTitle(item.PtEnd,item.Text);
|
|
63778
|
+
}
|
|
63774
63779
|
}
|
|
63775
63780
|
}
|
|
63776
63781
|
else
|
|
@@ -63982,13 +63987,68 @@ function ChartDrawPictureGannFan()
|
|
|
63982
63987
|
}
|
|
63983
63988
|
}
|
|
63984
63989
|
|
|
63990
|
+
|
|
63991
|
+
//江恩角度线(Gann Fan) 通达信版本
|
|
63992
|
+
function ChartDrawPictureGannFanV2()
|
|
63993
|
+
{
|
|
63994
|
+
this.newMethod=ChartDrawPictureGannFan; //派生
|
|
63995
|
+
this.newMethod();
|
|
63996
|
+
delete this.newMethod;
|
|
63997
|
+
|
|
63998
|
+
this.ClassName='ChartDrawPictureGannFanV2';
|
|
63999
|
+
this.EnableDottedLine=true; //辅助线是否使用虚线
|
|
64000
|
+
this.LineDash=[4,8];
|
|
64001
|
+
this.EnableArea=false;
|
|
64002
|
+
|
|
64003
|
+
this.Super_CalculateLines=this.CalculateLines;
|
|
64004
|
+
|
|
64005
|
+
this.CalculateLines=function(ptStart,ptEnd,quadrant)
|
|
64006
|
+
{
|
|
64007
|
+
if (!this.Super_CalculateLines(ptStart,ptEnd,quadrant)) return false;
|
|
64008
|
+
|
|
64009
|
+
var border=this.Frame.ChartBorder.GetBorder();
|
|
64010
|
+
if (quadrant==1)
|
|
64011
|
+
{
|
|
64012
|
+
var line={ Start:ptStart, End:{ X:border.Right, Y:ptStart.Y}, IsDottedLine:false, PtEnd:null, Text:null };
|
|
64013
|
+
this.LinePoint.push(line);
|
|
64014
|
+
|
|
64015
|
+
var line={ Start:ptStart, End:{ X:ptStart.X, Y:border.TopEx }, IsDottedLine:false, PtEnd:null, Text:null };
|
|
64016
|
+
this.LinePoint.push(line);
|
|
64017
|
+
}
|
|
64018
|
+
else if (quadrant==2)
|
|
64019
|
+
{
|
|
64020
|
+
var line={ Start:ptStart, End:{ X:ptStart.X, Y:border.TopEx }, IsDottedLine:false, PtEnd:null, Text:null };
|
|
64021
|
+
this.LinePoint.push(line);
|
|
64022
|
+
|
|
64023
|
+
var line={ Start:ptStart, End:{ X:border.Left, Y:ptStart.Y}, IsDottedLine:false, PtEnd:null, Text:null };
|
|
64024
|
+
this.LinePoint.push(line);
|
|
64025
|
+
}
|
|
64026
|
+
else if (quadrant==3)
|
|
64027
|
+
{
|
|
64028
|
+
var line={ Start:ptStart, End:{ X:border.Left, Y:ptStart.Y}, IsDottedLine:false, PtEnd:null, Text:null };
|
|
64029
|
+
this.LinePoint.push(line);
|
|
64030
|
+
|
|
64031
|
+
var line={ Start:ptStart, End:{ X:ptStart.X, Y:border.BottomEx }, IsDottedLine:false, PtEnd:null, Text:null };
|
|
64032
|
+
this.LinePoint.push(line);
|
|
64033
|
+
}
|
|
64034
|
+
else if (quadrant==4)
|
|
64035
|
+
{
|
|
64036
|
+
var line={ Start:ptStart, End:{ X:ptStart.X, Y:border.BottomEx }, IsDottedLine:false, PtEnd:null, Text:null };
|
|
64037
|
+
this.LinePoint.push(line);
|
|
64038
|
+
|
|
64039
|
+
var line={ Start:ptStart, End:{ X:border.Right, Y:ptStart.Y}, IsDottedLine:false, PtEnd:null, Text:null };
|
|
64040
|
+
this.LinePoint.push(line);
|
|
64041
|
+
}
|
|
64042
|
+
}
|
|
64043
|
+
}
|
|
64044
|
+
|
|
63985
64045
|
//阻速线 (高 3等份)
|
|
63986
64046
|
function ChartDrawPictureResistanceLine()
|
|
63987
64047
|
{
|
|
63988
64048
|
this.newMethod=ChartDrawPictureGannFan; //派生
|
|
63989
64049
|
this.newMethod();
|
|
63990
64050
|
delete this.newMethod;
|
|
63991
|
-
|
|
64051
|
+
|
|
63992
64052
|
this.ClassName='ChartDrawPictureResistanceLine';
|
|
63993
64053
|
|
|
63994
64054
|
//计算线段
|
|
@@ -64127,6 +64187,7 @@ function ChartDrawPictureResistanceLineV2()
|
|
|
64127
64187
|
this.EnableDottedLine=true; //辅助线是否使用虚线
|
|
64128
64188
|
this.LineDash=[4,8];
|
|
64129
64189
|
this.EnableArea=false;
|
|
64190
|
+
this.IsShowTitle=false;
|
|
64130
64191
|
}
|
|
64131
64192
|
|
|
64132
64193
|
|
|
@@ -128545,7 +128606,7 @@ function JSReportChartContainer(uielement)
|
|
|
128545
128606
|
switch(cmdID)
|
|
128546
128607
|
{
|
|
128547
128608
|
case JSCHART_MENU_ID.CMD_REPORT_CHANGE_BLOCK_ID:
|
|
128548
|
-
if (srcParam) this.ChangeSymbol(
|
|
128609
|
+
if (srcParam) this.ChangeSymbol(srcParam);
|
|
128549
128610
|
break;
|
|
128550
128611
|
}
|
|
128551
128612
|
}
|
|
@@ -129076,6 +129137,7 @@ var REPORT_COLUMN_ID=
|
|
|
129076
129137
|
CUSTOM_ICON_ID:103, //自定义图标
|
|
129077
129138
|
CUSTOM_CHECKBOX_ID:104, //自定义checkbox
|
|
129078
129139
|
CUSTOM_BUTTON_ID:105, //自定义按钮
|
|
129140
|
+
CUSTOM_PROGRESS_ID:106, //进度条
|
|
129079
129141
|
}
|
|
129080
129142
|
|
|
129081
129143
|
var MAP_COLUMN_FIELD=new Map([
|
|
@@ -129459,6 +129521,13 @@ function ChartReport()
|
|
|
129459
129521
|
if (IFrameSplitOperator.IsNumber(item.BlockIndex)) colItem.BlockIndex=item.BlockIndex;
|
|
129460
129522
|
if (item.Button) colItem.Button=CloneData(item.Button);
|
|
129461
129523
|
}
|
|
129524
|
+
else if (item.Type==REPORT_COLUMN_ID.CUSTOM_PROGRESS_ID)
|
|
129525
|
+
{
|
|
129526
|
+
if (!IFrameSplitOperator.IsNumber(item.DataIndex) && !IFrameSplitOperator.IsNumber(item.BlockIndex)) continue;
|
|
129527
|
+
if (IFrameSplitOperator.IsNumber(item.DataIndex)) colItem.DataIndex=item.DataIndex; //数据在扩展数据索引列
|
|
129528
|
+
if (IFrameSplitOperator.IsNumber(item.BlockIndex)) colItem.BlockIndex=item.BlockIndex;
|
|
129529
|
+
if (item.ProgressBar) colItem.ProgressBar=CloneData(item.ProgressBar);
|
|
129530
|
+
}
|
|
129462
129531
|
else if (item.Type==REPORT_COLUMN_ID.CUSTOM_ICON_ID)
|
|
129463
129532
|
{
|
|
129464
129533
|
|
|
@@ -129576,7 +129645,8 @@ function ChartReport()
|
|
|
129576
129645
|
|
|
129577
129646
|
{ Type:REPORT_COLUMN_ID.CUSTOM_CHECKBOX_ID, Title:"", TextAlign:"center", FixedWidth:20*GetDevicePixelRatio() },
|
|
129578
129647
|
|
|
129579
|
-
{ Type:REPORT_COLUMN_ID.CUSTOM_BUTTON_ID, Title:"", TextAlign:"center", FixedWidth:50*GetDevicePixelRatio() }
|
|
129648
|
+
{ Type:REPORT_COLUMN_ID.CUSTOM_BUTTON_ID, Title:"", TextAlign:"center", FixedWidth:50*GetDevicePixelRatio() },
|
|
129649
|
+
{ Type:REPORT_COLUMN_ID.CUSTOM_PROGRESS_ID, Title:"进度条", TextAlign:"center", FixedWidth:100*GetDevicePixelRatio() }
|
|
129580
129650
|
];
|
|
129581
129651
|
|
|
129582
129652
|
for(var i=0;i<DEFAULT_COLUMN.length;++i)
|
|
@@ -130549,6 +130619,15 @@ function ChartReport()
|
|
|
130549
130619
|
|
|
130550
130620
|
this.GetCustomButtonDrawInfo(data, column, drawInfo);
|
|
130551
130621
|
}
|
|
130622
|
+
else if (column.Type==REPORT_COLUMN_ID.CUSTOM_PROGRESS_ID)
|
|
130623
|
+
{
|
|
130624
|
+
rtItem={ Left:left, Top:top, Width:column.Width, Height:this.RowHeight };
|
|
130625
|
+
rtItem.Right=rtItem.Left+rtItem.Width;
|
|
130626
|
+
rtItem.Bottom=rtItem.Top+rtItem.Height;
|
|
130627
|
+
drawInfo.Rect=rtItem;
|
|
130628
|
+
|
|
130629
|
+
this.GetCustomProgressBarDrawInfo(data, column, drawInfo);
|
|
130630
|
+
}
|
|
130552
130631
|
|
|
130553
130632
|
|
|
130554
130633
|
//拖拽行颜色
|
|
@@ -130571,6 +130650,10 @@ function ChartReport()
|
|
|
130571
130650
|
{
|
|
130572
130651
|
this.DrawButton(drawInfo, left, top, itemWidth);
|
|
130573
130652
|
}
|
|
130653
|
+
else if (column.Type==REPORT_COLUMN_ID.CUSTOM_PROGRESS_ID)
|
|
130654
|
+
{
|
|
130655
|
+
this.DrawProgressBar(drawInfo, left, top, itemWidth);
|
|
130656
|
+
}
|
|
130574
130657
|
else
|
|
130575
130658
|
{
|
|
130576
130659
|
if (data.FlashBG && data.FlashBG.Data && column.ID!=undefined)
|
|
@@ -130886,6 +130969,22 @@ function ChartReport()
|
|
|
130886
130969
|
if (IFrameSplitOperator.IsBool(buttonData.Enable)) drawInfo.Enable=buttonData.Enable;
|
|
130887
130970
|
}
|
|
130888
130971
|
|
|
130972
|
+
this.GetCustomProgressBarDrawInfo=function(data, column, drawInfo)
|
|
130973
|
+
{
|
|
130974
|
+
var barData=this.GetExtendData(data, column);
|
|
130975
|
+
if (!barData) return;
|
|
130976
|
+
|
|
130977
|
+
drawInfo.Text=barData.Title;
|
|
130978
|
+
drawInfo.ProgressBar=column.ProgressBar;
|
|
130979
|
+
drawInfo.Enable=true;
|
|
130980
|
+
drawInfo.Value=barData.Value; //占比
|
|
130981
|
+
drawInfo.Data=barData;
|
|
130982
|
+
if (IFrameSplitOperator.IsBool(barData.Enable)) drawInfo.Enable=barData.Enable;
|
|
130983
|
+
if (barData.TextColor) drawInfo.TextColor=barData.TextColor;
|
|
130984
|
+
if (barData.BarColor) drawInfo.BarColor=barData.BarColor;
|
|
130985
|
+
if (barData.BGColor) drawInfo.BGColor=barData.BGColor;
|
|
130986
|
+
}
|
|
130987
|
+
|
|
130889
130988
|
this.FormaTimeDrawInfo=function(column, stock, drawInfo, data)
|
|
130890
130989
|
{
|
|
130891
130990
|
if (!IFrameSplitOperator.IsNumber(stock.Time)) return;
|
|
@@ -131228,6 +131327,67 @@ function ChartReport()
|
|
|
131228
131327
|
}
|
|
131229
131328
|
}
|
|
131230
131329
|
|
|
131330
|
+
this.DrawProgressBar=function(drawInfo, left, top, width)
|
|
131331
|
+
{
|
|
131332
|
+
if (!drawInfo.ProgressBar) return;
|
|
131333
|
+
|
|
131334
|
+
var config=drawInfo.ProgressBar;
|
|
131335
|
+
var rtBG=
|
|
131336
|
+
{
|
|
131337
|
+
Left:left+config.Margin.Left, Top:top+config.Margin.Top,
|
|
131338
|
+
Height:this.RowHeight-config.Margin.Top-config.Margin.Bottom,
|
|
131339
|
+
Width:width-config.Margin.Left-config.Margin.Right
|
|
131340
|
+
}
|
|
131341
|
+
rtBG.Right=rtBG.Left+rtBG.Width;
|
|
131342
|
+
rtBG.Bottom=rtBG.Top+rtBG.Height;
|
|
131343
|
+
|
|
131344
|
+
var bgColor=config.BGColor;
|
|
131345
|
+
var barColor=config.BarColor;
|
|
131346
|
+
var textColor=config.TextColor;
|
|
131347
|
+
if (drawInfo.Enable===false)
|
|
131348
|
+
{
|
|
131349
|
+
bgColor=config.Disable.BGColor;
|
|
131350
|
+
barColor=config.Disable.BarColor;
|
|
131351
|
+
textColor=config.Disable.TextColor;
|
|
131352
|
+
}
|
|
131353
|
+
|
|
131354
|
+
if (drawInfo.BGColor) bgColor=drawInfo.BGColor;
|
|
131355
|
+
if (drawInfo.TextColor) textColor=drawInfo.TextColor;
|
|
131356
|
+
if (drawInfo.BarColor) barColor=drawInfo.BarColor;
|
|
131357
|
+
|
|
131358
|
+
if (bgColor)
|
|
131359
|
+
{
|
|
131360
|
+
this.Canvas.fillStyle=bgColor;
|
|
131361
|
+
this.Canvas.fillRect(rtBG.Left, rtBG.Top,rtBG.Width,rtBG.Height);
|
|
131362
|
+
}
|
|
131363
|
+
|
|
131364
|
+
var fullBarWidth=rtBG.Width-config.BarMargin.Left-config.BarMargin.Right;
|
|
131365
|
+
var value=drawInfo.Value; // 0-1 进度条
|
|
131366
|
+
var rtBar={ Left:rtBG.Left+config.BarMargin.Left, Top:rtBG.Top+config.BarMargin.Top, Bottom:rtBG.Bottom-config.BarMargin.Bottom, Width:0 };
|
|
131367
|
+
if (value>0)
|
|
131368
|
+
{
|
|
131369
|
+
if (value>1) value=1;
|
|
131370
|
+
rtBar.Width=fullBarWidth*value;
|
|
131371
|
+
rtBar.Height=rtBar.Bottom-rtBar.Top;
|
|
131372
|
+
if (rtBar.Width<1) rtBG.Width=1;
|
|
131373
|
+
|
|
131374
|
+
this.Canvas.fillStyle=barColor;
|
|
131375
|
+
this.Canvas.fillRect(rtBar.Left, rtBar.Top,rtBar.Width,rtBar.Height);
|
|
131376
|
+
}
|
|
131377
|
+
|
|
131378
|
+
if (textColor && drawInfo.Text)
|
|
131379
|
+
{
|
|
131380
|
+
this.Canvas.font=config.Font;
|
|
131381
|
+
this.Canvas.textBaseline="bottom";
|
|
131382
|
+
this.Canvas.textAlign="left";
|
|
131383
|
+
|
|
131384
|
+
this.Canvas.fillStyle=textColor;
|
|
131385
|
+
var xText=rtBar.Left+config.TextMargin.Left;
|
|
131386
|
+
var yText=rtBar.Bottom-config.TextMargin.Bottom;
|
|
131387
|
+
this.Canvas.fillText(drawInfo.Text, xText, yText);
|
|
131388
|
+
}
|
|
131389
|
+
}
|
|
131390
|
+
|
|
131231
131391
|
//字体由外面设置
|
|
131232
131392
|
this.TextEllipsis=function(text, maxWidth, maxText)
|
|
131233
131393
|
{
|
|
@@ -138858,6 +139018,7 @@ function JSDialogDrawTool()
|
|
|
138858
139018
|
{ Title: '阻速线', ClassName: 'hqchart_drawtool icon-draw_resline', Type:0, Data:{ ID:"阻速线" } },
|
|
138859
139019
|
{ Title: '通达信阻速线', ClassName: 'hqchart_drawtool icon-draw_resline', Type:0, Data:{ ID:"阻速线2" } },
|
|
138860
139020
|
{ Title: '江恩角度线', ClassName: 'hqchart_drawtool icon-jiangenjiaoduxian', Type:0, Data:{ ID:"江恩角度线" } },
|
|
139021
|
+
{ Title: '通达信江恩角度线', ClassName: 'hqchart_drawtool icon-jiangenjiaoduxian', Type:0, Data:{ ID:"江恩角度线2" } },
|
|
138861
139022
|
]
|
|
138862
139023
|
},
|
|
138863
139024
|
{
|
|
@@ -139940,7 +140101,7 @@ function HQChartScriptWorker()
|
|
|
139940
140101
|
|
|
139941
140102
|
|
|
139942
140103
|
|
|
139943
|
-
var HQCHART_VERSION="1.1.
|
|
140104
|
+
var HQCHART_VERSION="1.1.13576";
|
|
139944
140105
|
|
|
139945
140106
|
function PrintHQChartVersion()
|
|
139946
140107
|
{
|