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
|
@@ -32204,6 +32204,12 @@ function ChartKLine()
|
|
|
32204
32204
|
TextColor: g_JSChartResource.DaySummaryKLine.TextColor,
|
|
32205
32205
|
LeftMargin:g_JSChartResource.DaySummaryKLine.LeftMargin,
|
|
32206
32206
|
}
|
|
32207
|
+
|
|
32208
|
+
this.PriceGapStyple=
|
|
32209
|
+
{
|
|
32210
|
+
Line:{ Color:g_JSChartResource.PriceGapStyple.Line.Color },
|
|
32211
|
+
Text:{ Color:g_JSChartResource.PriceGapStyple.Text.Color, Font: g_JSChartResource.PriceGapStyple.Text.Font }
|
|
32212
|
+
};
|
|
32207
32213
|
|
|
32208
32214
|
}
|
|
32209
32215
|
|
|
@@ -60208,6 +60214,11 @@ IFrameSplitOperator.RemoveMarketSuffix=function(symbol)
|
|
|
60208
60214
|
return symbol;
|
|
60209
60215
|
}
|
|
60210
60216
|
|
|
60217
|
+
IFrameSplitOperator.IsNumberString=function(strValue)
|
|
60218
|
+
{
|
|
60219
|
+
return /^\d+$/.test(strValue);
|
|
60220
|
+
}
|
|
60221
|
+
|
|
60211
60222
|
function FrameSplitKLinePriceY()
|
|
60212
60223
|
{
|
|
60213
60224
|
this.newMethod=IFrameSplitOperator; //派生
|
|
@@ -83520,13 +83531,13 @@ function JSChartResource()
|
|
|
83520
83531
|
{
|
|
83521
83532
|
Color:"RGB(60,60,60)",
|
|
83522
83533
|
Mergin:{ Left:5, Right:5, Top:4, Bottom:2 },
|
|
83523
|
-
Font:{ Size:
|
|
83534
|
+
Font:{ Size:14, Name:"微软雅黑" }
|
|
83524
83535
|
},
|
|
83525
83536
|
|
|
83526
83537
|
Row:
|
|
83527
83538
|
{
|
|
83528
83539
|
Mergin:{ Top:2, Bottom:2 },
|
|
83529
|
-
Font:{ Size:
|
|
83540
|
+
Font:{ Size:14, Name:"微软雅黑"},
|
|
83530
83541
|
BarMergin:{ Top:2, Left:3, Right:3, Bottom:2 }
|
|
83531
83542
|
},
|
|
83532
83543
|
|
|
@@ -83878,6 +83889,70 @@ function JSChartResource()
|
|
|
83878
83889
|
}
|
|
83879
83890
|
}
|
|
83880
83891
|
|
|
83892
|
+
//买卖5档
|
|
83893
|
+
this.StockInfo=
|
|
83894
|
+
{
|
|
83895
|
+
Header:
|
|
83896
|
+
{
|
|
83897
|
+
Name:
|
|
83898
|
+
{
|
|
83899
|
+
Font:`${20*GetDevicePixelRatio()}px 微软雅黑`,
|
|
83900
|
+
Color:"rgb(90,90,90)",
|
|
83901
|
+
Margin:{ Left:5, Top:10, Bottom:5, Right:5, YOffset:0 },
|
|
83902
|
+
},
|
|
83903
|
+
|
|
83904
|
+
Symbol:
|
|
83905
|
+
{
|
|
83906
|
+
Font:`${18*GetDevicePixelRatio()}px 微软雅黑`,
|
|
83907
|
+
Color:"rgb(90,90,90)",
|
|
83908
|
+
Margin:{ Left:5, Top:10, Bottom:5, Right:5, YOffset:0 },
|
|
83909
|
+
},
|
|
83910
|
+
|
|
83911
|
+
AryCell:
|
|
83912
|
+
[
|
|
83913
|
+
{ Font:`bold ${16*GetDevicePixelRatio()}px 微软雅黑`,Color:"rgb(90,90,90)", Margin:{ Left:5, Top:5, Bottom:5, Right:5, YOffset:0 } },
|
|
83914
|
+
{ Font:`${16*GetDevicePixelRatio()}px 微软雅黑`,Color:"rgb(90,90,90)", Margin:{ Left:5, Top:5, Bottom:5, Right:5, YOffset:0 } },
|
|
83915
|
+
{ Font:`${16*GetDevicePixelRatio()}px 微软雅黑`,Color:"rgb(90,90,90)", Margin:{ Left:5, Top:5, Bottom:5, Right:5, YOffset:0 } }
|
|
83916
|
+
],
|
|
83917
|
+
|
|
83918
|
+
TextColor:"rgb(100,100,10)",
|
|
83919
|
+
|
|
83920
|
+
BottomLine:{ Enable:true, Color:"rgb(192,192,192)"} , //底部分割线
|
|
83921
|
+
},
|
|
83922
|
+
|
|
83923
|
+
BuySell:
|
|
83924
|
+
{
|
|
83925
|
+
Font:14*GetDevicePixelRatio() +'px 微软雅黑',
|
|
83926
|
+
TitleColor:"rgb(90,90,90)",
|
|
83927
|
+
VolColor:"rgb(90,90,90)",
|
|
83928
|
+
Margin:{ Left:0, Top:0, Bottom:0, Right:0 },
|
|
83929
|
+
CellMargin:{ Top:5, Bottom:5, Left:5, Right:5, YOffset:0 },
|
|
83930
|
+
BottomLine:{ Enable:true, Color:"rgb(192,192,192)"}, //底部分割线
|
|
83931
|
+
TopLine:{ Enable:false, Color:"rgb(192,192,192)"}, //底部分割线
|
|
83932
|
+
|
|
83933
|
+
CenterLine:
|
|
83934
|
+
{
|
|
83935
|
+
BuyColor:"rgb(228, 164, 54)",SellColor:"rgb(61, 147, 219)", NoneColor:"rgb(90,90,90)",
|
|
83936
|
+
Width:2*GetDevicePixelRatio()
|
|
83937
|
+
}
|
|
83938
|
+
},
|
|
83939
|
+
|
|
83940
|
+
Table:
|
|
83941
|
+
{
|
|
83942
|
+
Font:14*GetDevicePixelRatio() +'px 微软雅黑',
|
|
83943
|
+
TitleColor:"rgb(90,90,90)",
|
|
83944
|
+
TextColor:"rgb(90,90,90)",
|
|
83945
|
+
Margin:{ Left:0, Top:0, Bottom:0, Right:0 },
|
|
83946
|
+
CellMargin:{ Top:5, Bottom:5, Left:5, Right:5, YOffset:0 },
|
|
83947
|
+
},
|
|
83948
|
+
|
|
83949
|
+
UpTextColor:"rgb(238,21,21)", //上涨文字颜色
|
|
83950
|
+
DownTextColor:"rgb(25,158,0)", //下跌文字颜色
|
|
83951
|
+
UnchangeTextColor:"rgb(90,90,90)", //平盘文字颜色
|
|
83952
|
+
|
|
83953
|
+
BorderColor:"rgb(192,192,192)"
|
|
83954
|
+
}
|
|
83955
|
+
|
|
83881
83956
|
|
|
83882
83957
|
//自定义风格
|
|
83883
83958
|
this.SetStyle=function(style)
|
|
@@ -84846,7 +84921,129 @@ function JSChartResource()
|
|
|
84846
84921
|
if (style.KLineCountDownPaint) this.SetKLineCountDownPaint(style.KLineCountDownPaint);
|
|
84847
84922
|
|
|
84848
84923
|
if (style.SmallFloatTooltipV2) this.SetSmallFloatTooltipV2(style.SmallFloatTooltipV2);
|
|
84924
|
+
if (style.StockInfo) this.SetStockInfo(style.StockInfo);
|
|
84925
|
+
|
|
84926
|
+
}
|
|
84927
|
+
|
|
84928
|
+
this.SetStockInfo=function(style)
|
|
84929
|
+
{
|
|
84930
|
+
var dest=this.StockInfo;
|
|
84931
|
+
|
|
84932
|
+
if (style.BuySell)
|
|
84933
|
+
{
|
|
84934
|
+
var item=style.BuySell;
|
|
84935
|
+
if (item.Font) dest.BuySell.Font=item.Font;
|
|
84936
|
+
if (item.TitleColor) dest.BuySell.TitleColor=item.TitleColor;
|
|
84937
|
+
if (item.VolColor) dest.BuySell.VolColor=item.VolColor;
|
|
84938
|
+
CopyMarginConfig(dest.BuySell.Margin, item.Margin);
|
|
84939
|
+
if (item.CellMargin)
|
|
84940
|
+
{
|
|
84941
|
+
var subItem=item.CellMargin;
|
|
84942
|
+
CopyMarginConfig(dest.BuySell.CellMargin, subItem);
|
|
84943
|
+
if (IFrameSplitOperator.IsNumber(subItem.YOffset)) dest.BuySell.CellMargin.YOffset=subItem.YOffset
|
|
84944
|
+
}
|
|
84945
|
+
|
|
84946
|
+
if (item.BottomLine)
|
|
84947
|
+
{
|
|
84948
|
+
var subItem=item.BottomLine;
|
|
84949
|
+
if (subItem.Color) dest.BuySell.BottomLine.Color=subItem.Color;
|
|
84950
|
+
if (IFrameSplitOperator.IsBool(subItem.Enable)) dest.BuySell.BottomLine.Enable=subItem.Enable;
|
|
84951
|
+
}
|
|
84952
|
+
|
|
84953
|
+
if (item.TopLine)
|
|
84954
|
+
{
|
|
84955
|
+
var subItem=item.TopLine;
|
|
84956
|
+
if (subItem.Color) dest.BuySell.TopLine.Color=subItem.Color;
|
|
84957
|
+
if (IFrameSplitOperator.IsBool(subItem.Enable)) dest.BuySell.TopLine.Enable=subItem.Enable;
|
|
84958
|
+
}
|
|
84959
|
+
|
|
84960
|
+
if (item.CenterLine)
|
|
84961
|
+
{
|
|
84962
|
+
var subItem=item.CenterLine;
|
|
84963
|
+
if (subItem.BuyColor) dest.BuySell.CenterLine.BuyColor=subItem.BuyColor;
|
|
84964
|
+
if (subItem.SellColor) dest.BuySell.CenterLine.SellColor=subItem.SellColor;
|
|
84965
|
+
if (subItem.NoneColor) dest.BuySell.CenterLine.NoneColor=subItem.NoneColor;
|
|
84966
|
+
if (IFrameSplitOperator.IsNumber(subItem.Width)) dest.BuySell.CenterLine.Width=subItem.Width;
|
|
84967
|
+
}
|
|
84968
|
+
|
|
84969
|
+
|
|
84970
|
+
}
|
|
84971
|
+
|
|
84972
|
+
if (style.Table)
|
|
84973
|
+
{
|
|
84974
|
+
var item=style.Table;
|
|
84975
|
+
if (item.Font) dest.Table.Font=item.Font;
|
|
84976
|
+
if (item.TitleColor) dest.Table.TitleColor=item.TitleColor;
|
|
84977
|
+
if (item.TextColor) dest.Table.TextColor=item.TextColor;
|
|
84978
|
+
CopyMarginConfig(dest.Table.Margin, item.Margin);
|
|
84979
|
+
if (item.CellMargin)
|
|
84980
|
+
{
|
|
84981
|
+
var subItem=item.CellMargin;
|
|
84982
|
+
CopyMarginConfig(dest.Table.CellMargin, subItem);
|
|
84983
|
+
if (IFrameSplitOperator.IsNumber(subItem.YOffset)) dest.Table.CellMargin.YOffset=subItem.YOffset
|
|
84984
|
+
}
|
|
84985
|
+
}
|
|
84986
|
+
|
|
84987
|
+
if (style.Header)
|
|
84988
|
+
{
|
|
84989
|
+
var item=style.Header;
|
|
84990
|
+
if (item.Font) dest.Header.Font=item.Font;
|
|
84991
|
+
if (item.TextColor) dest.Header.TextColor=item.TextColor;
|
|
84992
|
+
if (item.Name)
|
|
84993
|
+
{
|
|
84994
|
+
var subItem=item.Name;
|
|
84995
|
+
if (subItem.Font) dest.Header.Name.Font=subItem.Font;
|
|
84996
|
+
if (subItem.Color) dest.Header.Name.Color=subItem.Color;
|
|
84997
|
+
if (subItem.Margin)
|
|
84998
|
+
{
|
|
84999
|
+
var margin=subItem.Margin;
|
|
85000
|
+
CopyMarginConfig(dest.Header.Name.Margin, margin);
|
|
85001
|
+
if (IFrameSplitOperator.IsNumber(margin.YOffset)) dest.Header.Name.Margin.YOffset=margin.YOffset
|
|
85002
|
+
}
|
|
85003
|
+
}
|
|
84849
85004
|
|
|
85005
|
+
if (item.Symbol)
|
|
85006
|
+
{
|
|
85007
|
+
var subItem=item.Symbol;
|
|
85008
|
+
if (subItem.Font) dest.Header.Symbol.Font=subItem.Font;
|
|
85009
|
+
if (subItem.Color) dest.Header.Symbol.Color=subItem.Color;
|
|
85010
|
+
if (subItem.Margin)
|
|
85011
|
+
{
|
|
85012
|
+
var margin=subItem.Margin;
|
|
85013
|
+
CopyMarginConfig(dest.Header.Symbol.Margin, margin);
|
|
85014
|
+
if (IFrameSplitOperator.IsNumber(margin.YOffset)) dest.Header.Symbol.Margin.YOffset=margin.YOffset
|
|
85015
|
+
}
|
|
85016
|
+
}
|
|
85017
|
+
|
|
85018
|
+
if (IFrameSplitOperator.IsNonEmptyArray(item.AryCell))
|
|
85019
|
+
{
|
|
85020
|
+
for(var i=0;i<item.AryCell.length;++i)
|
|
85021
|
+
{
|
|
85022
|
+
var subItem=item.AryCell[i];
|
|
85023
|
+
if (!dest.Header.AryCell[i]) dest.Header.AryCell[i]={ };
|
|
85024
|
+
var subDest=dest.Header.AryCell[i];
|
|
85025
|
+
if (subItem.Font) subDest.Font=subItem.Font;
|
|
85026
|
+
if (subItem.Margin)
|
|
85027
|
+
{
|
|
85028
|
+
var margin=subItem.Margin;
|
|
85029
|
+
CopyMarginConfig(subDest.Margin, margin);
|
|
85030
|
+
if (IFrameSplitOperator.IsNumber(margin.YOffset)) subDest.YOffset=margin.YOffset
|
|
85031
|
+
}
|
|
85032
|
+
}
|
|
85033
|
+
}
|
|
85034
|
+
|
|
85035
|
+
if (item.BottomLine)
|
|
85036
|
+
{
|
|
85037
|
+
var subItem=item.BottomLine;
|
|
85038
|
+
if (subItem.Color) dest.Header.BottomLine.Color=subItem.Color;
|
|
85039
|
+
if (IFrameSplitOperator.IsBool(subItem.Enable)) dest.Header.BottomLine.Enable=subItem.Enable;
|
|
85040
|
+
}
|
|
85041
|
+
}
|
|
85042
|
+
|
|
85043
|
+
if (style.UpTextColor) dest.UpTextColor=style.UpTextColor;
|
|
85044
|
+
if (style.DownTextColor) dest.DownTextColor=style.DownTextColor;
|
|
85045
|
+
if (style.UnchangeTextColor) dest.UnchangeTextColor=style.UnchangeTextColor;
|
|
85046
|
+
if (style.BorderColor) dest.BorderColor=style.BorderColor;
|
|
84850
85047
|
}
|
|
84851
85048
|
|
|
84852
85049
|
this.SetSmallFloatTooltipV2=function(style)
|
|
@@ -91443,6 +91640,9 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
91443
91640
|
if (!option.Windows) return;
|
|
91444
91641
|
var count=option.Windows.length;
|
|
91445
91642
|
if (count<=0) return;
|
|
91643
|
+
|
|
91644
|
+
this.Frame.RestoreIndexWindows();
|
|
91645
|
+
|
|
91446
91646
|
var currentLength=this.Frame.SubFrame.length;
|
|
91447
91647
|
|
|
91448
91648
|
var period=null, right=null, symbol=null;
|
|
@@ -98373,6 +98573,8 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
98373
98573
|
this.ChangeIndexTemplate=function(option) //切换指标模板 可以设置指标窗口个数 每个窗口的指标, 只能从第3个指标窗口开始设置,前面2个指标窗口固定无法设置
|
|
98374
98574
|
{
|
|
98375
98575
|
if (!Array.isArray(option.Windows)) return;
|
|
98576
|
+
this.Frame.RestoreIndexWindows();
|
|
98577
|
+
|
|
98376
98578
|
var count=option.Windows.length;
|
|
98377
98579
|
var currentLength=this.Frame.SubFrame.length;
|
|
98378
98580
|
var startWindowIndex=2;
|
|
@@ -106440,6 +106642,7 @@ var MARKET_SUFFIX_NAME=
|
|
|
106440
106642
|
DCE: '.DCE', //大连商品交易所(Dalian Commodity Exchange)
|
|
106441
106643
|
CZCE: '.CZC', //郑州期货交易所
|
|
106442
106644
|
GZFE:".GZFE", //广州期货交易所
|
|
106645
|
+
INE:".INE", //上海国际能源交易中心
|
|
106443
106646
|
|
|
106444
106647
|
USA:'.USA', //美股
|
|
106445
106648
|
FTSE:'.FTSE', //富时中国
|
|
@@ -106684,10 +106887,18 @@ var MARKET_SUFFIX_NAME=
|
|
|
106684
106887
|
return upperSymbol.indexOf(this.GZFE) > 0;
|
|
106685
106888
|
},
|
|
106686
106889
|
|
|
106890
|
+
IsINE:function(upperSymbol)
|
|
106891
|
+
{
|
|
106892
|
+
if (!upperSymbol) return false;
|
|
106893
|
+
return upperSymbol.indexOf(this.INE) > 0;
|
|
106894
|
+
},
|
|
106895
|
+
|
|
106687
106896
|
IsChinaFutures:function(upperSymbol) //是否是国内期货 /期权
|
|
106688
106897
|
{
|
|
106898
|
+
if (!upperSymbol) return false;
|
|
106899
|
+
|
|
106689
106900
|
return this.IsSHO(upperSymbol) || this.IsSZO(upperSymbol) ||
|
|
106690
|
-
this.IsGZFE(upperSymbol) ||
|
|
106901
|
+
this.IsGZFE(upperSymbol) || this.IsINE(upperSymbol) ||
|
|
106691
106902
|
this.IsCFFEX(upperSymbol) || this.IsCZCE(upperSymbol) || this.IsDCE(upperSymbol) || this.IsSHFE(upperSymbol);
|
|
106692
106903
|
},
|
|
106693
106904
|
|
|
@@ -106831,6 +107042,18 @@ var MARKET_SUFFIX_NAME=
|
|
|
106831
107042
|
return false;
|
|
106832
107043
|
},
|
|
106833
107044
|
|
|
107045
|
+
IsHKStock:function(symbol) //港股股票 全是数字
|
|
107046
|
+
{
|
|
107047
|
+
if (!symbol) return false;
|
|
107048
|
+
var upperSymbol=symbol.toUpperCase();
|
|
107049
|
+
if (!this.IsHK(upperSymbol)) return false;
|
|
107050
|
+
|
|
107051
|
+
var shortSymbol=this.GetShortSymbol(symbol);
|
|
107052
|
+
if (IFrameSplitOperator.IsNumberString(shortSymbol)) return true;
|
|
107053
|
+
|
|
107054
|
+
return false;
|
|
107055
|
+
},
|
|
107056
|
+
|
|
106834
107057
|
GetMarketStatus:function(symbol) //获取市场状态 0=闭市 1=盘前 2=盘中 3=盘后
|
|
106835
107058
|
{
|
|
106836
107059
|
if (!symbol) return 0;
|
|
@@ -107171,7 +107394,18 @@ var MARKET_SUFFIX_NAME=
|
|
|
107171
107394
|
if (MARKET_SUFFIX_NAME.IsBJ(upperSymbol)) return 100; //单位手=100股
|
|
107172
107395
|
|
|
107173
107396
|
return 1;
|
|
107397
|
+
},
|
|
107398
|
+
|
|
107399
|
+
//获取不带后缀的代码
|
|
107400
|
+
GetShortSymbol:function(symbol)
|
|
107401
|
+
{
|
|
107402
|
+
if (!IFrameSplitOperator.IsString(symbol)) return null;
|
|
107403
|
+
var pos=symbol.lastIndexOf(".");
|
|
107404
|
+
if (pos<=0) return symbol;
|
|
107405
|
+
|
|
107406
|
+
return symbol.slice(0,pos);
|
|
107174
107407
|
}
|
|
107408
|
+
|
|
107175
107409
|
}
|
|
107176
107410
|
|
|
107177
107411
|
|
|
@@ -107519,7 +107753,8 @@ function MinuteTimeStringData()
|
|
|
107519
107753
|
if (MARKET_SUFFIX_NAME.IsTW(upperSymbol)) return this.GetTW(upperSymbol);
|
|
107520
107754
|
if (MARKET_SUFFIX_NAME.IsJP(upperSymbol)) return this.GetJP(upperSymbol);
|
|
107521
107755
|
if (MARKET_SUFFIX_NAME.IsUSA(upperSymbol)) return this.GetUSA(upperSymbol);
|
|
107522
|
-
if (MARKET_SUFFIX_NAME.IsCFFEX(upperSymbol) || MARKET_SUFFIX_NAME.IsCZCE(upperSymbol) || MARKET_SUFFIX_NAME.IsDCE(upperSymbol) || MARKET_SUFFIX_NAME.IsSHFE(upperSymbol) ||
|
|
107756
|
+
if (MARKET_SUFFIX_NAME.IsCFFEX(upperSymbol) || MARKET_SUFFIX_NAME.IsCZCE(upperSymbol) || MARKET_SUFFIX_NAME.IsDCE(upperSymbol) || MARKET_SUFFIX_NAME.IsSHFE(upperSymbol) ||
|
|
107757
|
+
MARKET_SUFFIX_NAME.IsGZFE(upperSymbol) || MARKET_SUFFIX_NAME.IsINE(upperSymbol))
|
|
107523
107758
|
{
|
|
107524
107759
|
var splitData = g_FuturesTimeData.GetSplitData(upperSymbol, option);
|
|
107525
107760
|
if (!splitData) return null;
|
|
@@ -108011,7 +108246,7 @@ function MinuteCoordinateData()
|
|
|
108011
108246
|
data=this.GetTWData(upperSymbol,width);
|
|
108012
108247
|
else if (MARKET_SUFFIX_NAME.IsJP(upperSymbol))
|
|
108013
108248
|
data=this.GetJPData(upperSymbol,width);
|
|
108014
|
-
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))
|
|
108249
|
+
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))
|
|
108015
108250
|
return this.GetChinatFuturesData(upperSymbol, width, option);
|
|
108016
108251
|
else if (MARKET_SUFFIX_NAME.IsUSA(upperSymbol))
|
|
108017
108252
|
data = this.GetUSAData(upperSymbol,width);
|
|
@@ -108858,6 +109093,13 @@ function FuturesTimeData()
|
|
|
108858
109093
|
[MARKET_SUFFIX_NAME.SHFE + '-LU', {Time:6,Decimal:0,Name:'低硫燃油'}],
|
|
108859
109094
|
[MARKET_SUFFIX_NAME.SHFE + '-BC', {Time:4,Decimal:0,Name:'国际铜'}],
|
|
108860
109095
|
[MARKET_SUFFIX_NAME.SHFE + '-EC', {Time:0,Decimal:0,Name:'集运指数'}],
|
|
109096
|
+
|
|
109097
|
+
//上海国际能源交易中心 独立的一个市场
|
|
109098
|
+
[MARKET_SUFFIX_NAME.INE + '-NR', {Time:6,Decimal:1,Name:'20号胶'}],
|
|
109099
|
+
[MARKET_SUFFIX_NAME.INE + '-SC', {Time:5,Decimal:1,Name:'原油'}],
|
|
109100
|
+
[MARKET_SUFFIX_NAME.INE + '-LU', {Time:6,Decimal:0,Name:'低硫燃油'}],
|
|
109101
|
+
[MARKET_SUFFIX_NAME.INE + '-BC', {Time:4,Decimal:0,Name:'国际铜'}],
|
|
109102
|
+
[MARKET_SUFFIX_NAME.INE + '-EC', {Time:0,Decimal:0,Name:'集运指数'}],
|
|
108861
109103
|
|
|
108862
109104
|
//郑州期货交易所
|
|
108863
109105
|
[MARKET_SUFFIX_NAME.CZCE + '-CF', {Time:6,Decimal:0,Name:"棉花"}],
|
|
@@ -108974,6 +109216,11 @@ function FuturesTimeData()
|
|
|
108974
109216
|
oneWordName = MARKET_SUFFIX_NAME.GZFE + '-' + oneWord;
|
|
108975
109217
|
twoWordsName = MARKET_SUFFIX_NAME.GZFE + '-' + twoWords;
|
|
108976
109218
|
}
|
|
109219
|
+
else if (MARKET_SUFFIX_NAME.IsINE(upperSymbol)) //上海国际能源交易中心
|
|
109220
|
+
{
|
|
109221
|
+
oneWordName = MARKET_SUFFIX_NAME.INE + '-' + oneWord;
|
|
109222
|
+
twoWordsName = MARKET_SUFFIX_NAME.INE + '-' + twoWords;
|
|
109223
|
+
}
|
|
108977
109224
|
|
|
108978
109225
|
if (this.MAP_TWOWORDS.has(twoWordsName))
|
|
108979
109226
|
{
|
|
@@ -123419,13 +123666,13 @@ function JSSymbolData(ast,option,jsExecute)
|
|
|
123419
123666
|
|
|
123420
123667
|
this.GetDynaCacheData=function(name)
|
|
123421
123668
|
{
|
|
123669
|
+
var data=null;
|
|
123422
123670
|
if (MAP_DYNAINFO_SHORTCUT.has(name))
|
|
123423
123671
|
{
|
|
123424
123672
|
var item=MAP_DYNAINFO_SHORTCUT.get(name);
|
|
123425
|
-
|
|
123673
|
+
data=this.GetLatestCacheData(item.ID);
|
|
123426
123674
|
}
|
|
123427
|
-
|
|
123428
|
-
return null;
|
|
123675
|
+
return data;
|
|
123429
123676
|
}
|
|
123430
123677
|
|
|
123431
123678
|
this.GetLatestIndexData=function()
|
|
@@ -124501,12 +124748,7 @@ function JSSymbolData(ast,option,jsExecute)
|
|
|
124501
124748
|
{ Url:self.RealtimeApiUrl, Type:'POST' ,
|
|
124502
124749
|
Data:
|
|
124503
124750
|
{
|
|
124504
|
-
|
|
124505
|
-
"symbol": self.Symbol,
|
|
124506
|
-
"start": -1,
|
|
124507
|
-
"count": self.MaxRequestDataCount,
|
|
124508
|
-
"period":this.Period,
|
|
124509
|
-
"right":this.Right
|
|
124751
|
+
symbol: self.Symbol,count: self.MaxRequestDataCount, period:this.Period,right:this.Right
|
|
124510
124752
|
}
|
|
124511
124753
|
},
|
|
124512
124754
|
Self:this,
|
|
@@ -124518,6 +124760,7 @@ function JSSymbolData(ast,option,jsExecute)
|
|
|
124518
124760
|
obj.Request.KLineDataTimeRange={Start:{ Date:this.KLineDateTimeRange.Start.Date}, End:{ Date:this.KLineDateTimeRange.End.Date} };
|
|
124519
124761
|
if (this.IsNumber(this.KLineDateTimeRange.Start.Time)) obj.Request.KLineDataTimeRange.Start.Time=this.KLineDateTimeRange.Start.Time;
|
|
124520
124762
|
if (this.IsNumber(this.KLineDateTimeRange.End.Time)) obj.Request.KLineDataTimeRange.End.Time=this.KLineDateTimeRange.End.Time;
|
|
124763
|
+
obj.Request.Data.dateRange=obj.Request.KLineDataTimeRange;
|
|
124521
124764
|
}
|
|
124522
124765
|
|
|
124523
124766
|
this.NetworkFilter(obj, function(data)
|
|
@@ -126879,13 +127122,14 @@ function JSSymbolData(ast,option,jsExecute)
|
|
|
126879
127122
|
if (readArgument.Value=='') readArgument.Value=this.Symbol; //缺省使用股票代码
|
|
126880
127123
|
|
|
126881
127124
|
var symbol=readArgument.Value;
|
|
127125
|
+
var upperSymbol=symbol.toUpperCase();
|
|
126882
127126
|
|
|
126883
127127
|
//支持 SH60000, SZ000001
|
|
126884
127128
|
//A股后缀小写
|
|
126885
|
-
if (
|
|
126886
|
-
else if (
|
|
126887
|
-
else if (
|
|
126888
|
-
else if (
|
|
127129
|
+
if (upperSymbol.indexOf('.SH')>0) result.Symbol=symbol.replace('.SH', ".sh");
|
|
127130
|
+
else if (upperSymbol.indexOf('.SZ')>0) result.Symbol=symbol.replace('.SZ', ".sz");
|
|
127131
|
+
else if (upperSymbol.indexOf("SH")==0) result.Symbol=symbol.slice(2)+".sh";
|
|
127132
|
+
else if (upperSymbol.indexOf("SZ")==0) result.Symbol=symbol.slice(2)+".sz";
|
|
126889
127133
|
else result.Symbol=symbol;
|
|
126890
127134
|
|
|
126891
127135
|
return true;
|
|
@@ -128581,6 +128825,8 @@ function JSExecute(ast,option)
|
|
|
128581
128825
|
|
|
128582
128826
|
this.ReadSymbolData=function(name,node)
|
|
128583
128827
|
{
|
|
128828
|
+
if (MAP_DYNAINFO_SHORTCUT.has(name)) return this.SymbolData.GetDynaCacheData(name);
|
|
128829
|
+
|
|
128584
128830
|
switch(name)
|
|
128585
128831
|
{
|
|
128586
128832
|
case 'CLOSE':
|
|
@@ -128648,7 +128894,6 @@ function JSExecute(ast,option)
|
|
|
128648
128894
|
case 'CAPITAL':
|
|
128649
128895
|
case 'EXCHANGE':
|
|
128650
128896
|
case "HSL":
|
|
128651
|
-
|
|
128652
128897
|
case "HYBLOCK":
|
|
128653
128898
|
case "DYBLOCK":
|
|
128654
128899
|
case "GNBLOCK":
|
|
@@ -128749,14 +128994,6 @@ function JSExecute(ast,option)
|
|
|
128749
128994
|
return this.SymbolData.WEEKOFYEAR();
|
|
128750
128995
|
case "DAYSTOTODAY":
|
|
128751
128996
|
return this.SymbolData.DAYSTOTODAY();
|
|
128752
|
-
|
|
128753
|
-
case "DYNA_NOW":
|
|
128754
|
-
case "DYNA_ZAF":
|
|
128755
|
-
case "DYNA_LB":
|
|
128756
|
-
case "DYNA_ZAS":
|
|
128757
|
-
case "SELLVOL":
|
|
128758
|
-
case "BUYVOL":
|
|
128759
|
-
return this.SymbolData.GetDynaCacheData(name);
|
|
128760
128997
|
}
|
|
128761
128998
|
|
|
128762
128999
|
this.ThrowUnexpectedNode(node, '变量'+name+'不存在', name);
|
|
@@ -138115,8 +138352,8 @@ function DownloadFinanceData(obj)
|
|
|
138115
138352
|
{
|
|
138116
138353
|
case 1: //FINANCE(1) 总股本(随时间可能有变化) 股
|
|
138117
138354
|
case 7: //FINANCE(7) 流通股本(随时间可能有变化) 股
|
|
138118
|
-
case "EXCHANGE": //换手率
|
|
138119
138355
|
case "HSL"://换手率
|
|
138356
|
+
case "EXCHANGE": //换手率
|
|
138120
138357
|
this.DownloadHistoryData(id);
|
|
138121
138358
|
break;
|
|
138122
138359
|
case 3:
|
|
@@ -138377,7 +138614,7 @@ function DownloadFinanceData(obj)
|
|
|
138377
138614
|
if (!item.capital) return null;
|
|
138378
138615
|
return { Date:date, Value:item.capital.total };
|
|
138379
138616
|
case 7:
|
|
138380
|
-
case "HSL":
|
|
138617
|
+
case "HSL":
|
|
138381
138618
|
case "EXCHANGE": //换手率 历史流通股本
|
|
138382
138619
|
if (!item.capital) return null;
|
|
138383
138620
|
return { Date:date, Value:item.capital.a };
|
|
@@ -139224,13 +139461,13 @@ function GetBlackStyle()
|
|
|
139224
139461
|
{
|
|
139225
139462
|
Color:"RGB(245,245,245)",
|
|
139226
139463
|
Mergin:{ Left:5, Right:5, Top:4, Bottom:2 },
|
|
139227
|
-
Font:{ Size:12, Name:"微软雅黑" }
|
|
139464
|
+
//Font:{ Size:12, Name:"微软雅黑" }
|
|
139228
139465
|
},
|
|
139229
139466
|
|
|
139230
139467
|
Row:
|
|
139231
139468
|
{
|
|
139232
139469
|
Mergin:{ Top:2, Bottom:2 },
|
|
139233
|
-
Font:{ Size:15, Name:"微软雅黑"},
|
|
139470
|
+
//Font:{ Size:15, Name:"微软雅黑"},
|
|
139234
139471
|
BarMergin:{ Top:2, Left:3, Right:3, Bottom:2 }
|
|
139235
139472
|
},
|
|
139236
139473
|
|
|
@@ -139518,6 +139755,67 @@ function GetBlackStyle()
|
|
|
139518
139755
|
BGColor: { Selected:"rgb(234,85,4)", Default:"rgb(25,25,25)", MoveOn:"rgb(59,59,59)" },
|
|
139519
139756
|
BorderColor:"rgb(60,60,60)",
|
|
139520
139757
|
}
|
|
139758
|
+
},
|
|
139759
|
+
|
|
139760
|
+
StockInfo:
|
|
139761
|
+
{
|
|
139762
|
+
Header:
|
|
139763
|
+
{
|
|
139764
|
+
Name:
|
|
139765
|
+
{
|
|
139766
|
+
//Font:`${20*GetDevicePixelRatio()}px 微软雅黑`,
|
|
139767
|
+
Color:"rgb(255,255,0)",
|
|
139768
|
+
//Margin:{ Left:5, Top:10, Bottom:5, Right:10, YOffset:0 },
|
|
139769
|
+
},
|
|
139770
|
+
|
|
139771
|
+
Symbol:
|
|
139772
|
+
{
|
|
139773
|
+
//Font:`${18*GetDevicePixelRatio()}px 微软雅黑`,
|
|
139774
|
+
Color:"rgb(250,250,250)",
|
|
139775
|
+
//Margin:{ Left:5, Top:10, Bottom:5, Right:5, YOffset:0 },
|
|
139776
|
+
},
|
|
139777
|
+
|
|
139778
|
+
AryCell:
|
|
139779
|
+
[
|
|
139780
|
+
//{ Font:`bold ${16*GetDevicePixelRatio()}px 微软雅黑`, Margin:{ Left:5, Top:5, Bottom:5, Right:15, YOffset:0 } },
|
|
139781
|
+
//{ Font:`${16*GetDevicePixelRatio()}px 微软雅黑`, Margin:{ Left:5, Top:5, Bottom:5, Right:15, YOffset:0 } },
|
|
139782
|
+
//{ Font:`${16*GetDevicePixelRatio()}px 微软雅黑`, Margin:{ Left:5, Top:5, Bottom:5, Right:5, YOffset:0 } }
|
|
139783
|
+
],
|
|
139784
|
+
|
|
139785
|
+
TextColor:"rgb(250,250,250)",
|
|
139786
|
+
|
|
139787
|
+
BottomLine:{ Enable:true, Color:"rgb(60,60,60)"} , //底部分割线
|
|
139788
|
+
},
|
|
139789
|
+
|
|
139790
|
+
BuySell:
|
|
139791
|
+
{
|
|
139792
|
+
//Font:14*GetDevicePixelRatio() +'px 微软雅黑',
|
|
139793
|
+
TitleColor:"rgb(250,250,250)",
|
|
139794
|
+
VolColor:"rgb(250,250,250)",
|
|
139795
|
+
//Margin:{ Left:0, Top:0, Bottom:0, Right:0 },
|
|
139796
|
+
//CellMargin:{ Top:5, Bottom:5, YOffset:0, Left:5, Right:5, YOffset:-5 },
|
|
139797
|
+
BottomLine:{ Enable:true, Color:"rgb(60,60,60)"} , //底部分割线
|
|
139798
|
+
TopLine:{ Enable:false, Color:"rgb(60,60,60)"} , //顶部分割线
|
|
139799
|
+
|
|
139800
|
+
CenterLine:
|
|
139801
|
+
{
|
|
139802
|
+
NoneColor:"rgb(60,60,60)",
|
|
139803
|
+
}
|
|
139804
|
+
},
|
|
139805
|
+
|
|
139806
|
+
Table:
|
|
139807
|
+
{
|
|
139808
|
+
Font:14*GetDevicePixelRatio() +'px 微软雅黑',
|
|
139809
|
+
TitleColor:"rgb(250,250,250)",
|
|
139810
|
+
TextColor:"rgb(250,250,250)",
|
|
139811
|
+
//Margin:{ Left:0, Top:0, Bottom:0, Right:0 },
|
|
139812
|
+
//CellMargin:{ Top:5, Bottom:5, YOffset:0, Left:5, Right:5, YOffset:-5 },
|
|
139813
|
+
},
|
|
139814
|
+
|
|
139815
|
+
UpTextColor:"rgb(238,21,21)", //上涨文字颜色
|
|
139816
|
+
DownTextColor:"rgb(25,158,0)", //下跌文字颜色
|
|
139817
|
+
UnchangeTextColor:"rgb(90,90,90)", //平盘文字颜色
|
|
139818
|
+
BorderColor:'rgb(38,38,41)', //边框线
|
|
139521
139819
|
}
|
|
139522
139820
|
|
|
139523
139821
|
};
|
|
@@ -139586,9 +139884,18 @@ function JSDealChart(divElement)
|
|
|
139586
139884
|
this.OnSize=function()
|
|
139587
139885
|
{
|
|
139588
139886
|
//画布大小通过div获取
|
|
139589
|
-
var height=
|
|
139887
|
+
var height=this.DivElement.offsetHeight;
|
|
139888
|
+
var width=this.DivElement.offsetWidth;
|
|
139889
|
+
if (this.DivElement.style.height && this.DivElement.style.width)
|
|
139890
|
+
{
|
|
139891
|
+
if (this.DivElement.style.height.includes("px"))
|
|
139892
|
+
height=parseInt(this.DivElement.style.height.replace("px",""));
|
|
139893
|
+
if (this.DivElement.style.width.includes("px"))
|
|
139894
|
+
width=parseInt(this.DivElement.style.width.replace("px",""));
|
|
139895
|
+
}
|
|
139896
|
+
|
|
139590
139897
|
this.CanvasElement.height=height;
|
|
139591
|
-
this.CanvasElement.width=
|
|
139898
|
+
this.CanvasElement.width=width;
|
|
139592
139899
|
this.CanvasElement.style.width=this.CanvasElement.width+'px';
|
|
139593
139900
|
this.CanvasElement.style.height=this.CanvasElement.height+'px';
|
|
139594
139901
|
|
|
@@ -140053,14 +140360,17 @@ function JSDealChartContainer(uielement)
|
|
|
140053
140360
|
this.ChangeSymbol=function(symbol, option)
|
|
140054
140361
|
{
|
|
140055
140362
|
this.Symbol=symbol;
|
|
140056
|
-
this.Data=
|
|
140057
|
-
this.SourceData=
|
|
140363
|
+
this.Data={ DataOffset:0, Data:[] }; //分笔数据
|
|
140364
|
+
this.SourceData={DataOffset:0, Data:[] }; //原始分笔数据
|
|
140058
140365
|
|
|
140059
140366
|
var chart=this.ChartPaint[0];
|
|
140060
140367
|
if (chart) chart.Data=null;
|
|
140061
140368
|
|
|
140062
|
-
if (option
|
|
140063
|
-
|
|
140369
|
+
if (option)
|
|
140370
|
+
{
|
|
140371
|
+
if (IFrameSplitOperator.IsNumber(option.TradeDate)) this.TradeDate=option.TradeDate;
|
|
140372
|
+
if (IFrameSplitOperator.IsNonEmptyArray(option.Column)) this.SetColumn(option.Column);
|
|
140373
|
+
}
|
|
140064
140374
|
|
|
140065
140375
|
if (!this.Symbol)
|
|
140066
140376
|
{
|
|
@@ -140168,6 +140478,7 @@ function JSDealChartContainer(uielement)
|
|
|
140168
140478
|
chart.Data=this.Data;
|
|
140169
140479
|
chart.Symbol=this.Symbol;
|
|
140170
140480
|
chart.YClose=data.yclose;
|
|
140481
|
+
chart.YFClose=data.yfclose;
|
|
140171
140482
|
chart.Open=data.open;
|
|
140172
140483
|
|
|
140173
140484
|
if (this.IsShowLastPage) this.SetLastPageDataOffset(); //显示最后一屏
|
|
@@ -140701,17 +141012,23 @@ JSDealChartContainer.JsonDataToDealData=function(data)
|
|
|
140701
141012
|
|
|
140702
141013
|
if (item[100]) dealItem.Guid=item[100];
|
|
140703
141014
|
|
|
140704
|
-
|
|
140705
|
-
|
|
140706
|
-
|
|
140707
|
-
|
|
140708
|
-
|
|
140709
|
-
|
|
140710
|
-
|
|
140711
|
-
|
|
140712
|
-
|
|
140713
|
-
|
|
140714
|
-
|
|
141015
|
+
//柱子类型
|
|
141016
|
+
if (item[50]) dealItem.MultiBar1=item[50];
|
|
141017
|
+
if (item[51]) dealItem.MultiBar2=item[51];
|
|
141018
|
+
if (item[52]) dealItem.MultiBar3=item[52];
|
|
141019
|
+
if (item[53]) dealItem.MultiBar4=item[53];
|
|
141020
|
+
|
|
141021
|
+
//10个数值型 101-199
|
|
141022
|
+
if (IFrameSplitOperator.IsNumber(item[101])) dealItem.ReserveNumber1=item[101];
|
|
141023
|
+
if (IFrameSplitOperator.IsNumber(item[102])) dealItem.ReserveNumber2=item[102];
|
|
141024
|
+
if (IFrameSplitOperator.IsNumber(item[103])) dealItem.ReserveNumber3=item[103];
|
|
141025
|
+
if (IFrameSplitOperator.IsNumber(item[104])) dealItem.ReserveNumber4=item[104];
|
|
141026
|
+
if (IFrameSplitOperator.IsNumber(item[105])) dealItem.ReserveNumber5=item[105];
|
|
141027
|
+
if (IFrameSplitOperator.IsNumber(item[106])) dealItem.ReserveNumber6=item[106];
|
|
141028
|
+
if (IFrameSplitOperator.IsNumber(item[107])) dealItem.ReserveNumber7=item[107];
|
|
141029
|
+
if (IFrameSplitOperator.IsNumber(item[108])) dealItem.ReserveNumber8=item[108];
|
|
141030
|
+
if (IFrameSplitOperator.IsNumber(item[109])) dealItem.ReserveNumber9=item[109];
|
|
141031
|
+
if (IFrameSplitOperator.IsNumber(item[110])) dealItem.ReserveNumber10=item[110];
|
|
140715
141032
|
|
|
140716
141033
|
//10个字符型 201-299
|
|
140717
141034
|
if (IFrameSplitOperator.IsString(item[201]) || IFrameSplitOperator.IsObject(item[201])) dealItem.ReserveString1=item[201];
|
|
@@ -140822,14 +141139,13 @@ var DEAL_COLUMN_ID=
|
|
|
140822
141139
|
UPDOWN_ID:5, //涨跌
|
|
140823
141140
|
STRING_TIME_ID:6, //字符串时间
|
|
140824
141141
|
INDEX_ID:7, //序号 从1开始
|
|
140825
|
-
|
|
141142
|
+
|
|
140826
141143
|
CENTER_BAR_ID:9, //中心柱子
|
|
140827
141144
|
CUSTOM_TEXT_ID:10, //自定义文本
|
|
140828
141145
|
|
|
140829
141146
|
SYMBOL_ID:11, //股票代码
|
|
140830
141147
|
NAME_ID:12, //股票名称
|
|
140831
141148
|
|
|
140832
|
-
|
|
140833
141149
|
//预留数值类型 10个
|
|
140834
141150
|
RESERVE_NUMBER1_ID:201, //ReserveNumber1:
|
|
140835
141151
|
RESERVE_NUMBER2_ID:202,
|
|
@@ -140853,6 +141169,11 @@ var DEAL_COLUMN_ID=
|
|
|
140853
141169
|
RESERVE_STRING8_ID:308,
|
|
140854
141170
|
RESERVE_STRING9_ID:309,
|
|
140855
141171
|
RESERVE_STRING10_ID:310,
|
|
141172
|
+
|
|
141173
|
+
MULTI_BAR_ID:50, //多颜色柱子
|
|
141174
|
+
MULTI_BAR2_ID:51,
|
|
141175
|
+
MULTI_BAR3_ID:52,
|
|
141176
|
+
MULTI_BAR4_ID:53
|
|
140856
141177
|
}
|
|
140857
141178
|
|
|
140858
141179
|
var MAP_DEAL_COLUMN_FIELD=new Map(
|
|
@@ -140861,6 +141182,11 @@ var MAP_DEAL_COLUMN_FIELD=new Map(
|
|
|
140861
141182
|
[DEAL_COLUMN_ID.NAME_ID, "Name"],
|
|
140862
141183
|
[DEAL_COLUMN_ID.PRICE_ID, "Price"],
|
|
140863
141184
|
|
|
141185
|
+
[DEAL_COLUMN_ID.MULTI_BAR_ID, "MultiBar1"],
|
|
141186
|
+
[DEAL_COLUMN_ID.MULTI_BAR2_ID, "MultiBar2"],
|
|
141187
|
+
[DEAL_COLUMN_ID.MULTI_BAR3_ID, "MultiBar3"],
|
|
141188
|
+
[DEAL_COLUMN_ID.MULTI_BAR4_ID, "MultiBar4"],
|
|
141189
|
+
|
|
140864
141190
|
[DEAL_COLUMN_ID.RESERVE_NUMBER1_ID,"ReserveNumber1"],
|
|
140865
141191
|
[DEAL_COLUMN_ID.RESERVE_NUMBER2_ID,"ReserveNumber2"],
|
|
140866
141192
|
[DEAL_COLUMN_ID.RESERVE_NUMBER3_ID,"ReserveNumber3"],
|
|
@@ -140897,6 +141223,7 @@ function ChartDealList()
|
|
|
140897
141223
|
//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 }] };
|
|
140898
141224
|
this.Symbol;
|
|
140899
141225
|
this.YClose; //昨收
|
|
141226
|
+
this.YFClose; //昨结算
|
|
140900
141227
|
this.Open; //开盘价
|
|
140901
141228
|
this.Decimal=2; //小数位数
|
|
140902
141229
|
this.IsSingleTable=false; //单表模式
|
|
@@ -141017,7 +141344,7 @@ function ChartDealList()
|
|
|
141017
141344
|
|
|
141018
141345
|
if (item.ChartTooltip) colItem.ChartTooltip={ Enable:item.ChartTooltip.Enable, Type:item.ChartTooltip.Type }; //图形提示信息
|
|
141019
141346
|
|
|
141020
|
-
if (item.Type==DEAL_COLUMN_ID.
|
|
141347
|
+
if (item.Type==DEAL_COLUMN_ID.CENTER_BAR_ID)
|
|
141021
141348
|
{
|
|
141022
141349
|
if (!IFrameSplitOperator.IsNumber(item.DataIndex)) continue;
|
|
141023
141350
|
colItem.DataIndex=item.DataIndex; //柱子数据所在原始数据索引列
|
|
@@ -141030,6 +141357,8 @@ function ChartDealList()
|
|
|
141030
141357
|
{
|
|
141031
141358
|
if (item.Format) colItem.Format=item.Format; //数据格式化设置{ Type:1=原始 2=千分位分割 3=万亿转换, ExFloatPrecision:万亿转换以后的小数位数 }
|
|
141032
141359
|
if (IFrameSplitOperator.IsNumber(item.ColorType)) colItem.ColorType=item.ColorType; //0=默认 1=(>0, =0, <0) 2=(>=0, <0)
|
|
141360
|
+
if (IFrameSplitOperator.IsNumber(item.FloatPrecision)) colItem.FloatPrecision=item.FloatPrecision;
|
|
141361
|
+
if (item.StringFormat) colItem.StringFormat=item.StringFormat; //"{0}%" 输出增加固定字符
|
|
141033
141362
|
}
|
|
141034
141363
|
|
|
141035
141364
|
this.Column.push(colItem);
|
|
@@ -141049,7 +141378,6 @@ function ChartDealList()
|
|
|
141049
141378
|
{ Type:DEAL_COLUMN_ID.STRING_TIME_ID, Title:"时间", TextAlign:"center", Width:null, TextColor:g_JSChartResource.DealList.FieldColor.Time, MaxText:"88:88:88" },
|
|
141050
141379
|
{ Type:DEAL_COLUMN_ID.INDEX_ID, Title:"序号", TextAlign:"center", Width:null, TextColor:g_JSChartResource.DealList.FieldColor.Index, MaxText:"88888" },
|
|
141051
141380
|
|
|
141052
|
-
{ Type:DEAL_COLUMN_ID.MULTI_BAR_ID, Title:"柱子", TextAlign:"center", Width:null, TextColor:g_JSChartResource.DealList.FieldColor.BarTitle, MaxText:"888888" },
|
|
141053
141381
|
{ Type:DEAL_COLUMN_ID.CENTER_BAR_ID, Title:"柱子2", TextAlign:"center", Width:null, TextColor:g_JSChartResource.DealList.FieldColor.BarTitle, MaxText:"888888" },
|
|
141054
141382
|
{ Type:DEAL_COLUMN_ID.CUSTOM_TEXT_ID, Title:"自定义", TextAlign:"center", Width:null, TextColor:g_JSChartResource.DealList.FieldColor.Text, MaxText:"擎擎擎擎擎" },
|
|
141055
141383
|
|
|
@@ -141077,6 +141405,11 @@ function ChartDealList()
|
|
|
141077
141405
|
{ Type:DEAL_COLUMN_ID.RESERVE_STRING8_ID, Title:"文字8", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"擎擎擎擎擎擎" },
|
|
141078
141406
|
{ Type:DEAL_COLUMN_ID.RESERVE_STRING9_ID, Title:"文字9", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"擎擎擎擎擎擎" },
|
|
141079
141407
|
{ Type:DEAL_COLUMN_ID.RESERVE_STRING10_ID, Title:"文字10", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"擎擎擎擎擎擎" },
|
|
141408
|
+
|
|
141409
|
+
{ Type:DEAL_COLUMN_ID.MULTI_BAR_ID, Title:"柱子", TextAlign:"center", Width:null, TextColor:g_JSChartResource.DealList.FieldColor.BarTitle, MaxText:"888888" },
|
|
141410
|
+
{ Type:DEAL_COLUMN_ID.MULTI_BAR2_ID, Title:"柱子2", TextAlign:"center", Width:null, TextColor:g_JSChartResource.DealList.FieldColor.BarTitle, MaxText:"888888" },
|
|
141411
|
+
{ Type:DEAL_COLUMN_ID.MULTI_BAR3_ID, Title:"柱子3", TextAlign:"center", Width:null, TextColor:g_JSChartResource.DealList.FieldColor.BarTitle, MaxText:"888888" },
|
|
141412
|
+
{ Type:DEAL_COLUMN_ID.MULTI_BAR4_ID, Title:"柱子4", TextAlign:"center", Width:null, TextColor:g_JSChartResource.DealList.FieldColor.BarTitle, MaxText:"888888" },
|
|
141080
141413
|
|
|
141081
141414
|
];
|
|
141082
141415
|
|
|
@@ -141373,10 +141706,7 @@ function ChartDealList()
|
|
|
141373
141706
|
}
|
|
141374
141707
|
else if (item.Type==DEAL_COLUMN_ID.PRICE_ID)
|
|
141375
141708
|
{
|
|
141376
|
-
|
|
141377
|
-
else if (data.Price<this.YClose) textColor=this.DownColor;
|
|
141378
|
-
else textColor=this.UnchangeColor;
|
|
141379
|
-
|
|
141709
|
+
textColor=this.GetPriceColor(data.Price);
|
|
141380
141710
|
text=data.Price.toFixed(this.Decimal);
|
|
141381
141711
|
}
|
|
141382
141712
|
else if (item.Type==DEAL_COLUMN_ID.VOL_ID)
|
|
@@ -141417,7 +141747,7 @@ function ChartDealList()
|
|
|
141417
141747
|
{
|
|
141418
141748
|
text=(dataIndex+1).toString();
|
|
141419
141749
|
}
|
|
141420
|
-
else if (item.Type
|
|
141750
|
+
else if (this.IsMulitBar(item.Type))
|
|
141421
141751
|
{
|
|
141422
141752
|
var rtItem={Left:left, Top:top, Width:itemWidth, Height:this.RowHeight};
|
|
141423
141753
|
this.DrawMultiBar(item, data, rtItem);
|
|
@@ -141477,6 +141807,29 @@ function ChartDealList()
|
|
|
141477
141807
|
}
|
|
141478
141808
|
}
|
|
141479
141809
|
|
|
141810
|
+
this.GetPriceColor=function(price)
|
|
141811
|
+
{
|
|
141812
|
+
var upperSymbol=null;
|
|
141813
|
+
if (this.Symbol) upperSymbol=this.Symbol.toUpperCase();
|
|
141814
|
+
if (MARKET_SUFFIX_NAME.IsChinaFutures(upperSymbol))
|
|
141815
|
+
{
|
|
141816
|
+
if (!IFrameSplitOperator.IsNumber(this.YFClose)) return this.UnchangeColor;
|
|
141817
|
+
return this.GetUpDownColor(price, this.YFClose);
|
|
141818
|
+
}
|
|
141819
|
+
else
|
|
141820
|
+
{
|
|
141821
|
+
if (!IFrameSplitOperator.IsNumber(this.YClose)) return this.UnchangeColor;
|
|
141822
|
+
return this.GetUpDownColor(price, this.YClose);
|
|
141823
|
+
}
|
|
141824
|
+
}
|
|
141825
|
+
|
|
141826
|
+
this.GetUpDownColor=function(price, price2)
|
|
141827
|
+
{
|
|
141828
|
+
if (price>price2) return this.UpColor;
|
|
141829
|
+
else if (price<price2) return this.DownColor;
|
|
141830
|
+
else return this.UnchangeColor;
|
|
141831
|
+
}
|
|
141832
|
+
|
|
141480
141833
|
this.FormatReserveNumber=function(column, data, drawInfo)
|
|
141481
141834
|
{
|
|
141482
141835
|
if (column.DefaultText) drawInfo.Text=column.DefaultText;
|
|
@@ -141518,6 +141871,11 @@ function ChartDealList()
|
|
|
141518
141871
|
break;
|
|
141519
141872
|
}
|
|
141520
141873
|
}
|
|
141874
|
+
|
|
141875
|
+
if (column.StringFormat && text)
|
|
141876
|
+
{
|
|
141877
|
+
text=column.StringFormat.replace("{0}", text);
|
|
141878
|
+
}
|
|
141521
141879
|
|
|
141522
141880
|
drawInfo.Text=text;
|
|
141523
141881
|
}
|
|
@@ -141639,8 +141997,10 @@ function ChartDealList()
|
|
|
141639
141997
|
|
|
141640
141998
|
this.DrawMultiBar=function(colunmInfo, data, rtItem)
|
|
141641
141999
|
{
|
|
141642
|
-
|
|
141643
|
-
|
|
142000
|
+
var fieldName=MAP_DEAL_COLUMN_FIELD.get(colunmInfo.Type);
|
|
142001
|
+
if (!data || !fieldName) return;
|
|
142002
|
+
|
|
142003
|
+
var barData=data[fieldName]; //{ Value:[0.4,0,2], Color:[0,1] };
|
|
141644
142004
|
if (!barData) return false;
|
|
141645
142005
|
if (!IFrameSplitOperator.IsNonEmptyArray(barData.Value)) return false;
|
|
141646
142006
|
|
|
@@ -141828,6 +142188,16 @@ function ChartDealList()
|
|
|
141828
142188
|
return ARARY_TYPE.includes(value);
|
|
141829
142189
|
}
|
|
141830
142190
|
|
|
142191
|
+
this.IsMulitBar=function(value)
|
|
142192
|
+
{
|
|
142193
|
+
var ARARY_TYPE=
|
|
142194
|
+
[
|
|
142195
|
+
DEAL_COLUMN_ID.MULTI_BAR_ID,DEAL_COLUMN_ID.MULTI_BAR2_ID,DEAL_COLUMN_ID.MULTI_BAR3_ID,DEAL_COLUMN_ID.MULTI_BAR4_ID,
|
|
142196
|
+
];
|
|
142197
|
+
|
|
142198
|
+
return ARARY_TYPE.includes(value);
|
|
142199
|
+
}
|
|
142200
|
+
|
|
141831
142201
|
this.IsReserveNumber=function(value)
|
|
141832
142202
|
{
|
|
141833
142203
|
var ARARY_TYPE=
|
|
@@ -143601,6 +143971,8 @@ function JSReportChartContainer(uielement)
|
|
|
143601
143971
|
//80=整行背景色
|
|
143602
143972
|
//101-199=数值型 201-299=字符型 301-350=进度条 351-400=按钮 401-499=日期时间
|
|
143603
143973
|
|
|
143974
|
+
var upperSymbol=null;
|
|
143975
|
+
if (stock.Symbol) upperSymbol=stock.Symbol.toUpperCase();
|
|
143604
143976
|
if (IFrameSplitOperator.IsString(item[1])) stock.Name=item[1];
|
|
143605
143977
|
if (IFrameSplitOperator.IsNumber(item[2])) stock.YClose=item[2];
|
|
143606
143978
|
if (IFrameSplitOperator.IsNumber(item[3])) stock.Open=item[3];
|
|
@@ -143632,17 +144004,39 @@ function JSReportChartContainer(uielement)
|
|
|
143632
144004
|
|
|
143633
144005
|
if (item[27]) stock.NameEx=item[27]; //扩展名字
|
|
143634
144006
|
|
|
144007
|
+
if (IFrameSplitOperator.IsNumber(item[38])) stock.Position=item[38]; //持仓量
|
|
144008
|
+
if (IFrameSplitOperator.IsNumber(item[39])) stock.FClose=item[39]; //结算价
|
|
144009
|
+
if (IFrameSplitOperator.IsNumber(item[40])) stock.YFClose=item[40]; //昨结算价
|
|
144010
|
+
if (IFrameSplitOperator.IsNumber(item[41])) stock.OpenPosition=item[41]; //开仓量
|
|
144011
|
+
if (IFrameSplitOperator.IsNumber(item[42])) stock.ClosePosition=item[42]; //平仓量
|
|
144012
|
+
|
|
143635
144013
|
//衍生数据计算
|
|
143636
144014
|
if (!IFrameSplitOperator.IsNumber(item[21])) //涨幅%
|
|
143637
144015
|
{
|
|
143638
|
-
if (
|
|
143639
|
-
|
|
144016
|
+
if (MARKET_SUFFIX_NAME.IsChinaFutures(upperSymbol))
|
|
144017
|
+
{
|
|
144018
|
+
if (IFrameSplitOperator.IsNumber(stock.Price) && IFrameSplitOperator.IsNumber(stock.YFClose) && stock.YFClose!=0)
|
|
144019
|
+
stock.Increase=(stock.Price-stock.YFClose)/stock.YFClose*100;
|
|
144020
|
+
}
|
|
144021
|
+
else
|
|
144022
|
+
{
|
|
144023
|
+
if (IFrameSplitOperator.IsNumber(stock.Price) && IFrameSplitOperator.IsNumber(stock.YClose) && stock.YClose!=0)
|
|
144024
|
+
stock.Increase=(stock.Price-stock.YClose)/stock.YClose*100;
|
|
144025
|
+
}
|
|
143640
144026
|
}
|
|
143641
144027
|
|
|
143642
144028
|
if (!IFrameSplitOperator.IsNumber(item[22])) //涨跌
|
|
143643
144029
|
{
|
|
143644
|
-
if (
|
|
143645
|
-
|
|
144030
|
+
if (MARKET_SUFFIX_NAME.IsChinaFutures(upperSymbol))
|
|
144031
|
+
{
|
|
144032
|
+
if (IFrameSplitOperator.IsNumber(stock.Price) && IFrameSplitOperator.IsNumber(stock.YFClose))
|
|
144033
|
+
stock.UpDown=stock.Price-stock.YFClose;
|
|
144034
|
+
}
|
|
144035
|
+
else
|
|
144036
|
+
{
|
|
144037
|
+
if (IFrameSplitOperator.IsNumber(stock.Price) && IFrameSplitOperator.IsNumber(stock.YClose))
|
|
144038
|
+
stock.UpDown=stock.Price-stock.YClose;
|
|
144039
|
+
}
|
|
143646
144040
|
}
|
|
143647
144041
|
|
|
143648
144042
|
if (!IFrameSplitOperator.IsNumber(item[23])) //换手率%
|
|
@@ -143653,8 +144047,17 @@ function JSReportChartContainer(uielement)
|
|
|
143653
144047
|
|
|
143654
144048
|
if (!IFrameSplitOperator.IsNumber(item[24])) //振幅%
|
|
143655
144049
|
{
|
|
143656
|
-
if (
|
|
143657
|
-
|
|
144050
|
+
if (MARKET_SUFFIX_NAME.IsChinaFutures(upperSymbol))
|
|
144051
|
+
{
|
|
144052
|
+
if (IFrameSplitOperator.IsNumber(stock.High) && IFrameSplitOperator.IsNumber(stock.Low) && IFrameSplitOperator.IsNumber(stock.YFClose) && stock.YFClose!=0)
|
|
144053
|
+
stock.Amplitude=(stock.High-stock.Low)/stock.YFClose*100;
|
|
144054
|
+
}
|
|
144055
|
+
else
|
|
144056
|
+
{
|
|
144057
|
+
if (IFrameSplitOperator.IsNumber(stock.High) && IFrameSplitOperator.IsNumber(stock.Low) && IFrameSplitOperator.IsNumber(stock.YClose) && stock.YClose!=0)
|
|
144058
|
+
stock.Amplitude=(stock.High-stock.Low)/stock.YClose*100;
|
|
144059
|
+
}
|
|
144060
|
+
|
|
143658
144061
|
}
|
|
143659
144062
|
|
|
143660
144063
|
if (!IFrameSplitOperator.IsNumber(item[25])) //流通市值
|
|
@@ -143683,11 +144086,7 @@ function JSReportChartContainer(uielement)
|
|
|
143683
144086
|
|
|
143684
144087
|
if (IFrameSplitOperator.IsBool(item[37])) stock.Checked=item[37];
|
|
143685
144088
|
|
|
143686
|
-
|
|
143687
|
-
if (IFrameSplitOperator.IsNumber(item[39])) stock.FClose=item[39]; //结算价
|
|
143688
|
-
if (IFrameSplitOperator.IsNumber(item[40])) stock.YFClose=item[40]; //昨结算价
|
|
143689
|
-
if (IFrameSplitOperator.IsNumber(item[41])) stock.OpenPosition=item[41]; //开仓量
|
|
143690
|
-
if (IFrameSplitOperator.IsNumber(item[42])) stock.ClosePosition=item[42]; //平仓量
|
|
144089
|
+
|
|
143691
144090
|
|
|
143692
144091
|
//1,3,5,10,15 涨速%
|
|
143693
144092
|
if (IFrameSplitOperator.IsNumber(item[43])) stock.RSpeed1M=item[43];
|
|
@@ -149977,7 +150376,16 @@ function ChartReport()
|
|
|
149977
150376
|
}
|
|
149978
150377
|
else //昨收价 计算颜色
|
|
149979
150378
|
{
|
|
149980
|
-
|
|
150379
|
+
var upperSymbol=null;
|
|
150380
|
+
if (stock.Symbol) upperSymbol=stock.Symbol.toUpperCase();
|
|
150381
|
+
if (MARKET_SUFFIX_NAME.IsChinaFutures(upperSymbol) && IFrameSplitOperator.IsNumber(stock.YFClose))
|
|
150382
|
+
{
|
|
150383
|
+
yClose=stock.YFClose;
|
|
150384
|
+
}
|
|
150385
|
+
else
|
|
150386
|
+
{
|
|
150387
|
+
if (IFrameSplitOperator.IsNumber(stock.YClose)) yClose=stock.YClose;
|
|
150388
|
+
}
|
|
149981
150389
|
}
|
|
149982
150390
|
|
|
149983
150391
|
if (!IFrameSplitOperator.IsNumber(yClose))
|
|
@@ -152484,17 +152892,17 @@ function JSTReportChart(divElement)
|
|
|
152484
152892
|
this.JSChartContainer; //表格控件
|
|
152485
152893
|
this.ResizeListener; //大小变动监听
|
|
152486
152894
|
|
|
152487
|
-
|
|
152488
|
-
|
|
152489
|
-
|
|
152490
|
-
|
|
152491
|
-
|
|
152492
|
-
|
|
152493
|
-
|
|
152494
|
-
|
|
152495
|
-
|
|
152496
|
-
|
|
152497
|
-
|
|
152895
|
+
//h5 canvas
|
|
152896
|
+
this.CanvasElement=document.createElement("canvas");
|
|
152897
|
+
this.CanvasElement.className='jstreport-drawing';
|
|
152898
|
+
this.CanvasElement.id=Guid();
|
|
152899
|
+
this.CanvasElement.setAttribute("tabindex",0);
|
|
152900
|
+
if (this.CanvasElement.style) this.CanvasElement.style.outline='none';
|
|
152901
|
+
if(divElement.hasChildNodes())
|
|
152902
|
+
{
|
|
152903
|
+
JSConsole.Chart.Log("[JSTReportChart::JSReportChart] divElement hasChildNodes", divElement.childNodes);
|
|
152904
|
+
}
|
|
152905
|
+
divElement.appendChild(this.CanvasElement);
|
|
152498
152906
|
|
|
152499
152907
|
|
|
152500
152908
|
this.OnSize=function()
|
|
@@ -163502,7 +163910,7 @@ function JSDialogTooltip()
|
|
|
163502
163910
|
return item;
|
|
163503
163911
|
}
|
|
163504
163912
|
|
|
163505
|
-
if (IFrameSplitOperator.IsNumber(yClose) && format!=1)
|
|
163913
|
+
if (IFrameSplitOperator.IsNumber(yClose) && format!=1 && yClose!=0)
|
|
163506
163914
|
{
|
|
163507
163915
|
var value=(price-yClose)/yClose*100;
|
|
163508
163916
|
item.Text=`${price.toFixed(defaultfloatPrecision)}(${value.toFixed(2)}%)`;
|
|
@@ -163578,9 +163986,7 @@ function JSDialogTooltip()
|
|
|
163578
163986
|
Color:this.ValueColor
|
|
163579
163987
|
};
|
|
163580
163988
|
|
|
163581
|
-
if (!IFrameSplitOperator.IsNumber(price) || !IFrameSplitOperator.IsNumber(yClose)) return item;
|
|
163582
|
-
|
|
163583
|
-
|
|
163989
|
+
if (!IFrameSplitOperator.IsNumber(price) || !IFrameSplitOperator.IsNumber(yClose) || yClose===0) return item;
|
|
163584
163990
|
|
|
163585
163991
|
var diffValue=price-yClose;
|
|
163586
163992
|
var value=(price-yClose)/yClose;
|
|
@@ -163628,7 +164034,7 @@ function JSDialogTooltip()
|
|
|
163628
164034
|
};
|
|
163629
164035
|
|
|
163630
164036
|
|
|
163631
|
-
if (!IFrameSplitOperator.IsNumber(high) || !IFrameSplitOperator.IsNumber(low) || !IFrameSplitOperator.IsNumber(yClose)) return item;
|
|
164037
|
+
if (!IFrameSplitOperator.IsNumber(high) || !IFrameSplitOperator.IsNumber(low) || !IFrameSplitOperator.IsNumber(yClose) || yClose===0) return item;
|
|
163632
164038
|
|
|
163633
164039
|
var diffValue=high-low;
|
|
163634
164040
|
var value=(high-low)/yClose;
|
|
@@ -167821,7 +168227,7 @@ function HQChartScriptWorker()
|
|
|
167821
168227
|
|
|
167822
168228
|
|
|
167823
168229
|
|
|
167824
|
-
var HQCHART_VERSION="1.1.
|
|
168230
|
+
var HQCHART_VERSION="1.1.15437";
|
|
167825
168231
|
|
|
167826
168232
|
function PrintHQChartVersion()
|
|
167827
168233
|
{
|