hqchart 1.1.15390 → 1.1.15438
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 +90 -53
- package/package.json +1 -1
- package/src/jscommon/umychart.DialogTooltip.js +3 -5
- package/src/jscommon/umychart.StockInfo.js +1205 -0
- package/src/jscommon/umychart.TReport.js +11 -11
- package/src/jscommon/umychart.complier.js +14 -24
- package/src/jscommon/umychart.deal.js +100 -28
- package/src/jscommon/umychart.js +252 -5
- package/src/jscommon/umychart.report.js +50 -12
- package/src/jscommon/umychart.style.js +63 -2
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +480 -72
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +494 -88
|
@@ -17,17 +17,17 @@ function JSTReportChart(divElement)
|
|
|
17
17
|
this.JSChartContainer; //表格控件
|
|
18
18
|
this.ResizeListener; //大小变动监听
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
20
|
+
//h5 canvas
|
|
21
|
+
this.CanvasElement=document.createElement("canvas");
|
|
22
|
+
this.CanvasElement.className='jstreport-drawing';
|
|
23
|
+
this.CanvasElement.id=Guid();
|
|
24
|
+
this.CanvasElement.setAttribute("tabindex",0);
|
|
25
|
+
if (this.CanvasElement.style) this.CanvasElement.style.outline='none';
|
|
26
|
+
if(divElement.hasChildNodes())
|
|
27
|
+
{
|
|
28
|
+
JSConsole.Chart.Log("[JSTReportChart::JSReportChart] divElement hasChildNodes", divElement.childNodes);
|
|
29
|
+
}
|
|
30
|
+
divElement.appendChild(this.CanvasElement);
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
this.OnSize=function()
|
|
@@ -12424,13 +12424,13 @@ function JSSymbolData(ast,option,jsExecute)
|
|
|
12424
12424
|
|
|
12425
12425
|
this.GetDynaCacheData=function(name)
|
|
12426
12426
|
{
|
|
12427
|
+
var data=null;
|
|
12427
12428
|
if (MAP_DYNAINFO_SHORTCUT.has(name))
|
|
12428
12429
|
{
|
|
12429
12430
|
var item=MAP_DYNAINFO_SHORTCUT.get(name);
|
|
12430
|
-
|
|
12431
|
+
data=this.GetLatestCacheData(item.ID);
|
|
12431
12432
|
}
|
|
12432
|
-
|
|
12433
|
-
return null;
|
|
12433
|
+
return data;
|
|
12434
12434
|
}
|
|
12435
12435
|
|
|
12436
12436
|
this.GetLatestIndexData=function()
|
|
@@ -13506,12 +13506,7 @@ function JSSymbolData(ast,option,jsExecute)
|
|
|
13506
13506
|
{ Url:self.RealtimeApiUrl, Type:'POST' ,
|
|
13507
13507
|
Data:
|
|
13508
13508
|
{
|
|
13509
|
-
|
|
13510
|
-
"symbol": self.Symbol,
|
|
13511
|
-
"start": -1,
|
|
13512
|
-
"count": self.MaxRequestDataCount,
|
|
13513
|
-
"period":this.Period,
|
|
13514
|
-
"right":this.Right
|
|
13509
|
+
symbol: self.Symbol,count: self.MaxRequestDataCount, period:this.Period,right:this.Right
|
|
13515
13510
|
}
|
|
13516
13511
|
},
|
|
13517
13512
|
Self:this,
|
|
@@ -13523,6 +13518,7 @@ function JSSymbolData(ast,option,jsExecute)
|
|
|
13523
13518
|
obj.Request.KLineDataTimeRange={Start:{ Date:this.KLineDateTimeRange.Start.Date}, End:{ Date:this.KLineDateTimeRange.End.Date} };
|
|
13524
13519
|
if (this.IsNumber(this.KLineDateTimeRange.Start.Time)) obj.Request.KLineDataTimeRange.Start.Time=this.KLineDateTimeRange.Start.Time;
|
|
13525
13520
|
if (this.IsNumber(this.KLineDateTimeRange.End.Time)) obj.Request.KLineDataTimeRange.End.Time=this.KLineDateTimeRange.End.Time;
|
|
13521
|
+
obj.Request.Data.dateRange=obj.Request.KLineDataTimeRange;
|
|
13526
13522
|
}
|
|
13527
13523
|
|
|
13528
13524
|
this.NetworkFilter(obj, function(data)
|
|
@@ -15884,13 +15880,14 @@ function JSSymbolData(ast,option,jsExecute)
|
|
|
15884
15880
|
if (readArgument.Value=='') readArgument.Value=this.Symbol; //缺省使用股票代码
|
|
15885
15881
|
|
|
15886
15882
|
var symbol=readArgument.Value;
|
|
15883
|
+
var upperSymbol=symbol.toUpperCase();
|
|
15887
15884
|
|
|
15888
15885
|
//支持 SH60000, SZ000001
|
|
15889
15886
|
//A股后缀小写
|
|
15890
|
-
if (
|
|
15891
|
-
else if (
|
|
15892
|
-
else if (
|
|
15893
|
-
else if (
|
|
15887
|
+
if (upperSymbol.indexOf('.SH')>0) result.Symbol=symbol.replace('.SH', ".sh");
|
|
15888
|
+
else if (upperSymbol.indexOf('.SZ')>0) result.Symbol=symbol.replace('.SZ', ".sz");
|
|
15889
|
+
else if (upperSymbol.indexOf("SH")==0) result.Symbol=symbol.slice(2)+".sh";
|
|
15890
|
+
else if (upperSymbol.indexOf("SZ")==0) result.Symbol=symbol.slice(2)+".sz";
|
|
15894
15891
|
else result.Symbol=symbol;
|
|
15895
15892
|
|
|
15896
15893
|
return true;
|
|
@@ -17586,6 +17583,8 @@ function JSExecute(ast,option)
|
|
|
17586
17583
|
|
|
17587
17584
|
this.ReadSymbolData=function(name,node)
|
|
17588
17585
|
{
|
|
17586
|
+
if (MAP_DYNAINFO_SHORTCUT.has(name)) return this.SymbolData.GetDynaCacheData(name);
|
|
17587
|
+
|
|
17589
17588
|
switch(name)
|
|
17590
17589
|
{
|
|
17591
17590
|
case 'CLOSE':
|
|
@@ -17653,7 +17652,6 @@ function JSExecute(ast,option)
|
|
|
17653
17652
|
case 'CAPITAL':
|
|
17654
17653
|
case 'EXCHANGE':
|
|
17655
17654
|
case "HSL":
|
|
17656
|
-
|
|
17657
17655
|
case "HYBLOCK":
|
|
17658
17656
|
case "DYBLOCK":
|
|
17659
17657
|
case "GNBLOCK":
|
|
@@ -17754,14 +17752,6 @@ function JSExecute(ast,option)
|
|
|
17754
17752
|
return this.SymbolData.WEEKOFYEAR();
|
|
17755
17753
|
case "DAYSTOTODAY":
|
|
17756
17754
|
return this.SymbolData.DAYSTOTODAY();
|
|
17757
|
-
|
|
17758
|
-
case "DYNA_NOW":
|
|
17759
|
-
case "DYNA_ZAF":
|
|
17760
|
-
case "DYNA_LB":
|
|
17761
|
-
case "DYNA_ZAS":
|
|
17762
|
-
case "SELLVOL":
|
|
17763
|
-
case "BUYVOL":
|
|
17764
|
-
return this.SymbolData.GetDynaCacheData(name);
|
|
17765
17755
|
}
|
|
17766
17756
|
|
|
17767
17757
|
this.ThrowUnexpectedNode(node, '变量'+name+'不存在', name);
|
|
@@ -27120,8 +27110,8 @@ function DownloadFinanceData(obj)
|
|
|
27120
27110
|
{
|
|
27121
27111
|
case 1: //FINANCE(1) 总股本(随时间可能有变化) 股
|
|
27122
27112
|
case 7: //FINANCE(7) 流通股本(随时间可能有变化) 股
|
|
27123
|
-
case "EXCHANGE": //换手率
|
|
27124
27113
|
case "HSL"://换手率
|
|
27114
|
+
case "EXCHANGE": //换手率
|
|
27125
27115
|
this.DownloadHistoryData(id);
|
|
27126
27116
|
break;
|
|
27127
27117
|
case 3:
|
|
@@ -27382,7 +27372,7 @@ function DownloadFinanceData(obj)
|
|
|
27382
27372
|
if (!item.capital) return null;
|
|
27383
27373
|
return { Date:date, Value:item.capital.total };
|
|
27384
27374
|
case 7:
|
|
27385
|
-
case "HSL":
|
|
27375
|
+
case "HSL":
|
|
27386
27376
|
case "EXCHANGE": //换手率 历史流通股本
|
|
27387
27377
|
if (!item.capital) return null;
|
|
27388
27378
|
return { Date:date, Value:item.capital.a };
|
|
@@ -33,9 +33,18 @@ function JSDealChart(divElement)
|
|
|
33
33
|
this.OnSize=function()
|
|
34
34
|
{
|
|
35
35
|
//画布大小通过div获取
|
|
36
|
-
var height=
|
|
36
|
+
var height=this.DivElement.offsetHeight;
|
|
37
|
+
var width=this.DivElement.offsetWidth;
|
|
38
|
+
if (this.DivElement.style.height && this.DivElement.style.width)
|
|
39
|
+
{
|
|
40
|
+
if (this.DivElement.style.height.includes("px"))
|
|
41
|
+
height=parseInt(this.DivElement.style.height.replace("px",""));
|
|
42
|
+
if (this.DivElement.style.width.includes("px"))
|
|
43
|
+
width=parseInt(this.DivElement.style.width.replace("px",""));
|
|
44
|
+
}
|
|
45
|
+
|
|
37
46
|
this.CanvasElement.height=height;
|
|
38
|
-
this.CanvasElement.width=
|
|
47
|
+
this.CanvasElement.width=width;
|
|
39
48
|
this.CanvasElement.style.width=this.CanvasElement.width+'px';
|
|
40
49
|
this.CanvasElement.style.height=this.CanvasElement.height+'px';
|
|
41
50
|
|
|
@@ -500,14 +509,17 @@ function JSDealChartContainer(uielement)
|
|
|
500
509
|
this.ChangeSymbol=function(symbol, option)
|
|
501
510
|
{
|
|
502
511
|
this.Symbol=symbol;
|
|
503
|
-
this.Data=
|
|
504
|
-
this.SourceData=
|
|
512
|
+
this.Data={ DataOffset:0, Data:[] }; //分笔数据
|
|
513
|
+
this.SourceData={DataOffset:0, Data:[] }; //原始分笔数据
|
|
505
514
|
|
|
506
515
|
var chart=this.ChartPaint[0];
|
|
507
516
|
if (chart) chart.Data=null;
|
|
508
517
|
|
|
509
|
-
if (option
|
|
510
|
-
|
|
518
|
+
if (option)
|
|
519
|
+
{
|
|
520
|
+
if (IFrameSplitOperator.IsNumber(option.TradeDate)) this.TradeDate=option.TradeDate;
|
|
521
|
+
if (IFrameSplitOperator.IsNonEmptyArray(option.Column)) this.SetColumn(option.Column);
|
|
522
|
+
}
|
|
511
523
|
|
|
512
524
|
if (!this.Symbol)
|
|
513
525
|
{
|
|
@@ -615,6 +627,7 @@ function JSDealChartContainer(uielement)
|
|
|
615
627
|
chart.Data=this.Data;
|
|
616
628
|
chart.Symbol=this.Symbol;
|
|
617
629
|
chart.YClose=data.yclose;
|
|
630
|
+
chart.YFClose=data.yfclose;
|
|
618
631
|
chart.Open=data.open;
|
|
619
632
|
|
|
620
633
|
if (this.IsShowLastPage) this.SetLastPageDataOffset(); //显示最后一屏
|
|
@@ -1148,17 +1161,23 @@ JSDealChartContainer.JsonDataToDealData=function(data)
|
|
|
1148
1161
|
|
|
1149
1162
|
if (item[100]) dealItem.Guid=item[100];
|
|
1150
1163
|
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1164
|
+
//柱子类型
|
|
1165
|
+
if (item[50]) dealItem.MultiBar1=item[50];
|
|
1166
|
+
if (item[51]) dealItem.MultiBar2=item[51];
|
|
1167
|
+
if (item[52]) dealItem.MultiBar3=item[52];
|
|
1168
|
+
if (item[53]) dealItem.MultiBar4=item[53];
|
|
1169
|
+
|
|
1170
|
+
//10个数值型 101-199
|
|
1171
|
+
if (IFrameSplitOperator.IsNumber(item[101])) dealItem.ReserveNumber1=item[101];
|
|
1172
|
+
if (IFrameSplitOperator.IsNumber(item[102])) dealItem.ReserveNumber2=item[102];
|
|
1173
|
+
if (IFrameSplitOperator.IsNumber(item[103])) dealItem.ReserveNumber3=item[103];
|
|
1174
|
+
if (IFrameSplitOperator.IsNumber(item[104])) dealItem.ReserveNumber4=item[104];
|
|
1175
|
+
if (IFrameSplitOperator.IsNumber(item[105])) dealItem.ReserveNumber5=item[105];
|
|
1176
|
+
if (IFrameSplitOperator.IsNumber(item[106])) dealItem.ReserveNumber6=item[106];
|
|
1177
|
+
if (IFrameSplitOperator.IsNumber(item[107])) dealItem.ReserveNumber7=item[107];
|
|
1178
|
+
if (IFrameSplitOperator.IsNumber(item[108])) dealItem.ReserveNumber8=item[108];
|
|
1179
|
+
if (IFrameSplitOperator.IsNumber(item[109])) dealItem.ReserveNumber9=item[109];
|
|
1180
|
+
if (IFrameSplitOperator.IsNumber(item[110])) dealItem.ReserveNumber10=item[110];
|
|
1162
1181
|
|
|
1163
1182
|
//10个字符型 201-299
|
|
1164
1183
|
if (IFrameSplitOperator.IsString(item[201]) || IFrameSplitOperator.IsObject(item[201])) dealItem.ReserveString1=item[201];
|
|
@@ -1269,14 +1288,13 @@ var DEAL_COLUMN_ID=
|
|
|
1269
1288
|
UPDOWN_ID:5, //涨跌
|
|
1270
1289
|
STRING_TIME_ID:6, //字符串时间
|
|
1271
1290
|
INDEX_ID:7, //序号 从1开始
|
|
1272
|
-
|
|
1291
|
+
|
|
1273
1292
|
CENTER_BAR_ID:9, //中心柱子
|
|
1274
1293
|
CUSTOM_TEXT_ID:10, //自定义文本
|
|
1275
1294
|
|
|
1276
1295
|
SYMBOL_ID:11, //股票代码
|
|
1277
1296
|
NAME_ID:12, //股票名称
|
|
1278
1297
|
|
|
1279
|
-
|
|
1280
1298
|
//预留数值类型 10个
|
|
1281
1299
|
RESERVE_NUMBER1_ID:201, //ReserveNumber1:
|
|
1282
1300
|
RESERVE_NUMBER2_ID:202,
|
|
@@ -1300,6 +1318,11 @@ var DEAL_COLUMN_ID=
|
|
|
1300
1318
|
RESERVE_STRING8_ID:308,
|
|
1301
1319
|
RESERVE_STRING9_ID:309,
|
|
1302
1320
|
RESERVE_STRING10_ID:310,
|
|
1321
|
+
|
|
1322
|
+
MULTI_BAR_ID:50, //多颜色柱子
|
|
1323
|
+
MULTI_BAR2_ID:51,
|
|
1324
|
+
MULTI_BAR3_ID:52,
|
|
1325
|
+
MULTI_BAR4_ID:53
|
|
1303
1326
|
}
|
|
1304
1327
|
|
|
1305
1328
|
var MAP_DEAL_COLUMN_FIELD=new Map(
|
|
@@ -1308,6 +1331,11 @@ var MAP_DEAL_COLUMN_FIELD=new Map(
|
|
|
1308
1331
|
[DEAL_COLUMN_ID.NAME_ID, "Name"],
|
|
1309
1332
|
[DEAL_COLUMN_ID.PRICE_ID, "Price"],
|
|
1310
1333
|
|
|
1334
|
+
[DEAL_COLUMN_ID.MULTI_BAR_ID, "MultiBar1"],
|
|
1335
|
+
[DEAL_COLUMN_ID.MULTI_BAR2_ID, "MultiBar2"],
|
|
1336
|
+
[DEAL_COLUMN_ID.MULTI_BAR3_ID, "MultiBar3"],
|
|
1337
|
+
[DEAL_COLUMN_ID.MULTI_BAR4_ID, "MultiBar4"],
|
|
1338
|
+
|
|
1311
1339
|
[DEAL_COLUMN_ID.RESERVE_NUMBER1_ID,"ReserveNumber1"],
|
|
1312
1340
|
[DEAL_COLUMN_ID.RESERVE_NUMBER2_ID,"ReserveNumber2"],
|
|
1313
1341
|
[DEAL_COLUMN_ID.RESERVE_NUMBER3_ID,"ReserveNumber3"],
|
|
@@ -1344,6 +1372,7 @@ function ChartDealList()
|
|
|
1344
1372
|
//this.Data={Offset:0, Data:[ {Time:925, Price:20.1, Vol:10000050, BS:1, Deal:45 }, {Time:925, Price:18.2, Vol:1150, BS:1, Deal:5 }] };
|
|
1345
1373
|
this.Symbol;
|
|
1346
1374
|
this.YClose; //昨收
|
|
1375
|
+
this.YFClose; //昨结算
|
|
1347
1376
|
this.Open; //开盘价
|
|
1348
1377
|
this.Decimal=2; //小数位数
|
|
1349
1378
|
this.IsSingleTable=false; //单表模式
|
|
@@ -1464,7 +1493,7 @@ function ChartDealList()
|
|
|
1464
1493
|
|
|
1465
1494
|
if (item.ChartTooltip) colItem.ChartTooltip={ Enable:item.ChartTooltip.Enable, Type:item.ChartTooltip.Type }; //图形提示信息
|
|
1466
1495
|
|
|
1467
|
-
if (item.Type==DEAL_COLUMN_ID.
|
|
1496
|
+
if (item.Type==DEAL_COLUMN_ID.CENTER_BAR_ID)
|
|
1468
1497
|
{
|
|
1469
1498
|
if (!IFrameSplitOperator.IsNumber(item.DataIndex)) continue;
|
|
1470
1499
|
colItem.DataIndex=item.DataIndex; //柱子数据所在原始数据索引列
|
|
@@ -1477,6 +1506,8 @@ function ChartDealList()
|
|
|
1477
1506
|
{
|
|
1478
1507
|
if (item.Format) colItem.Format=item.Format; //数据格式化设置{ Type:1=原始 2=千分位分割 3=万亿转换, ExFloatPrecision:万亿转换以后的小数位数 }
|
|
1479
1508
|
if (IFrameSplitOperator.IsNumber(item.ColorType)) colItem.ColorType=item.ColorType; //0=默认 1=(>0, =0, <0) 2=(>=0, <0)
|
|
1509
|
+
if (IFrameSplitOperator.IsNumber(item.FloatPrecision)) colItem.FloatPrecision=item.FloatPrecision;
|
|
1510
|
+
if (item.StringFormat) colItem.StringFormat=item.StringFormat; //"{0}%" 输出增加固定字符
|
|
1480
1511
|
}
|
|
1481
1512
|
|
|
1482
1513
|
this.Column.push(colItem);
|
|
@@ -1496,7 +1527,6 @@ function ChartDealList()
|
|
|
1496
1527
|
{ Type:DEAL_COLUMN_ID.STRING_TIME_ID, Title:"时间", TextAlign:"center", Width:null, TextColor:g_JSChartResource.DealList.FieldColor.Time, MaxText:"88:88:88" },
|
|
1497
1528
|
{ Type:DEAL_COLUMN_ID.INDEX_ID, Title:"序号", TextAlign:"center", Width:null, TextColor:g_JSChartResource.DealList.FieldColor.Index, MaxText:"88888" },
|
|
1498
1529
|
|
|
1499
|
-
{ Type:DEAL_COLUMN_ID.MULTI_BAR_ID, Title:"柱子", TextAlign:"center", Width:null, TextColor:g_JSChartResource.DealList.FieldColor.BarTitle, MaxText:"888888" },
|
|
1500
1530
|
{ Type:DEAL_COLUMN_ID.CENTER_BAR_ID, Title:"柱子2", TextAlign:"center", Width:null, TextColor:g_JSChartResource.DealList.FieldColor.BarTitle, MaxText:"888888" },
|
|
1501
1531
|
{ Type:DEAL_COLUMN_ID.CUSTOM_TEXT_ID, Title:"自定义", TextAlign:"center", Width:null, TextColor:g_JSChartResource.DealList.FieldColor.Text, MaxText:"擎擎擎擎擎" },
|
|
1502
1532
|
|
|
@@ -1524,6 +1554,11 @@ function ChartDealList()
|
|
|
1524
1554
|
{ Type:DEAL_COLUMN_ID.RESERVE_STRING8_ID, Title:"文字8", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"擎擎擎擎擎擎" },
|
|
1525
1555
|
{ Type:DEAL_COLUMN_ID.RESERVE_STRING9_ID, Title:"文字9", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"擎擎擎擎擎擎" },
|
|
1526
1556
|
{ Type:DEAL_COLUMN_ID.RESERVE_STRING10_ID, Title:"文字10", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"擎擎擎擎擎擎" },
|
|
1557
|
+
|
|
1558
|
+
{ Type:DEAL_COLUMN_ID.MULTI_BAR_ID, Title:"柱子", TextAlign:"center", Width:null, TextColor:g_JSChartResource.DealList.FieldColor.BarTitle, MaxText:"888888" },
|
|
1559
|
+
{ Type:DEAL_COLUMN_ID.MULTI_BAR2_ID, Title:"柱子2", TextAlign:"center", Width:null, TextColor:g_JSChartResource.DealList.FieldColor.BarTitle, MaxText:"888888" },
|
|
1560
|
+
{ Type:DEAL_COLUMN_ID.MULTI_BAR3_ID, Title:"柱子3", TextAlign:"center", Width:null, TextColor:g_JSChartResource.DealList.FieldColor.BarTitle, MaxText:"888888" },
|
|
1561
|
+
{ Type:DEAL_COLUMN_ID.MULTI_BAR4_ID, Title:"柱子4", TextAlign:"center", Width:null, TextColor:g_JSChartResource.DealList.FieldColor.BarTitle, MaxText:"888888" },
|
|
1527
1562
|
|
|
1528
1563
|
];
|
|
1529
1564
|
|
|
@@ -1820,10 +1855,7 @@ function ChartDealList()
|
|
|
1820
1855
|
}
|
|
1821
1856
|
else if (item.Type==DEAL_COLUMN_ID.PRICE_ID)
|
|
1822
1857
|
{
|
|
1823
|
-
|
|
1824
|
-
else if (data.Price<this.YClose) textColor=this.DownColor;
|
|
1825
|
-
else textColor=this.UnchangeColor;
|
|
1826
|
-
|
|
1858
|
+
textColor=this.GetPriceColor(data.Price);
|
|
1827
1859
|
text=data.Price.toFixed(this.Decimal);
|
|
1828
1860
|
}
|
|
1829
1861
|
else if (item.Type==DEAL_COLUMN_ID.VOL_ID)
|
|
@@ -1864,7 +1896,7 @@ function ChartDealList()
|
|
|
1864
1896
|
{
|
|
1865
1897
|
text=(dataIndex+1).toString();
|
|
1866
1898
|
}
|
|
1867
|
-
else if (item.Type
|
|
1899
|
+
else if (this.IsMulitBar(item.Type))
|
|
1868
1900
|
{
|
|
1869
1901
|
var rtItem={Left:left, Top:top, Width:itemWidth, Height:this.RowHeight};
|
|
1870
1902
|
this.DrawMultiBar(item, data, rtItem);
|
|
@@ -1924,6 +1956,29 @@ function ChartDealList()
|
|
|
1924
1956
|
}
|
|
1925
1957
|
}
|
|
1926
1958
|
|
|
1959
|
+
this.GetPriceColor=function(price)
|
|
1960
|
+
{
|
|
1961
|
+
var upperSymbol=null;
|
|
1962
|
+
if (this.Symbol) upperSymbol=this.Symbol.toUpperCase();
|
|
1963
|
+
if (MARKET_SUFFIX_NAME.IsChinaFutures(upperSymbol))
|
|
1964
|
+
{
|
|
1965
|
+
if (!IFrameSplitOperator.IsNumber(this.YFClose)) return this.UnchangeColor;
|
|
1966
|
+
return this.GetUpDownColor(price, this.YFClose);
|
|
1967
|
+
}
|
|
1968
|
+
else
|
|
1969
|
+
{
|
|
1970
|
+
if (!IFrameSplitOperator.IsNumber(this.YClose)) return this.UnchangeColor;
|
|
1971
|
+
return this.GetUpDownColor(price, this.YClose);
|
|
1972
|
+
}
|
|
1973
|
+
}
|
|
1974
|
+
|
|
1975
|
+
this.GetUpDownColor=function(price, price2)
|
|
1976
|
+
{
|
|
1977
|
+
if (price>price2) return this.UpColor;
|
|
1978
|
+
else if (price<price2) return this.DownColor;
|
|
1979
|
+
else return this.UnchangeColor;
|
|
1980
|
+
}
|
|
1981
|
+
|
|
1927
1982
|
this.FormatReserveNumber=function(column, data, drawInfo)
|
|
1928
1983
|
{
|
|
1929
1984
|
if (column.DefaultText) drawInfo.Text=column.DefaultText;
|
|
@@ -1965,6 +2020,11 @@ function ChartDealList()
|
|
|
1965
2020
|
break;
|
|
1966
2021
|
}
|
|
1967
2022
|
}
|
|
2023
|
+
|
|
2024
|
+
if (column.StringFormat && text)
|
|
2025
|
+
{
|
|
2026
|
+
text=column.StringFormat.replace("{0}", text);
|
|
2027
|
+
}
|
|
1968
2028
|
|
|
1969
2029
|
drawInfo.Text=text;
|
|
1970
2030
|
}
|
|
@@ -2086,8 +2146,10 @@ function ChartDealList()
|
|
|
2086
2146
|
|
|
2087
2147
|
this.DrawMultiBar=function(colunmInfo, data, rtItem)
|
|
2088
2148
|
{
|
|
2089
|
-
|
|
2090
|
-
|
|
2149
|
+
var fieldName=MAP_DEAL_COLUMN_FIELD.get(colunmInfo.Type);
|
|
2150
|
+
if (!data || !fieldName) return;
|
|
2151
|
+
|
|
2152
|
+
var barData=data[fieldName]; //{ Value:[0.4,0,2], Color:[0,1] };
|
|
2091
2153
|
if (!barData) return false;
|
|
2092
2154
|
if (!IFrameSplitOperator.IsNonEmptyArray(barData.Value)) return false;
|
|
2093
2155
|
|
|
@@ -2275,6 +2337,16 @@ function ChartDealList()
|
|
|
2275
2337
|
return ARARY_TYPE.includes(value);
|
|
2276
2338
|
}
|
|
2277
2339
|
|
|
2340
|
+
this.IsMulitBar=function(value)
|
|
2341
|
+
{
|
|
2342
|
+
var ARARY_TYPE=
|
|
2343
|
+
[
|
|
2344
|
+
DEAL_COLUMN_ID.MULTI_BAR_ID,DEAL_COLUMN_ID.MULTI_BAR2_ID,DEAL_COLUMN_ID.MULTI_BAR3_ID,DEAL_COLUMN_ID.MULTI_BAR4_ID,
|
|
2345
|
+
];
|
|
2346
|
+
|
|
2347
|
+
return ARARY_TYPE.includes(value);
|
|
2348
|
+
}
|
|
2349
|
+
|
|
2278
2350
|
this.IsReserveNumber=function(value)
|
|
2279
2351
|
{
|
|
2280
2352
|
var ARARY_TYPE=
|