hqchart 1.1.14836 → 1.1.14846

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hqchart",
3
- "version": "1.1.14836",
3
+ "version": "1.1.14846",
4
4
  "description": "HQChart - H5, 微信小程序 沪深/港股/数字货币/期货/美股 K线图(kline),走势图,缩放,拖拽,十字光标,画图工具,截图,筹码图. 分析家语法,通达信语法,(麦语法),第3方数据对接",
5
5
  "main": "lib/main.js",
6
6
  "scripts": {
@@ -744,17 +744,31 @@ function JSDialogTooltip()
744
744
  {
745
745
  var item=data.Data.Data;
746
746
  if (!item) item={ Vol:[] };
747
-
748
- var timeForamt="HH:MM:SS";
749
- if (item.Ver===1) timeForamt="HH:MM"
750
- aryText=
751
- [
752
- this.ForamtDate(item.Date,this.Style==1?"MM/DD/W":"YYYY/MM/DD/W",'DialogTooltip-Date' ),
753
- this.FormatTime(item.Time, null, timeForamt, 'DialogTooltip-Time'),
754
- this.ForamtPrice(item.Price,item.YClose, defaultfloatPrecision,'DialogTooltip-AC-Price',1),
755
- this.FormatIncrease(item.Price,item.YClose,defaultfloatPrecision,'DialogTooltip-AC-Increase',1),
756
- this.FormatVol(item.Vol[0]/unit,'DialogTooltip-AC-Vol' ),
757
- ];
747
+ if (data.Data.Ver===1)
748
+ {
749
+ var timeForamt="HH:MM"
750
+ aryText=
751
+ [
752
+ this.ForamtDate(item.Date,this.Style==1?"MM/DD/W":"YYYY/MM/DD/W",'DialogTooltip-Date' ),
753
+ this.FormatTime(item.Time, null, timeForamt, 'DialogTooltip-Time'),
754
+ this.ForamtPrice(item.Price,item.YClose, defaultfloatPrecision,'DialogTooltip-AC-Price',1),
755
+ this.FormatIncrease(item.Price,item.YClose,defaultfloatPrecision,'DialogTooltip-AC-Increase',1),
756
+ this.FormatVol(item.Vol[0]/unit,'DialogTooltip-AC-Vol'),
757
+ ];
758
+ }
759
+ else
760
+ {
761
+ var timeForamt="HH:MM:SS";
762
+ aryText=
763
+ [
764
+ this.ForamtDate(item.Date,this.Style==1?"MM/DD/W":"YYYY/MM/DD/W",'DialogTooltip-Date' ),
765
+ this.FormatTime(item.Time, null, timeForamt, 'DialogTooltip-Time'),
766
+ this.ForamtPrice(item.Price,item.YClose, defaultfloatPrecision,'DialogTooltip-AC-Price',1),
767
+ this.FormatIncrease(item.Price,item.YClose,defaultfloatPrecision,'DialogTooltip-AC-Increase',1),
768
+ this.FormatVol(item.Vol[0]/unit,'DialogTooltip-AC-Vol', 2),
769
+ this.FormatVol(item.Vol[1]/unit,'DialogTooltip-AC-NotMatchVol', 2),
770
+ ];
771
+ }
758
772
  }
759
773
  else
760
774
  {
@@ -875,7 +889,7 @@ function JSDialogTooltip()
875
889
  return item;
876
890
  }
877
891
 
878
- this.FormatVol=function(vol, TitleID)
892
+ this.FormatVol=function(vol, TitleID, floatPrecision)
879
893
  {
880
894
  var item=
881
895
  {
@@ -886,7 +900,10 @@ function JSDialogTooltip()
886
900
 
887
901
  if (!IFrameSplitOperator.IsNumber(vol)) return item;
888
902
 
889
- item.Text=IFrameSplitOperator.FormatValueStringV2(vol,0,2,this.LanguageID);
903
+ var decimal=0; //小数位数
904
+ if (IFrameSplitOperator.IsNumber(floatPrecision)) decimal=floatPrecision;
905
+
906
+ item.Text=IFrameSplitOperator.FormatValueStringV2(vol,decimal,2,this.LanguageID);
890
907
 
891
908
  return item;
892
909
  }
@@ -55718,8 +55718,11 @@ HQData.Minute_RequestMinuteData=function(data, callback)
55718
55718
  var fullData=HQData.GetDayMinuteDataBySymbol(symbol);
55719
55719
  var srcStock=fullData[0];
55720
55720
  var stockItem={ date:srcStock.date, minute:srcStock.minute, yclose:srcStock.yclose, symbol:symbol, name:symbol };
55721
+
55722
+ //盘前
55721
55723
  if (callcation.Before)
55722
55724
  {
55725
+ /*
55723
55726
  var before=
55724
55727
  [
55725
55728
  //[交易时间, 价格,成交量, 成交金额, 日期(可选,YYYYMMDD)],
@@ -55738,14 +55741,74 @@ HQData.Minute_RequestMinuteData=function(data, callback)
55738
55741
 
55739
55742
  var beforeinfo={ totalcount:11, ver:1.0 };
55740
55743
 
55744
+ stockItem.before=before;
55745
+ stockItem.beforeinfo=beforeinfo;
55746
+ */
55747
+
55748
+ var before=[];
55749
+ var beforeinfo={ totalcount:60*10, ver:2.0 }; //9:15-9:25 集合竞价15分钟 1s一个数据
55750
+ var price=srcStock.yclose+0.01;
55751
+
55752
+ var date=new Date(2021,5,2, 9,15, 0);
55753
+ var mapTest=new Map(
55754
+ [
55755
+ [91505, [91505,price+0.01, 400, 300, 1, 800]],
55756
+ [91550, [91550,price+0.02, 550, 600, 0, 1500]],
55757
+ [91603, [91603,price+0.03, 300, 600, 1, 3600]],
55758
+ [91613, [91613,price+0.03, 150, 320, 1, 3600]],
55759
+ [91623, [91623,price+0.04, 200, 400, 1, 3600]],
55760
+ [91635, [91635,price+0.05, 100, 100, 1, 3600]],
55761
+ [91640, [91640,price+0.03, 350, 210, 2, 1600]],
55762
+ [91711, [91711,price+0.02, 3210, 350, 2, 3700]],
55763
+ [91731, [91731,price+0.04, 110, 450, 1, 3700]],
55764
+ [91825, [91825,price-0.01, 210, 650, 2, 3700]],
55765
+ [91855, [91855,price-0.02, 330, 440, 1, 1000]],
55766
+ [91915, [91915,price-0.03, 630, 640, 1, 1200]],
55767
+ [92022, [92022,price+0.01, 260, 550, 2, 1000]],
55768
+ [92304, [92304,price-0.02, 300, 100, 2, 1000]],
55769
+ [92314, [92314,price-0.03, 550, 150, 2, 1000]],
55770
+ [92344, [92344,price-0.04, 550, 150, 1, 1000]],
55771
+ [92357, [92357,price-0.05, 250, 750, 1, 1500]],
55772
+ [92405, [92405,price-0.07, 450, 50, 2, 1000]],
55773
+ [92435, [92435,price-0.08, 650, 250, 1, 1000]],
55774
+ [92458, [92458,price-0.12, 350, 350, 2, 1000]],
55775
+ ])
55776
+
55777
+ for(var i=0;i<beforeinfo.totalcount; ++i) //1s一个数据
55778
+ {
55779
+ var time=date.getHours()*10000+date.getMinutes()*100+date.getSeconds();
55780
+
55781
+ var item=[ time, null, null, null, null, null ];
55782
+ if (mapTest.has(time))
55783
+ {
55784
+ item=mapTest.get(time);
55785
+ }
55786
+
55787
+ date.setSeconds(date.getSeconds()+1);
55788
+ before.push(item);
55789
+ }
55790
+
55741
55791
  stockItem.before=before;
55742
55792
  stockItem.beforeinfo=beforeinfo;
55743
55793
  }
55744
55794
 
55745
- var lastPrice=stockItem.minute[stockItem.minute.length-1].price;
55795
+ //盘中
55796
+ //stockItem.minute.length=2;
55797
+ //测试用 这里可以修改数据
55798
+ //var lastItem=srcStock.minute[srcStock.minute.length-1];
55799
+ //lastItem.price+=Math.ceil(Math.random()*10)/1000*lastItem.price;
55800
+ /*
55801
+ for(var i=0;i<srcStock.minute.length;++i)
55802
+ {
55803
+ var item=srcStock.minute[i];
55804
+ if (item.amount<1000000) item.amount*=100000;
55805
+ }
55806
+ */
55746
55807
 
55747
55808
  if (bBuySellBar) //盘口分析
55748
55809
  {
55810
+ var lastPrice=srcStock.yclose;
55811
+ if (stockItem.minute.length>0) lastPrice=stockItem.minute[stockItem.minute.length-1].price;
55749
55812
  var aryBuy=[];
55750
55813
  var value=lastPrice+0.01;
55751
55814
  for(var i=0;i<10;++i)
@@ -55764,20 +55827,54 @@ HQData.Minute_RequestMinuteData=function(data, callback)
55764
55827
  stockItem.BuySellData={ AryBuy:aryBuy, ArySell:arySell };
55765
55828
  }
55766
55829
 
55767
- //测试用 这里可以修改数据
55768
- //var lastItem=srcStock.minute[srcStock.minute.length-1];
55769
- //lastItem.price+=Math.ceil(Math.random()*10)/1000*lastItem.price;
55770
- /*
55771
- for(var i=0;i<srcStock.minute.length;++i)
55830
+ //盘后
55831
+ if (callcation.After && stockItem.minute.length>=240)
55772
55832
  {
55773
- var item=srcStock.minute[i];
55774
- if (item.amount<1000000) item.amount*=100000;
55775
- }
55776
- */
55833
+ var price=stockItem.minute[stockItem.minute.length-1].price;
55834
+ var afterData=[]
55835
+ var afterInfo={ ver:2.0, totalcount:60*3 } //14:57-15:00
55836
+ var date=new Date(2021,5,2, 14,57, 0);
55837
+ var mapTest=new Map(
55838
+ [
55839
+ [145708, [145708,price+0.01, 400, 300, 1, 800]],
55840
+ [145718, [145718,price+0.02, 550, 600, 0, 1500]],
55841
+ [145738, [145738,price+0.02, 150, 800, 0, 1500]],
55842
+ [145748, [145748,price+0.02, 150, 800, 0, 1500]],
55843
+ [145803, [145803,price+0.03, 300, 600, 1, 3600]],
55844
+ [145815, [145815,price+0.03, 350, 210, 2, 1600]],
55845
+ [145826, [145826,price+0.02, 1210, 350, 2, 2700]],
55846
+ [145833, [145833,price+0.01, 260, 550, 2, 1000]],
55847
+ [145845, [145845,price+0.02, 160, 750, 2, 1000]],
55848
+ [145858, [145858,price-0.01, 460, 650, 2, 1500]],
55849
+ [145905, [145905,price-0.02, 160, 450, 1, 1500]],
55850
+ [145928, [145928,price-0.02, 260, 250, 1, 1500]],
55851
+ [145948, [145948,price-0.02, 860, 150, 1, 1500]],
55852
+ ])
55853
+
55854
+ for(var i=0;i<afterInfo.totalcount; ++i) //1s一个数据
55855
+ {
55856
+ var time=date.getHours()*10000+date.getMinutes()*100+date.getSeconds();
55857
+
55858
+ var item=[ time, null, null, null, null, null ];
55859
+
55860
+ if (mapTest.has(time))
55861
+ {
55862
+ item=mapTest.get(time);
55863
+ }
55864
+
55865
+ date.setSeconds(date.getSeconds()+1);
55866
+ afterData.push(item);
55867
+ }
55777
55868
 
55778
- stockItem.minute.length=50;
55869
+ stockItem.after=afterData;
55870
+ stockItem.afterinfo=afterInfo;
55871
+ }
55779
55872
 
55780
55873
  var hqchartData={code:0, stock:[stockItem] };
55874
+
55875
+ var time=new Date();
55876
+ if (time.getSeconds()%3==1)
55877
+ hqchartData.LatestPointFlash={ FlashCount:2 };
55781
55878
 
55782
55879
 
55783
55880
  callback(hqchartData);
@@ -55813,15 +55910,16 @@ HQData.Minute_RequestMinuteDataV2=function(data, callback)
55813
55910
  var date=new Date(parseInt(stockItem.date/10000),(stockItem.date/100%100-1),stockItem.date%100, 9, 15, 0);
55814
55911
  var count=10*60; //9:15-9:25
55815
55912
  var before=[];
55816
- for(var i=0;i<count;++i)
55913
+ for(var i=0, j=0;i<count;++i)
55817
55914
  {
55818
55915
  var time=date.getHours()*10000+date.getMinutes()*100+date.getSeconds();
55819
- var testIndex=Math.floor(Math.random()*10)%TEST_BEFORE_DATA.length;
55916
+ var testIndex=j%TEST_BEFORE_DATA.length;
55820
55917
  var testData=TEST_BEFORE_DATA[testIndex];
55821
55918
  var item=[ time, null, null, null, null, null ];
55822
55919
  if (i%20==0 || i==count-1)
55823
55920
  {
55824
55921
  item=[ time, testData[0], testData[1], testData[2], testData[3], (testData[1]+testData[2])*1.5 ];
55922
+ ++j;
55825
55923
  }
55826
55924
  before.push(item);
55827
55925
  date.setSeconds(date.getSeconds()+1);
@@ -55847,15 +55945,16 @@ HQData.Minute_RequestMinuteDataV2=function(data, callback)
55847
55945
  var date=new Date(parseInt(stockItem.date/10000),(stockItem.date/100%100-1),stockItem.date%100, 14, 57, 0);
55848
55946
  var count=3*60; //14:57-15:00
55849
55947
  var after=[];
55850
- for(var i=0;i<count;++i)
55948
+ for(var i=0,j=0;i<count;++i)
55851
55949
  {
55852
55950
  var time=date.getHours()*10000+date.getMinutes()*100+date.getSeconds();
55853
- var testIndex=Math.floor(Math.random()*10)%TEST_AFTER_DATA.length;
55951
+ var testIndex=j%TEST_AFTER_DATA.length;
55854
55952
  var testData=TEST_AFTER_DATA[testIndex];
55855
55953
  var item=[ time, null, null, null, null, null ];
55856
55954
  if (i%10==0 || i==count-1)
55857
55955
  {
55858
55956
  item=[ time, testData[0], testData[1], testData[2], testData[3], (testData[1]+testData[2])*1.5 ];
55957
+ ++j;
55859
55958
  }
55860
55959
  after.push(item);
55861
55960
  date.setSeconds(date.getSeconds()+1);
@@ -56917,11 +57016,11 @@ HQData.Report_RequestStockData=function(data, callback)
56917
57016
  //名字字段
56918
57017
  var symbolEx={ Text:name };
56919
57018
  if (i%20==5)
56920
- symbolEx.Symbol={ Family:'iconfont', Size:16, Data:[ { Text:'\ue629', Color:'rgb(255,165,0)'}, { Text:'\ue627', Color:'#1c65db'} ] };
57019
+ symbolEx.Symbol={ Family:'iconfont', Size:14, Data:[ { Text:'\ue629', Color:'rgb(255,165,0)'}, { Text:'\ue627', Color:'#1c65db'} ] };
56921
57020
  else if (i%20==9)
56922
- symbolEx.Symbol={ Family:'iconfont', Size:16, Data:[ { Text:'\ue629', Color:'rgb(255,165,0)'}] } ;
57021
+ symbolEx.Symbol={ Family:'iconfont', Size:14, Data:[ { Text:'\ue629', Color:'rgb(255,165,0)'}] } ;
56923
57022
  else if (i%20==18)
56924
- symbolEx.Symbol={ Family:'iconfont', Size:16, Data:[ { Text:'\ue627', Color:'#1c65db'}] } ;
57023
+ symbolEx.Symbol={ Family:'iconfont', Size:14, Data:[ { Text:'\ue627', Color:'#1c65db'}] } ;
56925
57024
 
56926
57025
  newItem[27]=symbolEx;
56927
57026
 
@@ -57032,6 +57131,7 @@ HQData.Report_RequestStockSortData=function(data, callback)
57032
57131
  var column=data.Request.Data.column; //排序列信息
57033
57132
  var sortType=data.Request.Data.sort; //排序方向
57034
57133
  var pageSize=data.Request.Data.pageSize;
57134
+ var hqchart=data.Self;
57035
57135
  data.PreventDefault=true;
57036
57136
 
57037
57137
  var start=range.start;
@@ -57156,6 +57256,7 @@ HQData.Report_RequestVirtualStockData=function(data, callback)
57156
57256
  var column=data.Request.Data.column; //排序列信息
57157
57257
  var sortType=data.Request.Data.sort; //排序方向
57158
57258
  var pageSize=data.Request.Data.pageSize;
57259
+ var hqchart=data.Self;
57159
57260
  data.PreventDefault=true;
57160
57261
 
57161
57262
  var start=range.start;
@@ -57215,6 +57316,21 @@ HQData.Report_RequestVirtualStockData=function(data, callback)
57215
57316
  //换手率
57216
57317
  newItem[23]=(Math.round(Math.random()*60))/100;
57217
57318
 
57319
+ //行业
57320
+ newItem[201]="行业X";
57321
+ if (i%10==4) newItem[201]={ Text:"金融", TextColor:"rgb(0,206,209)"};
57322
+ else if (i%10==9) newItem[201]={ Text:"航天", TextColor:"rgb(0,0,0)", BGColor:"rgb(45,222,179)"};
57323
+ //地区
57324
+ newItem[202]="地区X";
57325
+
57326
+ newItem[101]=(Math.round(Math.random()*60))/100;
57327
+ newItem[102]=(Math.round(Math.random()*60))/100;
57328
+ newItem[103]=(Math.round(Math.random()*60))/100;
57329
+
57330
+ //日期
57331
+ newItem[401]={ DateTime:new Date() };
57332
+ newItem[402]={ DateTime:new Date() };
57333
+
57218
57334
  //名字字段
57219
57335
  var symbolEx={ Text:name };
57220
57336
  if (i%20==5)
@@ -57231,10 +57347,7 @@ HQData.Report_RequestVirtualStockData=function(data, callback)
57231
57347
  var extendData=[];
57232
57348
  newItem[30]=extendData;
57233
57349
 
57234
- //行业
57235
- extendData[0]="行业X";
57236
- //地区
57237
- extendData[1]="地区X";
57350
+
57238
57351
 
57239
57352
  //PE|PB
57240
57353
  extendData[2]=(Math.round(Math.random()*60))/100;
@@ -57252,9 +57365,18 @@ HQData.Report_RequestVirtualStockData=function(data, callback)
57252
57365
  newItem[351]={Title:"启动"};
57253
57366
  newItem[352]={Title:"加入"};
57254
57367
 
57368
+ if (i%20==3) newItem[80]='rgb(132,112,255)';
57369
+ else newItem[80]=null;
57370
+
57255
57371
 
57256
57372
  aryData.push(newItem);
57257
57373
  aryIndex.push(start+i);
57374
+
57375
+
57376
+ if (i==0)
57377
+ {
57378
+ hqchart.SetFlashBGItem(symbol, { ID:-1 , Color:"rgb(200,0,200)" });
57379
+ }
57258
57380
  }
57259
57381
  }
57260
57382
 
@@ -57669,6 +57791,8 @@ HQData.Report_APIIndex=function(data, callback)
57669
57791
  HQData.APIIndex_KLINE_TABLE(data, callback);
57670
57792
  else if (request.Data.indexname=="API_DRAWSVG")
57671
57793
  HQData.APIIndex_DRAWSVG(data, callback);
57794
+ else if (request.Data.indexname=="API_BASELINE_BAR")
57795
+ HQData.APIIndex_BASELINE_BAR(data, callback);
57672
57796
  }
57673
57797
 
57674
57798
 
@@ -59017,3 +59141,41 @@ HQData.RequestVolumeProfileData=function(data, callback)
59017
59141
  }
59018
59142
 
59019
59143
 
59144
+ HQData.APIIndex_BASELINE_BAR=function(data, callback)
59145
+ {
59146
+ data.PreventDefault=true;
59147
+ var hqchart=data.HQChart;
59148
+ var kData=hqchart.GetKData();
59149
+
59150
+ var pointData=
59151
+ {
59152
+ name:"BASELINE_BAR", type:1,
59153
+ Draw:
59154
+ {
59155
+ Name:"BASELINE_BAR",
59156
+ DrawType:"BASELINE_BAR",
59157
+ DrawData:[],
59158
+ Config:{ UpColor:"rgb(255,0,255)", DownColor:"rgb(255,165,0)"},
59159
+ },
59160
+ };
59161
+
59162
+ for(var i=0;i<kData.Data.length;++i)
59163
+ {
59164
+ var kItem=kData.Data[i];
59165
+
59166
+ var item={ Date:kItem.Date, Time:kItem.Time, Up:kItem.Vol*0.2, Down:(kItem.Vol*0.35)*-1 };
59167
+ pointData.Draw.DrawData.push(item);
59168
+ }
59169
+
59170
+ var apiData=
59171
+ {
59172
+ code:0,
59173
+ stock:{ name:hqchart.Name, symbol:hqchart.Symbol },
59174
+ outdata: { date:kData.GetDate(), time:kData.GetTime(), outvar:[ pointData] },
59175
+ };
59176
+
59177
+ console.log('[HQData.APIIndex_BASELINE_BAR] apiData ', apiData);
59178
+ callback(apiData);
59179
+ }
59180
+
59181
+
@@ -20260,7 +20260,8 @@ var SCRIPT_CHART_NAME=
20260
20260
 
20261
20261
  CLIP_COLOR_STICK:"CLIP_COLOR_STICK", //上下柱子 裁剪
20262
20262
 
20263
- DRAW_KLINE:"DRAWKLINE"
20263
+ DRAW_KLINE:"DRAWKLINE",
20264
+ BASELINE_BAR:"BASELINE_BAR"
20264
20265
  }
20265
20266
 
20266
20267
 
@@ -22323,6 +22324,32 @@ function ScriptIndex(name,script,args,option)
22323
22324
  hqChart.ChartPaint.push(chart);
22324
22325
  }
22325
22326
 
22327
+ this.CreateBaseLineBar=function(hqChart,windowIndex,varItem,id)
22328
+ {
22329
+ var chart=new ChartBaseLineBar();
22330
+ chart.Canvas=hqChart.Canvas;
22331
+ chart.Name=varItem.Name;
22332
+ chart.ChartBorder=hqChart.Frame.SubFrame[windowIndex].Frame.ChartBorder;
22333
+ chart.ChartFrame=hqChart.Frame.SubFrame[windowIndex].Frame;
22334
+ chart.HQChart=hqChart;
22335
+ chart.Identify=this.Guid;
22336
+
22337
+ chart.Data=hqChart.GetKData(); //绑定K线
22338
+ chart.AryData=varItem.Draw.DrawData;
22339
+
22340
+ var config=varItem.Draw.Config;
22341
+ if (config)
22342
+ {
22343
+ if (config.UpColor) chart.UpColor=config.UpColor;
22344
+ if (config.DownColor) chart.DownColor=config.DownColor;
22345
+ if (IFrameSplitOperator.IsNumber(config.DefaultMax)) chart.DefaultMax=config.DefaultMax;
22346
+ }
22347
+
22348
+ chart.BuildCacheData();
22349
+ this.SetChartIndexName(chart);
22350
+ hqChart.ChartPaint.push(chart);
22351
+ }
22352
+
22326
22353
 
22327
22354
  this.CreateClipColorStick=function(hqChart,windowIndex,varItem,id)
22328
22355
  {
@@ -22695,6 +22722,9 @@ function ScriptIndex(name,script,args,option)
22695
22722
  case SCRIPT_CHART_NAME.CLIP_COLOR_STICK:
22696
22723
  this.CreateClipColorStick(hqChart,windowIndex,item,i);
22697
22724
  break;
22725
+ case SCRIPT_CHART_NAME.BASELINE_BAR:
22726
+ this.CreateBaseLineBar(hqChart,windowIndex,item,i);
22727
+ break;
22698
22728
  default:
22699
22729
  {
22700
22730
  var find=g_ScriptIndexChartFactory.Get(item.Draw.DrawType); //外部挂接
@@ -23048,6 +23078,9 @@ function OverlayScriptIndex(name,script,args,option)
23048
23078
  case SCRIPT_CHART_NAME.OVERLAY_BARS:
23049
23079
  this.CreateStackedBar(hqChart,windowIndex,item,i);
23050
23080
  break;
23081
+ case SCRIPT_CHART_NAME.BASELINE_BAR:
23082
+ this.CreateBaseLineBar(hqChart,windowIndex,item,i);
23083
+ break;
23051
23084
  case "DRAWCOLORKLINE":
23052
23085
  this.CreateDrawColorKLine(hqChart,windowIndex,item,i);
23053
23086
  break;
@@ -23860,6 +23893,33 @@ function OverlayScriptIndex(name,script,args,option)
23860
23893
  frame.ChartPaint.push(chart);
23861
23894
  }
23862
23895
 
23896
+ this.CreateBaseLineBar=function(hqChart,windowIndex,varItem,id)
23897
+ {
23898
+ var overlayIndex=this.OverlayIndex;
23899
+ var frame=overlayIndex.Frame;
23900
+ var chart=new ChartBaseLineBar();
23901
+ chart.Canvas=hqChart.Canvas;
23902
+ chart.Name=varItem.Name;
23903
+ chart.HQChart=hqChart;
23904
+ chart.ChartBorder=frame.Frame.ChartBorder;
23905
+ chart.ChartFrame=frame.Frame;
23906
+ chart.Identify=overlayIndex.Identify;
23907
+
23908
+ chart.Data=hqChart.GetKData(); //绑定K线
23909
+ chart.AryData=varItem.Draw.DrawData;
23910
+
23911
+ var config=varItem.Draw.Config;
23912
+ if (config)
23913
+ {
23914
+ if (config.UpColor) chart.UpColor=config.UpColor;
23915
+ if (config.DownColor) chart.DownColor=config.DownColor;
23916
+ if (IFrameSplitOperator.IsNumber(config.DefaultMax)) chart.DefaultMax=config.DefaultMax;
23917
+ }
23918
+
23919
+ chart.BuildCacheData();
23920
+ frame.ChartPaint.push(chart);
23921
+ }
23922
+
23863
23923
 
23864
23924
  //创建通道
23865
23925
  this.CreateChannel=function(hqChart,windowIndex,varItem,id)
@@ -25769,6 +25829,17 @@ function APIScriptIndex(name,script,args,option, isOverlay)
25769
25829
  if (draw.Option) outVarItem.Option=draw.Option;
25770
25830
  result.push(outVarItem);
25771
25831
  }
25832
+ else if (draw.DrawType==SCRIPT_CHART_NAME.BASELINE_BAR)
25833
+ {
25834
+ drawItem.Name=draw.Name;
25835
+ drawItem.Type=draw.Type;
25836
+ drawItem.DrawType=draw.DrawType;
25837
+ drawItem.DrawData=draw.DrawData;
25838
+ drawItem.Config=draw.Config;
25839
+
25840
+ outVarItem.Draw=drawItem;
25841
+ result.push(outVarItem);
25842
+ }
25772
25843
  else if (draw.DrawType=='MULTI_LINE')
25773
25844
  {
25774
25845
  drawItem.Text=draw.Text;