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.
@@ -12688,6 +12688,13 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
12688
12688
  return false;
12689
12689
  }
12690
12690
 
12691
+ this.IsHScreenModel=function()
12692
+ {
12693
+ if (this.ClassName=="KLineChartHScreenContainer" || this.ClassName=="MinuteChartHScreenContainer") return true;
12694
+
12695
+ return false;
12696
+ }
12697
+
12691
12698
  this.UpdatePointByCursorIndex=function(type) //type 1=根据十字光标更新 2=强制取消十字光标
12692
12699
  {
12693
12700
  if (type==1) //根据十字光标更新
@@ -12708,8 +12715,18 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
12708
12715
  pt.X=null;
12709
12716
  }
12710
12717
  }
12711
- this.LastPoint.X=pt.X;
12712
- this.LastPoint.Y=pt.Y;
12718
+
12719
+ if (this.IsHScreenModel())
12720
+ {
12721
+ this.LastPoint.X=pt.Y;
12722
+ this.LastPoint.Y=pt.X;
12723
+ }
12724
+ else
12725
+ {
12726
+ this.LastPoint.X=pt.X;
12727
+ this.LastPoint.Y=pt.Y;
12728
+ }
12729
+
12713
12730
  }
12714
12731
  else if (type==2)
12715
12732
  {
@@ -12729,8 +12746,18 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
12729
12746
  pt.Y=this.Frame.GetYFromData(close);
12730
12747
  this.LastPoint.FrameID=0;
12731
12748
  }
12732
- this.LastPoint.X=pt.X;
12733
- this.LastPoint.Y=pt.Y;
12749
+
12750
+ if (this.IsHScreenModel())
12751
+ {
12752
+ this.LastPoint.X=pt.Y;
12753
+ this.LastPoint.Y=pt.X;
12754
+ }
12755
+ else
12756
+ {
12757
+ this.LastPoint.X=pt.X;
12758
+ this.LastPoint.Y=pt.Y;
12759
+ }
12760
+
12734
12761
  }
12735
12762
  }
12736
12763
 
@@ -32133,6 +32160,12 @@ function ChartKLine()
32133
32160
  TextColor: g_JSChartResource.DaySummaryKLine.TextColor,
32134
32161
  LeftMargin:g_JSChartResource.DaySummaryKLine.LeftMargin,
32135
32162
  }
32163
+
32164
+ this.PriceGapStyple=
32165
+ {
32166
+ Line:{ Color:g_JSChartResource.PriceGapStyple.Line.Color },
32167
+ Text:{ Color:g_JSChartResource.PriceGapStyple.Text.Color, Font: g_JSChartResource.PriceGapStyple.Text.Font }
32168
+ };
32136
32169
 
32137
32170
  }
32138
32171
 
@@ -60137,6 +60170,11 @@ IFrameSplitOperator.RemoveMarketSuffix=function(symbol)
60137
60170
  return symbol;
60138
60171
  }
60139
60172
 
60173
+ IFrameSplitOperator.IsNumberString=function(strValue)
60174
+ {
60175
+ return /^\d+$/.test(strValue);
60176
+ }
60177
+
60140
60178
  function FrameSplitKLinePriceY()
60141
60179
  {
60142
60180
  this.newMethod=IFrameSplitOperator; //派生
@@ -83567,6 +83605,13 @@ function JSChartResource()
83567
83605
  CloseColor:"rgb(30,144,255)",
83568
83606
  YCloseColor:"rgba(105,105,105,0.5)", //昨收线
83569
83607
  AreaColor:'rgba(0,191,255,0.2)',
83608
+
83609
+ UpColor:"rgb(255,0,0)",
83610
+ UpAreaColor:"rgba(255,0,0,0.5)",
83611
+ DownColor:"rgb(0,128,0)",
83612
+ DownAreaColor:"rgba(0,128,0,0.5)",
83613
+ UnchangeColor:'rgb(90,90,90)',
83614
+ UnchangeAreaColor:'rgba(90,90,90,0.5)',
83570
83615
  },
83571
83616
 
83572
83617
  KLine:
@@ -83800,6 +83845,70 @@ function JSChartResource()
83800
83845
  }
83801
83846
  }
83802
83847
 
83848
+ //买卖5档
83849
+ this.StockInfo=
83850
+ {
83851
+ Header:
83852
+ {
83853
+ Name:
83854
+ {
83855
+ Font:`${20*GetDevicePixelRatio()}px 微软雅黑`,
83856
+ Color:"rgb(90,90,90)",
83857
+ Margin:{ Left:5, Top:10, Bottom:5, Right:5, YOffset:0 },
83858
+ },
83859
+
83860
+ Symbol:
83861
+ {
83862
+ Font:`${18*GetDevicePixelRatio()}px 微软雅黑`,
83863
+ Color:"rgb(90,90,90)",
83864
+ Margin:{ Left:5, Top:10, Bottom:5, Right:5, YOffset:0 },
83865
+ },
83866
+
83867
+ AryCell:
83868
+ [
83869
+ { Font:`bold ${16*GetDevicePixelRatio()}px 微软雅黑`,Color:"rgb(90,90,90)", Margin:{ Left:5, Top:5, Bottom:5, Right:5, YOffset:0 } },
83870
+ { Font:`${16*GetDevicePixelRatio()}px 微软雅黑`,Color:"rgb(90,90,90)", Margin:{ Left:5, Top:5, Bottom:5, Right:5, YOffset:0 } },
83871
+ { Font:`${16*GetDevicePixelRatio()}px 微软雅黑`,Color:"rgb(90,90,90)", Margin:{ Left:5, Top:5, Bottom:5, Right:5, YOffset:0 } }
83872
+ ],
83873
+
83874
+ TextColor:"rgb(100,100,10)",
83875
+
83876
+ BottomLine:{ Enable:true, Color:"rgb(192,192,192)"} , //底部分割线
83877
+ },
83878
+
83879
+ BuySell:
83880
+ {
83881
+ Font:14*GetDevicePixelRatio() +'px 微软雅黑',
83882
+ TitleColor:"rgb(90,90,90)",
83883
+ VolColor:"rgb(90,90,90)",
83884
+ Margin:{ Left:0, Top:0, Bottom:0, Right:0 },
83885
+ CellMargin:{ Top:5, Bottom:5, Left:5, Right:5, YOffset:0 },
83886
+ BottomLine:{ Enable:true, Color:"rgb(192,192,192)"}, //底部分割线
83887
+ TopLine:{ Enable:false, Color:"rgb(192,192,192)"}, //底部分割线
83888
+
83889
+ CenterLine:
83890
+ {
83891
+ BuyColor:"rgb(228, 164, 54)",SellColor:"rgb(61, 147, 219)", NoneColor:"rgb(90,90,90)",
83892
+ Width:2*GetDevicePixelRatio()
83893
+ }
83894
+ },
83895
+
83896
+ Table:
83897
+ {
83898
+ Font:14*GetDevicePixelRatio() +'px 微软雅黑',
83899
+ TitleColor:"rgb(90,90,90)",
83900
+ TextColor:"rgb(90,90,90)",
83901
+ Margin:{ Left:0, Top:0, Bottom:0, Right:0 },
83902
+ CellMargin:{ Top:5, Bottom:5, Left:5, Right:5, YOffset:0 },
83903
+ },
83904
+
83905
+ UpTextColor:"rgb(238,21,21)", //上涨文字颜色
83906
+ DownTextColor:"rgb(25,158,0)", //下跌文字颜色
83907
+ UnchangeTextColor:"rgb(90,90,90)", //平盘文字颜色
83908
+
83909
+ BorderColor:"rgb(192,192,192)"
83910
+ }
83911
+
83803
83912
 
83804
83913
  //自定义风格
83805
83914
  this.SetStyle=function(style)
@@ -84768,7 +84877,129 @@ function JSChartResource()
84768
84877
  if (style.KLineCountDownPaint) this.SetKLineCountDownPaint(style.KLineCountDownPaint);
84769
84878
 
84770
84879
  if (style.SmallFloatTooltipV2) this.SetSmallFloatTooltipV2(style.SmallFloatTooltipV2);
84880
+ if (style.StockInfo) this.SetStockInfo(style.StockInfo);
84881
+
84882
+ }
84883
+
84884
+ this.SetStockInfo=function(style)
84885
+ {
84886
+ var dest=this.StockInfo;
84887
+
84888
+ if (style.BuySell)
84889
+ {
84890
+ var item=style.BuySell;
84891
+ if (item.Font) dest.BuySell.Font=item.Font;
84892
+ if (item.TitleColor) dest.BuySell.TitleColor=item.TitleColor;
84893
+ if (item.VolColor) dest.BuySell.VolColor=item.VolColor;
84894
+ CopyMarginConfig(dest.BuySell.Margin, item.Margin);
84895
+ if (item.CellMargin)
84896
+ {
84897
+ var subItem=item.CellMargin;
84898
+ CopyMarginConfig(dest.BuySell.CellMargin, subItem);
84899
+ if (IFrameSplitOperator.IsNumber(subItem.YOffset)) dest.BuySell.CellMargin.YOffset=subItem.YOffset
84900
+ }
84901
+
84902
+ if (item.BottomLine)
84903
+ {
84904
+ var subItem=item.BottomLine;
84905
+ if (subItem.Color) dest.BuySell.BottomLine.Color=subItem.Color;
84906
+ if (IFrameSplitOperator.IsBool(subItem.Enable)) dest.BuySell.BottomLine.Enable=subItem.Enable;
84907
+ }
84908
+
84909
+ if (item.TopLine)
84910
+ {
84911
+ var subItem=item.TopLine;
84912
+ if (subItem.Color) dest.BuySell.TopLine.Color=subItem.Color;
84913
+ if (IFrameSplitOperator.IsBool(subItem.Enable)) dest.BuySell.TopLine.Enable=subItem.Enable;
84914
+ }
84915
+
84916
+ if (item.CenterLine)
84917
+ {
84918
+ var subItem=item.CenterLine;
84919
+ if (subItem.BuyColor) dest.BuySell.CenterLine.BuyColor=subItem.BuyColor;
84920
+ if (subItem.SellColor) dest.BuySell.CenterLine.SellColor=subItem.SellColor;
84921
+ if (subItem.NoneColor) dest.BuySell.CenterLine.NoneColor=subItem.NoneColor;
84922
+ if (IFrameSplitOperator.IsNumber(subItem.Width)) dest.BuySell.CenterLine.Width=subItem.Width;
84923
+ }
84924
+
84925
+
84926
+ }
84927
+
84928
+ if (style.Table)
84929
+ {
84930
+ var item=style.Table;
84931
+ if (item.Font) dest.Table.Font=item.Font;
84932
+ if (item.TitleColor) dest.Table.TitleColor=item.TitleColor;
84933
+ if (item.TextColor) dest.Table.TextColor=item.TextColor;
84934
+ CopyMarginConfig(dest.Table.Margin, item.Margin);
84935
+ if (item.CellMargin)
84936
+ {
84937
+ var subItem=item.CellMargin;
84938
+ CopyMarginConfig(dest.Table.CellMargin, subItem);
84939
+ if (IFrameSplitOperator.IsNumber(subItem.YOffset)) dest.Table.CellMargin.YOffset=subItem.YOffset
84940
+ }
84941
+ }
84771
84942
 
84943
+ if (style.Header)
84944
+ {
84945
+ var item=style.Header;
84946
+ if (item.Font) dest.Header.Font=item.Font;
84947
+ if (item.TextColor) dest.Header.TextColor=item.TextColor;
84948
+ if (item.Name)
84949
+ {
84950
+ var subItem=item.Name;
84951
+ if (subItem.Font) dest.Header.Name.Font=subItem.Font;
84952
+ if (subItem.Color) dest.Header.Name.Color=subItem.Color;
84953
+ if (subItem.Margin)
84954
+ {
84955
+ var margin=subItem.Margin;
84956
+ CopyMarginConfig(dest.Header.Name.Margin, margin);
84957
+ if (IFrameSplitOperator.IsNumber(margin.YOffset)) dest.Header.Name.Margin.YOffset=margin.YOffset
84958
+ }
84959
+ }
84960
+
84961
+ if (item.Symbol)
84962
+ {
84963
+ var subItem=item.Symbol;
84964
+ if (subItem.Font) dest.Header.Symbol.Font=subItem.Font;
84965
+ if (subItem.Color) dest.Header.Symbol.Color=subItem.Color;
84966
+ if (subItem.Margin)
84967
+ {
84968
+ var margin=subItem.Margin;
84969
+ CopyMarginConfig(dest.Header.Symbol.Margin, margin);
84970
+ if (IFrameSplitOperator.IsNumber(margin.YOffset)) dest.Header.Symbol.Margin.YOffset=margin.YOffset
84971
+ }
84972
+ }
84973
+
84974
+ if (IFrameSplitOperator.IsNonEmptyArray(item.AryCell))
84975
+ {
84976
+ for(var i=0;i<item.AryCell.length;++i)
84977
+ {
84978
+ var subItem=item.AryCell[i];
84979
+ if (!dest.Header.AryCell[i]) dest.Header.AryCell[i]={ };
84980
+ var subDest=dest.Header.AryCell[i];
84981
+ if (subItem.Font) subDest.Font=subItem.Font;
84982
+ if (subItem.Margin)
84983
+ {
84984
+ var margin=subItem.Margin;
84985
+ CopyMarginConfig(subDest.Margin, margin);
84986
+ if (IFrameSplitOperator.IsNumber(margin.YOffset)) subDest.YOffset=margin.YOffset
84987
+ }
84988
+ }
84989
+ }
84990
+
84991
+ if (item.BottomLine)
84992
+ {
84993
+ var subItem=item.BottomLine;
84994
+ if (subItem.Color) dest.Header.BottomLine.Color=subItem.Color;
84995
+ if (IFrameSplitOperator.IsBool(subItem.Enable)) dest.Header.BottomLine.Enable=subItem.Enable;
84996
+ }
84997
+ }
84998
+
84999
+ if (style.UpTextColor) dest.UpTextColor=style.UpTextColor;
85000
+ if (style.DownTextColor) dest.DownTextColor=style.DownTextColor;
85001
+ if (style.UnchangeTextColor) dest.UnchangeTextColor=style.UnchangeTextColor;
85002
+ if (style.BorderColor) dest.BorderColor=style.BorderColor;
84772
85003
  }
84773
85004
 
84774
85005
  this.SetSmallFloatTooltipV2=function(style)
@@ -84965,6 +85196,13 @@ function JSChartResource()
84965
85196
  if (closeLine.CloseColor) this.Report.CloseLine.CloseColor=closeLine.CloseColor;
84966
85197
  if (closeLine.YCloseColor) this.Report.CloseLine.YCloseColor=closeLine.YCloseColor;
84967
85198
  if (closeLine.AreaColor) this.Report.CloseLine.AreaColor=closeLine.AreaColor;
85199
+
85200
+ if (closeLine.UpColor) this.Report.CloseLine.UpColor=closeLine.UpColor;
85201
+ if (closeLine.UpAreaColor) this.Report.CloseLine.UpAreaColor=closeLine.UpAreaColor;
85202
+ if (closeLine.DownColor) this.Report.CloseLine.DownColor=closeLine.DownColor;
85203
+ if (closeLine.DownAreaColor) this.Report.CloseLine.DownAreaColor=closeLine.DownAreaColor;
85204
+ if (closeLine.UnchangeColor) this.Report.CloseLine.UnchangeColor=closeLine.UnchangeColor;
85205
+ if (closeLine.UnchangeAreaColor) this.Report.CloseLine.UnchangeAreaColor=closeLine.UnchangeAreaColor;
84968
85206
  }
84969
85207
 
84970
85208
  if (item.KLine)
@@ -91358,6 +91596,9 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
91358
91596
  if (!option.Windows) return;
91359
91597
  var count=option.Windows.length;
91360
91598
  if (count<=0) return;
91599
+
91600
+ this.Frame.RestoreIndexWindows();
91601
+
91361
91602
  var currentLength=this.Frame.SubFrame.length;
91362
91603
 
91363
91604
  var period=null, right=null, symbol=null;
@@ -97713,21 +97954,31 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
97713
97954
 
97714
97955
  this.UpdatePointByCursorIndex=function()
97715
97956
  {
97716
- this.LastPoint.X=this.Frame.GetXFromIndex(this.CursorIndex);
97957
+ var x=null, y=null;
97958
+ x=this.Frame.GetXFromIndex(this.CursorIndex);
97717
97959
 
97718
97960
  var index=this.CursorIndex;
97719
97961
  index=parseInt(index.toFixed(0));
97720
97962
  var data=this.GetKData();
97721
- if (data.DataOffset+index>=data.Data.length)
97963
+ if (data.DataOffset+index<data.Data.length)
97722
97964
  {
97723
- return;
97965
+ var item=data.Data[data.DataOffset+index];
97966
+ var close=null;
97967
+ if (item.Before) close=item.Before.Close;
97968
+ else close=item.Close;
97969
+ y=this.Frame.GetYFromData(close);
97724
97970
  }
97725
- var item=data.Data[data.DataOffset+index];
97726
- var close=null;
97727
- if (item.Before) close=item.Before.Close;
97728
- else close=item.Close
97729
97971
 
97730
- this.LastPoint.Y=this.Frame.GetYFromData(close);
97972
+ if (this.IsHScreenModel())
97973
+ {
97974
+ this.LastPoint.X=y;
97975
+ this.LastPoint.Y=x;
97976
+ }
97977
+ else
97978
+ {
97979
+ this.LastPoint.X=x;
97980
+ this.LastPoint.Y=y;
97981
+ }
97731
97982
  this.LastPoint.FrameID=0;
97732
97983
  }
97733
97984
 
@@ -98278,6 +98529,8 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
98278
98529
  this.ChangeIndexTemplate=function(option) //切换指标模板 可以设置指标窗口个数 每个窗口的指标, 只能从第3个指标窗口开始设置,前面2个指标窗口固定无法设置
98279
98530
  {
98280
98531
  if (!Array.isArray(option.Windows)) return;
98532
+ this.Frame.RestoreIndexWindows();
98533
+
98281
98534
  var count=option.Windows.length;
98282
98535
  var currentLength=this.Frame.SubFrame.length;
98283
98536
  var startWindowIndex=2;
@@ -106736,6 +106989,18 @@ var MARKET_SUFFIX_NAME=
106736
106989
  return false;
106737
106990
  },
106738
106991
 
106992
+ IsHKStock:function(symbol) //港股股票 全是数字
106993
+ {
106994
+ if (!symbol) return false;
106995
+ var upperSymbol=symbol.toUpperCase();
106996
+ if (!this.IsHK(upperSymbol)) return false;
106997
+
106998
+ var shortSymbol=this.GetShortSymbol(symbol);
106999
+ if (IFrameSplitOperator.IsNumberString(shortSymbol)) return true;
107000
+
107001
+ return false;
107002
+ },
107003
+
106739
107004
  GetMarketStatus:function(symbol) //获取市场状态 0=闭市 1=盘前 2=盘中 3=盘后
106740
107005
  {
106741
107006
  if (!symbol) return 0;
@@ -107076,7 +107341,18 @@ var MARKET_SUFFIX_NAME=
107076
107341
  if (MARKET_SUFFIX_NAME.IsBJ(upperSymbol)) return 100; //单位手=100股
107077
107342
 
107078
107343
  return 1;
107344
+ },
107345
+
107346
+ //获取不带后缀的代码
107347
+ GetShortSymbol:function(symbol)
107348
+ {
107349
+ if (!IFrameSplitOperator.IsString(symbol)) return null;
107350
+ var pos=symbol.lastIndexOf(".");
107351
+ if (pos<=0) return symbol;
107352
+
107353
+ return symbol.slice(0,pos);
107079
107354
  }
107355
+
107080
107356
  }
107081
107357
 
107082
107358
 
@@ -111341,6 +111617,24 @@ JSComplierHelper.GetConvertValueName=function(funcName)
111341
111617
 
111342
111618
  return valueName;
111343
111619
  }
111620
+
111621
+
111622
+ //DYNAINFO() 转换
111623
+ //["DYNA_NOW",null], //DYNA_NOW 现价 DYNAINFO(7) 即时行情数据 没有现价时(比如在开盘前),返回昨收盘价
111624
+ //["DYNA_ZAF",null], //DYNA_ZAF 涨幅 DYNAINFO(14) 即时行情数据(沪深京早盘竞价期间使用匹配价的涨幅) 转换成幅度需要乘100
111625
+ //["DYNA_LB", null], //DYNA_LB DYNAINFO(17) 量比 即时行情数据
111626
+ //["DYNA_ZAS",null], //DYNA_ZAS DYNAINFO(24) 返回涨速 报价界面行情数据 转换成幅度需要乘100
111627
+ //["SELLVOL", null], //返回内盘,即DYNAINFO(22) 即时行情数据
111628
+ //["BUYVOL", null], //返回外盘,即DYNAINFO(21) 即时行情数据
111629
+ const MAP_DYNAINFO_SHORTCUT=new Map(
111630
+ [
111631
+ ['DYNA_NOW', { Name:"DYNA_NOW", ID:7 } ],
111632
+ ['DYNA_LB', { Name:"DYNA_LB", ID:17 } ],
111633
+ ['DYNA_ZAS', { Name:"DYNA_ZAS", ID:24 } ],
111634
+ ['SELLVOL', { Name:"SELLVOL", ID:22 }],
111635
+ ['BUYVOL', { Name:"BUYVOL", ID:21 } ],
111636
+ ]
111637
+ );
111344
111638
 
111345
111639
 
111346
111640
 
@@ -112280,6 +112574,14 @@ function Node(ErrorHandler)
112280
112574
  return;
112281
112575
  }
112282
112576
 
112577
+ if (MAP_DYNAINFO_SHORTCUT.has(varName))
112578
+ {
112579
+ var item=MAP_DYNAINFO_SHORTCUT.get(varName);
112580
+ var item={ ID:JS_EXECUTE_JOB_ID.JOB_DOWNLOAD_SYMBOL_LATEST_DATA, Args:[item.ID], FunctionName:varName };
112581
+ this.Dynainfo.push(item);
112582
+ return;
112583
+ }
112584
+
112283
112585
  if (varName.indexOf('#')>0)
112284
112586
  {
112285
112587
  var aryWrods = varName.split('#');
@@ -123035,8 +123337,10 @@ var DYNAINFO_ARGUMENT_ID=
123035
123337
  CLOSE:7,
123036
123338
  VOL:8,
123037
123339
  AMOUNT:10,
123340
+ UPDOWN:12, //DYNAINFO(12) 日涨跌 即时行情数据
123038
123341
  AMPLITUDE:13, //振幅
123039
123342
  INCREASE:14, //涨幅
123343
+
123040
123344
  EXCHANGERATE:37, //换手率
123041
123345
  };
123042
123346
 
@@ -123215,16 +123519,18 @@ function JSSymbolData(ast,option,jsExecute)
123215
123519
  let stock=data.stock[0];
123216
123520
  if (!stock) return;
123217
123521
 
123218
- if (IFrameSplitOperator.IsNumber(stock.yclose)) this.LatestData.set(DYNAINFO_ARGUMENT_ID.YCLOSE,stock.yclose);
123219
- if (IFrameSplitOperator.IsNumber(stock.open)) this.LatestData.set(DYNAINFO_ARGUMENT_ID.OPEN,stock.open);
123220
- if (IFrameSplitOperator.IsNumber(stock.high)) this.LatestData.set(DYNAINFO_ARGUMENT_ID.HIGH,stock.high);
123221
- if (IFrameSplitOperator.IsNumber(stock.low)) this.LatestData.set(DYNAINFO_ARGUMENT_ID.LOW,stock.low);
123222
- if (IFrameSplitOperator.IsNumber(stock.price)) this.LatestData.set(DYNAINFO_ARGUMENT_ID.CLOSE,stock.price);
123223
- if (IFrameSplitOperator.IsNumber(stock.vol)) this.LatestData.set(DYNAINFO_ARGUMENT_ID.VOL,stock.vol);
123224
- if (IFrameSplitOperator.IsNumber(stock.amount)) this.LatestData.set(DYNAINFO_ARGUMENT_ID.AMOUNT,stock.amount);
123225
- if (IFrameSplitOperator.IsNumber(stock.increase)) this.LatestData.set(DYNAINFO_ARGUMENT_ID.INCREASE,stock.increase);
123226
- if (IFrameSplitOperator.IsNumber(stock.exchangerate)) this.LatestData.set(DYNAINFO_ARGUMENT_ID.EXCHANGERATE,stock.exchangerate);
123227
- if (IFrameSplitOperator.IsNumber(stock.amplitude)) this.LatestData.set(DYNAINFO_ARGUMENT_ID.AMPLITUDE,stock.amplitude);
123522
+ if (IFrameSplitOperator.IsNumber(stock.yclose)) this.LatestData.set(this.GetLatestDataKey(DYNAINFO_ARGUMENT_ID.YCLOSE),stock.yclose);
123523
+ if (IFrameSplitOperator.IsNumber(stock.open)) this.LatestData.set(this.GetLatestDataKey(DYNAINFO_ARGUMENT_ID.OPEN),stock.open);
123524
+ if (IFrameSplitOperator.IsNumber(stock.high)) this.LatestData.set(this.GetLatestDataKey(DYNAINFO_ARGUMENT_ID.HIGH),stock.high);
123525
+ if (IFrameSplitOperator.IsNumber(stock.low)) this.LatestData.set(this.GetLatestDataKey(DYNAINFO_ARGUMENT_ID.LOW),stock.low);
123526
+ if (IFrameSplitOperator.IsNumber(stock.price)) this.LatestData.set(this.GetLatestDataKey(DYNAINFO_ARGUMENT_ID.CLOSE),stock.price);
123527
+ if (IFrameSplitOperator.IsNumber(stock.vol)) this.LatestData.set(this.GetLatestDataKey(DYNAINFO_ARGUMENT_ID.VOL),stock.vol);
123528
+ if (IFrameSplitOperator.IsNumber(stock.amount)) this.LatestData.set(this.GetLatestDataKey(DYNAINFO_ARGUMENT_ID.AMOUNT),stock.amount);
123529
+ if (IFrameSplitOperator.IsNumber(stock.increase)) this.LatestData.set(this.GetLatestDataKey(DYNAINFO_ARGUMENT_ID.INCREASE),stock.increase);
123530
+ if (IFrameSplitOperator.IsNumber(stock.exchangerate)) this.LatestData.set(this.GetLatestDataKey(DYNAINFO_ARGUMENT_ID.EXCHANGERATE),stock.exchangerate);
123531
+ if (IFrameSplitOperator.IsNumber(stock.amplitude)) this.LatestData.set(this.GetLatestDataKey(DYNAINFO_ARGUMENT_ID.AMPLITUDE),stock.amplitude);
123532
+ if (IFrameSplitOperator.IsNumber(stock.updown)) this.LatestData.set(this.GetLatestDataKey(DYNAINFO_ARGUMENT_ID.UPDOWN),stock.updown);
123533
+
123228
123534
 
123229
123535
  /*
123230
123536
  this.LatestData={ Symbol:stock.symbol, Name:stock.name, Date:stock.date, Time:stock.time,
@@ -123249,7 +123555,7 @@ function JSSymbolData(ast,option,jsExecute)
123249
123555
  if (IFrameSplitOperator.IsNumber(item.value) || IFrameSplitOperator.IsString(item.value))
123250
123556
  {
123251
123557
  JSConsole.Complier.Log(`[JSSymbolData::RecvLatestDataVer2] symbol=${symbol} DYNAINFO(${item.id})=${item.value}.`);
123252
- this.LatestData.set(item.id, item.value);
123558
+ this.LatestData.set(this.GetLatestDataKey(item.id), item.value);
123253
123559
  }
123254
123560
 
123255
123561
  }
@@ -123257,11 +123563,50 @@ function JSSymbolData(ast,option,jsExecute)
123257
123563
  JSConsole.Complier.Log('[JSSymbolData::RecvLatestDataVer2]', this.LatestData);
123258
123564
  }
123259
123565
 
123260
- this.GetLatestCacheData=function(dataname)
123566
+ this.GetLatestCacheData=function(dataID)
123261
123567
  {
123262
- if (this.LatestData.has(dataname)) return this.LatestData.get(dataname);
123568
+ var key=this.GetLatestDataKey(dataID);
123569
+ if (!this.LatestData.has(key)) return null;
123263
123570
 
123264
- return null;
123571
+ var data=this.LatestData.get(key);
123572
+
123573
+ //DYNAINFO(36) 自由流通换手率(序列数据,每个周期的数据不同,使用最新的自由流通股本) 转换成幅度需要乘100 比如DYNAINFO(36)>0.25表示换手超过25%
123574
+ //DYNAINFO(37) 换手率(序列数据,每个周期的数据不同,使用的流通股本为最近数据) 转换成幅度需要乘100 比如DYNAINFO(37)>0.1表示换手超过10%
123575
+ if (dataID==37 || dataID==36)
123576
+ {
123577
+ var value=null;
123578
+ if (IFrameSplitOperator.IsNumber(data)) value=data;
123579
+ else if (IFrameSplitOperator.IsNonEmptyArray(data) && IFrameSplitOperator.IsNumber(data[0])) value=data[0];
123580
+ else return null;
123581
+
123582
+ if (!this.Data || !IFrameSplitOperator.IsNonEmptyArray(this.Data.Data)) return null;
123583
+
123584
+ var aryData=[];
123585
+ for(var i=0;i<this.Data.Data.length;++i)
123586
+ {
123587
+ var kItem=this.Data.Data[i];
123588
+ aryData[i]=null;
123589
+ if (!kItem || !IFrameSplitOperator.IsNumber(kItem.Vol)) continue;
123590
+
123591
+ aryData[i]=kItem.Vol/value*100.0;// 换手率
123592
+ }
123593
+
123594
+ return aryData;
123595
+ }
123596
+
123597
+
123598
+ return data;
123599
+ }
123600
+
123601
+ this.GetDynaCacheData=function(name)
123602
+ {
123603
+ var data=null;
123604
+ if (MAP_DYNAINFO_SHORTCUT.has(name))
123605
+ {
123606
+ var item=MAP_DYNAINFO_SHORTCUT.get(name);
123607
+ data=this.GetLatestCacheData(item.ID);
123608
+ }
123609
+ return data;
123265
123610
  }
123266
123611
 
123267
123612
  this.GetLatestIndexData=function()
@@ -124337,12 +124682,7 @@ function JSSymbolData(ast,option,jsExecute)
124337
124682
  { Url:self.RealtimeApiUrl, Type:'POST' ,
124338
124683
  Data:
124339
124684
  {
124340
- "field": [ "name", "symbol","yclose","open","price","high","low","vol"],
124341
- "symbol": self.Symbol,
124342
- "start": -1,
124343
- "count": self.MaxRequestDataCount,
124344
- "period":this.Period,
124345
- "right":this.Right
124685
+ symbol: self.Symbol,count: self.MaxRequestDataCount, period:this.Period,right:this.Right
124346
124686
  }
124347
124687
  },
124348
124688
  Self:this,
@@ -124354,6 +124694,7 @@ function JSSymbolData(ast,option,jsExecute)
124354
124694
  obj.Request.KLineDataTimeRange={Start:{ Date:this.KLineDateTimeRange.Start.Date}, End:{ Date:this.KLineDateTimeRange.End.Date} };
124355
124695
  if (this.IsNumber(this.KLineDateTimeRange.Start.Time)) obj.Request.KLineDataTimeRange.Start.Time=this.KLineDateTimeRange.Start.Time;
124356
124696
  if (this.IsNumber(this.KLineDateTimeRange.End.Time)) obj.Request.KLineDataTimeRange.End.Time=this.KLineDateTimeRange.End.Time;
124697
+ obj.Request.Data.dateRange=obj.Request.KLineDataTimeRange;
124357
124698
  }
124358
124699
 
124359
124700
  this.NetworkFilter(obj, function(data)
@@ -126715,13 +127056,14 @@ function JSSymbolData(ast,option,jsExecute)
126715
127056
  if (readArgument.Value=='') readArgument.Value=this.Symbol; //缺省使用股票代码
126716
127057
 
126717
127058
  var symbol=readArgument.Value;
127059
+ var upperSymbol=symbol.toUpperCase();
126718
127060
 
126719
127061
  //支持 SH60000, SZ000001
126720
127062
  //A股后缀小写
126721
- if (symbol.indexOf('.SH')>0) result.Symbol=symbol.replace('.SH', ".sh");
126722
- else if (symbol.indexOf('.SZ')>0) result.Symbol=symbol.replace('.SZ', ".sz");
126723
- else if (symbol.indexOf("SH")==0) result.Symbol=symbol.slice(2)+".sh";
126724
- else if (symbol.indexOf("SZ")==0) result.Symbol=symbol.slice(2)+".sz";
127063
+ if (upperSymbol.indexOf('.SH')>0) result.Symbol=symbol.replace('.SH', ".sh");
127064
+ else if (upperSymbol.indexOf('.SZ')>0) result.Symbol=symbol.replace('.SZ', ".sz");
127065
+ else if (upperSymbol.indexOf("SH")==0) result.Symbol=symbol.slice(2)+".sh";
127066
+ else if (upperSymbol.indexOf("SZ")==0) result.Symbol=symbol.slice(2)+".sz";
126725
127067
  else result.Symbol=symbol;
126726
127068
 
126727
127069
  return true;
@@ -128246,6 +128588,13 @@ function JSExecute(ast,option)
128246
128588
  ["TR", null], //真实波幅
128247
128589
  ["AUTOFILTER", null],
128248
128590
 
128591
+ ["DYNA_NOW",null], //DYNA_NOW 现价 DYNAINFO(7) 即时行情数据 没有现价时(比如在开盘前),返回昨收盘价
128592
+ ["DYNA_ZAF",null], //DYNA_ZAF 涨幅 DYNAINFO(14) 即时行情数据(沪深京早盘竞价期间使用匹配价的涨幅) 转换成幅度需要乘100
128593
+ ["DYNA_LB", null], //DYNA_LB DYNAINFO(17) 量比 即时行情数据
128594
+ ["DYNA_ZAS",null], //DYNA_ZAS DYNAINFO(24) 返回涨速 报价界面行情数据 转换成幅度需要乘100
128595
+ ["SELLVOL", null], //返回内盘,即DYNAINFO(22) 即时行情数据
128596
+ ["BUYVOL", null], //返回外盘,即DYNAINFO(21) 即时行情数据
128597
+
128249
128598
  ['LARGEINTRDVOL', null], //逐笔买入大单成交量,相当于L2_VOL(0,0)+L2_VOL(1,0),沪深京品种的资金流向,仅日线以上周期,用于特定版本
128250
128599
  ['LARGEOUTTRDVOL', null], //逐笔卖出大单成交量,相当于L2_VOL(0,1)+L2_VOL(1,1),沪深京品种的资金流向,仅日线以上周期,用于特定版本
128251
128600
  ["TRADENUM", null], //逐笔成交总单数,沪深京品种的资金流向,仅日线以上周期,用于特定版本
@@ -128410,6 +128759,8 @@ function JSExecute(ast,option)
128410
128759
 
128411
128760
  this.ReadSymbolData=function(name,node)
128412
128761
  {
128762
+ if (MAP_DYNAINFO_SHORTCUT.has(name)) return this.SymbolData.GetDynaCacheData(name);
128763
+
128413
128764
  switch(name)
128414
128765
  {
128415
128766
  case 'CLOSE':
@@ -128477,7 +128828,6 @@ function JSExecute(ast,option)
128477
128828
  case 'CAPITAL':
128478
128829
  case 'EXCHANGE':
128479
128830
  case "HSL":
128480
-
128481
128831
  case "HYBLOCK":
128482
128832
  case "DYBLOCK":
128483
128833
  case "GNBLOCK":
@@ -137936,8 +138286,8 @@ function DownloadFinanceData(obj)
137936
138286
  {
137937
138287
  case 1: //FINANCE(1) 总股本(随时间可能有变化) 股
137938
138288
  case 7: //FINANCE(7) 流通股本(随时间可能有变化) 股
137939
- case "EXCHANGE": //换手率
137940
138289
  case "HSL"://换手率
138290
+ case "EXCHANGE": //换手率
137941
138291
  this.DownloadHistoryData(id);
137942
138292
  break;
137943
138293
  case 3:
@@ -138198,7 +138548,7 @@ function DownloadFinanceData(obj)
138198
138548
  if (!item.capital) return null;
138199
138549
  return { Date:date, Value:item.capital.total };
138200
138550
  case 7:
138201
- case "HSL": //换手率
138551
+ case "HSL":
138202
138552
  case "EXCHANGE": //换手率 历史流通股本
138203
138553
  if (!item.capital) return null;
138204
138554
  return { Date:date, Value:item.capital.a };
@@ -139339,6 +139689,67 @@ function GetBlackStyle()
139339
139689
  BGColor: { Selected:"rgb(234,85,4)", Default:"rgb(25,25,25)", MoveOn:"rgb(59,59,59)" },
139340
139690
  BorderColor:"rgb(60,60,60)",
139341
139691
  }
139692
+ },
139693
+
139694
+ StockInfo:
139695
+ {
139696
+ Header:
139697
+ {
139698
+ Name:
139699
+ {
139700
+ //Font:`${20*GetDevicePixelRatio()}px 微软雅黑`,
139701
+ Color:"rgb(255,255,0)",
139702
+ //Margin:{ Left:5, Top:10, Bottom:5, Right:10, YOffset:0 },
139703
+ },
139704
+
139705
+ Symbol:
139706
+ {
139707
+ //Font:`${18*GetDevicePixelRatio()}px 微软雅黑`,
139708
+ Color:"rgb(250,250,250)",
139709
+ //Margin:{ Left:5, Top:10, Bottom:5, Right:5, YOffset:0 },
139710
+ },
139711
+
139712
+ AryCell:
139713
+ [
139714
+ //{ Font:`bold ${16*GetDevicePixelRatio()}px 微软雅黑`, Margin:{ Left:5, Top:5, Bottom:5, Right:15, YOffset:0 } },
139715
+ //{ Font:`${16*GetDevicePixelRatio()}px 微软雅黑`, Margin:{ Left:5, Top:5, Bottom:5, Right:15, YOffset:0 } },
139716
+ //{ Font:`${16*GetDevicePixelRatio()}px 微软雅黑`, Margin:{ Left:5, Top:5, Bottom:5, Right:5, YOffset:0 } }
139717
+ ],
139718
+
139719
+ TextColor:"rgb(250,250,250)",
139720
+
139721
+ BottomLine:{ Enable:true, Color:"rgb(60,60,60)"} , //底部分割线
139722
+ },
139723
+
139724
+ BuySell:
139725
+ {
139726
+ //Font:14*GetDevicePixelRatio() +'px 微软雅黑',
139727
+ TitleColor:"rgb(250,250,250)",
139728
+ VolColor:"rgb(250,250,250)",
139729
+ //Margin:{ Left:0, Top:0, Bottom:0, Right:0 },
139730
+ //CellMargin:{ Top:5, Bottom:5, YOffset:0, Left:5, Right:5, YOffset:-5 },
139731
+ BottomLine:{ Enable:true, Color:"rgb(60,60,60)"} , //底部分割线
139732
+ TopLine:{ Enable:false, Color:"rgb(60,60,60)"} , //顶部分割线
139733
+
139734
+ CenterLine:
139735
+ {
139736
+ NoneColor:"rgb(60,60,60)",
139737
+ }
139738
+ },
139739
+
139740
+ Table:
139741
+ {
139742
+ Font:14*GetDevicePixelRatio() +'px 微软雅黑',
139743
+ TitleColor:"rgb(250,250,250)",
139744
+ TextColor:"rgb(250,250,250)",
139745
+ //Margin:{ Left:0, Top:0, Bottom:0, Right:0 },
139746
+ //CellMargin:{ Top:5, Bottom:5, YOffset:0, Left:5, Right:5, YOffset:-5 },
139747
+ },
139748
+
139749
+ UpTextColor:"rgb(238,21,21)", //上涨文字颜色
139750
+ DownTextColor:"rgb(25,158,0)", //下跌文字颜色
139751
+ UnchangeTextColor:"rgb(90,90,90)", //平盘文字颜色
139752
+ BorderColor:'rgb(38,38,41)', //边框线
139342
139753
  }
139343
139754
 
139344
139755
  };
@@ -139407,9 +139818,18 @@ function JSDealChart(divElement)
139407
139818
  this.OnSize=function()
139408
139819
  {
139409
139820
  //画布大小通过div获取
139410
- var height=parseInt(this.DivElement.style.height.replace("px",""));
139821
+ var height=this.DivElement.offsetHeight;
139822
+ var width=this.DivElement.offsetWidth;
139823
+ if (this.DivElement.style.height && this.DivElement.style.width)
139824
+ {
139825
+ if (this.DivElement.style.height.includes("px"))
139826
+ height=parseInt(this.DivElement.style.height.replace("px",""));
139827
+ if (this.DivElement.style.width.includes("px"))
139828
+ width=parseInt(this.DivElement.style.width.replace("px",""));
139829
+ }
139830
+
139411
139831
  this.CanvasElement.height=height;
139412
- this.CanvasElement.width=parseInt(this.DivElement.style.width.replace("px",""));
139832
+ this.CanvasElement.width=width;
139413
139833
  this.CanvasElement.style.width=this.CanvasElement.width+'px';
139414
139834
  this.CanvasElement.style.height=this.CanvasElement.height+'px';
139415
139835
 
@@ -139874,8 +140294,8 @@ function JSDealChartContainer(uielement)
139874
140294
  this.ChangeSymbol=function(symbol, option)
139875
140295
  {
139876
140296
  this.Symbol=symbol;
139877
- this.Data=null;
139878
- this.SourceData=null;
140297
+ this.Data={ DataOffset:0, Data:[] }; //分笔数据
140298
+ this.SourceData={DataOffset:0, Data:[] }; //原始分笔数据
139879
140299
 
139880
140300
  var chart=this.ChartPaint[0];
139881
140301
  if (chart) chart.Data=null;
@@ -140522,17 +140942,23 @@ JSDealChartContainer.JsonDataToDealData=function(data)
140522
140942
 
140523
140943
  if (item[100]) dealItem.Guid=item[100];
140524
140944
 
140525
- //10个数值型 101-199
140526
- if (IFrameSplitOperator.IsNumber(item[101])) dealItem.ReserveNumber1=item[101];
140527
- if (IFrameSplitOperator.IsNumber(item[102])) dealItem.ReserveNumber2=item[102];
140528
- if (IFrameSplitOperator.IsNumber(item[103])) dealItem.ReserveNumber3=item[103];
140529
- if (IFrameSplitOperator.IsNumber(item[104])) dealItem.ReserveNumber4=item[104];
140530
- if (IFrameSplitOperator.IsNumber(item[105])) dealItem.ReserveNumber5=item[105];
140531
- if (IFrameSplitOperator.IsNumber(item[106])) dealItem.ReserveNumber6=item[106];
140532
- if (IFrameSplitOperator.IsNumber(item[107])) dealItem.ReserveNumber7=item[107];
140533
- if (IFrameSplitOperator.IsNumber(item[108])) dealItem.ReserveNumber8=item[108];
140534
- if (IFrameSplitOperator.IsNumber(item[109])) dealItem.ReserveNumber9=item[109];
140535
- if (IFrameSplitOperator.IsNumber(item[110])) dealItem.ReserveNumber10=item[110];
140945
+ //柱子类型
140946
+ if (item[50]) dealItem.MultiBar1=item[50];
140947
+ if (item[51]) dealItem.MultiBar2=item[51];
140948
+ if (item[52]) dealItem.MultiBar3=item[52];
140949
+ if (item[53]) dealItem.MultiBar4=item[53];
140950
+
140951
+ //10个数值型 101-199
140952
+ if (IFrameSplitOperator.IsNumber(item[101])) dealItem.ReserveNumber1=item[101];
140953
+ if (IFrameSplitOperator.IsNumber(item[102])) dealItem.ReserveNumber2=item[102];
140954
+ if (IFrameSplitOperator.IsNumber(item[103])) dealItem.ReserveNumber3=item[103];
140955
+ if (IFrameSplitOperator.IsNumber(item[104])) dealItem.ReserveNumber4=item[104];
140956
+ if (IFrameSplitOperator.IsNumber(item[105])) dealItem.ReserveNumber5=item[105];
140957
+ if (IFrameSplitOperator.IsNumber(item[106])) dealItem.ReserveNumber6=item[106];
140958
+ if (IFrameSplitOperator.IsNumber(item[107])) dealItem.ReserveNumber7=item[107];
140959
+ if (IFrameSplitOperator.IsNumber(item[108])) dealItem.ReserveNumber8=item[108];
140960
+ if (IFrameSplitOperator.IsNumber(item[109])) dealItem.ReserveNumber9=item[109];
140961
+ if (IFrameSplitOperator.IsNumber(item[110])) dealItem.ReserveNumber10=item[110];
140536
140962
 
140537
140963
  //10个字符型 201-299
140538
140964
  if (IFrameSplitOperator.IsString(item[201]) || IFrameSplitOperator.IsObject(item[201])) dealItem.ReserveString1=item[201];
@@ -140643,13 +141069,14 @@ var DEAL_COLUMN_ID=
140643
141069
  UPDOWN_ID:5, //涨跌
140644
141070
  STRING_TIME_ID:6, //字符串时间
140645
141071
  INDEX_ID:7, //序号 从1开始
140646
- MULTI_BAR_ID:8, //多颜色柱子
141072
+
140647
141073
  CENTER_BAR_ID:9, //中心柱子
140648
141074
  CUSTOM_TEXT_ID:10, //自定义文本
140649
141075
 
140650
141076
  SYMBOL_ID:11, //股票代码
140651
141077
  NAME_ID:12, //股票名称
140652
141078
 
141079
+
140653
141080
 
140654
141081
  //预留数值类型 10个
140655
141082
  RESERVE_NUMBER1_ID:201, //ReserveNumber1:
@@ -140674,6 +141101,11 @@ var DEAL_COLUMN_ID=
140674
141101
  RESERVE_STRING8_ID:308,
140675
141102
  RESERVE_STRING9_ID:309,
140676
141103
  RESERVE_STRING10_ID:310,
141104
+
141105
+ MULTI_BAR_ID:50, //多颜色柱子
141106
+ MULTI_BAR2_ID:51,
141107
+ MULTI_BAR3_ID:52,
141108
+ MULTI_BAR4_ID:53
140677
141109
  }
140678
141110
 
140679
141111
  var MAP_DEAL_COLUMN_FIELD=new Map(
@@ -140682,6 +141114,11 @@ var MAP_DEAL_COLUMN_FIELD=new Map(
140682
141114
  [DEAL_COLUMN_ID.NAME_ID, "Name"],
140683
141115
  [DEAL_COLUMN_ID.PRICE_ID, "Price"],
140684
141116
 
141117
+ [DEAL_COLUMN_ID.MULTI_BAR_ID, "MultiBar1"],
141118
+ [DEAL_COLUMN_ID.MULTI_BAR2_ID, "MultiBar2"],
141119
+ [DEAL_COLUMN_ID.MULTI_BAR3_ID, "MultiBar3"],
141120
+ [DEAL_COLUMN_ID.MULTI_BAR4_ID, "MultiBar4"],
141121
+
140685
141122
  [DEAL_COLUMN_ID.RESERVE_NUMBER1_ID,"ReserveNumber1"],
140686
141123
  [DEAL_COLUMN_ID.RESERVE_NUMBER2_ID,"ReserveNumber2"],
140687
141124
  [DEAL_COLUMN_ID.RESERVE_NUMBER3_ID,"ReserveNumber3"],
@@ -140838,7 +141275,7 @@ function ChartDealList()
140838
141275
 
140839
141276
  if (item.ChartTooltip) colItem.ChartTooltip={ Enable:item.ChartTooltip.Enable, Type:item.ChartTooltip.Type }; //图形提示信息
140840
141277
 
140841
- if (item.Type==DEAL_COLUMN_ID.MULTI_BAR_ID || item.Type==DEAL_COLUMN_ID.CENTER_BAR_ID)
141278
+ if (item.Type==DEAL_COLUMN_ID.CENTER_BAR_ID)
140842
141279
  {
140843
141280
  if (!IFrameSplitOperator.IsNumber(item.DataIndex)) continue;
140844
141281
  colItem.DataIndex=item.DataIndex; //柱子数据所在原始数据索引列
@@ -140851,6 +141288,8 @@ function ChartDealList()
140851
141288
  {
140852
141289
  if (item.Format) colItem.Format=item.Format; //数据格式化设置{ Type:1=原始 2=千分位分割 3=万亿转换, ExFloatPrecision:万亿转换以后的小数位数 }
140853
141290
  if (IFrameSplitOperator.IsNumber(item.ColorType)) colItem.ColorType=item.ColorType; //0=默认 1=(>0, =0, <0) 2=(>=0, <0)
141291
+ if (IFrameSplitOperator.IsNumber(item.FloatPrecision)) colItem.FloatPrecision=item.FloatPrecision;
141292
+ if (item.StringFormat) colItem.StringFormat=item.StringFormat; //"{0}%" 输出增加固定字符
140854
141293
  }
140855
141294
 
140856
141295
  this.Column.push(colItem);
@@ -140870,7 +141309,7 @@ function ChartDealList()
140870
141309
  { Type:DEAL_COLUMN_ID.STRING_TIME_ID, Title:"时间", TextAlign:"center", Width:null, TextColor:g_JSChartResource.DealList.FieldColor.Time, MaxText:"88:88:88" },
140871
141310
  { Type:DEAL_COLUMN_ID.INDEX_ID, Title:"序号", TextAlign:"center", Width:null, TextColor:g_JSChartResource.DealList.FieldColor.Index, MaxText:"88888" },
140872
141311
 
140873
- { Type:DEAL_COLUMN_ID.MULTI_BAR_ID, Title:"柱子", TextAlign:"center", Width:null, TextColor:g_JSChartResource.DealList.FieldColor.BarTitle, MaxText:"888888" },
141312
+
140874
141313
  { Type:DEAL_COLUMN_ID.CENTER_BAR_ID, Title:"柱子2", TextAlign:"center", Width:null, TextColor:g_JSChartResource.DealList.FieldColor.BarTitle, MaxText:"888888" },
140875
141314
  { Type:DEAL_COLUMN_ID.CUSTOM_TEXT_ID, Title:"自定义", TextAlign:"center", Width:null, TextColor:g_JSChartResource.DealList.FieldColor.Text, MaxText:"擎擎擎擎擎" },
140876
141315
 
@@ -140898,6 +141337,11 @@ function ChartDealList()
140898
141337
  { Type:DEAL_COLUMN_ID.RESERVE_STRING8_ID, Title:"文字8", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"擎擎擎擎擎擎" },
140899
141338
  { Type:DEAL_COLUMN_ID.RESERVE_STRING9_ID, Title:"文字9", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"擎擎擎擎擎擎" },
140900
141339
  { Type:DEAL_COLUMN_ID.RESERVE_STRING10_ID, Title:"文字10", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"擎擎擎擎擎擎" },
141340
+
141341
+ { Type:DEAL_COLUMN_ID.MULTI_BAR_ID, Title:"柱子", TextAlign:"center", Width:null, TextColor:g_JSChartResource.DealList.FieldColor.BarTitle, MaxText:"888888" },
141342
+ { Type:DEAL_COLUMN_ID.MULTI_BAR2_ID, Title:"柱子2", TextAlign:"center", Width:null, TextColor:g_JSChartResource.DealList.FieldColor.BarTitle, MaxText:"888888" },
141343
+ { Type:DEAL_COLUMN_ID.MULTI_BAR3_ID, Title:"柱子3", TextAlign:"center", Width:null, TextColor:g_JSChartResource.DealList.FieldColor.BarTitle, MaxText:"888888" },
141344
+ { Type:DEAL_COLUMN_ID.MULTI_BAR4_ID, Title:"柱子4", TextAlign:"center", Width:null, TextColor:g_JSChartResource.DealList.FieldColor.BarTitle, MaxText:"888888" },
140901
141345
 
140902
141346
  ];
140903
141347
 
@@ -141238,7 +141682,7 @@ function ChartDealList()
141238
141682
  {
141239
141683
  text=(dataIndex+1).toString();
141240
141684
  }
141241
- else if (item.Type==DEAL_COLUMN_ID.MULTI_BAR_ID)
141685
+ else if (this.IsMulitBar(item.Type))
141242
141686
  {
141243
141687
  var rtItem={Left:left, Top:top, Width:itemWidth, Height:this.RowHeight};
141244
141688
  this.DrawMultiBar(item, data, rtItem);
@@ -141339,6 +141783,11 @@ function ChartDealList()
141339
141783
  break;
141340
141784
  }
141341
141785
  }
141786
+
141787
+ if (column.StringFormat && text)
141788
+ {
141789
+ text=column.StringFormat.replace("{0}", text);
141790
+ }
141342
141791
 
141343
141792
  drawInfo.Text=text;
141344
141793
  }
@@ -141460,8 +141909,10 @@ function ChartDealList()
141460
141909
 
141461
141910
  this.DrawMultiBar=function(colunmInfo, data, rtItem)
141462
141911
  {
141463
- if (!data.Source || !IFrameSplitOperator.IsNonEmptyArray(data.Source)) return false;
141464
- var barData=data.Source[colunmInfo.DataIndex]; //{ Value:[0.4,0,2], Color:[0,1] };
141912
+ var fieldName=MAP_DEAL_COLUMN_FIELD.get(colunmInfo.Type);
141913
+ if (!data || !fieldName) return;
141914
+
141915
+ var barData=data[fieldName]; //{ Value:[0.4,0,2], Color:[0,1] };
141465
141916
  if (!barData) return false;
141466
141917
  if (!IFrameSplitOperator.IsNonEmptyArray(barData.Value)) return false;
141467
141918
 
@@ -141649,6 +142100,16 @@ function ChartDealList()
141649
142100
  return ARARY_TYPE.includes(value);
141650
142101
  }
141651
142102
 
142103
+ this.IsMulitBar=function(value)
142104
+ {
142105
+ var ARARY_TYPE=
142106
+ [
142107
+ DEAL_COLUMN_ID.MULTI_BAR_ID,DEAL_COLUMN_ID.MULTI_BAR2_ID,DEAL_COLUMN_ID.MULTI_BAR3_ID,DEAL_COLUMN_ID.MULTI_BAR4_ID,
142108
+ ];
142109
+
142110
+ return ARARY_TYPE.includes(value);
142111
+ }
142112
+
141652
142113
  this.IsReserveNumber=function(value)
141653
142114
  {
141654
142115
  var ARARY_TYPE=
@@ -146978,7 +147439,15 @@ function ChartReport()
146978
147439
  {
146979
147440
  CloseColor:g_JSChartResource.Report.CloseLine.CloseColor,
146980
147441
  YCloseColor:g_JSChartResource.Report.CloseLine.YCloseColor,
146981
- AreaColor:g_JSChartResource.Report.CloseLine.AreaColor
147442
+ AreaColor:g_JSChartResource.Report.CloseLine.AreaColor,
147443
+
147444
+ UpColor:g_JSChartResource.Report.CloseLine.UpColor,
147445
+ DownColor:g_JSChartResource.Report.CloseLine.DownColor,
147446
+ UnchangeColor:g_JSChartResource.Report.CloseLine.UnchangeColor,
147447
+
147448
+ UpAreaColor:g_JSChartResource.Report.CloseLine.UpAreaColor,
147449
+ DownAreaColor:g_JSChartResource.Report.CloseLine.DownAreaColor,
147450
+ UnchangeAreaColor:g_JSChartResource.Report.CloseLine.UnchangeAreaColor,
146982
147451
  }
146983
147452
 
146984
147453
  //K线配置
@@ -147289,6 +147758,7 @@ function ChartReport()
147289
147758
  else if (item.Type==REPORT_COLUMN_ID.CLOSE_LINE_ID)
147290
147759
  {
147291
147760
  if (IFrameSplitOperator.IsBool(item.IsDrawArea)) colItem.IsDrawArea=item.IsDrawArea;
147761
+ if (IFrameSplitOperator.IsNumber(item.LineColorType)) colItem.LineColorType=item.LineColorType;
147292
147762
  }
147293
147763
  else if(item.Type==REPORT_COLUMN_ID.TIME_ID)
147294
147764
  {
@@ -147417,7 +147887,7 @@ function ChartReport()
147417
147887
  { Type:REPORT_COLUMN_ID.VOL_IN_ID, Title:"内盘", TextAlign:"right", TextColor:g_JSChartResource.Report.DownTextColor, Width:null, MaxText:"8888.8擎" },
147418
147888
  { Type:REPORT_COLUMN_ID.VOL_OUT_ID, Title:"外盘", TextAlign:"right", TextColor:g_JSChartResource.Report.UpTextColor, Width:null, MaxText:"8888.8擎" },
147419
147889
 
147420
- { Type:REPORT_COLUMN_ID.CLOSE_LINE_ID, Title:"走势", TextAlign:"center", TextColor:g_JSChartResource.Report.CloseLineColor, Width:null, MaxText:"88888.88888" },
147890
+ { Type:REPORT_COLUMN_ID.CLOSE_LINE_ID, Title:"走势", TextAlign:"center", TextColor:g_JSChartResource.Report.CloseLineColor, Width:null, MaxText:"88888.88888", LineColorType:0 },
147421
147891
 
147422
147892
 
147423
147893
  { Type:REPORT_COLUMN_ID.BUY_VOL_ID, Title:"买量", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Vol, Width:null, MaxText:"8888.8擎" },
@@ -150456,8 +150926,7 @@ function ChartReport()
150456
150926
  this.Canvas.setLineDash([]);
150457
150927
  }
150458
150928
 
150459
- if (lineData.Color) this.Canvas.strokeStyle=lineData.Color;
150460
- else this.Canvas.strokeStyle=this.CloseLineConfig.CloseColor;
150929
+ this.Canvas.strokeStyle=this.GetCloseLineColor(lineData, column);
150461
150930
 
150462
150931
  var bFirstPoint=true;
150463
150932
  var ptFirst={}; //第1个点
@@ -150495,8 +150964,7 @@ function ChartReport()
150495
150964
  this.Canvas.lineTo(x,yCenter);
150496
150965
  this.Canvas.lineTo(ptFirst.X,yCenter);
150497
150966
  this.Canvas.closePath();
150498
- var areaColor=this.CloseLineConfig.AreaColor;
150499
- if (lineData.AreaColor) areaColor=lineData.AreaColor;
150967
+ var areaColor=this.GetCloseAreaColor(lineData, column);
150500
150968
  this.SetFillStyle(areaColor,left,top, left,bottom);
150501
150969
  this.Canvas.fill();
150502
150970
  }
@@ -150505,6 +150973,48 @@ function ChartReport()
150505
150973
  this.Canvas.restore();
150506
150974
  }
150507
150975
 
150976
+ this.GetCloseLineColor=function(lineData, column)
150977
+ {
150978
+ var color=this.CloseLineConfig.CloseColor;
150979
+ if (lineData.Color)
150980
+ {
150981
+ color=lineData.Color;
150982
+ }
150983
+ else if (column.LineColorType==1)
150984
+ {
150985
+ var color= this.CloseLineConfig.UnchangeColor;
150986
+ if (IFrameSplitOperator.IsNumber(lineData.YClose) && IFrameSplitOperator.IsNonEmptyArray(lineData.Data) && IFrameSplitOperator.IsNumber(lineData.Data[ lineData.Data.length -1 ]))
150987
+ {
150988
+ var lastValue=lineData.Data[ lineData.Data.length -1 ];
150989
+ if (lastValue>lineData.YClose) color=this.CloseLineConfig.UpColor;
150990
+ else if (lastValue<lineData.YClose) color=this.CloseLineConfig.DownColor;
150991
+ }
150992
+ }
150993
+
150994
+ return color;
150995
+ }
150996
+
150997
+ this.GetCloseAreaColor=function(lineData, column)
150998
+ {
150999
+ var color=this.CloseLineConfig.AreaColor;
151000
+ if (lineData.AreaColor)
151001
+ {
151002
+ color=lineData.AreaColor;
151003
+ }
151004
+ else if (column.LineColorType==1)
151005
+ {
151006
+ var color= this.CloseLineConfig.UnchangeAreaColor;
151007
+ if (IFrameSplitOperator.IsNumber(lineData.YClose) && IFrameSplitOperator.IsNonEmptyArray(lineData.Data) && IFrameSplitOperator.IsNumber(lineData.Data[ lineData.Data.length -1 ]))
151008
+ {
151009
+ var lastValue=lineData.Data[ lineData.Data.length -1 ];
151010
+ if (lastValue>lineData.YClose) color=this.CloseLineConfig.UpAreaColor;
151011
+ else if (lastValue<lineData.YClose) color=this.CloseLineConfig.DownAreaColor;
151012
+ }
151013
+ }
151014
+
151015
+ return color;
151016
+ }
151017
+
150508
151018
  //klineData={ Data:[ open, high, low, close ] }
150509
151019
  this.DrawKLine=function(klineData, column, rtItem, data)
150510
151020
  {
@@ -150574,7 +151084,31 @@ function ChartReport()
150574
151084
  var distanceWidth=this.KLineConfig.DistanceWidth;
150575
151085
  var xOffset=left;
150576
151086
  var x, xLeft, xRight;
151087
+ var drawCount=0;
150577
151088
  for(var i=0;i<aryKLine.length;++i,xOffset+=(dataWidth+distanceWidth))
151089
+ {
151090
+ xLeft=xOffset;
151091
+ xRight=xOffset+dataWidth;
151092
+ x=xLeft+(xRight-xLeft)/2;
151093
+ if (xRight>right) break;
151094
+ drawCount++;
151095
+ }
151096
+
151097
+ var xOffset=left;
151098
+ var startIndex=0;
151099
+ if (aryKLine.length>drawCount)
151100
+ {
151101
+ high=null,low=null;
151102
+ startIndex=aryKLine.length-drawCount;
151103
+ for(var i=startIndex;i<aryKLine.length;++i)
151104
+ {
151105
+ var item=aryKLine[i];
151106
+ if (high==null || high<item.High) high=item.High;
151107
+ if (low==null || low>item.Low) low=item.Low;
151108
+ }
151109
+ }
151110
+
151111
+ for(var i=startIndex;i<aryKLine.length;++i,xOffset+=(dataWidth+distanceWidth))
150578
151112
  {
150579
151113
  var item=aryKLine[i];
150580
151114
  xLeft=xOffset;
@@ -150662,7 +151196,11 @@ function ChartReport()
150662
151196
  }
150663
151197
  else
150664
151198
  {
150665
-
151199
+ this.Canvas.beginPath();
151200
+ var xBar=x;
151201
+ this.Canvas.moveTo(ToFixedPoint(xBar),ToFixedPoint(yBarTop));
151202
+ this.Canvas.lineTo(ToFixedPoint(xBar),ToFixedPoint(yBarBottom));
151203
+ this.Canvas.stroke();
150666
151204
  }
150667
151205
  }
150668
151206
 
@@ -155550,7 +156088,7 @@ function ScrollBarBGChart()
155550
156088
 
155551
156089
 
155552
156090
 
155553
- var HQCHART_VERSION="1.1.15381";
156091
+ var HQCHART_VERSION="1.1.15427";
155554
156092
 
155555
156093
  function PrintHQChartVersion()
155556
156094
  {