hqchart 1.1.14683 → 1.1.14688

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.
@@ -5124,6 +5124,12 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
5124
5124
  chart.EnableBorderDrag=option.EnableBorderDrag;
5125
5125
  }
5126
5126
 
5127
+ if (IFrameSplitOperator.IsBool(option.EnableBuySellBar))
5128
+ {
5129
+ var barChart=chart.GetChartMinuteBuySellBar();
5130
+ if (barChart) barChart.IsShow=option.EnableBuySellBar;
5131
+ }
5132
+
5127
5133
  this.AdjustChartBorder(chart);
5128
5134
 
5129
5135
  if (option.Frame)
@@ -7023,6 +7029,7 @@ var JSCHART_MENU_ID=
7023
7029
  CMD_FULLSCREEN_SUMMARY_ID:56, //当前屏区间统计
7024
7030
  CMD_CORSS_DBCLICK_ID:57, //双击显示隐藏十字光标
7025
7031
  CMD_ENABLE_KLINE_DAY_SUMMARY_ID:58, //K线底部显示走完剩余时间
7032
+ CMD_SHOW_BUYSELL_BAR_ID:59, //盘口分析(右侧显示买卖盘柱子) 分时图
7026
7033
 
7027
7034
 
7028
7035
 
@@ -7265,6 +7272,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
7265
7272
  this.CustomChartDrag; //自定义图形的拖拽操作 { Type:, Data: }
7266
7273
 
7267
7274
  this.StockCache={ Data:null }; //扩展数据缓存数据
7275
+ this.BuySellData={ ArySell:null, AryBuy:null }; //10档买卖盘
7268
7276
 
7269
7277
  this.JSPopMenu; //内置菜单
7270
7278
  this.IsShowRightMenu=true; //显示右键菜单
@@ -7316,6 +7324,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
7316
7324
  this.ClearStockCache=function()
7317
7325
  {
7318
7326
  this.StockCache.Data=null;
7327
+ this.BuySellData.AryBuy=null;
7328
+ this.BuySellData.ArySell=null;
7319
7329
  }
7320
7330
 
7321
7331
  this.InitalPopMenu=function() //初始化弹出窗口
@@ -15003,6 +15013,15 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
15003
15013
  this.Draw();
15004
15014
  }
15005
15015
  break;
15016
+ case JSCHART_MENU_ID.CMD_SHOW_BUYSELL_BAR_ID:
15017
+ if (IFrameSplitOperator.IsBool(srcParam))
15018
+ {
15019
+ var chart=this.GetChartMinuteBuySellBar();
15020
+ chart.IsShow=srcParam;
15021
+ this.RequestData({ ClearYCoordinateMaxMin:true });
15022
+ this.Draw();
15023
+ }
15024
+ break;
15006
15025
  }
15007
15026
  }
15008
15027
 
@@ -29653,7 +29672,8 @@ function ChartPaintFactory()
29653
29672
  [
29654
29673
  ["ChartKLine", { Create:function(option) { return new ChartKLine(); } }], //K线图
29655
29674
  ["ChartMinuteVolumBar",{ Create:function(option) { return new ChartMinuteVolumBar(); } }], //分时成交量柱子
29656
- ["ChartMinutePriceLine",{ Create:function(option) { return new ChartMinutePriceLine();} }]
29675
+ ["ChartMinutePriceLine",{ Create:function(option) { return new ChartMinutePriceLine();} }],
29676
+ ["ChartMinuteBuySellBar", { Create:function(option){ return new ChartMinuteBuySellBar(); }}],
29657
29677
  ]);
29658
29678
 
29659
29679
  this.Create=function(name, option)
@@ -44174,6 +44194,216 @@ function ChartMinutePositionLine()
44174
44194
  }
44175
44195
  }
44176
44196
 
44197
+ //分时图 右侧10档买卖柱子
44198
+ function ChartMinuteBuySellBar()
44199
+ {
44200
+ this.newMethod=IChartPainting; //派生
44201
+ this.newMethod();
44202
+ delete this.newMethod;
44203
+
44204
+ this.BuyColor=g_JSChartResource.Minute.BuySellBar.BuyColor;
44205
+ this.SellColor=g_JSChartResource.Minute.BuySellBar.SellColor;
44206
+ this.BarWidth=g_JSChartResource.Minute.BuySellBar.BarWidth;
44207
+ this.MaxBarWidth=g_JSChartResource.Minute.BuySellBar.MaxBarWidth;
44208
+ this.YOffset=g_JSChartResource.Minute.BuySellBar.YOffset;
44209
+ this.Font=g_JSChartResource.Minute.BuySellBar.Font;
44210
+ this.TextColor=g_JSChartResource.Minute.BuySellBar.TextColor;
44211
+
44212
+ this.IsDrawFirst=true;
44213
+ this.IsShow=false;
44214
+
44215
+ this.BuySellData=null; //{ AryBuy:[{ Price:10.5, Vol:300}], ArySell:[{ Price:10.5, Vol:300}] }
44216
+
44217
+ this.ReloadResource=function(resource)
44218
+ {
44219
+ this.BuyColor=g_JSChartResource.Minute.BuySellBar.BuyColor;
44220
+ this.SellColor=g_JSChartResource.Minute.BuySellBar.SellColor;
44221
+ this.BarWidth=g_JSChartResource.Minute.BuySellBar.BarWidth;
44222
+ this.MaxBarWidth=g_JSChartResource.Minute.BuySellBar.MaxBarWidth;
44223
+ this.YOffset=g_JSChartResource.Minute.BuySellBar.YOffset;
44224
+ this.Font=g_JSChartResource.Minute.BuySellBar.Font;
44225
+ this.TextColor=g_JSChartResource.Minute.BuySellBar.TextColor;
44226
+ }
44227
+
44228
+ this.Draw=function()
44229
+ {
44230
+ if (!this.IsShow || this.ChartFrame.IsMinSize || !this.IsVisible) return;
44231
+ if (this.IsShowIndexTitleOnly()) return;
44232
+ if (this.IsHideScriptIndex()) return;
44233
+ if (!this.BuySellData) return;
44234
+
44235
+ var volRange=this.GetVolRange();
44236
+ if (!volRange) return;
44237
+
44238
+ var bHScreen=(this.ChartFrame.IsHScreen===true);
44239
+ var xPointCount=this.ChartFrame.XPointCount;
44240
+
44241
+ var xStart=this.ChartFrame.GetXFromIndex(xPointCount-this.MaxBarWidth);
44242
+ var xEnd=this.ChartFrame.GetXFromIndex(xPointCount-1);
44243
+
44244
+ function _Temp_GetXFromData(value)
44245
+ {
44246
+ var maxWidth=xEnd-xStart;
44247
+ var width = maxWidth * (value - volRange.Min) / (volRange.Max - volRange.Min);
44248
+ return xEnd-width;
44249
+ }
44250
+
44251
+ this.Canvas.save();
44252
+ this.ClipClient(bHScreen);
44253
+
44254
+ var aryBuy=this.BuySellData.AryBuy;
44255
+ if (IFrameSplitOperator.IsNonEmptyArray(aryBuy))
44256
+ {
44257
+ this.Canvas.beginPath();
44258
+ var lineCount=0;
44259
+ for(var i=0;i<aryBuy.length;++i)
44260
+ {
44261
+ var item=aryBuy[i];
44262
+ if (!item || !IFrameSplitOperator.IsNumber(item.Vol) || !IFrameSplitOperator.IsNumber(item.Price)) continue;
44263
+
44264
+ var y=this.GetYFromData(item.Price,false)
44265
+ var x=_Temp_GetXFromData(item.Vol);
44266
+
44267
+ if (bHScreen)
44268
+ {
44269
+ y-=-this.YOffset;
44270
+ this.Canvas.moveTo(y,x);
44271
+ this.Canvas.lineTo(y,xEnd);
44272
+ }
44273
+ else
44274
+ {
44275
+ y-=-this.YOffset;
44276
+ this.Canvas.moveTo(x,y);
44277
+ this.Canvas.lineTo(xEnd,y);
44278
+ }
44279
+
44280
+ ++lineCount;
44281
+ }
44282
+
44283
+ if (lineCount>0)
44284
+ {
44285
+ this.Canvas.strokeStyle=this.BuyColor;
44286
+ if (IFrameSplitOperator.IsPlusNumber(this.BarWidth)) this.Canvas.lineWidth=this.BarWidth;
44287
+ this.Canvas.stroke();
44288
+ }
44289
+ }
44290
+
44291
+ var arySell=this.BuySellData.ArySell;
44292
+ if (IFrameSplitOperator.IsNonEmptyArray(arySell))
44293
+ {
44294
+ this.Canvas.beginPath();
44295
+ var lineCount=0;
44296
+ for(var i=0;i<arySell.length;++i)
44297
+ {
44298
+ var item=arySell[i];
44299
+ if (!item || !IFrameSplitOperator.IsNumber(item.Vol) || !IFrameSplitOperator.IsNumber(item.Price)) continue;
44300
+
44301
+ var y=this.GetYFromData(item.Price,false);
44302
+ var x=_Temp_GetXFromData(item.Vol);
44303
+
44304
+ if (bHScreen)
44305
+ {
44306
+ y-=-this.YOffset;
44307
+ this.Canvas.moveTo(y,x);
44308
+ this.Canvas.lineTo(y,xEnd);
44309
+ }
44310
+ else
44311
+ {
44312
+ y-=-this.YOffset;
44313
+ this.Canvas.moveTo(x,y);
44314
+ this.Canvas.lineTo(xEnd,y);
44315
+ }
44316
+
44317
+ ++lineCount;
44318
+ }
44319
+
44320
+ if (lineCount>0)
44321
+ {
44322
+ this.Canvas.strokeStyle=this.SellColor;
44323
+ if (IFrameSplitOperator.IsPlusNumber(this.BarWidth)) this.Canvas.lineWidth=this.BarWidth;
44324
+ this.Canvas.stroke();
44325
+ }
44326
+ }
44327
+
44328
+
44329
+ this.DrawMaxVolText(volRange.Max, xStart);
44330
+
44331
+ this.Canvas.restore();
44332
+ }
44333
+
44334
+ this.DrawMaxVolText=function(value, x)
44335
+ {
44336
+ if (!IFrameSplitOperator.IsNumber(value)) return;
44337
+
44338
+ var border=this.ChartFrame.GetBorder();
44339
+ var text=value.toFixed(0);
44340
+ this.Canvas.textAlign = 'left';
44341
+ this.Canvas.textBaseline = 'bottom';
44342
+ this.Canvas.font=this.Font;
44343
+ this.Canvas.fillStyle=this.TextColor;
44344
+
44345
+ if (this.ChartFrame.IsHScreen===true)
44346
+ {
44347
+ var yBottom=border.LeftEx+1;
44348
+ this.Canvas.save();
44349
+ this.Canvas.translate(yBottom,x);
44350
+ this.Canvas.rotate(90 * Math.PI / 180);
44351
+ this.Canvas.fillText(text,0,0);
44352
+ this.Canvas.restore();
44353
+ }
44354
+ else
44355
+ {
44356
+ var yBottom=border.Bottom-1;
44357
+ this.Canvas.fillText(text,x,yBottom);
44358
+ }
44359
+ }
44360
+
44361
+ this.GetVolRange=function()
44362
+ {
44363
+ if (!this.BuySellData) return null;
44364
+
44365
+ var range={ Min:0, Max:null };
44366
+ var aryBuy=this.BuySellData.AryBuy;
44367
+ var arySell=this.BuySellData.ArySell;
44368
+ var count=0;
44369
+
44370
+ if (IFrameSplitOperator.IsNonEmptyArray(aryBuy))
44371
+ {
44372
+ for(var i=0;i<aryBuy.length;++i)
44373
+ {
44374
+ var item=aryBuy[i];
44375
+ if (!IFrameSplitOperator.IsNumber(item.Vol)) continue;
44376
+
44377
+ if (range.Min==null || range.Min>item.Vol) range.Min=item.Vol;
44378
+ if (range.Max==null || range.Max<item.Vol) range.Max=item.Vol;
44379
+ ++count;
44380
+ }
44381
+ }
44382
+
44383
+ if (IFrameSplitOperator.IsNonEmptyArray(arySell))
44384
+ {
44385
+ for(var i=0;i<arySell.length;++i)
44386
+ {
44387
+ var item=arySell[i];
44388
+ if (!IFrameSplitOperator.IsNumber(item.Vol)) continue;
44389
+
44390
+ if (range.Min==null || range.Min>item.Vol) range.Min=item.Vol;
44391
+ if (range.Max==null || range.Max<item.Vol) range.Max=item.Vol;
44392
+ ++count;
44393
+ }
44394
+ }
44395
+
44396
+ if (count<=0) return null;
44397
+
44398
+ return range;
44399
+ }
44400
+
44401
+ this.GetMaxMin=function()
44402
+ {
44403
+ return { Min:null, Max:null };
44404
+ }
44405
+ }
44406
+
44177
44407
  //分钟信息地雷 支持横屏
44178
44408
  function ChartMinuteInfo()
44179
44409
  {
@@ -51413,6 +51643,7 @@ function MinuteLeftTooltipPaint()
51413
51643
  this.Draw=function()
51414
51644
  {
51415
51645
  if (!this.IsEnableDraw()) return;
51646
+ if (this.ChartFrame && this.ChartFrame.IsHScreen===true) return; //不支持横屏
51416
51647
 
51417
51648
  this.TitlePaint=this.HQChart.TitlePaint[0];
51418
51649
  if (!this.TitlePaint) return;
@@ -77669,6 +77900,17 @@ function JSChartResource()
77669
77900
  Night: { Color:"rgb(0,0,0)", BGColor:"rgb(179,179,179)", BorderColor:"rgb(179,179,179)", Margin:{ Left:5, Top:2, Bottom:2, Right:5 } },
77670
77901
  }
77671
77902
 
77903
+ this.Minute.BuySellBar=
77904
+ {
77905
+ BuyColor:"rgb(242,54,69)",
77906
+ SellColor:"rgb(8,153,129)",
77907
+ BarWidth:4*GetDevicePixelRatio(),
77908
+ MaxBarWidth:120,
77909
+ YOffset:1,
77910
+ Font:`${12*GetDevicePixelRatio()}px 微软雅黑`,
77911
+ TextColor:"rgb(128,128,128)",
77912
+ }
77913
+
77672
77914
  this.DefaultTextColor="rgb(43,54,69)"; //图形中默认的字体颜色
77673
77915
  this.DefaultTextFont=14*GetDevicePixelRatio() +'px 微软雅黑'; //图形中默认的字体
77674
77916
  this.TitleFont=13*GetDevicePixelRatio() +'px 微软雅黑'; //指标显示,tooltip显示字体
@@ -78784,6 +79026,7 @@ function JSChartResource()
78784
79026
  {
78785
79027
  BorderColor:'rgb(192,192,192)', //边框线
78786
79028
  SelectedColor:"rgb(180,240,240)", //选中行
79029
+ SelectedLine:{ Color:"rgb(180,240,240)", Width:2 },
78787
79030
  Header:
78788
79031
  {
78789
79032
  Color:"rgb(60,60,60)", //表头文字颜色
@@ -79206,6 +79449,19 @@ function JSChartResource()
79206
79449
  CopyMarginConfig(this.Minute.NightDay.Night.Margin,subItem.Margin);
79207
79450
  }
79208
79451
  }
79452
+
79453
+ if (style.Minute.BuySellBar)
79454
+ {
79455
+ var item=style.Minute.BuySellBar;
79456
+ var dest=this.Minute.BuySellBar;
79457
+ if (item.BuyColor) dest.BuyColor=item.BuyColor;
79458
+ if (item.SellColor) dest.SellColor=item.SellColor;
79459
+ if (item.Font) dest.Font=item.Font;
79460
+ if (item.TextColor) dest.TextColor=item.TextColor;
79461
+ if (IFrameSplitOperator.IsNumber(item.BarWidth)) dest.BarWidth=item.BarWidth;
79462
+ if (IFrameSplitOperator.IsNumber(item.MaxBarWidth)) dest.MaxBarWidth=item.MaxBarWidth;
79463
+ if (IFrameSplitOperator.IsNumber(item.YOffset)) dest.YOffset=item.YOffset;
79464
+ }
79209
79465
  }
79210
79466
 
79211
79467
  if (style.PopMinuteChart)
@@ -80102,6 +80358,14 @@ function JSChartResource()
80102
80358
  if (item.DownTextColor) this.Report.DownTextColor=item.DownTextColor;
80103
80359
  if (item.UnchagneTextColor) this.Report.UnchagneTextColor=item.UnchagneTextColor;
80104
80360
  if (item.BorderColor) this.Report.SelectedColor=item.SelectedColor;
80361
+
80362
+ if (item.SelectedLine)
80363
+ {
80364
+ var subItem=item.SelectedLine;
80365
+ var subDest=this.Report.SelectedLine;
80366
+ if (subItem.Color) subDest.Color=subItem.Color;
80367
+ if (IFrameSplitOperator.IsNumber(subItem.Width)) subDest.Width=subItem.Width;
80368
+ }
80105
80369
 
80106
80370
 
80107
80371
  if (item.CloseLine)
@@ -90606,6 +90870,24 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
90606
90870
  return false;
90607
90871
  }
90608
90872
 
90873
+ this.GetChartMinuteBuySellBar=function()
90874
+ {
90875
+ var chart=this.ChartPaint[3];
90876
+ if (!chart) return null;
90877
+
90878
+ if (chart.Name!="Minute-BuySell-Bar") return null;
90879
+
90880
+ return chart;
90881
+ }
90882
+
90883
+ this.IsShowMinuteBuySellBar=function()
90884
+ {
90885
+ var chart=this.GetChartMinuteBuySellBar();
90886
+ if (!chart) return false;
90887
+
90888
+ return chart.IsShow;
90889
+ }
90890
+
90609
90891
  //左右拖拽
90610
90892
  this.OnDragMode_One=function(moveData, e)
90611
90893
  {
@@ -92065,7 +92347,9 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
92065
92347
  bRButtonSelectRect=this.ChartDragSelectRect.EnableRButton;
92066
92348
  bLButtonSelectRect=this.ChartDragSelectRect.EnableLButton;
92067
92349
  }
92068
-
92350
+
92351
+ var bShowBuySellBar=this.IsShowMinuteBuySellBar();
92352
+
92069
92353
  var minItem=null;
92070
92354
  if (frameID>=0 && option && IFrameSplitOperator.IsNumber(option.CursorIndex))
92071
92355
  {
@@ -92162,6 +92446,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
92162
92446
  SubMenu:
92163
92447
  [
92164
92448
  { Name:"画图工具", Data:{ ID:JSCHART_MENU_ID.CMD_SHOW_DRAWTOOL_ID, Args:[]}, Checked:this.IsShowDrawToolDialog()},
92449
+ { Name:"盘口分析", Data:{ ID:JSCHART_MENU_ID.CMD_SHOW_BUYSELL_BAR_ID, Args:[!bShowBuySellBar]}, Checked:bShowBuySellBar },
92165
92450
 
92166
92451
  { Name:JSPopMenu.SEPARATOR_LINE_NAME },
92167
92452
 
@@ -92854,6 +93139,16 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
92854
93139
  volLine.ShareAfterVol=this.ShareAfterVol;
92855
93140
  this.ChartPaint[2]=volLine;
92856
93141
 
93142
+ var buySellBar=g_ChartPaintFactory.Create("ChartMinuteBuySellBar");
93143
+ buySellBar.Canvas=this.Canvas;
93144
+ buySellBar.ChartBorder=this.Frame.SubFrame[0].Frame.ChartBorder;
93145
+ buySellBar.ChartFrame=this.Frame.SubFrame[0].Frame;
93146
+ buySellBar.Name="Minute-BuySell-Bar";
93147
+ buySellBar.Identify="Minute-BuySell-Bar";
93148
+ buySellBar.BuySellData=this.BuySellData;
93149
+ this.ChartPaint[3]=buySellBar;
93150
+
93151
+
92857
93152
  this.TitlePaint[0]=new DynamicMinuteTitlePainting();
92858
93153
  this.TitlePaint[0].Frame=this.Frame.SubFrame[0].Frame;
92859
93154
  this.TitlePaint[0].Canvas=this.Canvas;
@@ -93459,7 +93754,9 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
93459
93754
  this.AutoUpdateEvent(false, "MinuteChartContainer::ChangeDayCount");
93460
93755
  this.DayCount=count;
93461
93756
  this.ClearMinuteData();
93757
+ this.ClearStockCache();
93462
93758
  this.UnlockCorssCursor();
93759
+ this.Frame.ClearYCoordinateMaxMin();
93463
93760
 
93464
93761
  if (option && option.PageInfo)
93465
93762
  {
@@ -93729,8 +94026,14 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
93729
94026
  }
93730
94027
  }
93731
94028
 
93732
- this.RequestData=function()
94029
+ //option={ ClearYCoordinateMaxMin:true }
94030
+ this.RequestData=function(option)
93733
94031
  {
94032
+ if (option)
94033
+ {
94034
+ if (option.ClearYCoordinateMaxMin===true) this.Frame.ClearYCoordinateMaxMin();
94035
+ }
94036
+
93734
94037
  if (this.DayCount<=1) this.RequestMinuteData();
93735
94038
  else this.RequestHistoryMinuteData();
93736
94039
  }
@@ -93802,11 +94105,13 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
93802
94105
  After:this.IsShowMultiDayAfterData
93803
94106
  } //集合竞价
93804
94107
 
94108
+ var bBuySellBar=this.IsShowMinuteBuySellBar();
94109
+
93805
94110
  var obj=
93806
94111
  {
93807
94112
  Name:'MinuteChartContainer::RequestHistoryMinuteData', //类名::函数
93808
94113
  Explain:'多日分时数据',
93809
- Request:{ Url:self.HistoryMinuteApiUrl, Data:{daycount:self.DayCount, symbol:self.Symbol, callcation:callCation, AryDate:this.AryDate }, Type:'POST' },
94114
+ Request:{ Url:self.HistoryMinuteApiUrl, Data:{daycount:self.DayCount, symbol:self.Symbol, callcation:callCation, AryDate:this.AryDate, IsShowBuySellBar:bBuySellBar }, Type:'POST' },
93810
94115
  Self:this,
93811
94116
  PreventDefault:false
93812
94117
  };
@@ -93853,6 +94158,10 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
93853
94158
 
93854
94159
  this.DataStatus.MultiDay=true;
93855
94160
 
94161
+ var lastDayData=null;
94162
+ if (IFrameSplitOperator.IsNonEmptyArray(data.data) && data.data[0]) lastDayData=data.data[0];
94163
+ if (lastDayData) this.RecvBuySellData(lastDayData.BuySellData);
94164
+
93856
94165
  this.CaclutateCallCationYRange();
93857
94166
  this.Symbol=data.symbol;
93858
94167
  this.Name=data.name;
@@ -94172,6 +94481,9 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
94172
94481
  this.IsAfterData=true;
94173
94482
  }
94174
94483
 
94484
+ //5档买卖盘
94485
+ var bBuySellBar=this.IsShowMinuteBuySellBar();
94486
+
94175
94487
  if (this.NetworkFilter)
94176
94488
  {
94177
94489
  var dateRange=null;
@@ -94196,7 +94508,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
94196
94508
  {
94197
94509
  Name:'MinuteChartContainer::RequestMinuteData', //类名::函数名
94198
94510
  Explain:'最新分时数据',
94199
- Request:{ Url:self.MinuteApiUrl, Data:{field:fields, symbol:[self.Symbol], callcation:callCation, AryDate:this.AryDate }, Type:'POST' },
94511
+ Request:{ Url:self.MinuteApiUrl, Data:{field:fields, symbol:[self.Symbol], callcation:callCation, AryDate:this.AryDate, IsShowBuySellBar:bBuySellBar }, Type:'POST' },
94200
94512
  Self:this,
94201
94513
  PreventDefault:false
94202
94514
  };
@@ -94331,6 +94643,21 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
94331
94643
  }
94332
94644
  }
94333
94645
 
94646
+ this.RecvBuySellData=function(data)
94647
+ {
94648
+ if (!data) return;
94649
+
94650
+ if (Array.isArray(data.AryBuy))
94651
+ {
94652
+ this.BuySellData.AryBuy=data.AryBuy.slice();
94653
+ }
94654
+
94655
+ if (Array.isArray(data.ArySell))
94656
+ {
94657
+ this.BuySellData.ArySell=data.ArySell.slice();
94658
+ }
94659
+ }
94660
+
94334
94661
  this.RecvMinuteData=function(data)
94335
94662
  {
94336
94663
  if (!data)
@@ -94365,7 +94692,12 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
94365
94692
 
94366
94693
  var bFirstData=(this.DataStatus.LatestDay==false); //首条单日数据
94367
94694
 
94368
- this.DataStatus.LatestDate=data.stock[0].date; //保存下最后一天的日期
94695
+ if (IFrameSplitOperator.IsNonEmptyArray(data.stock) && data.stock[0])
94696
+ {
94697
+ this.DataStatus.LatestDate=data.stock[0].date; //保存下最后一天的日期
94698
+ this.RecvBuySellData(data.stock[0].BuySellData);
94699
+ }
94700
+
94369
94701
  this.DataStatus.LatestDay=true;
94370
94702
 
94371
94703
  if (this.DayCount>1) //多日走势图
@@ -131623,6 +131955,14 @@ function GetBlackStyle()
131623
131955
  Font:`${12*GetDevicePixelRatio()}px 微软雅黑`,
131624
131956
  Day: { Color:"rgb(153,153,153)", BGColor:"rgb(51,51,51)", BorderColor:"rgb(51,51,51)", Margin:{ Left:5, Top:2, Bottom:2, Right:5 } },
131625
131957
  Night: { Color:"rgb(153,153,153)", BGColor:"rgb(51,51,51)", BorderColor:"rgb(51,51,51)", Margin:{ Left:5, Top:2, Bottom:2, Right:5 } },
131958
+ },
131959
+
131960
+ BuySellBar:
131961
+ {
131962
+ BuyColor:"rgb(102, 33, 33)",
131963
+ SellColor:"rgb(20, 63, 31)",
131964
+ Font:`${12*GetDevicePixelRatio()}px 微软雅黑`,
131965
+ TextColor:"rgb(220,220,220)",
131626
131966
  }
131627
131967
  },
131628
131968
 
@@ -132237,6 +132577,7 @@ function GetBlackStyle()
132237
132577
  {
132238
132578
  BorderColor:'rgb(38,38,41)', //边框线
132239
132579
  SelectedColor:"rgb(49,48,56)", //选中行
132580
+ SelectedLine:{ Color:"rgb(250,250,250)" },
132240
132581
  Header:
132241
132582
  {
132242
132583
  Color:"RGB(245,245,245)",
@@ -134363,6 +134704,7 @@ function JSReportChart(divElement)
134363
134704
  {
134364
134705
  if (IFrameSplitOperator.IsNumber(option.TextOverflowStyle)) reportChart.TextOverflowStyle=option.TextOverflowStyle;
134365
134706
  if (IFrameSplitOperator.IsNumber(option.MultiSelectModel)) reportChart.MultiSelectModel=option.MultiSelectModel;
134707
+ if (IFrameSplitOperator.IsNumber(option.SelectedStyle)) reportChart.SelectedStyle=option.SelectedStyle;
134366
134708
  }
134367
134709
 
134368
134710
  this.SetChartBorder(chart, option);
@@ -138873,6 +139215,7 @@ function ChartReport()
138873
139215
  this.SelectedModel=0; //选中模式 0=SelectedRow表示当前屏索引
138874
139216
  this.SelectedRow=-1; //选中行ID
138875
139217
  this.SelectedFixedRow=-1; //选中固定行ID
139218
+ this.SelectedStyle=1; //选中行样式 1=整行填充 2=底部绘制直线
138876
139219
  this.IsDrawBorder=1; //是否绘制单元格边框
138877
139220
  this.HeaderRowCount=1; //表头行数
138878
139221
 
@@ -138897,6 +139240,7 @@ function ChartReport()
138897
139240
 
138898
139241
  this.BorderColor=g_JSChartResource.Report.BorderColor; //边框线
138899
139242
  this.SelectedColor=g_JSChartResource.Report.SelectedColor; //选中行
139243
+ this.SelectedLineConfig={ Color:g_JSChartResource.Report.SelectedLine.Color, Width:g_JSChartResource.Report.SelectedLine.Width }; //选中行底部线段
138900
139244
 
138901
139245
  //表头配置
138902
139246
  this.HeaderFontConfig={ Size:g_JSChartResource.Report.Header.Font.Size, Name:g_JSChartResource.Report.Header.Font.Name };
@@ -139017,6 +139361,8 @@ function ChartReport()
139017
139361
  this.IsShowAllColumn=false; //是否已显示所有列
139018
139362
  this.DevicePixelRatio=GetDevicePixelRatio(); //分辨率
139019
139363
 
139364
+ this.AryFullSelectedRow=[]; //选中行
139365
+
139020
139366
  //{
139021
139367
  // Type:列id, Title:标题, TextAlign:文字对齐方式, MaxText:文字最大宽度 , TextColor:文字颜色, Sort:0=不支持排序 1=本地排序 0=远程排序,
139022
139368
  // Icon:{ Family:"iconfont", Size:12, Symbol:"", Margin: { Left:, Bottom }}
@@ -139161,8 +139507,11 @@ function ChartReport()
139161
139507
  if (IFrameSplitOperator.IsNumber(item.Sort)) colItem.Sort=item.Sort;
139162
139508
  if (IFrameSplitOperator.IsNumber(item.FixedWidth)) colItem.FixedWidth=item.FixedWidth;
139163
139509
  if (IFrameSplitOperator.IsBool(item.EnableDragWidth)) colItem.EnableDragWidth=item.EnableDragWidth;
139510
+
139511
+ colItem.IsDrawCallback=false;
139164
139512
  if (IFrameSplitOperator.IsBool(item.IsDrawCallback)) colItem.IsDrawCallback=item.IsDrawCallback;
139165
- else colItem.IsDrawCallback=false;
139513
+
139514
+ if (IFrameSplitOperator.IsBool(item.EnableFormatDrawInfoEvent)) colItem.EnableFormatDrawInfoEvent=item.EnableFormatDrawInfoEvent;
139166
139515
 
139167
139516
  if (IFrameSplitOperator.IsNumber(item.FloatPrecision)) colItem.FloatPrecision=item.FloatPrecision; //小数位数
139168
139517
  if (IFrameSplitOperator.IsNumber(item.ColorType)) colItem.ColorType=item.ColorType; //0=默认 1=(>0, =0, <0) 2=(>=0, <0)
@@ -139504,6 +139853,7 @@ function ChartReport()
139504
139853
  this.ShowSymbol=[];
139505
139854
  this.TooltipRect=[];
139506
139855
  this.ButtonRect=[];
139856
+ this.AryFullSelectedRow=[];
139507
139857
  this.DevicePixelRatio=GetDevicePixelRatio()
139508
139858
  this.LastMouseStatus=lastMouseStatus;
139509
139859
 
@@ -139528,6 +139878,7 @@ function ChartReport()
139528
139878
 
139529
139879
  this.ClipClient();
139530
139880
  this.DrawBorder();
139881
+ this.DrawSelectedRow();
139531
139882
  this.Canvas.restore();
139532
139883
 
139533
139884
  this.DrawDragRow();
@@ -139542,6 +139893,7 @@ function ChartReport()
139542
139893
 
139543
139894
  this.LastMouseStatus=null;
139544
139895
  this.SizeChange=false;
139896
+ this.AryFullSelectedRow=[];
139545
139897
  }
139546
139898
 
139547
139899
  this.DrawDragHeaderBG=function()
@@ -140084,6 +140436,8 @@ function ChartReport()
140084
140436
  var left=this.RectClient.Left;
140085
140437
  var rowWidth=this.RectClient.Right-this.RectClient.Left;
140086
140438
 
140439
+ var arySelectedRow=[];
140440
+
140087
140441
  //固定行
140088
140442
  var textTop=top;
140089
140443
  this.Canvas.font=this.ItemFixedFont;
@@ -140175,8 +140529,16 @@ function ChartReport()
140175
140529
 
140176
140530
  if (bFillRow)
140177
140531
  {
140178
- this.Canvas.fillStyle=this.SelectedColor;
140179
- this.Canvas.fillRect(left,textTop,rowWidth,this.RowHeight);
140532
+ var rtRowBG={ Left:left, Top:textTop, Width:rowWidth, Height:this.RowHeight };
140533
+ rtRowBG.Right=rtRowBG.Left+rtRowBG.Width;
140534
+ rtRowBG.Bottom=rtRowBG.Top+rtRowBG.Height;
140535
+ this.AryFullSelectedRow.push(rtRowBG);
140536
+
140537
+ if (this.SelectedStyle===1)
140538
+ {
140539
+ this.Canvas.fillStyle=this.SelectedColor;
140540
+ this.Canvas.fillRect(rtRowBG.Left,rtRowBG.Top,rtRowBG.Width,rtRowBG.Height);
140541
+ }
140180
140542
  }
140181
140543
 
140182
140544
  this.DrawRow(symbol, textTop, i);
@@ -140185,6 +140547,22 @@ function ChartReport()
140185
140547
 
140186
140548
  textTop+=this.RowHeight;
140187
140549
  }
140550
+
140551
+
140552
+ }
140553
+
140554
+ this.DrawSelectedRow=function()
140555
+ {
140556
+ if (this.SelectedStyle===2 && IFrameSplitOperator.IsNonEmptyArray(this.AryFullSelectedRow))
140557
+ {
140558
+ this.Canvas.fillStyle=this.SelectedLineConfig.Color;
140559
+ var lineWidth=this.SelectedLineConfig.Width;
140560
+ for(var i=0;i<this.AryFullSelectedRow.length;++i)
140561
+ {
140562
+ var rtBG=this.AryFullSelectedRow[i];
140563
+ this.Canvas.fillRect(rtBG.Left,rtBG.Bottom-lineWidth,rtBG.Width,lineWidth);
140564
+ }
140565
+ }
140188
140566
  }
140189
140567
 
140190
140568
  this.GetSelectedSymbol=function()
@@ -140704,10 +141082,12 @@ function ChartReport()
140704
141082
  else if (this.IsReserveNumber(column.Type))
140705
141083
  {
140706
141084
  this.FormatReserveNumber(column, stock, drawInfo);
141085
+ this.FormatDrawInfoEvent(stock, data, column, drawInfo);
140707
141086
  }
140708
141087
  else if (this.IsReserveString(column.Type))
140709
141088
  {
140710
141089
  this.FormatReserveString(column, stock, drawInfo);
141090
+ this.FormatDrawInfoEvent(stock, data, column, drawInfo);
140711
141091
  }
140712
141092
  else if (this.IsReserveProgressBarColumn(column.Type))
140713
141093
  {
@@ -140812,8 +141192,22 @@ function ChartReport()
140812
141192
  var buttonData={ Stock:stock, Index:index, ColumnIndex:columnIndex, Column:column, Rect:drawInfo.Botton.Rect, Type:drawInfo.Botton.Type, Data:drawInfo.Data };
140813
141193
  this.ButtonRect.push(buttonData);
140814
141194
  }
141195
+ }
140815
141196
 
140816
-
141197
+ this.FormatDrawInfoEvent=function(stock, data, column, drawInfo)
141198
+ {
141199
+ if (!column.EnableFormatDrawInfoEvent) return;
141200
+
141201
+ var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_REPORT_FORMAT_DRAW_INFO);
141202
+ if (!event || !event.Callback) return;
141203
+
141204
+ var sendData=
141205
+ {
141206
+ Stock:stock, Column:column, Data:data,
141207
+ DrawInfo:drawInfo
141208
+ };
141209
+
141210
+ event.Callback(event, sendData, this);
140817
141211
  }
140818
141212
 
140819
141213
  this.IsReserveProgressBarColumn=function(value)
@@ -141473,9 +141867,13 @@ function ChartReport()
141473
141867
 
141474
141868
  this.DrawItemBG=function(drawInfo)
141475
141869
  {
141476
- if (drawInfo.BGColor && drawInfo.Rect)//绘制背景色
141870
+ if (!drawInfo.BGColor) return;
141871
+
141872
+ var rtItem=drawInfo.Rect; //绘制背景色
141873
+ if (drawInfo.RectBG) rtItem=drawInfo.RectBG;
141874
+
141875
+ if (rtItem)
141477
141876
  {
141478
- var rtItem=drawInfo.Rect;
141479
141877
  this.Canvas.fillStyle=drawInfo.BGColor;
141480
141878
  this.Canvas.fillRect(rtItem.Left,rtItem.Top,rtItem.Width,rtItem.Height); //画一个背景色, 不然是一个黑的背景
141481
141879
  }
@@ -147180,7 +147578,7 @@ function ScrollBarBGChart()
147180
147578
 
147181
147579
 
147182
147580
 
147183
- var HQCHART_VERSION="1.1.14682";
147581
+ var HQCHART_VERSION="1.1.14687";
147184
147582
 
147185
147583
  function PrintHQChartVersion()
147186
147584
  {