hqchart 1.1.15428 → 1.1.15446
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 +215 -181
- package/package.json +1 -1
- package/src/jscommon/umychart.DialogTooltip.js +3 -5
- package/src/jscommon/umychart.StatusBar.js +1069 -0
- package/src/jscommon/umychart.StockInfo.js +18 -11
- package/src/jscommon/umychart.deal.js +31 -9
- package/src/jscommon/umychart.js +330 -6
- package/src/jscommon/umychart.report.js +50 -12
- package/src/jscommon/umychart.resource/font/iconfont.css +11 -3
- package/src/jscommon/umychart.resource/font/iconfont.ttf +0 -0
- package/src/jscommon/umychart.resource/font/iconfont.woff +0 -0
- package/src/jscommon/umychart.resource/font/iconfont.woff2 +0 -0
- package/src/jscommon/umychart.style.js +44 -2
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +456 -30
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +459 -35
|
@@ -227,6 +227,7 @@ function JSStockInfoChartContainer(uielement)
|
|
|
227
227
|
{
|
|
228
228
|
Name:null,
|
|
229
229
|
YClose:null, //昨收盘
|
|
230
|
+
YFClose:null, //昨计算价
|
|
230
231
|
Symbol:null,
|
|
231
232
|
|
|
232
233
|
Buys:
|
|
@@ -294,6 +295,7 @@ function JSStockInfoChartContainer(uielement)
|
|
|
294
295
|
{
|
|
295
296
|
this.Data.Name=null;
|
|
296
297
|
this.Data.YClose=null;
|
|
298
|
+
this.Data.YFClose=null;
|
|
297
299
|
|
|
298
300
|
this.Data.Buys=
|
|
299
301
|
[
|
|
@@ -400,6 +402,8 @@ function JSStockInfoChartContainer(uielement)
|
|
|
400
402
|
|
|
401
403
|
if (recv.name) this.Data.Name=recv.Name;
|
|
402
404
|
if (IFrameSplitOperator.IsNumber(recv.yclose)) this.Data.YClose=recv.yclose;
|
|
405
|
+
if (IFrameSplitOperator.IsNumber(recv.yfclose)) this.Data.YFClose=recv.yfclose;
|
|
406
|
+
|
|
403
407
|
if (recv.name) this.Data.Name=recv.name;
|
|
404
408
|
|
|
405
409
|
if (IFrameSplitOperator.IsNonEmptyArray(recv.data))
|
|
@@ -510,12 +514,6 @@ function JSStockInfoChartContainer(uielement)
|
|
|
510
514
|
var item=this.ChartPaint[i];
|
|
511
515
|
item.Draw();
|
|
512
516
|
}
|
|
513
|
-
|
|
514
|
-
for(var i=0; i<this.ChartPaint.length; ++i)
|
|
515
|
-
{
|
|
516
|
-
var item=this.ChartPaint[i];
|
|
517
|
-
item.Draw();
|
|
518
|
-
}
|
|
519
517
|
}
|
|
520
518
|
|
|
521
519
|
this.OnSize=function()
|
|
@@ -759,7 +757,7 @@ function ChartStockData()
|
|
|
759
757
|
|
|
760
758
|
this.Draw=function()
|
|
761
759
|
{
|
|
762
|
-
this.Decimal=GetfloatPrecision(this.Symbol);
|
|
760
|
+
this.Decimal=GetfloatPrecision(this.Data.Symbol);
|
|
763
761
|
var border=this.ChartBorder.GetBorder();
|
|
764
762
|
var position = { Left:border.Left, Right:border.Right, Top:border.Top, Width:border.Right-border.Left, Border:border };
|
|
765
763
|
this.DrawHeader(position);
|
|
@@ -1171,16 +1169,25 @@ function ChartStockData()
|
|
|
1171
1169
|
|
|
1172
1170
|
this.GetPriceColor=function(price)
|
|
1173
1171
|
{
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1172
|
+
var upperSymbol=null;
|
|
1173
|
+
if (this.Data.Symbol) upperSymbol=this.Data.Symbol.toUpperCase();
|
|
1174
|
+
if (MARKET_SUFFIX_NAME.IsChinaFutures(upperSymbol))
|
|
1175
|
+
{
|
|
1176
|
+
if (!IFrameSplitOperator.IsNumber(this.Data.YFClose)) return this.UnchangeColor;
|
|
1177
|
+
return this.GetUpDownColor(price, this.Data.YFClose);
|
|
1178
|
+
}
|
|
1179
|
+
else
|
|
1180
|
+
{
|
|
1181
|
+
if (!IFrameSplitOperator.IsNumber(this.Data.YClose)) return this.UnchangeColor;
|
|
1182
|
+
return this.GetUpDownColor(price, this.Data.YClose);
|
|
1183
|
+
}
|
|
1177
1184
|
}
|
|
1178
1185
|
|
|
1179
1186
|
this.GetUpDownColor=function(price, price2)
|
|
1180
1187
|
{
|
|
1181
1188
|
if (price>price2) return this.UpColor;
|
|
1182
1189
|
else if (price<price2) return this.DownColor;
|
|
1183
|
-
else return this.
|
|
1190
|
+
else return this.UnchangeColor;
|
|
1184
1191
|
}
|
|
1185
1192
|
}
|
|
1186
1193
|
|
|
@@ -515,8 +515,11 @@ function JSDealChartContainer(uielement)
|
|
|
515
515
|
var chart=this.ChartPaint[0];
|
|
516
516
|
if (chart) chart.Data=null;
|
|
517
517
|
|
|
518
|
-
if (option
|
|
519
|
-
|
|
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
|
+
}
|
|
520
523
|
|
|
521
524
|
if (!this.Symbol)
|
|
522
525
|
{
|
|
@@ -624,6 +627,7 @@ function JSDealChartContainer(uielement)
|
|
|
624
627
|
chart.Data=this.Data;
|
|
625
628
|
chart.Symbol=this.Symbol;
|
|
626
629
|
chart.YClose=data.yclose;
|
|
630
|
+
chart.YFClose=data.yfclose;
|
|
627
631
|
chart.Open=data.open;
|
|
628
632
|
|
|
629
633
|
if (this.IsShowLastPage) this.SetLastPageDataOffset(); //显示最后一屏
|
|
@@ -1291,8 +1295,6 @@ var DEAL_COLUMN_ID=
|
|
|
1291
1295
|
SYMBOL_ID:11, //股票代码
|
|
1292
1296
|
NAME_ID:12, //股票名称
|
|
1293
1297
|
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
1298
|
//预留数值类型 10个
|
|
1297
1299
|
RESERVE_NUMBER1_ID:201, //ReserveNumber1:
|
|
1298
1300
|
RESERVE_NUMBER2_ID:202,
|
|
@@ -1370,6 +1372,7 @@ function ChartDealList()
|
|
|
1370
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 }] };
|
|
1371
1373
|
this.Symbol;
|
|
1372
1374
|
this.YClose; //昨收
|
|
1375
|
+
this.YFClose; //昨结算
|
|
1373
1376
|
this.Open; //开盘价
|
|
1374
1377
|
this.Decimal=2; //小数位数
|
|
1375
1378
|
this.IsSingleTable=false; //单表模式
|
|
@@ -1524,7 +1527,6 @@ function ChartDealList()
|
|
|
1524
1527
|
{ Type:DEAL_COLUMN_ID.STRING_TIME_ID, Title:"时间", TextAlign:"center", Width:null, TextColor:g_JSChartResource.DealList.FieldColor.Time, MaxText:"88:88:88" },
|
|
1525
1528
|
{ Type:DEAL_COLUMN_ID.INDEX_ID, Title:"序号", TextAlign:"center", Width:null, TextColor:g_JSChartResource.DealList.FieldColor.Index, MaxText:"88888" },
|
|
1526
1529
|
|
|
1527
|
-
|
|
1528
1530
|
{ Type:DEAL_COLUMN_ID.CENTER_BAR_ID, Title:"柱子2", TextAlign:"center", Width:null, TextColor:g_JSChartResource.DealList.FieldColor.BarTitle, MaxText:"888888" },
|
|
1529
1531
|
{ Type:DEAL_COLUMN_ID.CUSTOM_TEXT_ID, Title:"自定义", TextAlign:"center", Width:null, TextColor:g_JSChartResource.DealList.FieldColor.Text, MaxText:"擎擎擎擎擎" },
|
|
1530
1532
|
|
|
@@ -1853,10 +1855,7 @@ function ChartDealList()
|
|
|
1853
1855
|
}
|
|
1854
1856
|
else if (item.Type==DEAL_COLUMN_ID.PRICE_ID)
|
|
1855
1857
|
{
|
|
1856
|
-
|
|
1857
|
-
else if (data.Price<this.YClose) textColor=this.DownColor;
|
|
1858
|
-
else textColor=this.UnchangeColor;
|
|
1859
|
-
|
|
1858
|
+
textColor=this.GetPriceColor(data.Price);
|
|
1860
1859
|
text=data.Price.toFixed(this.Decimal);
|
|
1861
1860
|
}
|
|
1862
1861
|
else if (item.Type==DEAL_COLUMN_ID.VOL_ID)
|
|
@@ -1957,6 +1956,29 @@ function ChartDealList()
|
|
|
1957
1956
|
}
|
|
1958
1957
|
}
|
|
1959
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
|
+
|
|
1960
1982
|
this.FormatReserveNumber=function(column, data, drawInfo)
|
|
1961
1983
|
{
|
|
1962
1984
|
if (column.DefaultText) drawInfo.Text=column.DefaultText;
|
package/src/jscommon/umychart.js
CHANGED
|
@@ -2933,6 +2933,9 @@ var JSCHART_EVENT_ID=
|
|
|
2933
2933
|
ON_BEFORE_DRAW_HLINE:180, //画图工具-水平线(ChartDrawPictureHorizontalLine) 绘图前
|
|
2934
2934
|
|
|
2935
2935
|
ON_HIDE_ALL_POP_DIV:181, //隐藏所有弹框div
|
|
2936
|
+
|
|
2937
|
+
//工具条
|
|
2938
|
+
ON_CLICK_STATUSBAR_ITEM:301,
|
|
2936
2939
|
}
|
|
2937
2940
|
|
|
2938
2941
|
var JSCHART_OPERATOR_ID=
|
|
@@ -51084,6 +51087,9 @@ function StockChip()
|
|
|
51084
51087
|
if (recvData && recvData.PreventDefault)
|
|
51085
51088
|
return recvData.Result;
|
|
51086
51089
|
|
|
51090
|
+
if (MARKET_SUFFIX_NAME.IsIncludes(symbol, ARRAY_CHINA_FUTURES_SUFFIX))
|
|
51091
|
+
return this.CalculateChip_Futrues();
|
|
51092
|
+
|
|
51087
51093
|
if (MARKET_SUFFIX_NAME.IsSHSZIndex(symbol)) return false; //指数暂时不支持移动筹码
|
|
51088
51094
|
|
|
51089
51095
|
var bindData=this.HQChart.ChartPaint[0].Data;
|
|
@@ -51213,6 +51219,142 @@ function StockChip()
|
|
|
51213
51219
|
return true;
|
|
51214
51220
|
}
|
|
51215
51221
|
|
|
51222
|
+
this.CalculateChip_Futrues=function() //计算期货筹码 (持仓和量计算的)
|
|
51223
|
+
{
|
|
51224
|
+
if (!this.HQChart) return false;
|
|
51225
|
+
var symbol=this.HQChart.Symbol;
|
|
51226
|
+
if (!symbol) return false;
|
|
51227
|
+
var upperSymbol=symbol.toUpperCase();
|
|
51228
|
+
|
|
51229
|
+
if (!MARKET_SUFFIX_NAME.IsIncludes(symbol, ARRAY_CHINA_FUTURES_SUFFIX)) return false;
|
|
51230
|
+
|
|
51231
|
+
var bindData=this.HQChart.GetKData();
|
|
51232
|
+
//if (bindData.Period>=4) return false; //分钟K线不支持, 没时间做,以后再做吧
|
|
51233
|
+
var count=bindData.DataOffset+parseInt(this.HQChart.CursorIndex);
|
|
51234
|
+
if (count>=bindData.Data.length) count=bindData.Data.length-1;
|
|
51235
|
+
var selData=bindData.Data[count];
|
|
51236
|
+
var yPrice=selData.Close;
|
|
51237
|
+
|
|
51238
|
+
var mouseY=this.HQChart.LastPoint.Y;
|
|
51239
|
+
if (mouseY) yPrice=this.HQChart.Frame.SubFrame[0].Frame.GetYData(mouseY);
|
|
51240
|
+
|
|
51241
|
+
//JSConsole.Chart.Log("[StockChip::CalculateChip]",count,this.HQChart.CursorIndex,selData);
|
|
51242
|
+
const rate=1;
|
|
51243
|
+
var aryVol=[];
|
|
51244
|
+
var seed=1,vol,maxPrice,minPrice;
|
|
51245
|
+
for(let i=count;i>=0;--i)
|
|
51246
|
+
{
|
|
51247
|
+
var item=bindData.Data[i];
|
|
51248
|
+
var changeRate=1; //换手率
|
|
51249
|
+
if (item.Position>0) changeRate=item.Vol/item.Position;
|
|
51250
|
+
if (i==count) vol=item.Vol*changeRate;
|
|
51251
|
+
else vol=item.Vol*seed;
|
|
51252
|
+
var dataItem={Vol:vol,High:item.High,Low:item.Low};
|
|
51253
|
+
aryVol.push(dataItem);
|
|
51254
|
+
seed*=(1-changeRate*rate);
|
|
51255
|
+
|
|
51256
|
+
if (!maxPrice || maxPrice<item.High) maxPrice=item.High;
|
|
51257
|
+
if (!minPrice || minPrice>item.Low) minPrice=item.Low;
|
|
51258
|
+
}
|
|
51259
|
+
|
|
51260
|
+
//JSConsole.Chart.Log("[StockChip::CalculateChip]",maxPrice,minPrice);
|
|
51261
|
+
if (!maxPrice || !minPrice) return true;
|
|
51262
|
+
|
|
51263
|
+
var priceZoom=this.PriceZoom;
|
|
51264
|
+
|
|
51265
|
+
maxPrice=parseInt(maxPrice*priceZoom);
|
|
51266
|
+
minPrice=parseInt(minPrice*priceZoom);
|
|
51267
|
+
|
|
51268
|
+
var dataCount=maxPrice-minPrice;
|
|
51269
|
+
var aryChip=new Array()
|
|
51270
|
+
for(let i=0;i<=dataCount;++i)
|
|
51271
|
+
{
|
|
51272
|
+
aryChip.push(0);
|
|
51273
|
+
}
|
|
51274
|
+
|
|
51275
|
+
var dayChip=[];
|
|
51276
|
+
var distributeData;
|
|
51277
|
+
if (this.ShowType==2)
|
|
51278
|
+
{
|
|
51279
|
+
var dayChip=
|
|
51280
|
+
[
|
|
51281
|
+
{Day:100, Color:this.DAY_COLOR[1][5]}, {Day:60, Color:this.DAY_COLOR[1][4]}, {Day:30, Color:this.DAY_COLOR[1][3]},
|
|
51282
|
+
{Day:20, Color:this.DAY_COLOR[1][2]}, {Day:10, Color:this.DAY_COLOR[1][1]}, {Day:5, Color:this.DAY_COLOR[1][0]}
|
|
51283
|
+
];
|
|
51284
|
+
for(let i in aryVol)
|
|
51285
|
+
{
|
|
51286
|
+
var item=aryVol[i];
|
|
51287
|
+
var high=parseInt(item.High*priceZoom);
|
|
51288
|
+
var low=parseInt(item.Low*priceZoom);
|
|
51289
|
+
var averageVol=item.Vol;
|
|
51290
|
+
if (high-low>0) averageVol=item.Vol/(high-low);
|
|
51291
|
+
if (averageVol<=0.000000001) continue;
|
|
51292
|
+
|
|
51293
|
+
for(var k=0;k<dayChip.length;++k)
|
|
51294
|
+
{
|
|
51295
|
+
if (i==dayChip[k].Day)
|
|
51296
|
+
{
|
|
51297
|
+
dayChip[k].Chip=aryChip.slice(0);
|
|
51298
|
+
break;
|
|
51299
|
+
}
|
|
51300
|
+
}
|
|
51301
|
+
|
|
51302
|
+
distributeData={Low:low, High:high, Vol:item.Vol, MaxPrice:maxPrice, MinPrice:minPrice};
|
|
51303
|
+
this.CalculateDistribute(aryChip, distributeData );
|
|
51304
|
+
}
|
|
51305
|
+
}
|
|
51306
|
+
else if (this.ShowType==1)
|
|
51307
|
+
{
|
|
51308
|
+
var dayChip=
|
|
51309
|
+
[
|
|
51310
|
+
{Day:5, Color:this.DAY_COLOR[0][0]},{Day:10, Color:this.DAY_COLOR[0][1]},{Day:20, Color:this.DAY_COLOR[0][2]},
|
|
51311
|
+
{Day:30, Color:this.DAY_COLOR[0][3]},{Day:60, Color:this.DAY_COLOR[0][4]},{Day:100, Color:this.DAY_COLOR[0][5]}
|
|
51312
|
+
];
|
|
51313
|
+
|
|
51314
|
+
for(let i=aryVol.length-1;i>=0;--i)
|
|
51315
|
+
{
|
|
51316
|
+
var item=aryVol[i];
|
|
51317
|
+
var high=parseInt(item.High*priceZoom);
|
|
51318
|
+
var low=parseInt(item.Low*priceZoom);
|
|
51319
|
+
var averageVol=item.Vol;
|
|
51320
|
+
if (high-low>0) averageVol=item.Vol/(high-low);
|
|
51321
|
+
if (averageVol<=0.000000001) continue;
|
|
51322
|
+
|
|
51323
|
+
for(var k=0;k<dayChip.length;++k)
|
|
51324
|
+
{
|
|
51325
|
+
if (i==dayChip[k].Day)
|
|
51326
|
+
{
|
|
51327
|
+
dayChip[k].Chip=aryChip.slice(0);
|
|
51328
|
+
break;
|
|
51329
|
+
}
|
|
51330
|
+
}
|
|
51331
|
+
|
|
51332
|
+
distributeData={Low:low, High:high, Vol:item.Vol, MaxPrice:maxPrice, MinPrice:minPrice};
|
|
51333
|
+
this.CalculateDistribute(aryChip, distributeData);
|
|
51334
|
+
}
|
|
51335
|
+
}
|
|
51336
|
+
else
|
|
51337
|
+
{
|
|
51338
|
+
for(let i in aryVol)
|
|
51339
|
+
{
|
|
51340
|
+
var item=aryVol[i];
|
|
51341
|
+
var high=parseInt(item.High*priceZoom);
|
|
51342
|
+
var low=parseInt(item.Low*priceZoom);
|
|
51343
|
+
var averageVol=item.Vol;
|
|
51344
|
+
if (high-low>0) averageVol=item.Vol/(high-low);
|
|
51345
|
+
if (averageVol<=0.000000001) continue;
|
|
51346
|
+
|
|
51347
|
+
distributeData={Low:low, High:high, Vol:item.Vol, MaxPrice:maxPrice, MinPrice:minPrice};
|
|
51348
|
+
this.CalculateDistribute(aryChip, distributeData);
|
|
51349
|
+
}
|
|
51350
|
+
}
|
|
51351
|
+
|
|
51352
|
+
if (!distributeData) return false;
|
|
51353
|
+
|
|
51354
|
+
this.Data={AllChip:aryChip, MaxVol:distributeData.MaxVol, MaxPrice:maxPrice, MinPrice:minPrice,SelectData:selData, DayChip:dayChip, YPrice:yPrice};
|
|
51355
|
+
return true;
|
|
51356
|
+
}
|
|
51357
|
+
|
|
51216
51358
|
this.DrawFrame=function() //X轴成交量坐标
|
|
51217
51359
|
{
|
|
51218
51360
|
if (this.IsShowX==false) return;
|
|
@@ -79391,13 +79533,13 @@ function JSChartResource()
|
|
|
79391
79533
|
{
|
|
79392
79534
|
Color:"RGB(60,60,60)",
|
|
79393
79535
|
Mergin:{ Left:5, Right:5, Top:4, Bottom:2 },
|
|
79394
|
-
Font:{ Size:
|
|
79536
|
+
Font:{ Size:14, Name:"微软雅黑" }
|
|
79395
79537
|
},
|
|
79396
79538
|
|
|
79397
79539
|
Row:
|
|
79398
79540
|
{
|
|
79399
79541
|
Mergin:{ Top:2, Bottom:2 },
|
|
79400
|
-
Font:{ Size:
|
|
79542
|
+
Font:{ Size:14, Name:"微软雅黑"},
|
|
79401
79543
|
BarMergin:{ Top:2, Left:3, Right:3, Bottom:2 }
|
|
79402
79544
|
},
|
|
79403
79545
|
|
|
@@ -79813,6 +79955,57 @@ function JSChartResource()
|
|
|
79813
79955
|
BorderColor:"rgb(192,192,192)"
|
|
79814
79956
|
}
|
|
79815
79957
|
|
|
79958
|
+
this.StatusBar=
|
|
79959
|
+
{
|
|
79960
|
+
Table:
|
|
79961
|
+
{
|
|
79962
|
+
Font:14*GetDevicePixelRatio() +'px 微软雅黑',
|
|
79963
|
+
TitleColor:"rgb(90,90,90)",
|
|
79964
|
+
AryTextColor:["rgb(90,90,90)","rgb(192,192,0)"],
|
|
79965
|
+
Margin:{ Left:1*GetDevicePixelRatio(), Top:0, Bottom:0, Right:0 },
|
|
79966
|
+
CellMargin:
|
|
79967
|
+
{
|
|
79968
|
+
Top:5*GetDevicePixelRatio(),
|
|
79969
|
+
Bottom:5*GetDevicePixelRatio(),
|
|
79970
|
+
Left:5*GetDevicePixelRatio(),
|
|
79971
|
+
Right:5*GetDevicePixelRatio(),
|
|
79972
|
+
YOffset:1* GetDevicePixelRatio(),
|
|
79973
|
+
},
|
|
79974
|
+
|
|
79975
|
+
Separator: { Left:10, Right:10, Line:{ Width:1, Color:"rgb(192,192,192)", Top:2, Bottom:2 } }
|
|
79976
|
+
},
|
|
79977
|
+
|
|
79978
|
+
DateTime:
|
|
79979
|
+
{
|
|
79980
|
+
Font:14*GetDevicePixelRatio() +'px 微软雅黑',
|
|
79981
|
+
TitleColor:"rgb(90,90,90)",
|
|
79982
|
+
Format:"HH:MM:SS",
|
|
79983
|
+
MaxText:"99:99:99",
|
|
79984
|
+
Margin:{ Left:2*GetDevicePixelRatio(), Top:5*GetDevicePixelRatio(), Bottom:5*GetDevicePixelRatio(), Right:5*GetDevicePixelRatio(), YOffset:1*GetDevicePixelRatio() },
|
|
79985
|
+
},
|
|
79986
|
+
|
|
79987
|
+
RightToolbar:
|
|
79988
|
+
{
|
|
79989
|
+
Icon:{ Family:"iconfont", Size:14*GetDevicePixelRatio() },
|
|
79990
|
+
|
|
79991
|
+
Margin:{ Left:1*GetDevicePixelRatio(), Top:0, Bottom:0, Right:2*GetDevicePixelRatio() },
|
|
79992
|
+
CellMargin:
|
|
79993
|
+
{
|
|
79994
|
+
Top:5*GetDevicePixelRatio(),
|
|
79995
|
+
Bottom:5*GetDevicePixelRatio(),
|
|
79996
|
+
Left:2*GetDevicePixelRatio(),
|
|
79997
|
+
Right:2*GetDevicePixelRatio(),
|
|
79998
|
+
YOffset:0,
|
|
79999
|
+
},
|
|
80000
|
+
},
|
|
80001
|
+
|
|
80002
|
+
UpTextColor:"rgb(238,21,21)", //上涨文字颜色
|
|
80003
|
+
DownTextColor:"rgb(25,158,0)", //下跌文字颜色
|
|
80004
|
+
UnchangeTextColor:"rgb(90,90,90)", //平盘文字颜色
|
|
80005
|
+
|
|
80006
|
+
BorderColor:"rgb(192,192,192)"
|
|
80007
|
+
}
|
|
80008
|
+
|
|
79816
80009
|
|
|
79817
80010
|
//自定义风格
|
|
79818
80011
|
this.SetStyle=function(style)
|
|
@@ -80782,7 +80975,64 @@ function JSChartResource()
|
|
|
80782
80975
|
|
|
80783
80976
|
if (style.SmallFloatTooltipV2) this.SetSmallFloatTooltipV2(style.SmallFloatTooltipV2);
|
|
80784
80977
|
if (style.StockInfo) this.SetStockInfo(style.StockInfo);
|
|
80978
|
+
if (style.StatusBar) this.SetStatusBar(style.StatusBar);
|
|
80979
|
+
|
|
80980
|
+
}
|
|
80981
|
+
|
|
80982
|
+
this.SetStatusBar=function(style)
|
|
80983
|
+
{
|
|
80984
|
+
var dest=this.StatusBar;
|
|
80985
|
+
|
|
80986
|
+
if (style.Table)
|
|
80987
|
+
{
|
|
80988
|
+
var item=style.Table;
|
|
80989
|
+
if (item.Font) dest.Table.Font=item.Font;
|
|
80990
|
+
if (item.TitleColor) dest.Table.TitleColor=item.TitleColor;
|
|
80991
|
+
if (IFrameSplitOperator.IsNonEmptyArray(item.AryTextColor)) dest.Table.AryTextColor=item.AryTextColor.slice();
|
|
80992
|
+
CopyMarginConfig(dest.Table.Margin, item.Margin);
|
|
80993
|
+
if (item.CellMargin)
|
|
80994
|
+
{
|
|
80995
|
+
var subItem=item.CellMargin;
|
|
80996
|
+
CopyMarginConfig(dest.Table.CellMargin, subItem);
|
|
80997
|
+
if (IFrameSplitOperator.IsNumber(subItem.YOffset)) dest.Table.CellMargin.YOffset=subItem.YOffset
|
|
80998
|
+
}
|
|
80999
|
+
|
|
81000
|
+
if (item.Separator)
|
|
81001
|
+
{
|
|
81002
|
+
var subItem=item.Separator;
|
|
81003
|
+
var subDest=dest.Table.Separator;
|
|
81004
|
+
if (IFrameSplitOperator.IsNumber(subItem.Left)) subDest.Left=subItem.Left;
|
|
81005
|
+
if (IFrameSplitOperator.IsNumber(subItem.Right)) subDest.Left=subItem.Right;
|
|
80785
81006
|
|
|
81007
|
+
if (subItem.Line)
|
|
81008
|
+
{
|
|
81009
|
+
if (IFrameSplitOperator.IsNumber(subItem.Line.Width)) subDest.Line.Width=subItem.Line.Width;
|
|
81010
|
+
if (IFrameSplitOperator.IsNumber(subItem.Line.Top)) subDest.Line.Top=subItem.Line.Top;
|
|
81011
|
+
if (IFrameSplitOperator.IsNumber(subItem.Line.Bottom)) subDest.Line.Bottom=subItem.Line.Bottom;
|
|
81012
|
+
if (subItem.Line.Color) subDest.Line.Color=subItem.Line.Color;
|
|
81013
|
+
}
|
|
81014
|
+
}
|
|
81015
|
+
}
|
|
81016
|
+
|
|
81017
|
+
if (style.DateTime)
|
|
81018
|
+
{
|
|
81019
|
+
var item=style.DateTime;
|
|
81020
|
+
if (item.Font) dest.DateTime.Font=item.Font;
|
|
81021
|
+
if (item.TitleColor) dest.DateTime.TitleColor=item.TitleColor;
|
|
81022
|
+
if (item.Format) dest.DateTime.Format=item.Format;
|
|
81023
|
+
if (item.MaxText) dest.DateTime.MaxText=item.MaxText;
|
|
81024
|
+
if (item.Margin)
|
|
81025
|
+
{
|
|
81026
|
+
var subItem=item.Margin;
|
|
81027
|
+
CopyMarginConfig(dest.DateTime.Margin, subItem);
|
|
81028
|
+
if (IFrameSplitOperator.IsNumber(subItem.YOffset)) dest.DateTime.Margin.YOffset=subItem.YOffset;
|
|
81029
|
+
}
|
|
81030
|
+
}
|
|
81031
|
+
|
|
81032
|
+
if (style.UpTextColor) dest.UpTextColor=style.UpTextColor;
|
|
81033
|
+
if (style.DownTextColor) dest.DownTextColor=style.DownTextColor;
|
|
81034
|
+
if (style.UnchangeTextColor) dest.UnchangeTextColor=style.UnchangeTextColor;
|
|
81035
|
+
if (style.BorderColor) dest.BorderColor=style.BorderColor;
|
|
80786
81036
|
}
|
|
80787
81037
|
|
|
80788
81038
|
this.SetStockInfo=function(style)
|
|
@@ -102502,6 +102752,7 @@ var MARKET_SUFFIX_NAME=
|
|
|
102502
102752
|
DCE: '.DCE', //大连商品交易所(Dalian Commodity Exchange)
|
|
102503
102753
|
CZCE: '.CZC', //郑州期货交易所
|
|
102504
102754
|
GZFE:".GZFE", //广州期货交易所
|
|
102755
|
+
INE:".INE", //上海国际能源交易中心
|
|
102505
102756
|
|
|
102506
102757
|
USA:'.USA', //美股
|
|
102507
102758
|
FTSE:'.FTSE', //富时中国
|
|
@@ -102746,11 +102997,61 @@ var MARKET_SUFFIX_NAME=
|
|
|
102746
102997
|
return upperSymbol.indexOf(this.GZFE) > 0;
|
|
102747
102998
|
},
|
|
102748
102999
|
|
|
103000
|
+
IsINE:function(upperSymbol)
|
|
103001
|
+
{
|
|
103002
|
+
if (!upperSymbol) return false;
|
|
103003
|
+
return upperSymbol.indexOf(this.INE) > 0;
|
|
103004
|
+
},
|
|
103005
|
+
|
|
103006
|
+
//是否包含某一个市场的
|
|
103007
|
+
IsIncludes:function(symbol, arySuffix)
|
|
103008
|
+
{
|
|
103009
|
+
if (!symbol) return false;
|
|
103010
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(arySuffix)) return false;
|
|
103011
|
+
var upperSymbol=symbol.toUpperCase();
|
|
103012
|
+
|
|
103013
|
+
var bMatch=false;
|
|
103014
|
+
for(var i=0;i<arySuffix.length;++i)
|
|
103015
|
+
{
|
|
103016
|
+
var item=arySuffix[i];
|
|
103017
|
+
switch(item)
|
|
103018
|
+
{
|
|
103019
|
+
case this.SHFE:
|
|
103020
|
+
case this.SHFE2:
|
|
103021
|
+
if (this.IsSHFE(upperSymbol)) bMatch=true;
|
|
103022
|
+
break;
|
|
103023
|
+
case this.CFFEX2:
|
|
103024
|
+
case this.CFFEX:
|
|
103025
|
+
case this.CFFEX3:
|
|
103026
|
+
if (this.IsCFFEX(upperSymbol)) bMatch=true;
|
|
103027
|
+
break;
|
|
103028
|
+
case this.DCE:
|
|
103029
|
+
if (this.IsDCE(upperSymbol)) bMatch=true;
|
|
103030
|
+
break;
|
|
103031
|
+
case this.CZCE:
|
|
103032
|
+
if (this.IsCZCE(upperSymbol)) bMatch=true;
|
|
103033
|
+
break;
|
|
103034
|
+
case this.GZFE:
|
|
103035
|
+
if (this.IsGZFE(upperSymbol)) bMatch=true;
|
|
103036
|
+
break;
|
|
103037
|
+
case this.INE:
|
|
103038
|
+
if (this.IsINE(upperSymbol)) bMatch=true;
|
|
103039
|
+
break;
|
|
103040
|
+
}
|
|
103041
|
+
|
|
103042
|
+
if (bMatch) return true;
|
|
103043
|
+
}
|
|
103044
|
+
|
|
103045
|
+
return false;
|
|
103046
|
+
},
|
|
103047
|
+
|
|
102749
103048
|
IsChinaFutures:function(upperSymbol) //是否是国内期货 /期权
|
|
102750
103049
|
{
|
|
103050
|
+
if (!upperSymbol) return false;
|
|
103051
|
+
|
|
102751
103052
|
return this.IsSHO(upperSymbol) || this.IsSZO(upperSymbol) ||
|
|
102752
|
-
|
|
102753
|
-
|
|
103053
|
+
this.IsGZFE(upperSymbol) || this.IsINE(upperSymbol) ||
|
|
103054
|
+
this.IsCFFEX(upperSymbol) || this.IsCZCE(upperSymbol) || this.IsDCE(upperSymbol) || this.IsSHFE(upperSymbol);
|
|
102754
103055
|
},
|
|
102755
103056
|
|
|
102756
103057
|
IsFutures:function(upperSymbol) //是否是期货 包含国外的
|
|
@@ -103259,6 +103560,16 @@ var MARKET_SUFFIX_NAME=
|
|
|
103259
103560
|
|
|
103260
103561
|
}
|
|
103261
103562
|
|
|
103563
|
+
//国内期货市场
|
|
103564
|
+
const ARRAY_CHINA_FUTURES_SUFFIX=
|
|
103565
|
+
[
|
|
103566
|
+
MARKET_SUFFIX_NAME.SHFE,
|
|
103567
|
+
MARKET_SUFFIX_NAME.CFFEX,
|
|
103568
|
+
MARKET_SUFFIX_NAME.DCE,
|
|
103569
|
+
MARKET_SUFFIX_NAME.CZCE,
|
|
103570
|
+
MARKET_SUFFIX_NAME.GZFE,
|
|
103571
|
+
MARKET_SUFFIX_NAME.INE
|
|
103572
|
+
];
|
|
103262
103573
|
|
|
103263
103574
|
//走势图分钟数据对应的时间
|
|
103264
103575
|
function MinuteTimeStringData()
|
|
@@ -103604,7 +103915,8 @@ function MinuteTimeStringData()
|
|
|
103604
103915
|
if (MARKET_SUFFIX_NAME.IsTW(upperSymbol)) return this.GetTW(upperSymbol);
|
|
103605
103916
|
if (MARKET_SUFFIX_NAME.IsJP(upperSymbol)) return this.GetJP(upperSymbol);
|
|
103606
103917
|
if (MARKET_SUFFIX_NAME.IsUSA(upperSymbol)) return this.GetUSA(upperSymbol);
|
|
103607
|
-
if (MARKET_SUFFIX_NAME.IsCFFEX(upperSymbol) || MARKET_SUFFIX_NAME.IsCZCE(upperSymbol) || MARKET_SUFFIX_NAME.IsDCE(upperSymbol) || MARKET_SUFFIX_NAME.IsSHFE(upperSymbol) ||
|
|
103918
|
+
if (MARKET_SUFFIX_NAME.IsCFFEX(upperSymbol) || MARKET_SUFFIX_NAME.IsCZCE(upperSymbol) || MARKET_SUFFIX_NAME.IsDCE(upperSymbol) || MARKET_SUFFIX_NAME.IsSHFE(upperSymbol) ||
|
|
103919
|
+
MARKET_SUFFIX_NAME.IsGZFE(upperSymbol) || MARKET_SUFFIX_NAME.IsINE(upperSymbol))
|
|
103608
103920
|
{
|
|
103609
103921
|
var splitData = g_FuturesTimeData.GetSplitData(upperSymbol, option);
|
|
103610
103922
|
if (!splitData) return null;
|
|
@@ -104096,7 +104408,7 @@ function MinuteCoordinateData()
|
|
|
104096
104408
|
data=this.GetTWData(upperSymbol,width);
|
|
104097
104409
|
else if (MARKET_SUFFIX_NAME.IsJP(upperSymbol))
|
|
104098
104410
|
data=this.GetJPData(upperSymbol,width);
|
|
104099
|
-
else if (MARKET_SUFFIX_NAME.IsCFFEX(upperSymbol) || MARKET_SUFFIX_NAME.IsCZCE(upperSymbol) || MARKET_SUFFIX_NAME.IsDCE(upperSymbol) || MARKET_SUFFIX_NAME.IsSHFE(upperSymbol) || MARKET_SUFFIX_NAME.IsGZFE(upperSymbol))
|
|
104411
|
+
else if (MARKET_SUFFIX_NAME.IsCFFEX(upperSymbol) || MARKET_SUFFIX_NAME.IsCZCE(upperSymbol) || MARKET_SUFFIX_NAME.IsDCE(upperSymbol) || MARKET_SUFFIX_NAME.IsSHFE(upperSymbol) || MARKET_SUFFIX_NAME.IsGZFE(upperSymbol) || MARKET_SUFFIX_NAME.IsINE(upperSymbol))
|
|
104100
104412
|
return this.GetChinatFuturesData(upperSymbol, width, option);
|
|
104101
104413
|
else if (MARKET_SUFFIX_NAME.IsUSA(upperSymbol))
|
|
104102
104414
|
data = this.GetUSAData(upperSymbol,width);
|
|
@@ -104943,6 +105255,13 @@ function FuturesTimeData()
|
|
|
104943
105255
|
[MARKET_SUFFIX_NAME.SHFE + '-LU', {Time:6,Decimal:0,Name:'低硫燃油'}],
|
|
104944
105256
|
[MARKET_SUFFIX_NAME.SHFE + '-BC', {Time:4,Decimal:0,Name:'国际铜'}],
|
|
104945
105257
|
[MARKET_SUFFIX_NAME.SHFE + '-EC', {Time:0,Decimal:0,Name:'集运指数'}],
|
|
105258
|
+
|
|
105259
|
+
//上海国际能源交易中心 独立的一个市场
|
|
105260
|
+
[MARKET_SUFFIX_NAME.INE + '-NR', {Time:6,Decimal:1,Name:'20号胶'}],
|
|
105261
|
+
[MARKET_SUFFIX_NAME.INE + '-SC', {Time:5,Decimal:1,Name:'原油'}],
|
|
105262
|
+
[MARKET_SUFFIX_NAME.INE + '-LU', {Time:6,Decimal:0,Name:'低硫燃油'}],
|
|
105263
|
+
[MARKET_SUFFIX_NAME.INE + '-BC', {Time:4,Decimal:0,Name:'国际铜'}],
|
|
105264
|
+
[MARKET_SUFFIX_NAME.INE + '-EC', {Time:0,Decimal:0,Name:'集运指数'}],
|
|
104946
105265
|
|
|
104947
105266
|
//郑州期货交易所
|
|
104948
105267
|
[MARKET_SUFFIX_NAME.CZCE + '-CF', {Time:6,Decimal:0,Name:"棉花"}],
|
|
@@ -105059,6 +105378,11 @@ function FuturesTimeData()
|
|
|
105059
105378
|
oneWordName = MARKET_SUFFIX_NAME.GZFE + '-' + oneWord;
|
|
105060
105379
|
twoWordsName = MARKET_SUFFIX_NAME.GZFE + '-' + twoWords;
|
|
105061
105380
|
}
|
|
105381
|
+
else if (MARKET_SUFFIX_NAME.IsINE(upperSymbol)) //上海国际能源交易中心
|
|
105382
|
+
{
|
|
105383
|
+
oneWordName = MARKET_SUFFIX_NAME.INE + '-' + oneWord;
|
|
105384
|
+
twoWordsName = MARKET_SUFFIX_NAME.INE + '-' + twoWords;
|
|
105385
|
+
}
|
|
105062
105386
|
|
|
105063
105387
|
if (this.MAP_TWOWORDS.has(twoWordsName))
|
|
105064
105388
|
{
|