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
|
@@ -11487,6 +11487,45 @@ function JSDraw(errorHandler,symbolData)
|
|
|
11487
11487
|
|
|
11488
11488
|
return result;
|
|
11489
11489
|
}
|
|
11490
|
+
|
|
11491
|
+
//表格
|
|
11492
|
+
this.TABLE_CELL=function(text, color, textAlign)
|
|
11493
|
+
{
|
|
11494
|
+
var cellItem={ Text:text };
|
|
11495
|
+
if (color) cellItem.Color=color;
|
|
11496
|
+
if (IFrameSplitOperator.IsString(textAlign))
|
|
11497
|
+
{
|
|
11498
|
+
var strValue=textAlign.toLowerCase(); //转小写
|
|
11499
|
+
cellItem.TextAlign=strValue;
|
|
11500
|
+
}
|
|
11501
|
+
|
|
11502
|
+
return cellItem;
|
|
11503
|
+
}
|
|
11504
|
+
|
|
11505
|
+
this.TABLE_ROW=function(aryData)
|
|
11506
|
+
{
|
|
11507
|
+
var aryCell=[];
|
|
11508
|
+
for(var i=0;i<aryData.length;++i)
|
|
11509
|
+
{
|
|
11510
|
+
var item=aryData[i];
|
|
11511
|
+
aryCell.push(item)
|
|
11512
|
+
}
|
|
11513
|
+
|
|
11514
|
+
return aryCell;
|
|
11515
|
+
}
|
|
11516
|
+
|
|
11517
|
+
this.DRAWTABLE=function(aryData)
|
|
11518
|
+
{
|
|
11519
|
+
var tableData=[]
|
|
11520
|
+
for(var i=0;i<aryData.length;++i)
|
|
11521
|
+
{
|
|
11522
|
+
var item=aryData[i];
|
|
11523
|
+
tableData.push({ AryCell:item });
|
|
11524
|
+
}
|
|
11525
|
+
|
|
11526
|
+
|
|
11527
|
+
return result={ DrawData:{ TableData:tableData }, DrawType:'DRAW_SIMPLE_TABLE' };
|
|
11528
|
+
}
|
|
11490
11529
|
}
|
|
11491
11530
|
|
|
11492
11531
|
|
|
@@ -11541,7 +11580,7 @@ JSDraw.prototype.IsDrawFunction=function(name)
|
|
|
11541
11580
|
'DRAWOVERLAYLINE',"FILLRGN", "FILLRGN2","FILLTOPRGN", "FILLBOTTOMRGN", "FILLVERTICALRGN","FLOATRGN","DRAWSL", "DRAWGBK2","DRAWGBK_DIV",
|
|
11542
11581
|
"VERTLINE","HORLINE","TIPICON",
|
|
11543
11582
|
"BUY","SELL","SELLSHORT","BUYSHORT",
|
|
11544
|
-
"DRAWLASTBARICON","DRAWLASTBARNUMBER", "DRAWLASTBARTEXT",
|
|
11583
|
+
"DRAWLASTBARICON","DRAWLASTBARNUMBER", "DRAWLASTBARTEXT","DRAWTABLE",
|
|
11545
11584
|
]);
|
|
11546
11585
|
if (setFunctionName.has(name)) return true;
|
|
11547
11586
|
|
|
@@ -18411,6 +18450,18 @@ function JSExecute(ast,option)
|
|
|
18411
18450
|
node.Out=node.Draw.DrawData.Data;
|
|
18412
18451
|
break;
|
|
18413
18452
|
|
|
18453
|
+
//表格函数
|
|
18454
|
+
case "TABLE_CELL":
|
|
18455
|
+
node.Out=this.Draw.TABLE_CELL(args[0],args[1],args[2]);
|
|
18456
|
+
break;
|
|
18457
|
+
case "TABLE_ROW":
|
|
18458
|
+
node.Out=this.Draw.TABLE_ROW(args);
|
|
18459
|
+
break;
|
|
18460
|
+
case "DRAWTABLE":
|
|
18461
|
+
node.Draw=this.Draw.DRAWTABLE(args);
|
|
18462
|
+
node.Out=[];
|
|
18463
|
+
break;
|
|
18464
|
+
|
|
18414
18465
|
default:
|
|
18415
18466
|
node.Out=this.Algorithm.CallFunction(funcName, args, node, this.SymbolData);
|
|
18416
18467
|
break;
|
|
@@ -21376,6 +21427,29 @@ function ScriptIndex(name,script,args,option)
|
|
|
21376
21427
|
hqChart.ChartPaint.push(chart);
|
|
21377
21428
|
}
|
|
21378
21429
|
|
|
21430
|
+
this.CreateSimpleTable=function(hqChart,windowIndex,varItem,id)
|
|
21431
|
+
{
|
|
21432
|
+
var chart=new ChartSimpleTable();
|
|
21433
|
+
chart.Canvas=hqChart.Canvas;
|
|
21434
|
+
chart.Name=varItem.Name;
|
|
21435
|
+
chart.ChartBorder=hqChart.Frame.SubFrame[windowIndex].Frame.ChartBorder;
|
|
21436
|
+
chart.ChartFrame=hqChart.Frame.SubFrame[windowIndex].Frame;
|
|
21437
|
+
|
|
21438
|
+
if (varItem.Draw && varItem.Draw.DrawData)
|
|
21439
|
+
{
|
|
21440
|
+
var drawData=varItem.Draw.DrawData;
|
|
21441
|
+
if (drawData.TableData) chart.Data.Data=drawData.TableData;
|
|
21442
|
+
if (drawData.BGColor) chart.BGColor=drawData.BGColor;
|
|
21443
|
+
if (drawData.BorderColor) chart.BorderColor=drawData.BorderColor;
|
|
21444
|
+
if (drawData.TextFont) chart.TextFontConfig=drawData.TextFont;
|
|
21445
|
+
if (drawData.TextColor) chart.TextColor=drawData.TextColor;
|
|
21446
|
+
if (IFrameSplitOperator.IsNumber(drawData.XOffset)) chart.Offset.X=drawData.XOffset;
|
|
21447
|
+
if (IFrameSplitOperator.IsNumber(drawData.YOffset)) chart.Offset.Y=drawData.YOffset;
|
|
21448
|
+
}
|
|
21449
|
+
|
|
21450
|
+
hqChart.ChartPaint.push(chart);
|
|
21451
|
+
}
|
|
21452
|
+
|
|
21379
21453
|
this.CreateTradeIcon=function(hqChart,windowIndex,varItem,id)
|
|
21380
21454
|
{
|
|
21381
21455
|
var chart=new ChartTradeIcon();
|
|
@@ -22241,6 +22315,9 @@ function ScriptIndex(name,script,args,option)
|
|
|
22241
22315
|
case "MULTI_POINT_LINE":
|
|
22242
22316
|
this.CreateLineMultiData(hqChart,windowIndex,item,i);
|
|
22243
22317
|
break;
|
|
22318
|
+
case "DRAW_SIMPLE_TABLE":
|
|
22319
|
+
this.CreateSimpleTable(hqChart,windowIndex,item,i);
|
|
22320
|
+
break;
|
|
22244
22321
|
case "BUY":
|
|
22245
22322
|
case "SELL":
|
|
22246
22323
|
case "SELLSHORT":
|
|
@@ -22588,6 +22665,10 @@ function OverlayScriptIndex(name,script,args,option)
|
|
|
22588
22665
|
this.CreateMulitHtmlDom(hqChart,windowIndex,item,i);
|
|
22589
22666
|
break;
|
|
22590
22667
|
|
|
22668
|
+
case "DRAW_SIMPLE_TABLE":
|
|
22669
|
+
this.CreateSimpleTable(hqChart,windowIndex,item,i);
|
|
22670
|
+
break;
|
|
22671
|
+
|
|
22591
22672
|
case "KLINE_BG":
|
|
22592
22673
|
this.CreateBackgroud(hqChart,windowIndex,item,i);
|
|
22593
22674
|
break;
|
|
@@ -23597,6 +23678,33 @@ function OverlayScriptIndex(name,script,args,option)
|
|
|
23597
23678
|
frame.ChartPaint.push(chart);
|
|
23598
23679
|
}
|
|
23599
23680
|
|
|
23681
|
+
this.CreateSimpleTable=function(hqChart,windowIndex,varItem,i)
|
|
23682
|
+
{
|
|
23683
|
+
var overlayIndex=this.OverlayIndex;
|
|
23684
|
+
var frame=overlayIndex.Frame;
|
|
23685
|
+
var chart=new ChartSimpleTable();
|
|
23686
|
+
chart.Canvas=hqChart.Canvas;
|
|
23687
|
+
chart.Name=varItem.Name;
|
|
23688
|
+
chart.ChartBorder=frame.Frame.ChartBorder;
|
|
23689
|
+
chart.ChartFrame=frame.Frame;
|
|
23690
|
+
chart.Identify=overlayIndex.Identify;
|
|
23691
|
+
chart.HQChart=hqChart;
|
|
23692
|
+
|
|
23693
|
+
if (varItem.Draw && varItem.Draw.DrawData)
|
|
23694
|
+
{
|
|
23695
|
+
var drawData=varItem.Draw.DrawData;
|
|
23696
|
+
if (drawData.TableData) chart.Data.Data=drawData.TableData;
|
|
23697
|
+
if (drawData.BGColor) chart.BGColor=drawData.BGColor;
|
|
23698
|
+
if (drawData.BorderColor) chart.BorderColor=drawData.BorderColor;
|
|
23699
|
+
if (drawData.TextFont) chart.TextFontConfig=drawData.TextFont;
|
|
23700
|
+
if (drawData.TextColor) chart.TextColor=drawData.TextColor;
|
|
23701
|
+
if (IFrameSplitOperator.IsNumber(drawData.XOffset)) chart.Offset.X=drawData.XOffset;
|
|
23702
|
+
if (IFrameSplitOperator.IsNumber(drawData.YOffset)) chart.Offset.Y=drawData.YOffset;
|
|
23703
|
+
}
|
|
23704
|
+
|
|
23705
|
+
frame.ChartPaint.push(chart);
|
|
23706
|
+
}
|
|
23707
|
+
|
|
23600
23708
|
this.CreateChartVericaltLine=function(hqChart,windowIndex,varItem,id)
|
|
23601
23709
|
{
|
|
23602
23710
|
var overlayIndex=this.OverlayIndex;
|
|
@@ -24788,6 +24896,17 @@ function APIScriptIndex(name,script,args,option, isOverlay)
|
|
|
24788
24896
|
|
|
24789
24897
|
result.push(outVarItem);
|
|
24790
24898
|
}
|
|
24899
|
+
else if (draw.DrawType=="DRAW_SIMPLE_TABLE")
|
|
24900
|
+
{
|
|
24901
|
+
drawItem.Name=draw.Name;
|
|
24902
|
+
drawItem.Type=draw.Type;
|
|
24903
|
+
|
|
24904
|
+
drawItem.DrawType=draw.DrawType;
|
|
24905
|
+
drawItem.DrawData=draw.DrawData; //{ TableData:[ [ {AryCell:[{Text:, Color: }]}, ], ], BGColor:, TextFont:{ Size:, Name: } };
|
|
24906
|
+
|
|
24907
|
+
outVarItem.Draw=drawItem;
|
|
24908
|
+
result.push(outVarItem);
|
|
24909
|
+
}
|
|
24791
24910
|
else
|
|
24792
24911
|
{
|
|
24793
24912
|
var find=g_ScriptIndexChartFactory.Get(draw.DrawType); //外部挂接
|
package/src/jscommon/umychart.js
CHANGED
|
@@ -31501,6 +31501,225 @@ function ChartKLineTable()
|
|
|
31501
31501
|
}
|
|
31502
31502
|
}
|
|
31503
31503
|
|
|
31504
|
+
//表格
|
|
31505
|
+
function ChartSimpleTable()
|
|
31506
|
+
{
|
|
31507
|
+
this.newMethod=IChartPainting; //派生
|
|
31508
|
+
this.newMethod();
|
|
31509
|
+
delete this.newMethod;
|
|
31510
|
+
|
|
31511
|
+
this.ClassName='ChartSimpleTable'; //类名
|
|
31512
|
+
//this.Data;
|
|
31513
|
+
|
|
31514
|
+
this.TextFontConfig=CloneData(g_JSChartResource.ChartSimpleTable.TextFont);
|
|
31515
|
+
this.ItemMargin=CloneData(g_JSChartResource.ChartSimpleTable.ItemMargin);
|
|
31516
|
+
this.TextColor=g_JSChartResource.ChartSimpleTable.TextColor; //默认颜色
|
|
31517
|
+
this.BGColor=g_JSChartResource.ChartSimpleTable.BGColor; //背景色
|
|
31518
|
+
this.BorderColor=g_JSChartResource.ChartSimpleTable.BorderColor; //边框颜色
|
|
31519
|
+
this.Offset={ X:-3, Y:0 }, //位置偏移
|
|
31520
|
+
|
|
31521
|
+
|
|
31522
|
+
this.DefaultCellWidth=30;
|
|
31523
|
+
|
|
31524
|
+
this.RectClient={ };
|
|
31525
|
+
this.AryColumnCache=[]; //列缓存
|
|
31526
|
+
this.TextFontHeight;
|
|
31527
|
+
this.TextFont;
|
|
31528
|
+
this.RowHeight; //行高
|
|
31529
|
+
|
|
31530
|
+
this.ReloadResource=function(resource)
|
|
31531
|
+
{
|
|
31532
|
+
this.TextFontConfig=CloneData(g_JSChartResource.ChartSimpleTable.TextFont);
|
|
31533
|
+
this.ItemMargin=CloneData(g_JSChartResource.ChartSimpleTable.ItemMargin);
|
|
31534
|
+
this.TextColor=g_JSChartResource.ChartSimpleTable.TextColor; //默认颜色
|
|
31535
|
+
this.BGColor=g_JSChartResource.ChartSimpleTable.BGColor; //背景色
|
|
31536
|
+
this.BorderColor=g_JSChartResource.ChartSimpleTable.BorderColor; //边框颜色
|
|
31537
|
+
}
|
|
31538
|
+
|
|
31539
|
+
this.CalculateSize=function()
|
|
31540
|
+
{
|
|
31541
|
+
this.AryColumnCache=[];
|
|
31542
|
+
|
|
31543
|
+
var pixelRatio=GetDevicePixelRatio();
|
|
31544
|
+
this.TextFont=`${this.TextFontConfig.Size*pixelRatio}px ${ this.TextFontConfig.Name}`;
|
|
31545
|
+
this.TextFontHeight=this.GetFontHeight(this.TextFont,"擎");
|
|
31546
|
+
this.RowHeight=this.TextFontHeight+this.ItemMargin.Top+this.ItemMargin.Bottom;
|
|
31547
|
+
|
|
31548
|
+
var rowCount=this.Data.Data.length;
|
|
31549
|
+
for(var i=0, j=0;i<rowCount;++i)
|
|
31550
|
+
{
|
|
31551
|
+
var rowItem=this.Data.Data[i];
|
|
31552
|
+
for(j=0;j<rowItem.AryCell.length;++j)
|
|
31553
|
+
{
|
|
31554
|
+
if (!this.AryColumnCache[j]) this.AryColumnCache[j]={ Width:this.DefaultCellWidth };
|
|
31555
|
+
var colItem=this.AryColumnCache[j];
|
|
31556
|
+
|
|
31557
|
+
var cellItem=rowItem.AryCell[j];
|
|
31558
|
+
var textWidth=this.Canvas.measureText(cellItem.Text).width;
|
|
31559
|
+
if (colItem.Width<textWidth) colItem.Width=textWidth;
|
|
31560
|
+
}
|
|
31561
|
+
}
|
|
31562
|
+
|
|
31563
|
+
var tableWidth=0;
|
|
31564
|
+
for(var i=0;i<this.AryColumnCache.length;++i)
|
|
31565
|
+
{
|
|
31566
|
+
var item=this.AryColumnCache[i];
|
|
31567
|
+
item.Width+=(this.ItemMargin.Left+this.ItemMargin.Right); //增加左右间距
|
|
31568
|
+
|
|
31569
|
+
tableWidth+=item.Width;
|
|
31570
|
+
}
|
|
31571
|
+
|
|
31572
|
+
this.RectClient={ Width:tableWidth, Height:this.RowHeight*rowCount };
|
|
31573
|
+
|
|
31574
|
+
var border=this.ChartFrame.GetBorder();
|
|
31575
|
+
this.RectClient.Right=border.Right+this.Offset.X;
|
|
31576
|
+
this.RectClient.Top=border.TopEx+this.Offset.Y;
|
|
31577
|
+
this.RectClient.Left=this.RectClient.Right-this.RectClient.Width;
|
|
31578
|
+
this.RectClient.Bottom=this.RectClient.Top+this.RectClient.Height;
|
|
31579
|
+
}
|
|
31580
|
+
|
|
31581
|
+
this.Draw=function()
|
|
31582
|
+
{
|
|
31583
|
+
if (!this.IsShow || this.ChartFrame.IsMinSize) return;
|
|
31584
|
+
if (!this.Data || !IFrameSplitOperator.IsNonEmptyArray(this.Data.Data)) return;
|
|
31585
|
+
|
|
31586
|
+
var isHScreen=(this.ChartFrame.IsHScreen===true);
|
|
31587
|
+
if (isHScreen) return;
|
|
31588
|
+
|
|
31589
|
+
this.CalculateSize();
|
|
31590
|
+
|
|
31591
|
+
if (this.BGColor)
|
|
31592
|
+
{
|
|
31593
|
+
this.Canvas.fillStyle=this.BGColor;
|
|
31594
|
+
this.Canvas.fillRect(this.RectClient.Left, this.RectClient.Top, this.RectClient.Width, this.RectClient.Height);
|
|
31595
|
+
}
|
|
31596
|
+
|
|
31597
|
+
var itemHeight=this.RowHeight;
|
|
31598
|
+
this.Canvas.font=this.TextFont;
|
|
31599
|
+
this.Canvas.textBaseline='bottom';
|
|
31600
|
+
this.Canvas.textAlign='left';
|
|
31601
|
+
var rtRow={ Left:this.RectClient.Left, Top:this.RectClient.Top, Width:this.RectClient.Width, Height:itemHeight };
|
|
31602
|
+
rtRow.Right=rtRow.Left+rtRow.Width;
|
|
31603
|
+
rtRow.Bottom=rtRow.Top+rtRow.Height;
|
|
31604
|
+
var rowCount=this.Data.Data.length;
|
|
31605
|
+
for(var i=0;i<rowCount;++i)
|
|
31606
|
+
{
|
|
31607
|
+
var rowItem=this.Data.Data[i];
|
|
31608
|
+
this.DrawRow(rowItem, rtRow);
|
|
31609
|
+
|
|
31610
|
+
rtRow.Top+=itemHeight;
|
|
31611
|
+
rtRow.Bottom+=itemHeight;
|
|
31612
|
+
}
|
|
31613
|
+
|
|
31614
|
+
this.DrawBorder();
|
|
31615
|
+
}
|
|
31616
|
+
|
|
31617
|
+
this.DrawBorder=function()
|
|
31618
|
+
{
|
|
31619
|
+
if (!this.BorderColor) return;
|
|
31620
|
+
|
|
31621
|
+
var rowCount=this.Data.Data.length;
|
|
31622
|
+
var colCount=this.AryColumnCache.length;
|
|
31623
|
+
this.Canvas.strokeStyle=this.BorderColor;
|
|
31624
|
+
this.Canvas.beginPath();
|
|
31625
|
+
|
|
31626
|
+
//横线
|
|
31627
|
+
var rowTop=this.RectClient.Top;
|
|
31628
|
+
var left=this.RectClient.Left, right=this.RectClient.Right;
|
|
31629
|
+
var bottom=this.RectClient.Bottom, top=this.RectClient.Top;
|
|
31630
|
+
for(var i=0;i<rowCount;++i)
|
|
31631
|
+
{
|
|
31632
|
+
if (i==0)
|
|
31633
|
+
{
|
|
31634
|
+
var drawTop=ToFixedPoint(rowTop);
|
|
31635
|
+
this.Canvas.moveTo(left,drawTop);
|
|
31636
|
+
this.Canvas.lineTo(right,drawTop);
|
|
31637
|
+
}
|
|
31638
|
+
|
|
31639
|
+
var drawTop=ToFixedPoint(rowTop+this.RowHeight);
|
|
31640
|
+
this.Canvas.moveTo(left,drawTop);
|
|
31641
|
+
this.Canvas.lineTo(right,drawTop);
|
|
31642
|
+
|
|
31643
|
+
rowTop+=this.RowHeight;
|
|
31644
|
+
}
|
|
31645
|
+
|
|
31646
|
+
//竖线
|
|
31647
|
+
var columnLeft=this.RectClient.Left;
|
|
31648
|
+
for(var i=0;i<colCount; ++i)
|
|
31649
|
+
{
|
|
31650
|
+
var item=this.AryColumnCache[i];
|
|
31651
|
+
|
|
31652
|
+
if (i==0)
|
|
31653
|
+
{
|
|
31654
|
+
var drawLeft=ToFixedPoint(columnLeft);
|
|
31655
|
+
this.Canvas.moveTo(drawLeft,top);
|
|
31656
|
+
this.Canvas.lineTo(drawLeft,bottom);
|
|
31657
|
+
}
|
|
31658
|
+
|
|
31659
|
+
var drawLeft=ToFixedPoint(columnLeft+item.Width);
|
|
31660
|
+
this.Canvas.moveTo(drawLeft,top);
|
|
31661
|
+
this.Canvas.lineTo(drawLeft,bottom);
|
|
31662
|
+
|
|
31663
|
+
columnLeft+=item.Width;
|
|
31664
|
+
}
|
|
31665
|
+
|
|
31666
|
+
this.Canvas.stroke();
|
|
31667
|
+
}
|
|
31668
|
+
|
|
31669
|
+
this.DrawRow=function(data, rtRow)
|
|
31670
|
+
{
|
|
31671
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(data.AryCell)) return;
|
|
31672
|
+
|
|
31673
|
+
var x=rtRow.Left,y=rtRow.Top, width=rtRow.Width;
|
|
31674
|
+
for(var i=0;i<data.AryCell.length;++i)
|
|
31675
|
+
{
|
|
31676
|
+
var item=data.AryCell[i];
|
|
31677
|
+
var colItem=this.AryColumnCache[i];
|
|
31678
|
+
|
|
31679
|
+
var rtBG={Left:x, Top:rtRow.Top, Bottom:rtRow.Bottom, Height:this.RowHeight, Width:colItem.Width };
|
|
31680
|
+
rtBG.Right=rtBG.Left+rtBG.Width;
|
|
31681
|
+
|
|
31682
|
+
if (item)
|
|
31683
|
+
{
|
|
31684
|
+
if (item.BGColor)
|
|
31685
|
+
{
|
|
31686
|
+
this.Canvas.fillStyle=item.BGColor;
|
|
31687
|
+
this.Canvas.fillRect(rtBG.Left, rtBG.Top, rtBG.Width, rtBG.Height);
|
|
31688
|
+
}
|
|
31689
|
+
|
|
31690
|
+
if (item.Text && rtBG.Width>10)
|
|
31691
|
+
{
|
|
31692
|
+
if (item.Color) this.Canvas.fillStyle=item.Color;
|
|
31693
|
+
else this.Canvas.fillStyle=this.TextColor
|
|
31694
|
+
|
|
31695
|
+
var xText=x+this.ItemMargin.Left;
|
|
31696
|
+
var yText=rtBG.Bottom-this.ItemMargin.Bottom;
|
|
31697
|
+
|
|
31698
|
+
if (item.TextAlign=='right')
|
|
31699
|
+
{
|
|
31700
|
+
var textWidth=this.Canvas.measureText(item.Text).width;
|
|
31701
|
+
xText=rtBG.Right-this.ItemMargin.Right-textWidth;
|
|
31702
|
+
}
|
|
31703
|
+
else if (item.TextAlign=='center')
|
|
31704
|
+
{
|
|
31705
|
+
var textWidth=this.Canvas.measureText(item.Text).width;
|
|
31706
|
+
xText=rtBG.Left+rtBG.Width/2-textWidth/2;
|
|
31707
|
+
}
|
|
31708
|
+
|
|
31709
|
+
this.Canvas.fillText(item.Text,xText,yText);
|
|
31710
|
+
}
|
|
31711
|
+
}
|
|
31712
|
+
|
|
31713
|
+
x+=rtBG.Width;
|
|
31714
|
+
}
|
|
31715
|
+
}
|
|
31716
|
+
|
|
31717
|
+
this.GetMaxMin=function()
|
|
31718
|
+
{
|
|
31719
|
+
return { Min:null, Max:null };
|
|
31720
|
+
}
|
|
31721
|
+
}
|
|
31722
|
+
|
|
31504
31723
|
//分钟成交量 支持横屏
|
|
31505
31724
|
function ChartMinuteVolumBar()
|
|
31506
31725
|
{
|
|
@@ -70097,6 +70316,15 @@ function JSChartResource()
|
|
|
70097
70316
|
ItemMergin:{ Left:5, Right:5, Top:4, Bottom:2 },
|
|
70098
70317
|
};
|
|
70099
70318
|
|
|
70319
|
+
this.ChartSimpleTable=
|
|
70320
|
+
{
|
|
70321
|
+
TextFont:{ Family:'微软雅黑' , Size:14 },
|
|
70322
|
+
ItemMargin:{ Left:5, Right:5, Top:4, Bottom:2 },
|
|
70323
|
+
TextColor:"rgb(0,0,0)",
|
|
70324
|
+
BGColor:"rgba(255,255,255,0.95)",
|
|
70325
|
+
BorderColor:"rgb(217,217,217)",
|
|
70326
|
+
}
|
|
70327
|
+
|
|
70100
70328
|
//手机端tooltip
|
|
70101
70329
|
this.TooltipPaint = {
|
|
70102
70330
|
BGColor:'rgba(250,250,250,0.8)', //背景色
|
|
@@ -71325,6 +71553,8 @@ function JSChartResource()
|
|
|
71325
71553
|
if (style.Title.PositionColor) this.Title.PositionColor=style.Title.PositionColor;
|
|
71326
71554
|
}
|
|
71327
71555
|
|
|
71556
|
+
if (style.ChartSimpleTable) this.SetChartSimpleTable(style.ChartSimpleTable);
|
|
71557
|
+
|
|
71328
71558
|
if (style.DRAWICON)
|
|
71329
71559
|
{
|
|
71330
71560
|
if (style.DRAWICON.Icon)
|
|
@@ -71584,7 +71814,7 @@ function JSChartResource()
|
|
|
71584
71814
|
{
|
|
71585
71815
|
var mergin=header.Mergin;
|
|
71586
71816
|
if (IFrameSplitOperator.IsNumber(mergin.Left)) this.DealList.Header.Mergin.Left=mergin.Left;
|
|
71587
|
-
if (IFrameSplitOperator.IsNumber(mergin.Right)) this.DealList.Header.Mergin.
|
|
71817
|
+
if (IFrameSplitOperator.IsNumber(mergin.Right)) this.DealList.Header.Mergin.Right=mergin.Right;
|
|
71588
71818
|
if (IFrameSplitOperator.IsNumber(mergin.Top)) this.DealList.Header.Mergin.Top=mergin.Top;
|
|
71589
71819
|
if (IFrameSplitOperator.IsNumber(mergin.Bottom)) this.DealList.Header.Mergin.Bottom=mergin.Bottom;
|
|
71590
71820
|
}
|
|
@@ -72370,6 +72600,32 @@ function JSChartResource()
|
|
|
72370
72600
|
if (IFrameSplitOperator.IsBool(style.AddIndexWindow)) dest.AddIndexWindow=style.AddIndexWindow;
|
|
72371
72601
|
}
|
|
72372
72602
|
|
|
72603
|
+
|
|
72604
|
+
this.SetChartSimpleTable=function(style)
|
|
72605
|
+
{
|
|
72606
|
+
var dest=this.ChartSimpleTable;
|
|
72607
|
+
|
|
72608
|
+
if (style.TextColor) dest.TextColor=style.TextColor;
|
|
72609
|
+
if (style.BGColor) dest.BGColor=style.BGColor;
|
|
72610
|
+
if (style.BorderColor) dest.BorderColor=style.BorderColor;
|
|
72611
|
+
|
|
72612
|
+
if (style.TextFont)
|
|
72613
|
+
{
|
|
72614
|
+
var item=style.TextFont;
|
|
72615
|
+
if (item.Name) dest.TextFont.Name=item.Name;
|
|
72616
|
+
if (IFrameSplitOperator.IsNumber(item.Size)) dest.TextFont.Size=item.Size;
|
|
72617
|
+
}
|
|
72618
|
+
|
|
72619
|
+
if (style.ItemMargin)
|
|
72620
|
+
{
|
|
72621
|
+
var margin=style.ItemMargin;
|
|
72622
|
+
if (IFrameSplitOperator.IsNumber(margin.Left)) dest.ItemMargin.Left=margin.Left;
|
|
72623
|
+
if (IFrameSplitOperator.IsNumber(margin.Right)) dest.ItemMargin.Right=margin.Right;
|
|
72624
|
+
if (IFrameSplitOperator.IsNumber(margin.Top)) dest.ItemMargin.Top=margin.Top;
|
|
72625
|
+
if (IFrameSplitOperator.IsNumber(margin.Bottom)) dest.ItemMargin.Bottom=margin.Bottom;
|
|
72626
|
+
}
|
|
72627
|
+
}
|
|
72628
|
+
|
|
72373
72629
|
}
|
|
72374
72630
|
|
|
72375
72631
|
var g_JSChartResource=new JSChartResource();
|
|
@@ -76781,6 +77037,8 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
76781
77037
|
}
|
|
76782
77038
|
else //API周期数据 重新请求数据
|
|
76783
77039
|
{
|
|
77040
|
+
|
|
77041
|
+
|
|
76784
77042
|
if (ChartData.IsDayPeriod(this.Period,true))
|
|
76785
77043
|
{
|
|
76786
77044
|
this.CancelAutoUpdate(); //先停止定时器
|
|
@@ -76788,6 +77046,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
76788
77046
|
this.ClearIndexPaint();
|
|
76789
77047
|
this.ResetOverlaySymbolStatus();
|
|
76790
77048
|
this.ResetScrollBar();
|
|
77049
|
+
this.Frame.ClearYCoordinateMaxMin();
|
|
76791
77050
|
this.RequestHistoryData(); //请求日线数据
|
|
76792
77051
|
}
|
|
76793
77052
|
else if (ChartData.IsMinutePeriod(this.Period,true) || ChartData.IsSecondPeriod(this.Period) || ChartData.IsMilliSecondPeriod(this.Period))
|
|
@@ -76797,6 +77056,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
76797
77056
|
this.ClearIndexPaint();
|
|
76798
77057
|
this.ResetOverlaySymbolStatus();
|
|
76799
77058
|
this.ResetScrollBar();
|
|
77059
|
+
this.Frame.ClearYCoordinateMaxMin();
|
|
76800
77060
|
this.RequestHistoryMinuteData(); //请求分钟数据
|
|
76801
77061
|
}
|
|
76802
77062
|
}
|
|
@@ -534,6 +534,13 @@ function GetBlackStyle()
|
|
|
534
534
|
}
|
|
535
535
|
},
|
|
536
536
|
|
|
537
|
+
ChartSimpleTable:
|
|
538
|
+
{
|
|
539
|
+
TextColor:"rgb(250,250,250)",
|
|
540
|
+
BGColor:"rgba(0,0,0,0.85)",
|
|
541
|
+
BorderColor:"rgb(90,90,90)",
|
|
542
|
+
},
|
|
543
|
+
|
|
537
544
|
ChartDrawVolProfile:
|
|
538
545
|
{
|
|
539
546
|
BGColor:"rgba(244,250,254,0.3)",
|