hqchart 1.1.15382 → 1.1.15428
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 +91 -43
- package/package.json +1 -1
- package/src/jscommon/umychart.StockInfo.js +1192 -0
- package/src/jscommon/umychart.TReport.js +11 -11
- package/src/jscommon/umychart.complier.js +101 -27
- package/src/jscommon/umychart.deal.js +71 -21
- package/src/jscommon/umychart.js +288 -12
- package/src/jscommon/umychart.report.js +84 -7
- package/src/jscommon/umychart.style.js +61 -0
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +606 -68
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +617 -79
|
@@ -12732,6 +12732,13 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
12732
12732
|
return false;
|
|
12733
12733
|
}
|
|
12734
12734
|
|
|
12735
|
+
this.IsHScreenModel=function()
|
|
12736
|
+
{
|
|
12737
|
+
if (this.ClassName=="KLineChartHScreenContainer" || this.ClassName=="MinuteChartHScreenContainer") return true;
|
|
12738
|
+
|
|
12739
|
+
return false;
|
|
12740
|
+
}
|
|
12741
|
+
|
|
12735
12742
|
this.UpdatePointByCursorIndex=function(type) //type 1=根据十字光标更新 2=强制取消十字光标
|
|
12736
12743
|
{
|
|
12737
12744
|
if (type==1) //根据十字光标更新
|
|
@@ -12752,8 +12759,18 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
12752
12759
|
pt.X=null;
|
|
12753
12760
|
}
|
|
12754
12761
|
}
|
|
12755
|
-
|
|
12756
|
-
this.
|
|
12762
|
+
|
|
12763
|
+
if (this.IsHScreenModel())
|
|
12764
|
+
{
|
|
12765
|
+
this.LastPoint.X=pt.Y;
|
|
12766
|
+
this.LastPoint.Y=pt.X;
|
|
12767
|
+
}
|
|
12768
|
+
else
|
|
12769
|
+
{
|
|
12770
|
+
this.LastPoint.X=pt.X;
|
|
12771
|
+
this.LastPoint.Y=pt.Y;
|
|
12772
|
+
}
|
|
12773
|
+
|
|
12757
12774
|
}
|
|
12758
12775
|
else if (type==2)
|
|
12759
12776
|
{
|
|
@@ -12773,8 +12790,18 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
12773
12790
|
pt.Y=this.Frame.GetYFromData(close);
|
|
12774
12791
|
this.LastPoint.FrameID=0;
|
|
12775
12792
|
}
|
|
12776
|
-
|
|
12777
|
-
this.
|
|
12793
|
+
|
|
12794
|
+
if (this.IsHScreenModel())
|
|
12795
|
+
{
|
|
12796
|
+
this.LastPoint.X=pt.Y;
|
|
12797
|
+
this.LastPoint.Y=pt.X;
|
|
12798
|
+
}
|
|
12799
|
+
else
|
|
12800
|
+
{
|
|
12801
|
+
this.LastPoint.X=pt.X;
|
|
12802
|
+
this.LastPoint.Y=pt.Y;
|
|
12803
|
+
}
|
|
12804
|
+
|
|
12778
12805
|
}
|
|
12779
12806
|
}
|
|
12780
12807
|
|
|
@@ -32177,6 +32204,12 @@ function ChartKLine()
|
|
|
32177
32204
|
TextColor: g_JSChartResource.DaySummaryKLine.TextColor,
|
|
32178
32205
|
LeftMargin:g_JSChartResource.DaySummaryKLine.LeftMargin,
|
|
32179
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
|
+
};
|
|
32180
32213
|
|
|
32181
32214
|
}
|
|
32182
32215
|
|
|
@@ -60181,6 +60214,11 @@ IFrameSplitOperator.RemoveMarketSuffix=function(symbol)
|
|
|
60181
60214
|
return symbol;
|
|
60182
60215
|
}
|
|
60183
60216
|
|
|
60217
|
+
IFrameSplitOperator.IsNumberString=function(strValue)
|
|
60218
|
+
{
|
|
60219
|
+
return /^\d+$/.test(strValue);
|
|
60220
|
+
}
|
|
60221
|
+
|
|
60184
60222
|
function FrameSplitKLinePriceY()
|
|
60185
60223
|
{
|
|
60186
60224
|
this.newMethod=IFrameSplitOperator; //派生
|
|
@@ -83611,6 +83649,13 @@ function JSChartResource()
|
|
|
83611
83649
|
CloseColor:"rgb(30,144,255)",
|
|
83612
83650
|
YCloseColor:"rgba(105,105,105,0.5)", //昨收线
|
|
83613
83651
|
AreaColor:'rgba(0,191,255,0.2)',
|
|
83652
|
+
|
|
83653
|
+
UpColor:"rgb(255,0,0)",
|
|
83654
|
+
UpAreaColor:"rgba(255,0,0,0.5)",
|
|
83655
|
+
DownColor:"rgb(0,128,0)",
|
|
83656
|
+
DownAreaColor:"rgba(0,128,0,0.5)",
|
|
83657
|
+
UnchangeColor:'rgb(90,90,90)',
|
|
83658
|
+
UnchangeAreaColor:'rgba(90,90,90,0.5)',
|
|
83614
83659
|
},
|
|
83615
83660
|
|
|
83616
83661
|
KLine:
|
|
@@ -83844,6 +83889,70 @@ function JSChartResource()
|
|
|
83844
83889
|
}
|
|
83845
83890
|
}
|
|
83846
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
|
+
|
|
83847
83956
|
|
|
83848
83957
|
//自定义风格
|
|
83849
83958
|
this.SetStyle=function(style)
|
|
@@ -84812,9 +84921,131 @@ function JSChartResource()
|
|
|
84812
84921
|
if (style.KLineCountDownPaint) this.SetKLineCountDownPaint(style.KLineCountDownPaint);
|
|
84813
84922
|
|
|
84814
84923
|
if (style.SmallFloatTooltipV2) this.SetSmallFloatTooltipV2(style.SmallFloatTooltipV2);
|
|
84924
|
+
if (style.StockInfo) this.SetStockInfo(style.StockInfo);
|
|
84815
84925
|
|
|
84816
84926
|
}
|
|
84817
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
|
+
}
|
|
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;
|
|
85047
|
+
}
|
|
85048
|
+
|
|
84818
85049
|
this.SetSmallFloatTooltipV2=function(style)
|
|
84819
85050
|
{
|
|
84820
85051
|
var dest=this.SmallFloatTooltipV2;
|
|
@@ -85009,6 +85240,13 @@ function JSChartResource()
|
|
|
85009
85240
|
if (closeLine.CloseColor) this.Report.CloseLine.CloseColor=closeLine.CloseColor;
|
|
85010
85241
|
if (closeLine.YCloseColor) this.Report.CloseLine.YCloseColor=closeLine.YCloseColor;
|
|
85011
85242
|
if (closeLine.AreaColor) this.Report.CloseLine.AreaColor=closeLine.AreaColor;
|
|
85243
|
+
|
|
85244
|
+
if (closeLine.UpColor) this.Report.CloseLine.UpColor=closeLine.UpColor;
|
|
85245
|
+
if (closeLine.UpAreaColor) this.Report.CloseLine.UpAreaColor=closeLine.UpAreaColor;
|
|
85246
|
+
if (closeLine.DownColor) this.Report.CloseLine.DownColor=closeLine.DownColor;
|
|
85247
|
+
if (closeLine.DownAreaColor) this.Report.CloseLine.DownAreaColor=closeLine.DownAreaColor;
|
|
85248
|
+
if (closeLine.UnchangeColor) this.Report.CloseLine.UnchangeColor=closeLine.UnchangeColor;
|
|
85249
|
+
if (closeLine.UnchangeAreaColor) this.Report.CloseLine.UnchangeAreaColor=closeLine.UnchangeAreaColor;
|
|
85012
85250
|
}
|
|
85013
85251
|
|
|
85014
85252
|
if (item.KLine)
|
|
@@ -91402,6 +91640,9 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
91402
91640
|
if (!option.Windows) return;
|
|
91403
91641
|
var count=option.Windows.length;
|
|
91404
91642
|
if (count<=0) return;
|
|
91643
|
+
|
|
91644
|
+
this.Frame.RestoreIndexWindows();
|
|
91645
|
+
|
|
91405
91646
|
var currentLength=this.Frame.SubFrame.length;
|
|
91406
91647
|
|
|
91407
91648
|
var period=null, right=null, symbol=null;
|
|
@@ -97757,21 +97998,31 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
97757
97998
|
|
|
97758
97999
|
this.UpdatePointByCursorIndex=function()
|
|
97759
98000
|
{
|
|
97760
|
-
|
|
98001
|
+
var x=null, y=null;
|
|
98002
|
+
x=this.Frame.GetXFromIndex(this.CursorIndex);
|
|
97761
98003
|
|
|
97762
98004
|
var index=this.CursorIndex;
|
|
97763
98005
|
index=parseInt(index.toFixed(0));
|
|
97764
98006
|
var data=this.GetKData();
|
|
97765
|
-
if (data.DataOffset+index
|
|
98007
|
+
if (data.DataOffset+index<data.Data.length)
|
|
97766
98008
|
{
|
|
97767
|
-
|
|
98009
|
+
var item=data.Data[data.DataOffset+index];
|
|
98010
|
+
var close=null;
|
|
98011
|
+
if (item.Before) close=item.Before.Close;
|
|
98012
|
+
else close=item.Close;
|
|
98013
|
+
y=this.Frame.GetYFromData(close);
|
|
97768
98014
|
}
|
|
97769
|
-
var item=data.Data[data.DataOffset+index];
|
|
97770
|
-
var close=null;
|
|
97771
|
-
if (item.Before) close=item.Before.Close;
|
|
97772
|
-
else close=item.Close
|
|
97773
98015
|
|
|
97774
|
-
this.
|
|
98016
|
+
if (this.IsHScreenModel())
|
|
98017
|
+
{
|
|
98018
|
+
this.LastPoint.X=y;
|
|
98019
|
+
this.LastPoint.Y=x;
|
|
98020
|
+
}
|
|
98021
|
+
else
|
|
98022
|
+
{
|
|
98023
|
+
this.LastPoint.X=x;
|
|
98024
|
+
this.LastPoint.Y=y;
|
|
98025
|
+
}
|
|
97775
98026
|
this.LastPoint.FrameID=0;
|
|
97776
98027
|
}
|
|
97777
98028
|
|
|
@@ -98322,6 +98573,8 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
98322
98573
|
this.ChangeIndexTemplate=function(option) //切换指标模板 可以设置指标窗口个数 每个窗口的指标, 只能从第3个指标窗口开始设置,前面2个指标窗口固定无法设置
|
|
98323
98574
|
{
|
|
98324
98575
|
if (!Array.isArray(option.Windows)) return;
|
|
98576
|
+
this.Frame.RestoreIndexWindows();
|
|
98577
|
+
|
|
98325
98578
|
var count=option.Windows.length;
|
|
98326
98579
|
var currentLength=this.Frame.SubFrame.length;
|
|
98327
98580
|
var startWindowIndex=2;
|
|
@@ -106780,6 +107033,18 @@ var MARKET_SUFFIX_NAME=
|
|
|
106780
107033
|
return false;
|
|
106781
107034
|
},
|
|
106782
107035
|
|
|
107036
|
+
IsHKStock:function(symbol) //港股股票 全是数字
|
|
107037
|
+
{
|
|
107038
|
+
if (!symbol) return false;
|
|
107039
|
+
var upperSymbol=symbol.toUpperCase();
|
|
107040
|
+
if (!this.IsHK(upperSymbol)) return false;
|
|
107041
|
+
|
|
107042
|
+
var shortSymbol=this.GetShortSymbol(symbol);
|
|
107043
|
+
if (IFrameSplitOperator.IsNumberString(shortSymbol)) return true;
|
|
107044
|
+
|
|
107045
|
+
return false;
|
|
107046
|
+
},
|
|
107047
|
+
|
|
106783
107048
|
GetMarketStatus:function(symbol) //获取市场状态 0=闭市 1=盘前 2=盘中 3=盘后
|
|
106784
107049
|
{
|
|
106785
107050
|
if (!symbol) return 0;
|
|
@@ -107120,7 +107385,18 @@ var MARKET_SUFFIX_NAME=
|
|
|
107120
107385
|
if (MARKET_SUFFIX_NAME.IsBJ(upperSymbol)) return 100; //单位手=100股
|
|
107121
107386
|
|
|
107122
107387
|
return 1;
|
|
107388
|
+
},
|
|
107389
|
+
|
|
107390
|
+
//获取不带后缀的代码
|
|
107391
|
+
GetShortSymbol:function(symbol)
|
|
107392
|
+
{
|
|
107393
|
+
if (!IFrameSplitOperator.IsString(symbol)) return null;
|
|
107394
|
+
var pos=symbol.lastIndexOf(".");
|
|
107395
|
+
if (pos<=0) return symbol;
|
|
107396
|
+
|
|
107397
|
+
return symbol.slice(0,pos);
|
|
107123
107398
|
}
|
|
107399
|
+
|
|
107124
107400
|
}
|
|
107125
107401
|
|
|
107126
107402
|
|
|
@@ -111385,6 +111661,24 @@ JSComplierHelper.GetConvertValueName=function(funcName)
|
|
|
111385
111661
|
|
|
111386
111662
|
return valueName;
|
|
111387
111663
|
}
|
|
111664
|
+
|
|
111665
|
+
|
|
111666
|
+
//DYNAINFO() 转换
|
|
111667
|
+
//["DYNA_NOW",null], //DYNA_NOW 现价 DYNAINFO(7) 即时行情数据 没有现价时(比如在开盘前),返回昨收盘价
|
|
111668
|
+
//["DYNA_ZAF",null], //DYNA_ZAF 涨幅 DYNAINFO(14) 即时行情数据(沪深京早盘竞价期间使用匹配价的涨幅) 转换成幅度需要乘100
|
|
111669
|
+
//["DYNA_LB", null], //DYNA_LB DYNAINFO(17) 量比 即时行情数据
|
|
111670
|
+
//["DYNA_ZAS",null], //DYNA_ZAS DYNAINFO(24) 返回涨速 报价界面行情数据 转换成幅度需要乘100
|
|
111671
|
+
//["SELLVOL", null], //返回内盘,即DYNAINFO(22) 即时行情数据
|
|
111672
|
+
//["BUYVOL", null], //返回外盘,即DYNAINFO(21) 即时行情数据
|
|
111673
|
+
const MAP_DYNAINFO_SHORTCUT=new Map(
|
|
111674
|
+
[
|
|
111675
|
+
['DYNA_NOW', { Name:"DYNA_NOW", ID:7 } ],
|
|
111676
|
+
['DYNA_LB', { Name:"DYNA_LB", ID:17 } ],
|
|
111677
|
+
['DYNA_ZAS', { Name:"DYNA_ZAS", ID:24 } ],
|
|
111678
|
+
['SELLVOL', { Name:"SELLVOL", ID:22 }],
|
|
111679
|
+
['BUYVOL', { Name:"BUYVOL", ID:21 } ],
|
|
111680
|
+
]
|
|
111681
|
+
);
|
|
111388
111682
|
|
|
111389
111683
|
|
|
111390
111684
|
|
|
@@ -112324,6 +112618,14 @@ function Node(ErrorHandler)
|
|
|
112324
112618
|
return;
|
|
112325
112619
|
}
|
|
112326
112620
|
|
|
112621
|
+
if (MAP_DYNAINFO_SHORTCUT.has(varName))
|
|
112622
|
+
{
|
|
112623
|
+
var item=MAP_DYNAINFO_SHORTCUT.get(varName);
|
|
112624
|
+
var item={ ID:JS_EXECUTE_JOB_ID.JOB_DOWNLOAD_SYMBOL_LATEST_DATA, Args:[item.ID], FunctionName:varName };
|
|
112625
|
+
this.Dynainfo.push(item);
|
|
112626
|
+
return;
|
|
112627
|
+
}
|
|
112628
|
+
|
|
112327
112629
|
if (varName.indexOf('#')>0)
|
|
112328
112630
|
{
|
|
112329
112631
|
var aryWrods = varName.split('#');
|
|
@@ -123079,8 +123381,10 @@ var DYNAINFO_ARGUMENT_ID=
|
|
|
123079
123381
|
CLOSE:7,
|
|
123080
123382
|
VOL:8,
|
|
123081
123383
|
AMOUNT:10,
|
|
123384
|
+
UPDOWN:12, //DYNAINFO(12) 日涨跌 即时行情数据
|
|
123082
123385
|
AMPLITUDE:13, //振幅
|
|
123083
123386
|
INCREASE:14, //涨幅
|
|
123387
|
+
|
|
123084
123388
|
EXCHANGERATE:37, //换手率
|
|
123085
123389
|
};
|
|
123086
123390
|
|
|
@@ -123259,16 +123563,18 @@ function JSSymbolData(ast,option,jsExecute)
|
|
|
123259
123563
|
let stock=data.stock[0];
|
|
123260
123564
|
if (!stock) return;
|
|
123261
123565
|
|
|
123262
|
-
if (IFrameSplitOperator.IsNumber(stock.yclose)) this.LatestData.set(DYNAINFO_ARGUMENT_ID.YCLOSE,stock.yclose);
|
|
123263
|
-
if (IFrameSplitOperator.IsNumber(stock.open)) this.LatestData.set(DYNAINFO_ARGUMENT_ID.OPEN,stock.open);
|
|
123264
|
-
if (IFrameSplitOperator.IsNumber(stock.high)) this.LatestData.set(DYNAINFO_ARGUMENT_ID.HIGH,stock.high);
|
|
123265
|
-
if (IFrameSplitOperator.IsNumber(stock.low)) this.LatestData.set(DYNAINFO_ARGUMENT_ID.LOW,stock.low);
|
|
123266
|
-
if (IFrameSplitOperator.IsNumber(stock.price)) this.LatestData.set(DYNAINFO_ARGUMENT_ID.CLOSE,stock.price);
|
|
123267
|
-
if (IFrameSplitOperator.IsNumber(stock.vol)) this.LatestData.set(DYNAINFO_ARGUMENT_ID.VOL,stock.vol);
|
|
123268
|
-
if (IFrameSplitOperator.IsNumber(stock.amount)) this.LatestData.set(DYNAINFO_ARGUMENT_ID.AMOUNT,stock.amount);
|
|
123269
|
-
if (IFrameSplitOperator.IsNumber(stock.increase)) this.LatestData.set(DYNAINFO_ARGUMENT_ID.INCREASE,stock.increase);
|
|
123270
|
-
if (IFrameSplitOperator.IsNumber(stock.exchangerate)) this.LatestData.set(DYNAINFO_ARGUMENT_ID.EXCHANGERATE,stock.exchangerate);
|
|
123271
|
-
if (IFrameSplitOperator.IsNumber(stock.amplitude)) this.LatestData.set(DYNAINFO_ARGUMENT_ID.AMPLITUDE,stock.amplitude);
|
|
123566
|
+
if (IFrameSplitOperator.IsNumber(stock.yclose)) this.LatestData.set(this.GetLatestDataKey(DYNAINFO_ARGUMENT_ID.YCLOSE),stock.yclose);
|
|
123567
|
+
if (IFrameSplitOperator.IsNumber(stock.open)) this.LatestData.set(this.GetLatestDataKey(DYNAINFO_ARGUMENT_ID.OPEN),stock.open);
|
|
123568
|
+
if (IFrameSplitOperator.IsNumber(stock.high)) this.LatestData.set(this.GetLatestDataKey(DYNAINFO_ARGUMENT_ID.HIGH),stock.high);
|
|
123569
|
+
if (IFrameSplitOperator.IsNumber(stock.low)) this.LatestData.set(this.GetLatestDataKey(DYNAINFO_ARGUMENT_ID.LOW),stock.low);
|
|
123570
|
+
if (IFrameSplitOperator.IsNumber(stock.price)) this.LatestData.set(this.GetLatestDataKey(DYNAINFO_ARGUMENT_ID.CLOSE),stock.price);
|
|
123571
|
+
if (IFrameSplitOperator.IsNumber(stock.vol)) this.LatestData.set(this.GetLatestDataKey(DYNAINFO_ARGUMENT_ID.VOL),stock.vol);
|
|
123572
|
+
if (IFrameSplitOperator.IsNumber(stock.amount)) this.LatestData.set(this.GetLatestDataKey(DYNAINFO_ARGUMENT_ID.AMOUNT),stock.amount);
|
|
123573
|
+
if (IFrameSplitOperator.IsNumber(stock.increase)) this.LatestData.set(this.GetLatestDataKey(DYNAINFO_ARGUMENT_ID.INCREASE),stock.increase);
|
|
123574
|
+
if (IFrameSplitOperator.IsNumber(stock.exchangerate)) this.LatestData.set(this.GetLatestDataKey(DYNAINFO_ARGUMENT_ID.EXCHANGERATE),stock.exchangerate);
|
|
123575
|
+
if (IFrameSplitOperator.IsNumber(stock.amplitude)) this.LatestData.set(this.GetLatestDataKey(DYNAINFO_ARGUMENT_ID.AMPLITUDE),stock.amplitude);
|
|
123576
|
+
if (IFrameSplitOperator.IsNumber(stock.updown)) this.LatestData.set(this.GetLatestDataKey(DYNAINFO_ARGUMENT_ID.UPDOWN),stock.updown);
|
|
123577
|
+
|
|
123272
123578
|
|
|
123273
123579
|
/*
|
|
123274
123580
|
this.LatestData={ Symbol:stock.symbol, Name:stock.name, Date:stock.date, Time:stock.time,
|
|
@@ -123293,7 +123599,7 @@ function JSSymbolData(ast,option,jsExecute)
|
|
|
123293
123599
|
if (IFrameSplitOperator.IsNumber(item.value) || IFrameSplitOperator.IsString(item.value))
|
|
123294
123600
|
{
|
|
123295
123601
|
JSConsole.Complier.Log(`[JSSymbolData::RecvLatestDataVer2] symbol=${symbol} DYNAINFO(${item.id})=${item.value}.`);
|
|
123296
|
-
this.LatestData.set(item.id, item.value);
|
|
123602
|
+
this.LatestData.set(this.GetLatestDataKey(item.id), item.value);
|
|
123297
123603
|
}
|
|
123298
123604
|
|
|
123299
123605
|
}
|
|
@@ -123301,11 +123607,50 @@ function JSSymbolData(ast,option,jsExecute)
|
|
|
123301
123607
|
JSConsole.Complier.Log('[JSSymbolData::RecvLatestDataVer2]', this.LatestData);
|
|
123302
123608
|
}
|
|
123303
123609
|
|
|
123304
|
-
this.GetLatestCacheData=function(
|
|
123610
|
+
this.GetLatestCacheData=function(dataID)
|
|
123305
123611
|
{
|
|
123306
|
-
|
|
123612
|
+
var key=this.GetLatestDataKey(dataID);
|
|
123613
|
+
if (!this.LatestData.has(key)) return null;
|
|
123307
123614
|
|
|
123308
|
-
|
|
123615
|
+
var data=this.LatestData.get(key);
|
|
123616
|
+
|
|
123617
|
+
//DYNAINFO(36) 自由流通换手率(序列数据,每个周期的数据不同,使用最新的自由流通股本) 转换成幅度需要乘100 比如DYNAINFO(36)>0.25表示换手超过25%
|
|
123618
|
+
//DYNAINFO(37) 换手率(序列数据,每个周期的数据不同,使用的流通股本为最近数据) 转换成幅度需要乘100 比如DYNAINFO(37)>0.1表示换手超过10%
|
|
123619
|
+
if (dataID==37 || dataID==36)
|
|
123620
|
+
{
|
|
123621
|
+
var value=null;
|
|
123622
|
+
if (IFrameSplitOperator.IsNumber(data)) value=data;
|
|
123623
|
+
else if (IFrameSplitOperator.IsNonEmptyArray(data) && IFrameSplitOperator.IsNumber(data[0])) value=data[0];
|
|
123624
|
+
else return null;
|
|
123625
|
+
|
|
123626
|
+
if (!this.Data || !IFrameSplitOperator.IsNonEmptyArray(this.Data.Data)) return null;
|
|
123627
|
+
|
|
123628
|
+
var aryData=[];
|
|
123629
|
+
for(var i=0;i<this.Data.Data.length;++i)
|
|
123630
|
+
{
|
|
123631
|
+
var kItem=this.Data.Data[i];
|
|
123632
|
+
aryData[i]=null;
|
|
123633
|
+
if (!kItem || !IFrameSplitOperator.IsNumber(kItem.Vol)) continue;
|
|
123634
|
+
|
|
123635
|
+
aryData[i]=kItem.Vol/value*100.0;// 换手率
|
|
123636
|
+
}
|
|
123637
|
+
|
|
123638
|
+
return aryData;
|
|
123639
|
+
}
|
|
123640
|
+
|
|
123641
|
+
|
|
123642
|
+
return data;
|
|
123643
|
+
}
|
|
123644
|
+
|
|
123645
|
+
this.GetDynaCacheData=function(name)
|
|
123646
|
+
{
|
|
123647
|
+
var data=null;
|
|
123648
|
+
if (MAP_DYNAINFO_SHORTCUT.has(name))
|
|
123649
|
+
{
|
|
123650
|
+
var item=MAP_DYNAINFO_SHORTCUT.get(name);
|
|
123651
|
+
data=this.GetLatestCacheData(item.ID);
|
|
123652
|
+
}
|
|
123653
|
+
return data;
|
|
123309
123654
|
}
|
|
123310
123655
|
|
|
123311
123656
|
this.GetLatestIndexData=function()
|
|
@@ -124381,12 +124726,7 @@ function JSSymbolData(ast,option,jsExecute)
|
|
|
124381
124726
|
{ Url:self.RealtimeApiUrl, Type:'POST' ,
|
|
124382
124727
|
Data:
|
|
124383
124728
|
{
|
|
124384
|
-
|
|
124385
|
-
"symbol": self.Symbol,
|
|
124386
|
-
"start": -1,
|
|
124387
|
-
"count": self.MaxRequestDataCount,
|
|
124388
|
-
"period":this.Period,
|
|
124389
|
-
"right":this.Right
|
|
124729
|
+
symbol: self.Symbol,count: self.MaxRequestDataCount, period:this.Period,right:this.Right
|
|
124390
124730
|
}
|
|
124391
124731
|
},
|
|
124392
124732
|
Self:this,
|
|
@@ -124398,6 +124738,7 @@ function JSSymbolData(ast,option,jsExecute)
|
|
|
124398
124738
|
obj.Request.KLineDataTimeRange={Start:{ Date:this.KLineDateTimeRange.Start.Date}, End:{ Date:this.KLineDateTimeRange.End.Date} };
|
|
124399
124739
|
if (this.IsNumber(this.KLineDateTimeRange.Start.Time)) obj.Request.KLineDataTimeRange.Start.Time=this.KLineDateTimeRange.Start.Time;
|
|
124400
124740
|
if (this.IsNumber(this.KLineDateTimeRange.End.Time)) obj.Request.KLineDataTimeRange.End.Time=this.KLineDateTimeRange.End.Time;
|
|
124741
|
+
obj.Request.Data.dateRange=obj.Request.KLineDataTimeRange;
|
|
124401
124742
|
}
|
|
124402
124743
|
|
|
124403
124744
|
this.NetworkFilter(obj, function(data)
|
|
@@ -126759,13 +127100,14 @@ function JSSymbolData(ast,option,jsExecute)
|
|
|
126759
127100
|
if (readArgument.Value=='') readArgument.Value=this.Symbol; //缺省使用股票代码
|
|
126760
127101
|
|
|
126761
127102
|
var symbol=readArgument.Value;
|
|
127103
|
+
var upperSymbol=symbol.toUpperCase();
|
|
126762
127104
|
|
|
126763
127105
|
//支持 SH60000, SZ000001
|
|
126764
127106
|
//A股后缀小写
|
|
126765
|
-
if (
|
|
126766
|
-
else if (
|
|
126767
|
-
else if (
|
|
126768
|
-
else if (
|
|
127107
|
+
if (upperSymbol.indexOf('.SH')>0) result.Symbol=symbol.replace('.SH', ".sh");
|
|
127108
|
+
else if (upperSymbol.indexOf('.SZ')>0) result.Symbol=symbol.replace('.SZ', ".sz");
|
|
127109
|
+
else if (upperSymbol.indexOf("SH")==0) result.Symbol=symbol.slice(2)+".sh";
|
|
127110
|
+
else if (upperSymbol.indexOf("SZ")==0) result.Symbol=symbol.slice(2)+".sz";
|
|
126769
127111
|
else result.Symbol=symbol;
|
|
126770
127112
|
|
|
126771
127113
|
return true;
|
|
@@ -128290,6 +128632,13 @@ function JSExecute(ast,option)
|
|
|
128290
128632
|
["TR", null], //真实波幅
|
|
128291
128633
|
["AUTOFILTER", null],
|
|
128292
128634
|
|
|
128635
|
+
["DYNA_NOW",null], //DYNA_NOW 现价 DYNAINFO(7) 即时行情数据 没有现价时(比如在开盘前),返回昨收盘价
|
|
128636
|
+
["DYNA_ZAF",null], //DYNA_ZAF 涨幅 DYNAINFO(14) 即时行情数据(沪深京早盘竞价期间使用匹配价的涨幅) 转换成幅度需要乘100
|
|
128637
|
+
["DYNA_LB", null], //DYNA_LB DYNAINFO(17) 量比 即时行情数据
|
|
128638
|
+
["DYNA_ZAS",null], //DYNA_ZAS DYNAINFO(24) 返回涨速 报价界面行情数据 转换成幅度需要乘100
|
|
128639
|
+
["SELLVOL", null], //返回内盘,即DYNAINFO(22) 即时行情数据
|
|
128640
|
+
["BUYVOL", null], //返回外盘,即DYNAINFO(21) 即时行情数据
|
|
128641
|
+
|
|
128293
128642
|
['LARGEINTRDVOL', null], //逐笔买入大单成交量,相当于L2_VOL(0,0)+L2_VOL(1,0),沪深京品种的资金流向,仅日线以上周期,用于特定版本
|
|
128294
128643
|
['LARGEOUTTRDVOL', null], //逐笔卖出大单成交量,相当于L2_VOL(0,1)+L2_VOL(1,1),沪深京品种的资金流向,仅日线以上周期,用于特定版本
|
|
128295
128644
|
["TRADENUM", null], //逐笔成交总单数,沪深京品种的资金流向,仅日线以上周期,用于特定版本
|
|
@@ -128454,6 +128803,8 @@ function JSExecute(ast,option)
|
|
|
128454
128803
|
|
|
128455
128804
|
this.ReadSymbolData=function(name,node)
|
|
128456
128805
|
{
|
|
128806
|
+
if (MAP_DYNAINFO_SHORTCUT.has(name)) return this.SymbolData.GetDynaCacheData(name);
|
|
128807
|
+
|
|
128457
128808
|
switch(name)
|
|
128458
128809
|
{
|
|
128459
128810
|
case 'CLOSE':
|
|
@@ -128521,7 +128872,6 @@ function JSExecute(ast,option)
|
|
|
128521
128872
|
case 'CAPITAL':
|
|
128522
128873
|
case 'EXCHANGE':
|
|
128523
128874
|
case "HSL":
|
|
128524
|
-
|
|
128525
128875
|
case "HYBLOCK":
|
|
128526
128876
|
case "DYBLOCK":
|
|
128527
128877
|
case "GNBLOCK":
|
|
@@ -137980,8 +138330,8 @@ function DownloadFinanceData(obj)
|
|
|
137980
138330
|
{
|
|
137981
138331
|
case 1: //FINANCE(1) 总股本(随时间可能有变化) 股
|
|
137982
138332
|
case 7: //FINANCE(7) 流通股本(随时间可能有变化) 股
|
|
137983
|
-
case "EXCHANGE": //换手率
|
|
137984
138333
|
case "HSL"://换手率
|
|
138334
|
+
case "EXCHANGE": //换手率
|
|
137985
138335
|
this.DownloadHistoryData(id);
|
|
137986
138336
|
break;
|
|
137987
138337
|
case 3:
|
|
@@ -138242,7 +138592,7 @@ function DownloadFinanceData(obj)
|
|
|
138242
138592
|
if (!item.capital) return null;
|
|
138243
138593
|
return { Date:date, Value:item.capital.total };
|
|
138244
138594
|
case 7:
|
|
138245
|
-
case "HSL":
|
|
138595
|
+
case "HSL":
|
|
138246
138596
|
case "EXCHANGE": //换手率 历史流通股本
|
|
138247
138597
|
if (!item.capital) return null;
|
|
138248
138598
|
return { Date:date, Value:item.capital.a };
|
|
@@ -139383,6 +139733,67 @@ function GetBlackStyle()
|
|
|
139383
139733
|
BGColor: { Selected:"rgb(234,85,4)", Default:"rgb(25,25,25)", MoveOn:"rgb(59,59,59)" },
|
|
139384
139734
|
BorderColor:"rgb(60,60,60)",
|
|
139385
139735
|
}
|
|
139736
|
+
},
|
|
139737
|
+
|
|
139738
|
+
StockInfo:
|
|
139739
|
+
{
|
|
139740
|
+
Header:
|
|
139741
|
+
{
|
|
139742
|
+
Name:
|
|
139743
|
+
{
|
|
139744
|
+
//Font:`${20*GetDevicePixelRatio()}px 微软雅黑`,
|
|
139745
|
+
Color:"rgb(255,255,0)",
|
|
139746
|
+
//Margin:{ Left:5, Top:10, Bottom:5, Right:10, YOffset:0 },
|
|
139747
|
+
},
|
|
139748
|
+
|
|
139749
|
+
Symbol:
|
|
139750
|
+
{
|
|
139751
|
+
//Font:`${18*GetDevicePixelRatio()}px 微软雅黑`,
|
|
139752
|
+
Color:"rgb(250,250,250)",
|
|
139753
|
+
//Margin:{ Left:5, Top:10, Bottom:5, Right:5, YOffset:0 },
|
|
139754
|
+
},
|
|
139755
|
+
|
|
139756
|
+
AryCell:
|
|
139757
|
+
[
|
|
139758
|
+
//{ Font:`bold ${16*GetDevicePixelRatio()}px 微软雅黑`, Margin:{ Left:5, Top:5, Bottom:5, Right:15, YOffset:0 } },
|
|
139759
|
+
//{ Font:`${16*GetDevicePixelRatio()}px 微软雅黑`, Margin:{ Left:5, Top:5, Bottom:5, Right:15, YOffset:0 } },
|
|
139760
|
+
//{ Font:`${16*GetDevicePixelRatio()}px 微软雅黑`, Margin:{ Left:5, Top:5, Bottom:5, Right:5, YOffset:0 } }
|
|
139761
|
+
],
|
|
139762
|
+
|
|
139763
|
+
TextColor:"rgb(250,250,250)",
|
|
139764
|
+
|
|
139765
|
+
BottomLine:{ Enable:true, Color:"rgb(60,60,60)"} , //底部分割线
|
|
139766
|
+
},
|
|
139767
|
+
|
|
139768
|
+
BuySell:
|
|
139769
|
+
{
|
|
139770
|
+
//Font:14*GetDevicePixelRatio() +'px 微软雅黑',
|
|
139771
|
+
TitleColor:"rgb(250,250,250)",
|
|
139772
|
+
VolColor:"rgb(250,250,250)",
|
|
139773
|
+
//Margin:{ Left:0, Top:0, Bottom:0, Right:0 },
|
|
139774
|
+
//CellMargin:{ Top:5, Bottom:5, YOffset:0, Left:5, Right:5, YOffset:-5 },
|
|
139775
|
+
BottomLine:{ Enable:true, Color:"rgb(60,60,60)"} , //底部分割线
|
|
139776
|
+
TopLine:{ Enable:false, Color:"rgb(60,60,60)"} , //顶部分割线
|
|
139777
|
+
|
|
139778
|
+
CenterLine:
|
|
139779
|
+
{
|
|
139780
|
+
NoneColor:"rgb(60,60,60)",
|
|
139781
|
+
}
|
|
139782
|
+
},
|
|
139783
|
+
|
|
139784
|
+
Table:
|
|
139785
|
+
{
|
|
139786
|
+
Font:14*GetDevicePixelRatio() +'px 微软雅黑',
|
|
139787
|
+
TitleColor:"rgb(250,250,250)",
|
|
139788
|
+
TextColor:"rgb(250,250,250)",
|
|
139789
|
+
//Margin:{ Left:0, Top:0, Bottom:0, Right:0 },
|
|
139790
|
+
//CellMargin:{ Top:5, Bottom:5, YOffset:0, Left:5, Right:5, YOffset:-5 },
|
|
139791
|
+
},
|
|
139792
|
+
|
|
139793
|
+
UpTextColor:"rgb(238,21,21)", //上涨文字颜色
|
|
139794
|
+
DownTextColor:"rgb(25,158,0)", //下跌文字颜色
|
|
139795
|
+
UnchangeTextColor:"rgb(90,90,90)", //平盘文字颜色
|
|
139796
|
+
BorderColor:'rgb(38,38,41)', //边框线
|
|
139386
139797
|
}
|
|
139387
139798
|
|
|
139388
139799
|
};
|
|
@@ -139451,9 +139862,18 @@ function JSDealChart(divElement)
|
|
|
139451
139862
|
this.OnSize=function()
|
|
139452
139863
|
{
|
|
139453
139864
|
//画布大小通过div获取
|
|
139454
|
-
var height=
|
|
139865
|
+
var height=this.DivElement.offsetHeight;
|
|
139866
|
+
var width=this.DivElement.offsetWidth;
|
|
139867
|
+
if (this.DivElement.style.height && this.DivElement.style.width)
|
|
139868
|
+
{
|
|
139869
|
+
if (this.DivElement.style.height.includes("px"))
|
|
139870
|
+
height=parseInt(this.DivElement.style.height.replace("px",""));
|
|
139871
|
+
if (this.DivElement.style.width.includes("px"))
|
|
139872
|
+
width=parseInt(this.DivElement.style.width.replace("px",""));
|
|
139873
|
+
}
|
|
139874
|
+
|
|
139455
139875
|
this.CanvasElement.height=height;
|
|
139456
|
-
this.CanvasElement.width=
|
|
139876
|
+
this.CanvasElement.width=width;
|
|
139457
139877
|
this.CanvasElement.style.width=this.CanvasElement.width+'px';
|
|
139458
139878
|
this.CanvasElement.style.height=this.CanvasElement.height+'px';
|
|
139459
139879
|
|
|
@@ -139918,8 +140338,8 @@ function JSDealChartContainer(uielement)
|
|
|
139918
140338
|
this.ChangeSymbol=function(symbol, option)
|
|
139919
140339
|
{
|
|
139920
140340
|
this.Symbol=symbol;
|
|
139921
|
-
this.Data=
|
|
139922
|
-
this.SourceData=
|
|
140341
|
+
this.Data={ DataOffset:0, Data:[] }; //分笔数据
|
|
140342
|
+
this.SourceData={DataOffset:0, Data:[] }; //原始分笔数据
|
|
139923
140343
|
|
|
139924
140344
|
var chart=this.ChartPaint[0];
|
|
139925
140345
|
if (chart) chart.Data=null;
|
|
@@ -140566,17 +140986,23 @@ JSDealChartContainer.JsonDataToDealData=function(data)
|
|
|
140566
140986
|
|
|
140567
140987
|
if (item[100]) dealItem.Guid=item[100];
|
|
140568
140988
|
|
|
140569
|
-
|
|
140570
|
-
|
|
140571
|
-
|
|
140572
|
-
|
|
140573
|
-
|
|
140574
|
-
|
|
140575
|
-
|
|
140576
|
-
|
|
140577
|
-
|
|
140578
|
-
|
|
140579
|
-
|
|
140989
|
+
//柱子类型
|
|
140990
|
+
if (item[50]) dealItem.MultiBar1=item[50];
|
|
140991
|
+
if (item[51]) dealItem.MultiBar2=item[51];
|
|
140992
|
+
if (item[52]) dealItem.MultiBar3=item[52];
|
|
140993
|
+
if (item[53]) dealItem.MultiBar4=item[53];
|
|
140994
|
+
|
|
140995
|
+
//10个数值型 101-199
|
|
140996
|
+
if (IFrameSplitOperator.IsNumber(item[101])) dealItem.ReserveNumber1=item[101];
|
|
140997
|
+
if (IFrameSplitOperator.IsNumber(item[102])) dealItem.ReserveNumber2=item[102];
|
|
140998
|
+
if (IFrameSplitOperator.IsNumber(item[103])) dealItem.ReserveNumber3=item[103];
|
|
140999
|
+
if (IFrameSplitOperator.IsNumber(item[104])) dealItem.ReserveNumber4=item[104];
|
|
141000
|
+
if (IFrameSplitOperator.IsNumber(item[105])) dealItem.ReserveNumber5=item[105];
|
|
141001
|
+
if (IFrameSplitOperator.IsNumber(item[106])) dealItem.ReserveNumber6=item[106];
|
|
141002
|
+
if (IFrameSplitOperator.IsNumber(item[107])) dealItem.ReserveNumber7=item[107];
|
|
141003
|
+
if (IFrameSplitOperator.IsNumber(item[108])) dealItem.ReserveNumber8=item[108];
|
|
141004
|
+
if (IFrameSplitOperator.IsNumber(item[109])) dealItem.ReserveNumber9=item[109];
|
|
141005
|
+
if (IFrameSplitOperator.IsNumber(item[110])) dealItem.ReserveNumber10=item[110];
|
|
140580
141006
|
|
|
140581
141007
|
//10个字符型 201-299
|
|
140582
141008
|
if (IFrameSplitOperator.IsString(item[201]) || IFrameSplitOperator.IsObject(item[201])) dealItem.ReserveString1=item[201];
|
|
@@ -140687,13 +141113,14 @@ var DEAL_COLUMN_ID=
|
|
|
140687
141113
|
UPDOWN_ID:5, //涨跌
|
|
140688
141114
|
STRING_TIME_ID:6, //字符串时间
|
|
140689
141115
|
INDEX_ID:7, //序号 从1开始
|
|
140690
|
-
|
|
141116
|
+
|
|
140691
141117
|
CENTER_BAR_ID:9, //中心柱子
|
|
140692
141118
|
CUSTOM_TEXT_ID:10, //自定义文本
|
|
140693
141119
|
|
|
140694
141120
|
SYMBOL_ID:11, //股票代码
|
|
140695
141121
|
NAME_ID:12, //股票名称
|
|
140696
141122
|
|
|
141123
|
+
|
|
140697
141124
|
|
|
140698
141125
|
//预留数值类型 10个
|
|
140699
141126
|
RESERVE_NUMBER1_ID:201, //ReserveNumber1:
|
|
@@ -140718,6 +141145,11 @@ var DEAL_COLUMN_ID=
|
|
|
140718
141145
|
RESERVE_STRING8_ID:308,
|
|
140719
141146
|
RESERVE_STRING9_ID:309,
|
|
140720
141147
|
RESERVE_STRING10_ID:310,
|
|
141148
|
+
|
|
141149
|
+
MULTI_BAR_ID:50, //多颜色柱子
|
|
141150
|
+
MULTI_BAR2_ID:51,
|
|
141151
|
+
MULTI_BAR3_ID:52,
|
|
141152
|
+
MULTI_BAR4_ID:53
|
|
140721
141153
|
}
|
|
140722
141154
|
|
|
140723
141155
|
var MAP_DEAL_COLUMN_FIELD=new Map(
|
|
@@ -140726,6 +141158,11 @@ var MAP_DEAL_COLUMN_FIELD=new Map(
|
|
|
140726
141158
|
[DEAL_COLUMN_ID.NAME_ID, "Name"],
|
|
140727
141159
|
[DEAL_COLUMN_ID.PRICE_ID, "Price"],
|
|
140728
141160
|
|
|
141161
|
+
[DEAL_COLUMN_ID.MULTI_BAR_ID, "MultiBar1"],
|
|
141162
|
+
[DEAL_COLUMN_ID.MULTI_BAR2_ID, "MultiBar2"],
|
|
141163
|
+
[DEAL_COLUMN_ID.MULTI_BAR3_ID, "MultiBar3"],
|
|
141164
|
+
[DEAL_COLUMN_ID.MULTI_BAR4_ID, "MultiBar4"],
|
|
141165
|
+
|
|
140729
141166
|
[DEAL_COLUMN_ID.RESERVE_NUMBER1_ID,"ReserveNumber1"],
|
|
140730
141167
|
[DEAL_COLUMN_ID.RESERVE_NUMBER2_ID,"ReserveNumber2"],
|
|
140731
141168
|
[DEAL_COLUMN_ID.RESERVE_NUMBER3_ID,"ReserveNumber3"],
|
|
@@ -140882,7 +141319,7 @@ function ChartDealList()
|
|
|
140882
141319
|
|
|
140883
141320
|
if (item.ChartTooltip) colItem.ChartTooltip={ Enable:item.ChartTooltip.Enable, Type:item.ChartTooltip.Type }; //图形提示信息
|
|
140884
141321
|
|
|
140885
|
-
if (item.Type==DEAL_COLUMN_ID.
|
|
141322
|
+
if (item.Type==DEAL_COLUMN_ID.CENTER_BAR_ID)
|
|
140886
141323
|
{
|
|
140887
141324
|
if (!IFrameSplitOperator.IsNumber(item.DataIndex)) continue;
|
|
140888
141325
|
colItem.DataIndex=item.DataIndex; //柱子数据所在原始数据索引列
|
|
@@ -140895,6 +141332,8 @@ function ChartDealList()
|
|
|
140895
141332
|
{
|
|
140896
141333
|
if (item.Format) colItem.Format=item.Format; //数据格式化设置{ Type:1=原始 2=千分位分割 3=万亿转换, ExFloatPrecision:万亿转换以后的小数位数 }
|
|
140897
141334
|
if (IFrameSplitOperator.IsNumber(item.ColorType)) colItem.ColorType=item.ColorType; //0=默认 1=(>0, =0, <0) 2=(>=0, <0)
|
|
141335
|
+
if (IFrameSplitOperator.IsNumber(item.FloatPrecision)) colItem.FloatPrecision=item.FloatPrecision;
|
|
141336
|
+
if (item.StringFormat) colItem.StringFormat=item.StringFormat; //"{0}%" 输出增加固定字符
|
|
140898
141337
|
}
|
|
140899
141338
|
|
|
140900
141339
|
this.Column.push(colItem);
|
|
@@ -140914,7 +141353,7 @@ function ChartDealList()
|
|
|
140914
141353
|
{ Type:DEAL_COLUMN_ID.STRING_TIME_ID, Title:"时间", TextAlign:"center", Width:null, TextColor:g_JSChartResource.DealList.FieldColor.Time, MaxText:"88:88:88" },
|
|
140915
141354
|
{ Type:DEAL_COLUMN_ID.INDEX_ID, Title:"序号", TextAlign:"center", Width:null, TextColor:g_JSChartResource.DealList.FieldColor.Index, MaxText:"88888" },
|
|
140916
141355
|
|
|
140917
|
-
|
|
141356
|
+
|
|
140918
141357
|
{ Type:DEAL_COLUMN_ID.CENTER_BAR_ID, Title:"柱子2", TextAlign:"center", Width:null, TextColor:g_JSChartResource.DealList.FieldColor.BarTitle, MaxText:"888888" },
|
|
140919
141358
|
{ Type:DEAL_COLUMN_ID.CUSTOM_TEXT_ID, Title:"自定义", TextAlign:"center", Width:null, TextColor:g_JSChartResource.DealList.FieldColor.Text, MaxText:"擎擎擎擎擎" },
|
|
140920
141359
|
|
|
@@ -140942,6 +141381,11 @@ function ChartDealList()
|
|
|
140942
141381
|
{ Type:DEAL_COLUMN_ID.RESERVE_STRING8_ID, Title:"文字8", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"擎擎擎擎擎擎" },
|
|
140943
141382
|
{ Type:DEAL_COLUMN_ID.RESERVE_STRING9_ID, Title:"文字9", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"擎擎擎擎擎擎" },
|
|
140944
141383
|
{ Type:DEAL_COLUMN_ID.RESERVE_STRING10_ID, Title:"文字10", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"擎擎擎擎擎擎" },
|
|
141384
|
+
|
|
141385
|
+
{ Type:DEAL_COLUMN_ID.MULTI_BAR_ID, Title:"柱子", TextAlign:"center", Width:null, TextColor:g_JSChartResource.DealList.FieldColor.BarTitle, MaxText:"888888" },
|
|
141386
|
+
{ Type:DEAL_COLUMN_ID.MULTI_BAR2_ID, Title:"柱子2", TextAlign:"center", Width:null, TextColor:g_JSChartResource.DealList.FieldColor.BarTitle, MaxText:"888888" },
|
|
141387
|
+
{ Type:DEAL_COLUMN_ID.MULTI_BAR3_ID, Title:"柱子3", TextAlign:"center", Width:null, TextColor:g_JSChartResource.DealList.FieldColor.BarTitle, MaxText:"888888" },
|
|
141388
|
+
{ Type:DEAL_COLUMN_ID.MULTI_BAR4_ID, Title:"柱子4", TextAlign:"center", Width:null, TextColor:g_JSChartResource.DealList.FieldColor.BarTitle, MaxText:"888888" },
|
|
140945
141389
|
|
|
140946
141390
|
];
|
|
140947
141391
|
|
|
@@ -141282,7 +141726,7 @@ function ChartDealList()
|
|
|
141282
141726
|
{
|
|
141283
141727
|
text=(dataIndex+1).toString();
|
|
141284
141728
|
}
|
|
141285
|
-
else if (item.Type
|
|
141729
|
+
else if (this.IsMulitBar(item.Type))
|
|
141286
141730
|
{
|
|
141287
141731
|
var rtItem={Left:left, Top:top, Width:itemWidth, Height:this.RowHeight};
|
|
141288
141732
|
this.DrawMultiBar(item, data, rtItem);
|
|
@@ -141383,6 +141827,11 @@ function ChartDealList()
|
|
|
141383
141827
|
break;
|
|
141384
141828
|
}
|
|
141385
141829
|
}
|
|
141830
|
+
|
|
141831
|
+
if (column.StringFormat && text)
|
|
141832
|
+
{
|
|
141833
|
+
text=column.StringFormat.replace("{0}", text);
|
|
141834
|
+
}
|
|
141386
141835
|
|
|
141387
141836
|
drawInfo.Text=text;
|
|
141388
141837
|
}
|
|
@@ -141504,8 +141953,10 @@ function ChartDealList()
|
|
|
141504
141953
|
|
|
141505
141954
|
this.DrawMultiBar=function(colunmInfo, data, rtItem)
|
|
141506
141955
|
{
|
|
141507
|
-
|
|
141508
|
-
|
|
141956
|
+
var fieldName=MAP_DEAL_COLUMN_FIELD.get(colunmInfo.Type);
|
|
141957
|
+
if (!data || !fieldName) return;
|
|
141958
|
+
|
|
141959
|
+
var barData=data[fieldName]; //{ Value:[0.4,0,2], Color:[0,1] };
|
|
141509
141960
|
if (!barData) return false;
|
|
141510
141961
|
if (!IFrameSplitOperator.IsNonEmptyArray(barData.Value)) return false;
|
|
141511
141962
|
|
|
@@ -141693,6 +142144,16 @@ function ChartDealList()
|
|
|
141693
142144
|
return ARARY_TYPE.includes(value);
|
|
141694
142145
|
}
|
|
141695
142146
|
|
|
142147
|
+
this.IsMulitBar=function(value)
|
|
142148
|
+
{
|
|
142149
|
+
var ARARY_TYPE=
|
|
142150
|
+
[
|
|
142151
|
+
DEAL_COLUMN_ID.MULTI_BAR_ID,DEAL_COLUMN_ID.MULTI_BAR2_ID,DEAL_COLUMN_ID.MULTI_BAR3_ID,DEAL_COLUMN_ID.MULTI_BAR4_ID,
|
|
142152
|
+
];
|
|
142153
|
+
|
|
142154
|
+
return ARARY_TYPE.includes(value);
|
|
142155
|
+
}
|
|
142156
|
+
|
|
141696
142157
|
this.IsReserveNumber=function(value)
|
|
141697
142158
|
{
|
|
141698
142159
|
var ARARY_TYPE=
|
|
@@ -147022,7 +147483,15 @@ function ChartReport()
|
|
|
147022
147483
|
{
|
|
147023
147484
|
CloseColor:g_JSChartResource.Report.CloseLine.CloseColor,
|
|
147024
147485
|
YCloseColor:g_JSChartResource.Report.CloseLine.YCloseColor,
|
|
147025
|
-
AreaColor:g_JSChartResource.Report.CloseLine.AreaColor
|
|
147486
|
+
AreaColor:g_JSChartResource.Report.CloseLine.AreaColor,
|
|
147487
|
+
|
|
147488
|
+
UpColor:g_JSChartResource.Report.CloseLine.UpColor,
|
|
147489
|
+
DownColor:g_JSChartResource.Report.CloseLine.DownColor,
|
|
147490
|
+
UnchangeColor:g_JSChartResource.Report.CloseLine.UnchangeColor,
|
|
147491
|
+
|
|
147492
|
+
UpAreaColor:g_JSChartResource.Report.CloseLine.UpAreaColor,
|
|
147493
|
+
DownAreaColor:g_JSChartResource.Report.CloseLine.DownAreaColor,
|
|
147494
|
+
UnchangeAreaColor:g_JSChartResource.Report.CloseLine.UnchangeAreaColor,
|
|
147026
147495
|
}
|
|
147027
147496
|
|
|
147028
147497
|
//K线配置
|
|
@@ -147333,6 +147802,7 @@ function ChartReport()
|
|
|
147333
147802
|
else if (item.Type==REPORT_COLUMN_ID.CLOSE_LINE_ID)
|
|
147334
147803
|
{
|
|
147335
147804
|
if (IFrameSplitOperator.IsBool(item.IsDrawArea)) colItem.IsDrawArea=item.IsDrawArea;
|
|
147805
|
+
if (IFrameSplitOperator.IsNumber(item.LineColorType)) colItem.LineColorType=item.LineColorType;
|
|
147336
147806
|
}
|
|
147337
147807
|
else if(item.Type==REPORT_COLUMN_ID.TIME_ID)
|
|
147338
147808
|
{
|
|
@@ -147461,7 +147931,7 @@ function ChartReport()
|
|
|
147461
147931
|
{ Type:REPORT_COLUMN_ID.VOL_IN_ID, Title:"内盘", TextAlign:"right", TextColor:g_JSChartResource.Report.DownTextColor, Width:null, MaxText:"8888.8擎" },
|
|
147462
147932
|
{ Type:REPORT_COLUMN_ID.VOL_OUT_ID, Title:"外盘", TextAlign:"right", TextColor:g_JSChartResource.Report.UpTextColor, Width:null, MaxText:"8888.8擎" },
|
|
147463
147933
|
|
|
147464
|
-
{ Type:REPORT_COLUMN_ID.CLOSE_LINE_ID, Title:"走势", TextAlign:"center", TextColor:g_JSChartResource.Report.CloseLineColor, Width:null, MaxText:"88888.88888" },
|
|
147934
|
+
{ Type:REPORT_COLUMN_ID.CLOSE_LINE_ID, Title:"走势", TextAlign:"center", TextColor:g_JSChartResource.Report.CloseLineColor, Width:null, MaxText:"88888.88888", LineColorType:0 },
|
|
147465
147935
|
|
|
147466
147936
|
|
|
147467
147937
|
{ Type:REPORT_COLUMN_ID.BUY_VOL_ID, Title:"买量", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Vol, Width:null, MaxText:"8888.8擎" },
|
|
@@ -150500,8 +150970,7 @@ function ChartReport()
|
|
|
150500
150970
|
this.Canvas.setLineDash([]);
|
|
150501
150971
|
}
|
|
150502
150972
|
|
|
150503
|
-
|
|
150504
|
-
else this.Canvas.strokeStyle=this.CloseLineConfig.CloseColor;
|
|
150973
|
+
this.Canvas.strokeStyle=this.GetCloseLineColor(lineData, column);
|
|
150505
150974
|
|
|
150506
150975
|
var bFirstPoint=true;
|
|
150507
150976
|
var ptFirst={}; //第1个点
|
|
@@ -150539,8 +151008,7 @@ function ChartReport()
|
|
|
150539
151008
|
this.Canvas.lineTo(x,yCenter);
|
|
150540
151009
|
this.Canvas.lineTo(ptFirst.X,yCenter);
|
|
150541
151010
|
this.Canvas.closePath();
|
|
150542
|
-
var areaColor=this.
|
|
150543
|
-
if (lineData.AreaColor) areaColor=lineData.AreaColor;
|
|
151011
|
+
var areaColor=this.GetCloseAreaColor(lineData, column);
|
|
150544
151012
|
this.SetFillStyle(areaColor,left,top, left,bottom);
|
|
150545
151013
|
this.Canvas.fill();
|
|
150546
151014
|
}
|
|
@@ -150549,6 +151017,48 @@ function ChartReport()
|
|
|
150549
151017
|
this.Canvas.restore();
|
|
150550
151018
|
}
|
|
150551
151019
|
|
|
151020
|
+
this.GetCloseLineColor=function(lineData, column)
|
|
151021
|
+
{
|
|
151022
|
+
var color=this.CloseLineConfig.CloseColor;
|
|
151023
|
+
if (lineData.Color)
|
|
151024
|
+
{
|
|
151025
|
+
color=lineData.Color;
|
|
151026
|
+
}
|
|
151027
|
+
else if (column.LineColorType==1)
|
|
151028
|
+
{
|
|
151029
|
+
var color= this.CloseLineConfig.UnchangeColor;
|
|
151030
|
+
if (IFrameSplitOperator.IsNumber(lineData.YClose) && IFrameSplitOperator.IsNonEmptyArray(lineData.Data) && IFrameSplitOperator.IsNumber(lineData.Data[ lineData.Data.length -1 ]))
|
|
151031
|
+
{
|
|
151032
|
+
var lastValue=lineData.Data[ lineData.Data.length -1 ];
|
|
151033
|
+
if (lastValue>lineData.YClose) color=this.CloseLineConfig.UpColor;
|
|
151034
|
+
else if (lastValue<lineData.YClose) color=this.CloseLineConfig.DownColor;
|
|
151035
|
+
}
|
|
151036
|
+
}
|
|
151037
|
+
|
|
151038
|
+
return color;
|
|
151039
|
+
}
|
|
151040
|
+
|
|
151041
|
+
this.GetCloseAreaColor=function(lineData, column)
|
|
151042
|
+
{
|
|
151043
|
+
var color=this.CloseLineConfig.AreaColor;
|
|
151044
|
+
if (lineData.AreaColor)
|
|
151045
|
+
{
|
|
151046
|
+
color=lineData.AreaColor;
|
|
151047
|
+
}
|
|
151048
|
+
else if (column.LineColorType==1)
|
|
151049
|
+
{
|
|
151050
|
+
var color= this.CloseLineConfig.UnchangeAreaColor;
|
|
151051
|
+
if (IFrameSplitOperator.IsNumber(lineData.YClose) && IFrameSplitOperator.IsNonEmptyArray(lineData.Data) && IFrameSplitOperator.IsNumber(lineData.Data[ lineData.Data.length -1 ]))
|
|
151052
|
+
{
|
|
151053
|
+
var lastValue=lineData.Data[ lineData.Data.length -1 ];
|
|
151054
|
+
if (lastValue>lineData.YClose) color=this.CloseLineConfig.UpAreaColor;
|
|
151055
|
+
else if (lastValue<lineData.YClose) color=this.CloseLineConfig.DownAreaColor;
|
|
151056
|
+
}
|
|
151057
|
+
}
|
|
151058
|
+
|
|
151059
|
+
return color;
|
|
151060
|
+
}
|
|
151061
|
+
|
|
150552
151062
|
//klineData={ Data:[ open, high, low, close ] }
|
|
150553
151063
|
this.DrawKLine=function(klineData, column, rtItem, data)
|
|
150554
151064
|
{
|
|
@@ -150618,7 +151128,31 @@ function ChartReport()
|
|
|
150618
151128
|
var distanceWidth=this.KLineConfig.DistanceWidth;
|
|
150619
151129
|
var xOffset=left;
|
|
150620
151130
|
var x, xLeft, xRight;
|
|
151131
|
+
var drawCount=0;
|
|
150621
151132
|
for(var i=0;i<aryKLine.length;++i,xOffset+=(dataWidth+distanceWidth))
|
|
151133
|
+
{
|
|
151134
|
+
xLeft=xOffset;
|
|
151135
|
+
xRight=xOffset+dataWidth;
|
|
151136
|
+
x=xLeft+(xRight-xLeft)/2;
|
|
151137
|
+
if (xRight>right) break;
|
|
151138
|
+
drawCount++;
|
|
151139
|
+
}
|
|
151140
|
+
|
|
151141
|
+
var xOffset=left;
|
|
151142
|
+
var startIndex=0;
|
|
151143
|
+
if (aryKLine.length>drawCount)
|
|
151144
|
+
{
|
|
151145
|
+
high=null,low=null;
|
|
151146
|
+
startIndex=aryKLine.length-drawCount;
|
|
151147
|
+
for(var i=startIndex;i<aryKLine.length;++i)
|
|
151148
|
+
{
|
|
151149
|
+
var item=aryKLine[i];
|
|
151150
|
+
if (high==null || high<item.High) high=item.High;
|
|
151151
|
+
if (low==null || low>item.Low) low=item.Low;
|
|
151152
|
+
}
|
|
151153
|
+
}
|
|
151154
|
+
|
|
151155
|
+
for(var i=startIndex;i<aryKLine.length;++i,xOffset+=(dataWidth+distanceWidth))
|
|
150622
151156
|
{
|
|
150623
151157
|
var item=aryKLine[i];
|
|
150624
151158
|
xLeft=xOffset;
|
|
@@ -150706,7 +151240,11 @@ function ChartReport()
|
|
|
150706
151240
|
}
|
|
150707
151241
|
else
|
|
150708
151242
|
{
|
|
150709
|
-
|
|
151243
|
+
this.Canvas.beginPath();
|
|
151244
|
+
var xBar=x;
|
|
151245
|
+
this.Canvas.moveTo(ToFixedPoint(xBar),ToFixedPoint(yBarTop));
|
|
151246
|
+
this.Canvas.lineTo(ToFixedPoint(xBar),ToFixedPoint(yBarBottom));
|
|
151247
|
+
this.Canvas.stroke();
|
|
150710
151248
|
}
|
|
150711
151249
|
}
|
|
150712
151250
|
|
|
@@ -152272,17 +152810,17 @@ function JSTReportChart(divElement)
|
|
|
152272
152810
|
this.JSChartContainer; //表格控件
|
|
152273
152811
|
this.ResizeListener; //大小变动监听
|
|
152274
152812
|
|
|
152275
|
-
|
|
152276
|
-
|
|
152277
|
-
|
|
152278
|
-
|
|
152279
|
-
|
|
152280
|
-
|
|
152281
|
-
|
|
152282
|
-
|
|
152283
|
-
|
|
152284
|
-
|
|
152285
|
-
|
|
152813
|
+
//h5 canvas
|
|
152814
|
+
this.CanvasElement=document.createElement("canvas");
|
|
152815
|
+
this.CanvasElement.className='jstreport-drawing';
|
|
152816
|
+
this.CanvasElement.id=Guid();
|
|
152817
|
+
this.CanvasElement.setAttribute("tabindex",0);
|
|
152818
|
+
if (this.CanvasElement.style) this.CanvasElement.style.outline='none';
|
|
152819
|
+
if(divElement.hasChildNodes())
|
|
152820
|
+
{
|
|
152821
|
+
JSConsole.Chart.Log("[JSTReportChart::JSReportChart] divElement hasChildNodes", divElement.childNodes);
|
|
152822
|
+
}
|
|
152823
|
+
divElement.appendChild(this.CanvasElement);
|
|
152286
152824
|
|
|
152287
152825
|
|
|
152288
152826
|
this.OnSize=function()
|
|
@@ -167609,7 +168147,7 @@ function HQChartScriptWorker()
|
|
|
167609
168147
|
|
|
167610
168148
|
|
|
167611
168149
|
|
|
167612
|
-
var HQCHART_VERSION="1.1.
|
|
168150
|
+
var HQCHART_VERSION="1.1.15427";
|
|
167613
168151
|
|
|
167614
168152
|
function PrintHQChartVersion()
|
|
167615
168153
|
{
|