hqchart 1.1.14280 → 1.1.14286
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 +36 -16
- package/package.json +1 -1
- package/src/jscommon/umychart.complier.js +120 -1
- package/src/jscommon/umychart.js +261 -1
- package/src/jscommon/umychart.style.js +7 -0
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +389 -3
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +389 -3
|
@@ -35470,6 +35470,225 @@ function ChartKLineTable()
|
|
|
35470
35470
|
}
|
|
35471
35471
|
}
|
|
35472
35472
|
|
|
35473
|
+
//表格
|
|
35474
|
+
function ChartSimpleTable()
|
|
35475
|
+
{
|
|
35476
|
+
this.newMethod=IChartPainting; //派生
|
|
35477
|
+
this.newMethod();
|
|
35478
|
+
delete this.newMethod;
|
|
35479
|
+
|
|
35480
|
+
this.ClassName='ChartSimpleTable'; //类名
|
|
35481
|
+
//this.Data;
|
|
35482
|
+
|
|
35483
|
+
this.TextFontConfig=CloneData(g_JSChartResource.ChartSimpleTable.TextFont);
|
|
35484
|
+
this.ItemMargin=CloneData(g_JSChartResource.ChartSimpleTable.ItemMargin);
|
|
35485
|
+
this.TextColor=g_JSChartResource.ChartSimpleTable.TextColor; //默认颜色
|
|
35486
|
+
this.BGColor=g_JSChartResource.ChartSimpleTable.BGColor; //背景色
|
|
35487
|
+
this.BorderColor=g_JSChartResource.ChartSimpleTable.BorderColor; //边框颜色
|
|
35488
|
+
this.Offset={ X:-3, Y:0 }, //位置偏移
|
|
35489
|
+
|
|
35490
|
+
|
|
35491
|
+
this.DefaultCellWidth=30;
|
|
35492
|
+
|
|
35493
|
+
this.RectClient={ };
|
|
35494
|
+
this.AryColumnCache=[]; //列缓存
|
|
35495
|
+
this.TextFontHeight;
|
|
35496
|
+
this.TextFont;
|
|
35497
|
+
this.RowHeight; //行高
|
|
35498
|
+
|
|
35499
|
+
this.ReloadResource=function(resource)
|
|
35500
|
+
{
|
|
35501
|
+
this.TextFontConfig=CloneData(g_JSChartResource.ChartSimpleTable.TextFont);
|
|
35502
|
+
this.ItemMargin=CloneData(g_JSChartResource.ChartSimpleTable.ItemMargin);
|
|
35503
|
+
this.TextColor=g_JSChartResource.ChartSimpleTable.TextColor; //默认颜色
|
|
35504
|
+
this.BGColor=g_JSChartResource.ChartSimpleTable.BGColor; //背景色
|
|
35505
|
+
this.BorderColor=g_JSChartResource.ChartSimpleTable.BorderColor; //边框颜色
|
|
35506
|
+
}
|
|
35507
|
+
|
|
35508
|
+
this.CalculateSize=function()
|
|
35509
|
+
{
|
|
35510
|
+
this.AryColumnCache=[];
|
|
35511
|
+
|
|
35512
|
+
var pixelRatio=GetDevicePixelRatio();
|
|
35513
|
+
this.TextFont=`${this.TextFontConfig.Size*pixelRatio}px ${ this.TextFontConfig.Name}`;
|
|
35514
|
+
this.TextFontHeight=this.GetFontHeight(this.TextFont,"擎");
|
|
35515
|
+
this.RowHeight=this.TextFontHeight+this.ItemMargin.Top+this.ItemMargin.Bottom;
|
|
35516
|
+
|
|
35517
|
+
var rowCount=this.Data.Data.length;
|
|
35518
|
+
for(var i=0, j=0;i<rowCount;++i)
|
|
35519
|
+
{
|
|
35520
|
+
var rowItem=this.Data.Data[i];
|
|
35521
|
+
for(j=0;j<rowItem.AryCell.length;++j)
|
|
35522
|
+
{
|
|
35523
|
+
if (!this.AryColumnCache[j]) this.AryColumnCache[j]={ Width:this.DefaultCellWidth };
|
|
35524
|
+
var colItem=this.AryColumnCache[j];
|
|
35525
|
+
|
|
35526
|
+
var cellItem=rowItem.AryCell[j];
|
|
35527
|
+
var textWidth=this.Canvas.measureText(cellItem.Text).width;
|
|
35528
|
+
if (colItem.Width<textWidth) colItem.Width=textWidth;
|
|
35529
|
+
}
|
|
35530
|
+
}
|
|
35531
|
+
|
|
35532
|
+
var tableWidth=0;
|
|
35533
|
+
for(var i=0;i<this.AryColumnCache.length;++i)
|
|
35534
|
+
{
|
|
35535
|
+
var item=this.AryColumnCache[i];
|
|
35536
|
+
item.Width+=(this.ItemMargin.Left+this.ItemMargin.Right); //增加左右间距
|
|
35537
|
+
|
|
35538
|
+
tableWidth+=item.Width;
|
|
35539
|
+
}
|
|
35540
|
+
|
|
35541
|
+
this.RectClient={ Width:tableWidth, Height:this.RowHeight*rowCount };
|
|
35542
|
+
|
|
35543
|
+
var border=this.ChartFrame.GetBorder();
|
|
35544
|
+
this.RectClient.Right=border.Right+this.Offset.X;
|
|
35545
|
+
this.RectClient.Top=border.TopEx+this.Offset.Y;
|
|
35546
|
+
this.RectClient.Left=this.RectClient.Right-this.RectClient.Width;
|
|
35547
|
+
this.RectClient.Bottom=this.RectClient.Top+this.RectClient.Height;
|
|
35548
|
+
}
|
|
35549
|
+
|
|
35550
|
+
this.Draw=function()
|
|
35551
|
+
{
|
|
35552
|
+
if (!this.IsShow || this.ChartFrame.IsMinSize) return;
|
|
35553
|
+
if (!this.Data || !IFrameSplitOperator.IsNonEmptyArray(this.Data.Data)) return;
|
|
35554
|
+
|
|
35555
|
+
var isHScreen=(this.ChartFrame.IsHScreen===true);
|
|
35556
|
+
if (isHScreen) return;
|
|
35557
|
+
|
|
35558
|
+
this.CalculateSize();
|
|
35559
|
+
|
|
35560
|
+
if (this.BGColor)
|
|
35561
|
+
{
|
|
35562
|
+
this.Canvas.fillStyle=this.BGColor;
|
|
35563
|
+
this.Canvas.fillRect(this.RectClient.Left, this.RectClient.Top, this.RectClient.Width, this.RectClient.Height);
|
|
35564
|
+
}
|
|
35565
|
+
|
|
35566
|
+
var itemHeight=this.RowHeight;
|
|
35567
|
+
this.Canvas.font=this.TextFont;
|
|
35568
|
+
this.Canvas.textBaseline='bottom';
|
|
35569
|
+
this.Canvas.textAlign='left';
|
|
35570
|
+
var rtRow={ Left:this.RectClient.Left, Top:this.RectClient.Top, Width:this.RectClient.Width, Height:itemHeight };
|
|
35571
|
+
rtRow.Right=rtRow.Left+rtRow.Width;
|
|
35572
|
+
rtRow.Bottom=rtRow.Top+rtRow.Height;
|
|
35573
|
+
var rowCount=this.Data.Data.length;
|
|
35574
|
+
for(var i=0;i<rowCount;++i)
|
|
35575
|
+
{
|
|
35576
|
+
var rowItem=this.Data.Data[i];
|
|
35577
|
+
this.DrawRow(rowItem, rtRow);
|
|
35578
|
+
|
|
35579
|
+
rtRow.Top+=itemHeight;
|
|
35580
|
+
rtRow.Bottom+=itemHeight;
|
|
35581
|
+
}
|
|
35582
|
+
|
|
35583
|
+
this.DrawBorder();
|
|
35584
|
+
}
|
|
35585
|
+
|
|
35586
|
+
this.DrawBorder=function()
|
|
35587
|
+
{
|
|
35588
|
+
if (!this.BorderColor) return;
|
|
35589
|
+
|
|
35590
|
+
var rowCount=this.Data.Data.length;
|
|
35591
|
+
var colCount=this.AryColumnCache.length;
|
|
35592
|
+
this.Canvas.strokeStyle=this.BorderColor;
|
|
35593
|
+
this.Canvas.beginPath();
|
|
35594
|
+
|
|
35595
|
+
//横线
|
|
35596
|
+
var rowTop=this.RectClient.Top;
|
|
35597
|
+
var left=this.RectClient.Left, right=this.RectClient.Right;
|
|
35598
|
+
var bottom=this.RectClient.Bottom, top=this.RectClient.Top;
|
|
35599
|
+
for(var i=0;i<rowCount;++i)
|
|
35600
|
+
{
|
|
35601
|
+
if (i==0)
|
|
35602
|
+
{
|
|
35603
|
+
var drawTop=ToFixedPoint(rowTop);
|
|
35604
|
+
this.Canvas.moveTo(left,drawTop);
|
|
35605
|
+
this.Canvas.lineTo(right,drawTop);
|
|
35606
|
+
}
|
|
35607
|
+
|
|
35608
|
+
var drawTop=ToFixedPoint(rowTop+this.RowHeight);
|
|
35609
|
+
this.Canvas.moveTo(left,drawTop);
|
|
35610
|
+
this.Canvas.lineTo(right,drawTop);
|
|
35611
|
+
|
|
35612
|
+
rowTop+=this.RowHeight;
|
|
35613
|
+
}
|
|
35614
|
+
|
|
35615
|
+
//竖线
|
|
35616
|
+
var columnLeft=this.RectClient.Left;
|
|
35617
|
+
for(var i=0;i<colCount; ++i)
|
|
35618
|
+
{
|
|
35619
|
+
var item=this.AryColumnCache[i];
|
|
35620
|
+
|
|
35621
|
+
if (i==0)
|
|
35622
|
+
{
|
|
35623
|
+
var drawLeft=ToFixedPoint(columnLeft);
|
|
35624
|
+
this.Canvas.moveTo(drawLeft,top);
|
|
35625
|
+
this.Canvas.lineTo(drawLeft,bottom);
|
|
35626
|
+
}
|
|
35627
|
+
|
|
35628
|
+
var drawLeft=ToFixedPoint(columnLeft+item.Width);
|
|
35629
|
+
this.Canvas.moveTo(drawLeft,top);
|
|
35630
|
+
this.Canvas.lineTo(drawLeft,bottom);
|
|
35631
|
+
|
|
35632
|
+
columnLeft+=item.Width;
|
|
35633
|
+
}
|
|
35634
|
+
|
|
35635
|
+
this.Canvas.stroke();
|
|
35636
|
+
}
|
|
35637
|
+
|
|
35638
|
+
this.DrawRow=function(data, rtRow)
|
|
35639
|
+
{
|
|
35640
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(data.AryCell)) return;
|
|
35641
|
+
|
|
35642
|
+
var x=rtRow.Left,y=rtRow.Top, width=rtRow.Width;
|
|
35643
|
+
for(var i=0;i<data.AryCell.length;++i)
|
|
35644
|
+
{
|
|
35645
|
+
var item=data.AryCell[i];
|
|
35646
|
+
var colItem=this.AryColumnCache[i];
|
|
35647
|
+
|
|
35648
|
+
var rtBG={Left:x, Top:rtRow.Top, Bottom:rtRow.Bottom, Height:this.RowHeight, Width:colItem.Width };
|
|
35649
|
+
rtBG.Right=rtBG.Left+rtBG.Width;
|
|
35650
|
+
|
|
35651
|
+
if (item)
|
|
35652
|
+
{
|
|
35653
|
+
if (item.BGColor)
|
|
35654
|
+
{
|
|
35655
|
+
this.Canvas.fillStyle=item.BGColor;
|
|
35656
|
+
this.Canvas.fillRect(rtBG.Left, rtBG.Top, rtBG.Width, rtBG.Height);
|
|
35657
|
+
}
|
|
35658
|
+
|
|
35659
|
+
if (item.Text && rtBG.Width>10)
|
|
35660
|
+
{
|
|
35661
|
+
if (item.Color) this.Canvas.fillStyle=item.Color;
|
|
35662
|
+
else this.Canvas.fillStyle=this.TextColor
|
|
35663
|
+
|
|
35664
|
+
var xText=x+this.ItemMargin.Left;
|
|
35665
|
+
var yText=rtBG.Bottom-this.ItemMargin.Bottom;
|
|
35666
|
+
|
|
35667
|
+
if (item.TextAlign=='right')
|
|
35668
|
+
{
|
|
35669
|
+
var textWidth=this.Canvas.measureText(item.Text).width;
|
|
35670
|
+
xText=rtBG.Right-this.ItemMargin.Right-textWidth;
|
|
35671
|
+
}
|
|
35672
|
+
else if (item.TextAlign=='center')
|
|
35673
|
+
{
|
|
35674
|
+
var textWidth=this.Canvas.measureText(item.Text).width;
|
|
35675
|
+
xText=rtBG.Left+rtBG.Width/2-textWidth/2;
|
|
35676
|
+
}
|
|
35677
|
+
|
|
35678
|
+
this.Canvas.fillText(item.Text,xText,yText);
|
|
35679
|
+
}
|
|
35680
|
+
}
|
|
35681
|
+
|
|
35682
|
+
x+=rtBG.Width;
|
|
35683
|
+
}
|
|
35684
|
+
}
|
|
35685
|
+
|
|
35686
|
+
this.GetMaxMin=function()
|
|
35687
|
+
{
|
|
35688
|
+
return { Min:null, Max:null };
|
|
35689
|
+
}
|
|
35690
|
+
}
|
|
35691
|
+
|
|
35473
35692
|
//分钟成交量 支持横屏
|
|
35474
35693
|
function ChartMinuteVolumBar()
|
|
35475
35694
|
{
|
|
@@ -74066,6 +74285,15 @@ function JSChartResource()
|
|
|
74066
74285
|
ItemMergin:{ Left:5, Right:5, Top:4, Bottom:2 },
|
|
74067
74286
|
};
|
|
74068
74287
|
|
|
74288
|
+
this.ChartSimpleTable=
|
|
74289
|
+
{
|
|
74290
|
+
TextFont:{ Family:'微软雅黑' , Size:14 },
|
|
74291
|
+
ItemMargin:{ Left:5, Right:5, Top:4, Bottom:2 },
|
|
74292
|
+
TextColor:"rgb(0,0,0)",
|
|
74293
|
+
BGColor:"rgba(255,255,255,0.95)",
|
|
74294
|
+
BorderColor:"rgb(217,217,217)",
|
|
74295
|
+
}
|
|
74296
|
+
|
|
74069
74297
|
//手机端tooltip
|
|
74070
74298
|
this.TooltipPaint = {
|
|
74071
74299
|
BGColor:'rgba(250,250,250,0.8)', //背景色
|
|
@@ -75294,6 +75522,8 @@ function JSChartResource()
|
|
|
75294
75522
|
if (style.Title.PositionColor) this.Title.PositionColor=style.Title.PositionColor;
|
|
75295
75523
|
}
|
|
75296
75524
|
|
|
75525
|
+
if (style.ChartSimpleTable) this.SetChartSimpleTable(style.ChartSimpleTable);
|
|
75526
|
+
|
|
75297
75527
|
if (style.DRAWICON)
|
|
75298
75528
|
{
|
|
75299
75529
|
if (style.DRAWICON.Icon)
|
|
@@ -75553,7 +75783,7 @@ function JSChartResource()
|
|
|
75553
75783
|
{
|
|
75554
75784
|
var mergin=header.Mergin;
|
|
75555
75785
|
if (IFrameSplitOperator.IsNumber(mergin.Left)) this.DealList.Header.Mergin.Left=mergin.Left;
|
|
75556
|
-
if (IFrameSplitOperator.IsNumber(mergin.Right)) this.DealList.Header.Mergin.
|
|
75786
|
+
if (IFrameSplitOperator.IsNumber(mergin.Right)) this.DealList.Header.Mergin.Right=mergin.Right;
|
|
75557
75787
|
if (IFrameSplitOperator.IsNumber(mergin.Top)) this.DealList.Header.Mergin.Top=mergin.Top;
|
|
75558
75788
|
if (IFrameSplitOperator.IsNumber(mergin.Bottom)) this.DealList.Header.Mergin.Bottom=mergin.Bottom;
|
|
75559
75789
|
}
|
|
@@ -76339,6 +76569,32 @@ function JSChartResource()
|
|
|
76339
76569
|
if (IFrameSplitOperator.IsBool(style.AddIndexWindow)) dest.AddIndexWindow=style.AddIndexWindow;
|
|
76340
76570
|
}
|
|
76341
76571
|
|
|
76572
|
+
|
|
76573
|
+
this.SetChartSimpleTable=function(style)
|
|
76574
|
+
{
|
|
76575
|
+
var dest=this.ChartSimpleTable;
|
|
76576
|
+
|
|
76577
|
+
if (style.TextColor) dest.TextColor=style.TextColor;
|
|
76578
|
+
if (style.BGColor) dest.BGColor=style.BGColor;
|
|
76579
|
+
if (style.BorderColor) dest.BorderColor=style.BorderColor;
|
|
76580
|
+
|
|
76581
|
+
if (style.TextFont)
|
|
76582
|
+
{
|
|
76583
|
+
var item=style.TextFont;
|
|
76584
|
+
if (item.Name) dest.TextFont.Name=item.Name;
|
|
76585
|
+
if (IFrameSplitOperator.IsNumber(item.Size)) dest.TextFont.Size=item.Size;
|
|
76586
|
+
}
|
|
76587
|
+
|
|
76588
|
+
if (style.ItemMargin)
|
|
76589
|
+
{
|
|
76590
|
+
var margin=style.ItemMargin;
|
|
76591
|
+
if (IFrameSplitOperator.IsNumber(margin.Left)) dest.ItemMargin.Left=margin.Left;
|
|
76592
|
+
if (IFrameSplitOperator.IsNumber(margin.Right)) dest.ItemMargin.Right=margin.Right;
|
|
76593
|
+
if (IFrameSplitOperator.IsNumber(margin.Top)) dest.ItemMargin.Top=margin.Top;
|
|
76594
|
+
if (IFrameSplitOperator.IsNumber(margin.Bottom)) dest.ItemMargin.Bottom=margin.Bottom;
|
|
76595
|
+
}
|
|
76596
|
+
}
|
|
76597
|
+
|
|
76342
76598
|
}
|
|
76343
76599
|
|
|
76344
76600
|
var g_JSChartResource=new JSChartResource();
|
|
@@ -80750,6 +81006,8 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
80750
81006
|
}
|
|
80751
81007
|
else //API周期数据 重新请求数据
|
|
80752
81008
|
{
|
|
81009
|
+
|
|
81010
|
+
|
|
80753
81011
|
if (ChartData.IsDayPeriod(this.Period,true))
|
|
80754
81012
|
{
|
|
80755
81013
|
this.CancelAutoUpdate(); //先停止定时器
|
|
@@ -80757,6 +81015,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
80757
81015
|
this.ClearIndexPaint();
|
|
80758
81016
|
this.ResetOverlaySymbolStatus();
|
|
80759
81017
|
this.ResetScrollBar();
|
|
81018
|
+
this.Frame.ClearYCoordinateMaxMin();
|
|
80760
81019
|
this.RequestHistoryData(); //请求日线数据
|
|
80761
81020
|
}
|
|
80762
81021
|
else if (ChartData.IsMinutePeriod(this.Period,true) || ChartData.IsSecondPeriod(this.Period) || ChartData.IsMilliSecondPeriod(this.Period))
|
|
@@ -80766,6 +81025,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
80766
81025
|
this.ClearIndexPaint();
|
|
80767
81026
|
this.ResetOverlaySymbolStatus();
|
|
80768
81027
|
this.ResetScrollBar();
|
|
81028
|
+
this.Frame.ClearYCoordinateMaxMin();
|
|
80769
81029
|
this.RequestHistoryMinuteData(); //请求分钟数据
|
|
80770
81030
|
}
|
|
80771
81031
|
}
|
|
@@ -111324,6 +111584,45 @@ function JSDraw(errorHandler,symbolData)
|
|
|
111324
111584
|
|
|
111325
111585
|
return result;
|
|
111326
111586
|
}
|
|
111587
|
+
|
|
111588
|
+
//表格
|
|
111589
|
+
this.TABLE_CELL=function(text, color, textAlign)
|
|
111590
|
+
{
|
|
111591
|
+
var cellItem={ Text:text };
|
|
111592
|
+
if (color) cellItem.Color=color;
|
|
111593
|
+
if (IFrameSplitOperator.IsString(textAlign))
|
|
111594
|
+
{
|
|
111595
|
+
var strValue=textAlign.toLowerCase(); //转小写
|
|
111596
|
+
cellItem.TextAlign=strValue;
|
|
111597
|
+
}
|
|
111598
|
+
|
|
111599
|
+
return cellItem;
|
|
111600
|
+
}
|
|
111601
|
+
|
|
111602
|
+
this.TABLE_ROW=function(aryData)
|
|
111603
|
+
{
|
|
111604
|
+
var aryCell=[];
|
|
111605
|
+
for(var i=0;i<aryData.length;++i)
|
|
111606
|
+
{
|
|
111607
|
+
var item=aryData[i];
|
|
111608
|
+
aryCell.push(item)
|
|
111609
|
+
}
|
|
111610
|
+
|
|
111611
|
+
return aryCell;
|
|
111612
|
+
}
|
|
111613
|
+
|
|
111614
|
+
this.DRAWTABLE=function(aryData)
|
|
111615
|
+
{
|
|
111616
|
+
var tableData=[]
|
|
111617
|
+
for(var i=0;i<aryData.length;++i)
|
|
111618
|
+
{
|
|
111619
|
+
var item=aryData[i];
|
|
111620
|
+
tableData.push({ AryCell:item });
|
|
111621
|
+
}
|
|
111622
|
+
|
|
111623
|
+
|
|
111624
|
+
return result={ DrawData:{ TableData:tableData }, DrawType:'DRAW_SIMPLE_TABLE' };
|
|
111625
|
+
}
|
|
111327
111626
|
}
|
|
111328
111627
|
|
|
111329
111628
|
|
|
@@ -111378,7 +111677,7 @@ JSDraw.prototype.IsDrawFunction=function(name)
|
|
|
111378
111677
|
'DRAWOVERLAYLINE',"FILLRGN", "FILLRGN2","FILLTOPRGN", "FILLBOTTOMRGN", "FILLVERTICALRGN","FLOATRGN","DRAWSL", "DRAWGBK2","DRAWGBK_DIV",
|
|
111379
111678
|
"VERTLINE","HORLINE","TIPICON",
|
|
111380
111679
|
"BUY","SELL","SELLSHORT","BUYSHORT",
|
|
111381
|
-
"DRAWLASTBARICON","DRAWLASTBARNUMBER", "DRAWLASTBARTEXT",
|
|
111680
|
+
"DRAWLASTBARICON","DRAWLASTBARNUMBER", "DRAWLASTBARTEXT","DRAWTABLE",
|
|
111382
111681
|
]);
|
|
111383
111682
|
if (setFunctionName.has(name)) return true;
|
|
111384
111683
|
|
|
@@ -118248,6 +118547,18 @@ function JSExecute(ast,option)
|
|
|
118248
118547
|
node.Out=node.Draw.DrawData.Data;
|
|
118249
118548
|
break;
|
|
118250
118549
|
|
|
118550
|
+
//表格函数
|
|
118551
|
+
case "TABLE_CELL":
|
|
118552
|
+
node.Out=this.Draw.TABLE_CELL(args[0],args[1],args[2]);
|
|
118553
|
+
break;
|
|
118554
|
+
case "TABLE_ROW":
|
|
118555
|
+
node.Out=this.Draw.TABLE_ROW(args);
|
|
118556
|
+
break;
|
|
118557
|
+
case "DRAWTABLE":
|
|
118558
|
+
node.Draw=this.Draw.DRAWTABLE(args);
|
|
118559
|
+
node.Out=[];
|
|
118560
|
+
break;
|
|
118561
|
+
|
|
118251
118562
|
default:
|
|
118252
118563
|
node.Out=this.Algorithm.CallFunction(funcName, args, node, this.SymbolData);
|
|
118253
118564
|
break;
|
|
@@ -121213,6 +121524,29 @@ function ScriptIndex(name,script,args,option)
|
|
|
121213
121524
|
hqChart.ChartPaint.push(chart);
|
|
121214
121525
|
}
|
|
121215
121526
|
|
|
121527
|
+
this.CreateSimpleTable=function(hqChart,windowIndex,varItem,id)
|
|
121528
|
+
{
|
|
121529
|
+
var chart=new ChartSimpleTable();
|
|
121530
|
+
chart.Canvas=hqChart.Canvas;
|
|
121531
|
+
chart.Name=varItem.Name;
|
|
121532
|
+
chart.ChartBorder=hqChart.Frame.SubFrame[windowIndex].Frame.ChartBorder;
|
|
121533
|
+
chart.ChartFrame=hqChart.Frame.SubFrame[windowIndex].Frame;
|
|
121534
|
+
|
|
121535
|
+
if (varItem.Draw && varItem.Draw.DrawData)
|
|
121536
|
+
{
|
|
121537
|
+
var drawData=varItem.Draw.DrawData;
|
|
121538
|
+
if (drawData.TableData) chart.Data.Data=drawData.TableData;
|
|
121539
|
+
if (drawData.BGColor) chart.BGColor=drawData.BGColor;
|
|
121540
|
+
if (drawData.BorderColor) chart.BorderColor=drawData.BorderColor;
|
|
121541
|
+
if (drawData.TextFont) chart.TextFontConfig=drawData.TextFont;
|
|
121542
|
+
if (drawData.TextColor) chart.TextColor=drawData.TextColor;
|
|
121543
|
+
if (IFrameSplitOperator.IsNumber(drawData.XOffset)) chart.Offset.X=drawData.XOffset;
|
|
121544
|
+
if (IFrameSplitOperator.IsNumber(drawData.YOffset)) chart.Offset.Y=drawData.YOffset;
|
|
121545
|
+
}
|
|
121546
|
+
|
|
121547
|
+
hqChart.ChartPaint.push(chart);
|
|
121548
|
+
}
|
|
121549
|
+
|
|
121216
121550
|
this.CreateTradeIcon=function(hqChart,windowIndex,varItem,id)
|
|
121217
121551
|
{
|
|
121218
121552
|
var chart=new ChartTradeIcon();
|
|
@@ -122078,6 +122412,9 @@ function ScriptIndex(name,script,args,option)
|
|
|
122078
122412
|
case "MULTI_POINT_LINE":
|
|
122079
122413
|
this.CreateLineMultiData(hqChart,windowIndex,item,i);
|
|
122080
122414
|
break;
|
|
122415
|
+
case "DRAW_SIMPLE_TABLE":
|
|
122416
|
+
this.CreateSimpleTable(hqChart,windowIndex,item,i);
|
|
122417
|
+
break;
|
|
122081
122418
|
case "BUY":
|
|
122082
122419
|
case "SELL":
|
|
122083
122420
|
case "SELLSHORT":
|
|
@@ -122425,6 +122762,10 @@ function OverlayScriptIndex(name,script,args,option)
|
|
|
122425
122762
|
this.CreateMulitHtmlDom(hqChart,windowIndex,item,i);
|
|
122426
122763
|
break;
|
|
122427
122764
|
|
|
122765
|
+
case "DRAW_SIMPLE_TABLE":
|
|
122766
|
+
this.CreateSimpleTable(hqChart,windowIndex,item,i);
|
|
122767
|
+
break;
|
|
122768
|
+
|
|
122428
122769
|
case "KLINE_BG":
|
|
122429
122770
|
this.CreateBackgroud(hqChart,windowIndex,item,i);
|
|
122430
122771
|
break;
|
|
@@ -123434,6 +123775,33 @@ function OverlayScriptIndex(name,script,args,option)
|
|
|
123434
123775
|
frame.ChartPaint.push(chart);
|
|
123435
123776
|
}
|
|
123436
123777
|
|
|
123778
|
+
this.CreateSimpleTable=function(hqChart,windowIndex,varItem,i)
|
|
123779
|
+
{
|
|
123780
|
+
var overlayIndex=this.OverlayIndex;
|
|
123781
|
+
var frame=overlayIndex.Frame;
|
|
123782
|
+
var chart=new ChartSimpleTable();
|
|
123783
|
+
chart.Canvas=hqChart.Canvas;
|
|
123784
|
+
chart.Name=varItem.Name;
|
|
123785
|
+
chart.ChartBorder=frame.Frame.ChartBorder;
|
|
123786
|
+
chart.ChartFrame=frame.Frame;
|
|
123787
|
+
chart.Identify=overlayIndex.Identify;
|
|
123788
|
+
chart.HQChart=hqChart;
|
|
123789
|
+
|
|
123790
|
+
if (varItem.Draw && varItem.Draw.DrawData)
|
|
123791
|
+
{
|
|
123792
|
+
var drawData=varItem.Draw.DrawData;
|
|
123793
|
+
if (drawData.TableData) chart.Data.Data=drawData.TableData;
|
|
123794
|
+
if (drawData.BGColor) chart.BGColor=drawData.BGColor;
|
|
123795
|
+
if (drawData.BorderColor) chart.BorderColor=drawData.BorderColor;
|
|
123796
|
+
if (drawData.TextFont) chart.TextFontConfig=drawData.TextFont;
|
|
123797
|
+
if (drawData.TextColor) chart.TextColor=drawData.TextColor;
|
|
123798
|
+
if (IFrameSplitOperator.IsNumber(drawData.XOffset)) chart.Offset.X=drawData.XOffset;
|
|
123799
|
+
if (IFrameSplitOperator.IsNumber(drawData.YOffset)) chart.Offset.Y=drawData.YOffset;
|
|
123800
|
+
}
|
|
123801
|
+
|
|
123802
|
+
frame.ChartPaint.push(chart);
|
|
123803
|
+
}
|
|
123804
|
+
|
|
123437
123805
|
this.CreateChartVericaltLine=function(hqChart,windowIndex,varItem,id)
|
|
123438
123806
|
{
|
|
123439
123807
|
var overlayIndex=this.OverlayIndex;
|
|
@@ -124625,6 +124993,17 @@ function APIScriptIndex(name,script,args,option, isOverlay)
|
|
|
124625
124993
|
|
|
124626
124994
|
result.push(outVarItem);
|
|
124627
124995
|
}
|
|
124996
|
+
else if (draw.DrawType=="DRAW_SIMPLE_TABLE")
|
|
124997
|
+
{
|
|
124998
|
+
drawItem.Name=draw.Name;
|
|
124999
|
+
drawItem.Type=draw.Type;
|
|
125000
|
+
|
|
125001
|
+
drawItem.DrawType=draw.DrawType;
|
|
125002
|
+
drawItem.DrawData=draw.DrawData; //{ TableData:[ [ {AryCell:[{Text:, Color: }]}, ], ], BGColor:, TextFont:{ Size:, Name: } };
|
|
125003
|
+
|
|
125004
|
+
outVarItem.Draw=drawItem;
|
|
125005
|
+
result.push(outVarItem);
|
|
125006
|
+
}
|
|
124628
125007
|
else
|
|
124629
125008
|
{
|
|
124630
125009
|
var find=g_ScriptIndexChartFactory.Get(draw.DrawType); //外部挂接
|
|
@@ -126229,6 +126608,13 @@ function GetBlackStyle()
|
|
|
126229
126608
|
}
|
|
126230
126609
|
},
|
|
126231
126610
|
|
|
126611
|
+
ChartSimpleTable:
|
|
126612
|
+
{
|
|
126613
|
+
TextColor:"rgb(250,250,250)",
|
|
126614
|
+
BGColor:"rgba(0,0,0,0.85)",
|
|
126615
|
+
BorderColor:"rgb(90,90,90)",
|
|
126616
|
+
},
|
|
126617
|
+
|
|
126232
126618
|
ChartDrawVolProfile:
|
|
126233
126619
|
{
|
|
126234
126620
|
BGColor:"rgba(244,250,254,0.3)",
|
|
@@ -150368,7 +150754,7 @@ function HQChartScriptWorker()
|
|
|
150368
150754
|
|
|
150369
150755
|
|
|
150370
150756
|
|
|
150371
|
-
var HQCHART_VERSION="1.1.
|
|
150757
|
+
var HQCHART_VERSION="1.1.14285";
|
|
150372
150758
|
|
|
150373
150759
|
function PrintHQChartVersion()
|
|
150374
150760
|
{
|