hqchart 1.1.14632 → 1.1.14639
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 +25 -193
- package/package.json +1 -1
- package/src/jscommon/umychart.DialogTooltip.js +10 -0
- package/src/jscommon/umychart.NetworkFilterTest.js +112 -0
- package/src/jscommon/umychart.complier.js +4 -0
- package/src/jscommon/umychart.js +97 -187
- package/src/jscommon/umychart.testdata.js +112 -0
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +102 -188
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.NetworkFilterTest.vue.js +112 -0
- package/src/jscommon/umychart.vue/umychart.vue.js +112 -188
|
@@ -12148,6 +12148,15 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
12148
12148
|
return;
|
|
12149
12149
|
}
|
|
12150
12150
|
}
|
|
12151
|
+
else if (toolTip.Type==9) //ChartKLineTable
|
|
12152
|
+
{
|
|
12153
|
+
if (toolTip.Data.Item && toolTip.Data.Item.Tooltip && this.FloatTooltip)
|
|
12154
|
+
{
|
|
12155
|
+
this.DrawFloatTooltip({X:x, Y:y, YMove:20/pixelTatio}, toolTip);
|
|
12156
|
+
bHideFloatToolip=false;
|
|
12157
|
+
return;
|
|
12158
|
+
}
|
|
12159
|
+
}
|
|
12151
12160
|
|
|
12152
12161
|
|
|
12153
12162
|
if (bHideFloatToolip) this.HideFloatTooltip();
|
|
@@ -36709,6 +36718,7 @@ function ChartKLineTable()
|
|
|
36709
36718
|
this.AryTableData=[];
|
|
36710
36719
|
this.MapCache=null; //key=date/date-time value={ Date:, Time:, Data:[ ] }
|
|
36711
36720
|
this.GetKValue=ChartData.GetKValue;
|
|
36721
|
+
this.AryCellRect=[]; //保存单元格信息
|
|
36712
36722
|
|
|
36713
36723
|
this.BuildCacheData=function()
|
|
36714
36724
|
{
|
|
@@ -36768,6 +36778,7 @@ function ChartKLineTable()
|
|
|
36768
36778
|
|
|
36769
36779
|
this.Draw=function()
|
|
36770
36780
|
{
|
|
36781
|
+
this.AryCellRect=[];
|
|
36771
36782
|
if (!this.IsShow || this.ChartFrame.IsMinSize || !this.IsVisible) return;
|
|
36772
36783
|
if (this.IsShowIndexTitleOnly()) return;
|
|
36773
36784
|
if (this.IsHideScriptIndex()) return;
|
|
@@ -36881,7 +36892,7 @@ function ChartKLineTable()
|
|
|
36881
36892
|
|
|
36882
36893
|
if (this.BGColor)
|
|
36883
36894
|
{
|
|
36884
|
-
var rtRightBG={Left:border.RightEx, Top:border.
|
|
36895
|
+
var rtRightBG={Left:border.RightEx, Top:border.Top, Right:border.ChartWidth, Bottom:border.Bottom };
|
|
36885
36896
|
rtRightBG.Width=rtRightBG.Right-rtRightBG.Left;
|
|
36886
36897
|
rtRightBG.Height=rtRightBG.Bottom-rtRightBG.Top;
|
|
36887
36898
|
this.Canvas.fillStyle=this.BGColor;
|
|
@@ -36922,9 +36933,11 @@ function ChartKLineTable()
|
|
|
36922
36933
|
var x=left,y=top, width=right-left;
|
|
36923
36934
|
var yOffset=3;
|
|
36924
36935
|
if (this.ItemMergin.YOffset) yOffset=this.ItemMergin.YOffset;
|
|
36925
|
-
for(var i=0;i<data.Data.length
|
|
36936
|
+
for(var i=0; i<data.Data.length; ++i, y+=this.RowHeight)
|
|
36926
36937
|
{
|
|
36927
36938
|
var item=data.Data[i];
|
|
36939
|
+
if (!item) continue;
|
|
36940
|
+
|
|
36928
36941
|
var rtBG={Left:x, Top:y, Right:right, Height:this.RowHeight, Width:width };
|
|
36929
36942
|
rtBG.Bottom=rtBG.Top+this.RowHeight;
|
|
36930
36943
|
|
|
@@ -36969,20 +36982,27 @@ function ChartKLineTable()
|
|
|
36969
36982
|
}
|
|
36970
36983
|
}
|
|
36971
36984
|
|
|
36985
|
+
if (rtBG.Width>5)
|
|
36986
|
+
{
|
|
36987
|
+
this.AryCellRect.push({ Item:{ Cell:item, Colunm:data, RowIndex:i, SubCell:subItem, SubIndex:j, Tooltip:subItem.Tooltip, Type:2 }, Rect:rtSubBG });
|
|
36988
|
+
}
|
|
36989
|
+
|
|
36972
36990
|
xCell+=subCellWidth;
|
|
36973
36991
|
}
|
|
36974
36992
|
}
|
|
36975
36993
|
else
|
|
36976
36994
|
{
|
|
36977
|
-
if (item
|
|
36995
|
+
if (item.BGColor)
|
|
36978
36996
|
{
|
|
36979
36997
|
this.Canvas.fillStyle=item.BGColor;
|
|
36980
36998
|
this.Canvas.fillRect(rtBG.Left, rtBG.Top, rtBG.Width, rtBG.Height);
|
|
36981
36999
|
}
|
|
36982
37000
|
|
|
36983
|
-
if (item
|
|
37001
|
+
if (item.Text && rtBG.Width>10)
|
|
36984
37002
|
{
|
|
36985
|
-
this.Canvas.fillStyle=item.Color;
|
|
37003
|
+
if (item.Color) this.Canvas.fillStyle=item.Color;
|
|
37004
|
+
else this.Canvas.fillStyle=this.TextColor;
|
|
37005
|
+
|
|
36986
37006
|
this.Canvas.textBaseline='bottom';
|
|
36987
37007
|
var yText=rtBG.Bottom-yOffset;
|
|
36988
37008
|
|
|
@@ -37002,9 +37022,14 @@ function ChartKLineTable()
|
|
|
37002
37022
|
this.Canvas.fillText(item.Text,rtBG.Left+2,yText, width-4);
|
|
37003
37023
|
}
|
|
37004
37024
|
}
|
|
37025
|
+
|
|
37026
|
+
if (rtBG.Width>5)
|
|
37027
|
+
{
|
|
37028
|
+
this.AryCellRect.push({ Item:{ Cell:item, Colunm:data, RowIndex:i, Tooltip:item.Tooltip, Type:1 }, Rect:rtBG });
|
|
37029
|
+
}
|
|
37005
37030
|
}
|
|
37006
37031
|
|
|
37007
|
-
|
|
37032
|
+
|
|
37008
37033
|
}
|
|
37009
37034
|
}
|
|
37010
37035
|
|
|
@@ -37038,6 +37063,30 @@ function ChartKLineTable()
|
|
|
37038
37063
|
{
|
|
37039
37064
|
return {Min:0, Max:this.RowCount};
|
|
37040
37065
|
}
|
|
37066
|
+
|
|
37067
|
+
this.GetTooltipData=function(x,y,tooltip)
|
|
37068
|
+
{
|
|
37069
|
+
if (!this.IsShow) return false;
|
|
37070
|
+
|
|
37071
|
+
for(var i=0;i<this.AryCellRect.length;++i)
|
|
37072
|
+
{
|
|
37073
|
+
var item=this.AryCellRect[i];
|
|
37074
|
+
if (!item.Rect) continue;
|
|
37075
|
+
|
|
37076
|
+
var rect=item.Rect;
|
|
37077
|
+
if (x>=rect.Left && x<=rect.Right && y>=rect.Top && y<=rect.Bottom)
|
|
37078
|
+
{
|
|
37079
|
+
var data=item.Item;
|
|
37080
|
+
JSConsole.Chart.Log('[ChartKLineTable::GetTooltipData] cell', item);
|
|
37081
|
+
tooltip.Data={ Rect:item.Rect, Item:data };
|
|
37082
|
+
tooltip.ChartPaint=this;
|
|
37083
|
+
tooltip.Type=9; //ChartKLineTable
|
|
37084
|
+
return true;
|
|
37085
|
+
}
|
|
37086
|
+
}
|
|
37087
|
+
|
|
37088
|
+
return false;
|
|
37089
|
+
}
|
|
37041
37090
|
}
|
|
37042
37091
|
|
|
37043
37092
|
//表格
|
|
@@ -38865,7 +38914,7 @@ function ChartArea()
|
|
|
38865
38914
|
}
|
|
38866
38915
|
}
|
|
38867
38916
|
|
|
38868
|
-
//散点图
|
|
38917
|
+
//散点图 建议使用新版本 ChartScatterPlotV2
|
|
38869
38918
|
function ChartScatterPlot()
|
|
38870
38919
|
{
|
|
38871
38920
|
this.newMethod=IChartPainting; //派生
|
|
@@ -39070,7 +39119,7 @@ function ChartScatterPlot()
|
|
|
39070
39119
|
|
|
39071
39120
|
}
|
|
39072
39121
|
|
|
39073
|
-
//散点图
|
|
39122
|
+
//散点图 2.0
|
|
39074
39123
|
function ChartScatterPlotV2()
|
|
39075
39124
|
{
|
|
39076
39125
|
this.newMethod=IChartPainting; //派生
|
|
@@ -48047,6 +48096,9 @@ function ChartDrawSVG()
|
|
|
48047
48096
|
this.BuildKeyCallback=null;
|
|
48048
48097
|
this.MapCache=null; //key=date/date-time value={ Data:[] }
|
|
48049
48098
|
|
|
48099
|
+
this.AryDrawDetail=[]; //需要绘制的文字信息
|
|
48100
|
+
this.EnalbeDetailOnVerlap=false; //详情重叠不显示
|
|
48101
|
+
|
|
48050
48102
|
this.BuildKey=function(item)
|
|
48051
48103
|
{
|
|
48052
48104
|
if (this.BuildKeyCallback) return this.BuildKeyCallback(item);
|
|
@@ -48081,6 +48133,7 @@ function ChartDrawSVG()
|
|
|
48081
48133
|
{
|
|
48082
48134
|
this.TooltipRect=[];
|
|
48083
48135
|
this.AryDrawRect=[];
|
|
48136
|
+
this.AryDrawDetail=[];
|
|
48084
48137
|
this.AutoYOffset=0;
|
|
48085
48138
|
|
|
48086
48139
|
if (!this.IsShow || this.ChartFrame.IsMinSize || !this.IsVisible) return;
|
|
@@ -48089,6 +48142,10 @@ function ChartDrawSVG()
|
|
|
48089
48142
|
if (!this.MapCache || this.MapCache.size<=0) return;
|
|
48090
48143
|
|
|
48091
48144
|
this.DrawSVGV2();
|
|
48145
|
+
|
|
48146
|
+
if (this.EnalbeDetailOnVerlap) this.DrawOnVerlapDetail();
|
|
48147
|
+
|
|
48148
|
+
this.AryDrawDetail=[];
|
|
48092
48149
|
}
|
|
48093
48150
|
|
|
48094
48151
|
this.DrawDetail=function(rtSVG, data, svgItem)
|
|
@@ -48155,6 +48212,21 @@ function ChartDrawSVG()
|
|
|
48155
48212
|
}
|
|
48156
48213
|
}
|
|
48157
48214
|
|
|
48215
|
+
if (this.EnalbeDetailOnVerlap) //启动重叠不会 先不画只计算位置, 后面统一画
|
|
48216
|
+
{
|
|
48217
|
+
this.AryDrawDetail.push({ Rect:rtBorder, AryText:aryText, Data:svgItem });
|
|
48218
|
+
return;
|
|
48219
|
+
}
|
|
48220
|
+
|
|
48221
|
+
this.DrawDetailText(data,aryText,rtBorder);
|
|
48222
|
+
|
|
48223
|
+
this.AryDrawRect.push( {Left:rtBorder.Left, Top:rtBorder.Top, Right:rtBorder.Right, Bottom:rtBorder.Bottom, Type:"Detail", Data:svgItem } );
|
|
48224
|
+
}
|
|
48225
|
+
|
|
48226
|
+
this.DrawDetailText=function(data, aryText, rtBorder)
|
|
48227
|
+
{
|
|
48228
|
+
if (!data) return;
|
|
48229
|
+
|
|
48158
48230
|
if (data.BGColor)
|
|
48159
48231
|
{
|
|
48160
48232
|
this.Canvas.fillStyle=data.BGColor;
|
|
@@ -48171,12 +48243,27 @@ function ChartDrawSVG()
|
|
|
48171
48243
|
for(var i=0;i<aryText.length;++i)
|
|
48172
48244
|
{
|
|
48173
48245
|
var item=aryText[i];
|
|
48174
|
-
|
|
48246
|
+
|
|
48175
48247
|
this.Canvas.fillStyle = item.Data.Color;
|
|
48176
48248
|
this.Canvas.fillText(item.Data.Text, item.X, item.Y);
|
|
48177
48249
|
}
|
|
48250
|
+
}
|
|
48178
48251
|
|
|
48179
|
-
|
|
48252
|
+
this.DrawOnVerlapDetail=function()
|
|
48253
|
+
{
|
|
48254
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(this.AryDrawDetail)) return;
|
|
48255
|
+
|
|
48256
|
+
for(var i=this.AryDrawDetail.length-1;i>=0; --i)
|
|
48257
|
+
{
|
|
48258
|
+
var drawItem=this.AryDrawDetail[i];
|
|
48259
|
+
var rtBorder=drawItem.Rect;
|
|
48260
|
+
|
|
48261
|
+
if (this.IsRectOverlap(rtBorder)) continue;
|
|
48262
|
+
|
|
48263
|
+
this.DrawDetailText(drawItem.Data.Detail, drawItem.AryText, rtBorder);
|
|
48264
|
+
|
|
48265
|
+
this.AryDrawRect.push( {Left:rtBorder.Left, Top:rtBorder.Top, Right:rtBorder.Right, Bottom:rtBorder.Bottom, Type:"Detail", Data:drawItem.Data } );
|
|
48266
|
+
}
|
|
48180
48267
|
}
|
|
48181
48268
|
|
|
48182
48269
|
this.GetDetailPosition=function(rtSVG, data)
|
|
@@ -48538,183 +48625,6 @@ function ChartDrawSVG()
|
|
|
48538
48625
|
}
|
|
48539
48626
|
}
|
|
48540
48627
|
|
|
48541
|
-
/*
|
|
48542
|
-
this.DrawSVG=function()
|
|
48543
|
-
{
|
|
48544
|
-
if (!this.IsShow || this.ChartFrame.IsMinSize) return;
|
|
48545
|
-
if (!this.Data || !IFrameSplitOperator.IsNonEmptyArray(this.Data.Data)) return;
|
|
48546
|
-
if (!IFrameSplitOperator.IsNonEmptyArray(this.Texts)) return;
|
|
48547
|
-
if (!this.Family) return;
|
|
48548
|
-
|
|
48549
|
-
this.IsHScreen=(this.ChartFrame.IsHScreen===true);
|
|
48550
|
-
var xPointCount=this.ChartFrame.XPointCount;
|
|
48551
|
-
var offset=this.Data.DataOffset;
|
|
48552
|
-
var top=this.ChartBorder.GetTopEx();
|
|
48553
|
-
var bottom=this.ChartBorder.GetBottomEx();
|
|
48554
|
-
var pixelRatio = GetDevicePixelRatio();
|
|
48555
|
-
|
|
48556
|
-
var x=0,y=0;
|
|
48557
|
-
for(var i=0; i<this.Texts.length; ++i)
|
|
48558
|
-
{
|
|
48559
|
-
var item=this.Texts[i];
|
|
48560
|
-
|
|
48561
|
-
if (!item.SVG || !item.SVG.Symbol) continue;
|
|
48562
|
-
if (!IFrameSplitOperator.IsNumber(item.Index)) continue;
|
|
48563
|
-
|
|
48564
|
-
var isMinuteFrame=this.IsMinuteFrame();
|
|
48565
|
-
var index=item.Index-offset;
|
|
48566
|
-
var kItem=this.Data.Data[item.Index];
|
|
48567
|
-
if (index<0 || index>=xPointCount) continue;
|
|
48568
|
-
|
|
48569
|
-
x=this.ChartFrame.GetXFromIndex(index);
|
|
48570
|
-
if (item.Value=="Top") y=top;
|
|
48571
|
-
else if (item.Value=="Bottom") y=bottom;
|
|
48572
|
-
else y=this.ChartFrame.GetYFromData(item.Value, false);
|
|
48573
|
-
if (IFrameSplitOperator.IsNumber(item.YOffset)) y+=item.YOffset; //Y轴偏移
|
|
48574
|
-
|
|
48575
|
-
var svgItem=item.SVG;
|
|
48576
|
-
if (IFrameSplitOperator.IsNumber(svgItem.YOffset)) y+=svgItem.YOffset;
|
|
48577
|
-
|
|
48578
|
-
if (this.AutoPosition)
|
|
48579
|
-
{
|
|
48580
|
-
var pt={ X:x, Y:y };
|
|
48581
|
-
this.CalculateShowPosition(item, pt); //重新计算位置
|
|
48582
|
-
x=pt.X;
|
|
48583
|
-
y=pt.Y;
|
|
48584
|
-
}
|
|
48585
|
-
|
|
48586
|
-
|
|
48587
|
-
var fontSVG=`${svgItem.Size}px ${this.Family}`;
|
|
48588
|
-
this.Canvas.font=fontSVG;
|
|
48589
|
-
var halfSize=svgItem.Size/2;
|
|
48590
|
-
var textBaseline='bottom';
|
|
48591
|
-
var rtSVG={ Left:x-halfSize, Right:x+halfSize, Top:y-svgItem.Size, Bottom:y, Height:svgItem.Size, Width:svgItem.Size };
|
|
48592
|
-
if (svgItem.VAlign===0)
|
|
48593
|
-
{
|
|
48594
|
-
textBaseline="top";
|
|
48595
|
-
rtSVG.Top=y;
|
|
48596
|
-
rtSVG.Bottom=rtSVG.Top+svgItem.Size;
|
|
48597
|
-
}
|
|
48598
|
-
else if (svgItem.VAlign===1)
|
|
48599
|
-
{
|
|
48600
|
-
textBaseline='middle';
|
|
48601
|
-
rtSVG.Top=y-svgItem.Size/2;
|
|
48602
|
-
rtSVG.Bottom=rtSVG.Top+svgItem.Size;
|
|
48603
|
-
}
|
|
48604
|
-
|
|
48605
|
-
if (rtSVG.Top<0)
|
|
48606
|
-
{
|
|
48607
|
-
rtSVG.Top=0;
|
|
48608
|
-
rtSVG.Bottom=svgItem.Size;
|
|
48609
|
-
y=rtSVG.Bottom;
|
|
48610
|
-
}
|
|
48611
|
-
|
|
48612
|
-
this.Canvas.textBaseline=textBaseline;
|
|
48613
|
-
this.Canvas.textAlign='center';
|
|
48614
|
-
this.Canvas.fillStyle = svgItem.Color;
|
|
48615
|
-
this.Canvas.fillText(svgItem.Symbol, x, y);
|
|
48616
|
-
|
|
48617
|
-
this.AryDrawRect.push( {Left:rtSVG.Left, Top:rtSVG.Top, Right:rtSVG.Right, Bottom:rtSVG.Bottom, Type:"SVG", Data:item } );
|
|
48618
|
-
|
|
48619
|
-
if (this.EnableTooltip) this.TooltipRect.push({ Rect:rtSVG,Index:i });
|
|
48620
|
-
|
|
48621
|
-
//文字
|
|
48622
|
-
if (item.Text && item.Text.Content && this.TextFont)
|
|
48623
|
-
{
|
|
48624
|
-
var textItem=item.Text;
|
|
48625
|
-
this.Canvas.font=this.TextFont;
|
|
48626
|
-
this.Canvas.fillStyle=textItem.Color;
|
|
48627
|
-
var yText=y;
|
|
48628
|
-
if (IFrameSplitOperator.IsNumber(textItem.YOffset)) yText+=textItem.YOffset;
|
|
48629
|
-
this.Canvas.fillText(textItem.Content, x, yText);
|
|
48630
|
-
}
|
|
48631
|
-
|
|
48632
|
-
if (item.Detail)
|
|
48633
|
-
{
|
|
48634
|
-
this.DrawDetail(rtSVG,item.Detail, item);
|
|
48635
|
-
}
|
|
48636
|
-
|
|
48637
|
-
//连线
|
|
48638
|
-
if (item.Line)
|
|
48639
|
-
{
|
|
48640
|
-
var lineItem=item.Line;
|
|
48641
|
-
var price=null, yPrice=null;
|
|
48642
|
-
var kItem=this.Data.Data[item.Index];
|
|
48643
|
-
if (lineItem.Value=="Bottom")
|
|
48644
|
-
{
|
|
48645
|
-
yPrice=bottom;
|
|
48646
|
-
}
|
|
48647
|
-
else if (lineItem.Value=="Top")
|
|
48648
|
-
{
|
|
48649
|
-
yPrice=top;
|
|
48650
|
-
}
|
|
48651
|
-
else
|
|
48652
|
-
{
|
|
48653
|
-
switch(lineItem.Value)
|
|
48654
|
-
{
|
|
48655
|
-
case "C":
|
|
48656
|
-
price=kItem.Close;
|
|
48657
|
-
break;
|
|
48658
|
-
case "H":
|
|
48659
|
-
price=kItem.High;
|
|
48660
|
-
break;
|
|
48661
|
-
case "L":
|
|
48662
|
-
price=kItem.Low;
|
|
48663
|
-
break;
|
|
48664
|
-
}
|
|
48665
|
-
|
|
48666
|
-
if (!IFrameSplitOperator.IsNumber(price)) continue;
|
|
48667
|
-
|
|
48668
|
-
yPrice=this.ChartFrame.GetYFromData(price);
|
|
48669
|
-
}
|
|
48670
|
-
|
|
48671
|
-
if (yPrice>=rtSVG.Top && yPrice<=rtSVG.Bottom) continue;
|
|
48672
|
-
|
|
48673
|
-
var yText;
|
|
48674
|
-
if (yPrice<rtSVG.Top)
|
|
48675
|
-
{
|
|
48676
|
-
yText=rtSVG.Top;
|
|
48677
|
-
if (IFrameSplitOperator.IsNumber(lineItem.SVGBlank))
|
|
48678
|
-
{
|
|
48679
|
-
//yPrice+=lineItem.Blank;
|
|
48680
|
-
yText-=lineItem.SVGBlank;
|
|
48681
|
-
}
|
|
48682
|
-
}
|
|
48683
|
-
else
|
|
48684
|
-
{
|
|
48685
|
-
yText=rtSVG.Bottom;
|
|
48686
|
-
if (IFrameSplitOperator.IsNumber(lineItem.SVGBlank))
|
|
48687
|
-
{
|
|
48688
|
-
//yPrice-=lineItem.Blank;
|
|
48689
|
-
yText+=lineItem.SVGBlank;
|
|
48690
|
-
}
|
|
48691
|
-
}
|
|
48692
|
-
|
|
48693
|
-
if (lineItem.Dash) this.Canvas.setLineDash(lineItem.Dash); //虚线
|
|
48694
|
-
var lineWidth=1*pixelRatio;
|
|
48695
|
-
if (lineItem.Width>0) lineWidth=lineItem.Width*pixelRatio;
|
|
48696
|
-
this.Canvas.lineWidth=lineWidth; //线宽
|
|
48697
|
-
this.Canvas.strokeStyle = lineItem.Color;
|
|
48698
|
-
this.Canvas.beginPath();
|
|
48699
|
-
|
|
48700
|
-
if (this.IsHScreen)
|
|
48701
|
-
{
|
|
48702
|
-
this.Canvas.moveTo(yText, ToFixedPoint(x));
|
|
48703
|
-
this.Canvas.lineTo(yPrice,ToFixedPoint(x));
|
|
48704
|
-
}
|
|
48705
|
-
else
|
|
48706
|
-
{
|
|
48707
|
-
this.Canvas.moveTo(ToFixedPoint2(lineWidth,x),yText);
|
|
48708
|
-
this.Canvas.lineTo(ToFixedPoint2(lineWidth,x),yPrice);
|
|
48709
|
-
}
|
|
48710
|
-
|
|
48711
|
-
this.Canvas.stroke();
|
|
48712
|
-
this.Canvas.setLineDash([]);
|
|
48713
|
-
}
|
|
48714
|
-
}
|
|
48715
|
-
}
|
|
48716
|
-
*/
|
|
48717
|
-
|
|
48718
48628
|
this.GetMaxMin=function()
|
|
48719
48629
|
{
|
|
48720
48630
|
this.IsHScreen=(this.ChartFrame.IsHScreen===true);
|
|
@@ -126623,6 +126533,7 @@ function ScriptIndex(name,script,args,option)
|
|
|
126623
126533
|
chart.Data=hqChart.GetKData()
|
|
126624
126534
|
if (IFrameSplitOperator.IsBool(varItem.Draw.DrawData.EnableTooltip)) chart.EnableTooltip=varItem.Draw.DrawData.EnableTooltip;
|
|
126625
126535
|
if (IFrameSplitOperator.IsBool(varItem.Draw.DrawData.IsDrawFirst)) chart.IsDrawFirst=varItem.Draw.DrawData.IsDrawFirst;
|
|
126536
|
+
if (IFrameSplitOperator.IsBool(varItem.Draw.EnalbeDetailOnVerlap)) chart.EnalbeDetailOnVerlap=varItem.Draw.EnalbeDetailOnVerlap;
|
|
126626
126537
|
if (varItem.Draw.BuildKeyCallback) chart.BuildKeyCallback=varItem.Draw.BuildKeyCallback;
|
|
126627
126538
|
chart.Family=varItem.Draw.DrawData.Family;
|
|
126628
126539
|
chart.TextFont=varItem.Draw.DrawData.TextFont;
|
|
@@ -126693,6 +126604,7 @@ function ScriptIndex(name,script,args,option)
|
|
|
126693
126604
|
if (config.TextColor) chart.TextColor=config.TextColor;
|
|
126694
126605
|
if (config.BorderColor) chart.BorderColor=config.BorderColor;
|
|
126695
126606
|
if (IFrameSplitOperator.IsNumber(config.RowNamePosition)) chart.RowNamePosition=config.RowNamePosition;
|
|
126607
|
+
if (IFrameSplitOperator.IsNumber(config.RowHeightType)) chart.RowHeightType=config.RowHeightType;
|
|
126696
126608
|
|
|
126697
126609
|
if (config.ItemMergin)
|
|
126698
126610
|
{
|
|
@@ -128533,6 +128445,7 @@ function OverlayScriptIndex(name,script,args,option)
|
|
|
128533
128445
|
chart.TextFont=varItem.Draw.DrawData.TextFont;
|
|
128534
128446
|
chart.Texts= varItem.Draw.DrawData.Data;
|
|
128535
128447
|
if (varItem.Draw.AutoPosition) chart.AutoPosition=varItem.Draw.AutoPosition;
|
|
128448
|
+
if (IFrameSplitOperator.IsBool(varItem.Draw.EnalbeDetailOnVerlap)) chart.EnalbeDetailOnVerlap=varItem.Draw.EnalbeDetailOnVerlap;
|
|
128536
128449
|
|
|
128537
128450
|
this.ReloadChartResource(hqChart, windowIndex, chart);
|
|
128538
128451
|
|
|
@@ -129739,6 +129652,7 @@ function APIScriptIndex(name,script,args,option, isOverlay)
|
|
|
129739
129652
|
drawItem.Name=draw.Name;
|
|
129740
129653
|
drawItem.DrawType=draw.DrawType;
|
|
129741
129654
|
if (draw.AutoPosition) drawItem.AutoPosition=draw.AutoPosition;
|
|
129655
|
+
drawItem.EnalbeDetailOnVerlap=draw.EnalbeDetailOnVerlap;
|
|
129742
129656
|
if (draw.BuildKeyCallback) drawItem.BuildKeyCallback=draw.BuildKeyCallback;
|
|
129743
129657
|
drawItem.DrawData={ Data:draw.Data, Family:draw.Family, TextFont:draw.TextFont, EnableTooltip:draw.EnableTooltip, IsDrawFirst:draw.IsDrawFirst };
|
|
129744
129658
|
outVarItem.Draw=drawItem;
|
|
@@ -146631,7 +146545,7 @@ function ScrollBarBGChart()
|
|
|
146631
146545
|
|
|
146632
146546
|
|
|
146633
146547
|
|
|
146634
|
-
var HQCHART_VERSION="1.1.
|
|
146548
|
+
var HQCHART_VERSION="1.1.14638";
|
|
146635
146549
|
|
|
146636
146550
|
function PrintHQChartVersion()
|
|
146637
146551
|
{
|
|
@@ -57547,6 +57547,8 @@ HQData.Report_APIIndex=function(data, callback)
|
|
|
57547
57547
|
HQData.APIIndex_TITLE(data, callback);
|
|
57548
57548
|
else if (request.Data.indexname=="API_SCATTER_PLOT_V2")
|
|
57549
57549
|
HQData.APIIndex_SCATTER_PLOT_V2(data, callback);
|
|
57550
|
+
else if (request.Data.indexname=="API_KLINE_TABLE")
|
|
57551
|
+
HQData.APIIndex_KLINE_TABLE(data, callback);
|
|
57550
57552
|
}
|
|
57551
57553
|
|
|
57552
57554
|
|
|
@@ -58608,6 +58610,116 @@ HQData.APIIndex_SCATTER_PLOT_V2=function(data, callback)
|
|
|
58608
58610
|
callback(apiData);
|
|
58609
58611
|
}
|
|
58610
58612
|
|
|
58613
|
+
HQData.APIIndex_KLINE_TABLE=function(data, callback)
|
|
58614
|
+
{
|
|
58615
|
+
data.PreventDefault=true;
|
|
58616
|
+
var hqchart=data.HQChart;
|
|
58617
|
+
var kData=data.HQChart.GetKData(); //hqchart图形的分钟数据
|
|
58618
|
+
|
|
58619
|
+
var tableData=
|
|
58620
|
+
{
|
|
58621
|
+
name:'KLINE_TABLE', type:1,
|
|
58622
|
+
Draw:
|
|
58623
|
+
{
|
|
58624
|
+
DrawType:'KLINE_TABLE',
|
|
58625
|
+
DrawData:[ ] , //数据 [ [ { Text, Color: BGColor }, ...... ], [],]
|
|
58626
|
+
RowCount:4,
|
|
58627
|
+
RowName:[ {Name:"账户1",TextAlign:"center"}, {Name:"账户2",TextAlign:"center"}, {Name:"账户3",TextAlign:"center"},{Name:"账户4", TextAlign:"center"}],
|
|
58628
|
+
|
|
58629
|
+
Config:
|
|
58630
|
+
{
|
|
58631
|
+
BGColor:"rgb(0,0,0)",
|
|
58632
|
+
BorderColor:"rgb(220,220,220)",
|
|
58633
|
+
TextColor:"rgb(250,250,250)",
|
|
58634
|
+
ItemMergin:{ Left:2, Right:2, Top:4, Bottom:4, YOffset:3 },
|
|
58635
|
+
RowNamePosition:3,
|
|
58636
|
+
TextFont:{ Family:'微软雅黑' , FontMaxSize:14*GetDevicePixelRatio(), },
|
|
58637
|
+
RowHeightType:1,
|
|
58638
|
+
}
|
|
58639
|
+
},
|
|
58640
|
+
|
|
58641
|
+
};
|
|
58642
|
+
|
|
58643
|
+
var ACCOUNT_TEST_DATA=
|
|
58644
|
+
[
|
|
58645
|
+
{ Name:"账户1", DayCount:5, OperatorID:0 },
|
|
58646
|
+
{ Name:"账户2", DayCount:10, OperatorID:0 },
|
|
58647
|
+
{ Name:"账户3", DayCount:4, OperatorID:0 },
|
|
58648
|
+
{ Name:"账户4", DayCount:8, OperatorID:0 },
|
|
58649
|
+
]
|
|
58650
|
+
|
|
58651
|
+
for(var i=0;i<kData.Data.length;++i)
|
|
58652
|
+
{
|
|
58653
|
+
var kItem=kData.Data[i];
|
|
58654
|
+
|
|
58655
|
+
//一列数据
|
|
58656
|
+
var colItem={ Date:kItem.Date, Time:kItem.Time, Data:[ ] };
|
|
58657
|
+
|
|
58658
|
+
for(var j=0;j<ACCOUNT_TEST_DATA.length;++j)
|
|
58659
|
+
{
|
|
58660
|
+
var accountItem=ACCOUNT_TEST_DATA[j];
|
|
58661
|
+
if (i%accountItem.DayCount==0)
|
|
58662
|
+
{
|
|
58663
|
+
accountItem.OperatorID++;
|
|
58664
|
+
if (accountItem.OperatorID>=3) accountItem.OperatorID=0;
|
|
58665
|
+
|
|
58666
|
+
if (accountItem.OperatorID==1)
|
|
58667
|
+
{
|
|
58668
|
+
colItem.Data[j]=
|
|
58669
|
+
{
|
|
58670
|
+
Text:"买", Color:"rgb(250,250,250)", BGColor:'rgb(250,0,0)', TextAlign:"center",
|
|
58671
|
+
Tooltip:
|
|
58672
|
+
{
|
|
58673
|
+
AryText:
|
|
58674
|
+
[
|
|
58675
|
+
{Title:"日期", Text:`${kItem.Date}`},
|
|
58676
|
+
{Title:"买入价", Text:`${kItem.Close.toFixed(2)}`, TextColor:"rgb(250,0,0)"},
|
|
58677
|
+
{Title:"数量", Text:`${HQData.GetRandomTestData(100,400).toFixed(0)}`,TextColor:"rgb(255,165,0)" },
|
|
58678
|
+
]
|
|
58679
|
+
}
|
|
58680
|
+
};
|
|
58681
|
+
}
|
|
58682
|
+
else if (accountItem.OperatorID==2)
|
|
58683
|
+
{
|
|
58684
|
+
colItem.Data[j]=
|
|
58685
|
+
{
|
|
58686
|
+
Text:"卖", Color:"rgb(250,250,250)", BGColor:'rgb(34,139,34)', TextAlign:"center",
|
|
58687
|
+
Tooltip:
|
|
58688
|
+
{
|
|
58689
|
+
AryText:
|
|
58690
|
+
[
|
|
58691
|
+
{Title:"日期", Text:`${kItem.Date}`},
|
|
58692
|
+
{Title:"卖入价", Text:`${kItem.Close.toFixed(2)}`, TextColor:"rgb(34,139,34)"},
|
|
58693
|
+
{Title:"数量", Text:`${HQData.GetRandomTestData(100,400).toFixed(0)}`,TextColor:"rgb(255,165,0)" },
|
|
58694
|
+
]
|
|
58695
|
+
}
|
|
58696
|
+
};
|
|
58697
|
+
}
|
|
58698
|
+
|
|
58699
|
+
}
|
|
58700
|
+
else
|
|
58701
|
+
{
|
|
58702
|
+
if (accountItem.OperatorID==0) continue; //空闲
|
|
58703
|
+
|
|
58704
|
+
if (accountItem.OperatorID==1)
|
|
58705
|
+
colItem.Data[j]= {Text:"持", Color:"rgb(250,250,250)", BGColor:'rgb(255,140,0)',TextAlign:"center"};
|
|
58706
|
+
}
|
|
58707
|
+
}
|
|
58708
|
+
|
|
58709
|
+
tableData.Draw.DrawData.push(colItem);
|
|
58710
|
+
}
|
|
58711
|
+
|
|
58712
|
+
var apiData=
|
|
58713
|
+
{
|
|
58714
|
+
code:0,
|
|
58715
|
+
stock:{ name:hqchart.Name, symbol:hqchart.Symbol },
|
|
58716
|
+
outdata: { date:kData.GetDate(), time:kData.GetTime(), outvar:[tableData] }
|
|
58717
|
+
};
|
|
58718
|
+
|
|
58719
|
+
console.log('[KLineChart::APIIndex_KLINE_TABLE] apiData ', apiData);
|
|
58720
|
+
callback(apiData);
|
|
58721
|
+
}
|
|
58722
|
+
|
|
58611
58723
|
|
|
58612
58724
|
HQData.RequestVolumeProfileData=function(data, callback)
|
|
58613
58725
|
{
|