hqchart 1.1.14675 → 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.
@@ -1028,6 +1028,12 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
1028
1028
  chart.EnableBorderDrag=option.EnableBorderDrag;
1029
1029
  }
1030
1030
 
1031
+ if (IFrameSplitOperator.IsBool(option.EnableBuySellBar))
1032
+ {
1033
+ var barChart=chart.GetChartMinuteBuySellBar();
1034
+ if (barChart) barChart.IsShow=option.EnableBuySellBar;
1035
+ }
1036
+
1031
1037
  this.AdjustChartBorder(chart);
1032
1038
 
1033
1039
  if (option.Frame)
@@ -2927,6 +2933,7 @@ var JSCHART_MENU_ID=
2927
2933
  CMD_FULLSCREEN_SUMMARY_ID:56, //当前屏区间统计
2928
2934
  CMD_CORSS_DBCLICK_ID:57, //双击显示隐藏十字光标
2929
2935
  CMD_ENABLE_KLINE_DAY_SUMMARY_ID:58, //K线底部显示走完剩余时间
2936
+ CMD_SHOW_BUYSELL_BAR_ID:59, //盘口分析(右侧显示买卖盘柱子) 分时图
2930
2937
 
2931
2938
 
2932
2939
 
@@ -3169,6 +3176,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
3169
3176
  this.CustomChartDrag; //自定义图形的拖拽操作 { Type:, Data: }
3170
3177
 
3171
3178
  this.StockCache={ Data:null }; //扩展数据缓存数据
3179
+ this.BuySellData={ ArySell:null, AryBuy:null }; //10档买卖盘
3172
3180
 
3173
3181
  this.JSPopMenu; //内置菜单
3174
3182
  this.IsShowRightMenu=true; //显示右键菜单
@@ -3220,6 +3228,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
3220
3228
  this.ClearStockCache=function()
3221
3229
  {
3222
3230
  this.StockCache.Data=null;
3231
+ this.BuySellData.AryBuy=null;
3232
+ this.BuySellData.ArySell=null;
3223
3233
  }
3224
3234
 
3225
3235
  this.InitalPopMenu=function() //初始化弹出窗口
@@ -10907,6 +10917,15 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
10907
10917
  this.Draw();
10908
10918
  }
10909
10919
  break;
10920
+ case JSCHART_MENU_ID.CMD_SHOW_BUYSELL_BAR_ID:
10921
+ if (IFrameSplitOperator.IsBool(srcParam))
10922
+ {
10923
+ var chart=this.GetChartMinuteBuySellBar();
10924
+ chart.IsShow=srcParam;
10925
+ this.RequestData({ ClearYCoordinateMaxMin:true });
10926
+ this.Draw();
10927
+ }
10928
+ break;
10910
10929
  }
10911
10930
  }
10912
10931
 
@@ -25557,7 +25576,8 @@ function ChartPaintFactory()
25557
25576
  [
25558
25577
  ["ChartKLine", { Create:function(option) { return new ChartKLine(); } }], //K线图
25559
25578
  ["ChartMinuteVolumBar",{ Create:function(option) { return new ChartMinuteVolumBar(); } }], //分时成交量柱子
25560
- ["ChartMinutePriceLine",{ Create:function(option) { return new ChartMinutePriceLine();} }]
25579
+ ["ChartMinutePriceLine",{ Create:function(option) { return new ChartMinutePriceLine();} }],
25580
+ ["ChartMinuteBuySellBar", { Create:function(option){ return new ChartMinuteBuySellBar(); }}],
25561
25581
  ]);
25562
25582
 
25563
25583
  this.Create=function(name, option)
@@ -34976,6 +34996,32 @@ function ChartIndexTitle()
34976
34996
  delete this.newMethod;
34977
34997
 
34978
34998
  this.ClassName='ChartIndexTitle'; //类名
34999
+ this.AryTitle=[]; //{ Date, Time, AryText:[ ] }
35000
+ this.MapCache=null; //key=date/date-time value={ Data:[] }
35001
+
35002
+ this.BuildCacheData=function()
35003
+ {
35004
+ var mapData=new Map();
35005
+ this.MapCache=mapData;
35006
+ if (!IFrameSplitOperator.IsNonEmptyArray(this.AryTitle)) return;
35007
+
35008
+ for(var i=0;i<this.AryTitle.length;++i)
35009
+ {
35010
+ var item=this.AryTitle[i];
35011
+ var key=this.BuildKey(item);
35012
+
35013
+ mapData.set(key,{ Data:item });
35014
+ }
35015
+ }
35016
+
35017
+ this.GetItem=function(kItem)
35018
+ {
35019
+ if (!this.MapCache || this.MapCache.size<=0) return null;
35020
+ var key=this.BuildKey(kItem);
35021
+ if (!this.MapCache.has(key)) return null;
35022
+
35023
+ return this.MapCache.get(key);
35024
+ }
34979
35025
 
34980
35026
  this.Draw=function()
34981
35027
  {
@@ -40052,6 +40098,216 @@ function ChartMinutePositionLine()
40052
40098
  }
40053
40099
  }
40054
40100
 
40101
+ //分时图 右侧10档买卖柱子
40102
+ function ChartMinuteBuySellBar()
40103
+ {
40104
+ this.newMethod=IChartPainting; //派生
40105
+ this.newMethod();
40106
+ delete this.newMethod;
40107
+
40108
+ this.BuyColor=g_JSChartResource.Minute.BuySellBar.BuyColor;
40109
+ this.SellColor=g_JSChartResource.Minute.BuySellBar.SellColor;
40110
+ this.BarWidth=g_JSChartResource.Minute.BuySellBar.BarWidth;
40111
+ this.MaxBarWidth=g_JSChartResource.Minute.BuySellBar.MaxBarWidth;
40112
+ this.YOffset=g_JSChartResource.Minute.BuySellBar.YOffset;
40113
+ this.Font=g_JSChartResource.Minute.BuySellBar.Font;
40114
+ this.TextColor=g_JSChartResource.Minute.BuySellBar.TextColor;
40115
+
40116
+ this.IsDrawFirst=true;
40117
+ this.IsShow=false;
40118
+
40119
+ this.BuySellData=null; //{ AryBuy:[{ Price:10.5, Vol:300}], ArySell:[{ Price:10.5, Vol:300}] }
40120
+
40121
+ this.ReloadResource=function(resource)
40122
+ {
40123
+ this.BuyColor=g_JSChartResource.Minute.BuySellBar.BuyColor;
40124
+ this.SellColor=g_JSChartResource.Minute.BuySellBar.SellColor;
40125
+ this.BarWidth=g_JSChartResource.Minute.BuySellBar.BarWidth;
40126
+ this.MaxBarWidth=g_JSChartResource.Minute.BuySellBar.MaxBarWidth;
40127
+ this.YOffset=g_JSChartResource.Minute.BuySellBar.YOffset;
40128
+ this.Font=g_JSChartResource.Minute.BuySellBar.Font;
40129
+ this.TextColor=g_JSChartResource.Minute.BuySellBar.TextColor;
40130
+ }
40131
+
40132
+ this.Draw=function()
40133
+ {
40134
+ if (!this.IsShow || this.ChartFrame.IsMinSize || !this.IsVisible) return;
40135
+ if (this.IsShowIndexTitleOnly()) return;
40136
+ if (this.IsHideScriptIndex()) return;
40137
+ if (!this.BuySellData) return;
40138
+
40139
+ var volRange=this.GetVolRange();
40140
+ if (!volRange) return;
40141
+
40142
+ var bHScreen=(this.ChartFrame.IsHScreen===true);
40143
+ var xPointCount=this.ChartFrame.XPointCount;
40144
+
40145
+ var xStart=this.ChartFrame.GetXFromIndex(xPointCount-this.MaxBarWidth);
40146
+ var xEnd=this.ChartFrame.GetXFromIndex(xPointCount-1);
40147
+
40148
+ function _Temp_GetXFromData(value)
40149
+ {
40150
+ var maxWidth=xEnd-xStart;
40151
+ var width = maxWidth * (value - volRange.Min) / (volRange.Max - volRange.Min);
40152
+ return xEnd-width;
40153
+ }
40154
+
40155
+ this.Canvas.save();
40156
+ this.ClipClient(bHScreen);
40157
+
40158
+ var aryBuy=this.BuySellData.AryBuy;
40159
+ if (IFrameSplitOperator.IsNonEmptyArray(aryBuy))
40160
+ {
40161
+ this.Canvas.beginPath();
40162
+ var lineCount=0;
40163
+ for(var i=0;i<aryBuy.length;++i)
40164
+ {
40165
+ var item=aryBuy[i];
40166
+ if (!item || !IFrameSplitOperator.IsNumber(item.Vol) || !IFrameSplitOperator.IsNumber(item.Price)) continue;
40167
+
40168
+ var y=this.GetYFromData(item.Price,false)
40169
+ var x=_Temp_GetXFromData(item.Vol);
40170
+
40171
+ if (bHScreen)
40172
+ {
40173
+ y-=-this.YOffset;
40174
+ this.Canvas.moveTo(y,x);
40175
+ this.Canvas.lineTo(y,xEnd);
40176
+ }
40177
+ else
40178
+ {
40179
+ y-=-this.YOffset;
40180
+ this.Canvas.moveTo(x,y);
40181
+ this.Canvas.lineTo(xEnd,y);
40182
+ }
40183
+
40184
+ ++lineCount;
40185
+ }
40186
+
40187
+ if (lineCount>0)
40188
+ {
40189
+ this.Canvas.strokeStyle=this.BuyColor;
40190
+ if (IFrameSplitOperator.IsPlusNumber(this.BarWidth)) this.Canvas.lineWidth=this.BarWidth;
40191
+ this.Canvas.stroke();
40192
+ }
40193
+ }
40194
+
40195
+ var arySell=this.BuySellData.ArySell;
40196
+ if (IFrameSplitOperator.IsNonEmptyArray(arySell))
40197
+ {
40198
+ this.Canvas.beginPath();
40199
+ var lineCount=0;
40200
+ for(var i=0;i<arySell.length;++i)
40201
+ {
40202
+ var item=arySell[i];
40203
+ if (!item || !IFrameSplitOperator.IsNumber(item.Vol) || !IFrameSplitOperator.IsNumber(item.Price)) continue;
40204
+
40205
+ var y=this.GetYFromData(item.Price,false);
40206
+ var x=_Temp_GetXFromData(item.Vol);
40207
+
40208
+ if (bHScreen)
40209
+ {
40210
+ y-=-this.YOffset;
40211
+ this.Canvas.moveTo(y,x);
40212
+ this.Canvas.lineTo(y,xEnd);
40213
+ }
40214
+ else
40215
+ {
40216
+ y-=-this.YOffset;
40217
+ this.Canvas.moveTo(x,y);
40218
+ this.Canvas.lineTo(xEnd,y);
40219
+ }
40220
+
40221
+ ++lineCount;
40222
+ }
40223
+
40224
+ if (lineCount>0)
40225
+ {
40226
+ this.Canvas.strokeStyle=this.SellColor;
40227
+ if (IFrameSplitOperator.IsPlusNumber(this.BarWidth)) this.Canvas.lineWidth=this.BarWidth;
40228
+ this.Canvas.stroke();
40229
+ }
40230
+ }
40231
+
40232
+
40233
+ this.DrawMaxVolText(volRange.Max, xStart);
40234
+
40235
+ this.Canvas.restore();
40236
+ }
40237
+
40238
+ this.DrawMaxVolText=function(value, x)
40239
+ {
40240
+ if (!IFrameSplitOperator.IsNumber(value)) return;
40241
+
40242
+ var border=this.ChartFrame.GetBorder();
40243
+ var text=value.toFixed(0);
40244
+ this.Canvas.textAlign = 'left';
40245
+ this.Canvas.textBaseline = 'bottom';
40246
+ this.Canvas.font=this.Font;
40247
+ this.Canvas.fillStyle=this.TextColor;
40248
+
40249
+ if (this.ChartFrame.IsHScreen===true)
40250
+ {
40251
+ var yBottom=border.LeftEx+1;
40252
+ this.Canvas.save();
40253
+ this.Canvas.translate(yBottom,x);
40254
+ this.Canvas.rotate(90 * Math.PI / 180);
40255
+ this.Canvas.fillText(text,0,0);
40256
+ this.Canvas.restore();
40257
+ }
40258
+ else
40259
+ {
40260
+ var yBottom=border.Bottom-1;
40261
+ this.Canvas.fillText(text,x,yBottom);
40262
+ }
40263
+ }
40264
+
40265
+ this.GetVolRange=function()
40266
+ {
40267
+ if (!this.BuySellData) return null;
40268
+
40269
+ var range={ Min:0, Max:null };
40270
+ var aryBuy=this.BuySellData.AryBuy;
40271
+ var arySell=this.BuySellData.ArySell;
40272
+ var count=0;
40273
+
40274
+ if (IFrameSplitOperator.IsNonEmptyArray(aryBuy))
40275
+ {
40276
+ for(var i=0;i<aryBuy.length;++i)
40277
+ {
40278
+ var item=aryBuy[i];
40279
+ if (!IFrameSplitOperator.IsNumber(item.Vol)) continue;
40280
+
40281
+ if (range.Min==null || range.Min>item.Vol) range.Min=item.Vol;
40282
+ if (range.Max==null || range.Max<item.Vol) range.Max=item.Vol;
40283
+ ++count;
40284
+ }
40285
+ }
40286
+
40287
+ if (IFrameSplitOperator.IsNonEmptyArray(arySell))
40288
+ {
40289
+ for(var i=0;i<arySell.length;++i)
40290
+ {
40291
+ var item=arySell[i];
40292
+ if (!IFrameSplitOperator.IsNumber(item.Vol)) continue;
40293
+
40294
+ if (range.Min==null || range.Min>item.Vol) range.Min=item.Vol;
40295
+ if (range.Max==null || range.Max<item.Vol) range.Max=item.Vol;
40296
+ ++count;
40297
+ }
40298
+ }
40299
+
40300
+ if (count<=0) return null;
40301
+
40302
+ return range;
40303
+ }
40304
+
40305
+ this.GetMaxMin=function()
40306
+ {
40307
+ return { Min:null, Max:null };
40308
+ }
40309
+ }
40310
+
40055
40311
  //分钟信息地雷 支持横屏
40056
40312
  function ChartMinuteInfo()
40057
40313
  {
@@ -47291,6 +47547,7 @@ function MinuteLeftTooltipPaint()
47291
47547
  this.Draw=function()
47292
47548
  {
47293
47549
  if (!this.IsEnableDraw()) return;
47550
+ if (this.ChartFrame && this.ChartFrame.IsHScreen===true) return; //不支持横屏
47294
47551
 
47295
47552
  this.TitlePaint=this.HQChart.TitlePaint[0];
47296
47553
  if (!this.TitlePaint) return;
@@ -55868,44 +56125,39 @@ function ChartCorssCursor()
55868
56125
  var textSize={ Width:textWidth+4, Height:this.TextHeight, Text:[] };
55869
56126
  var buttonData={Y:y, YValue:yValue, FrameID:yValueExtend.FrameID };
55870
56127
 
55871
- if (this.Frame.ChartBorder.Left>=30) //左边
56128
+ var margin=this.LeftConfig.Margin;
56129
+ var textOffset=this.LeftConfig.TextOffset;
56130
+ var rtBG=null;
56131
+ if (this.Frame.ChartBorder.Left>=30 && this.ShowTextMode.Left==1) //左边
55872
56132
  {
55873
- var margin=this.LeftConfig.Margin;
55874
- var textOffset=this.LeftConfig.TextOffset;
55875
-
55876
- var rtBG=null;
55877
- if (this.ShowTextMode.Left==1)
55878
- {
55879
- var rtBG={ Right:left, Width:textWidth+margin.Left+margin.Right, YCenter:y, Height:textHeight+margin.Top+margin.Bottom };
55880
- rtBG.Left=rtBG.Right-rtBG.Width;
55881
- rtBG.Top=rtBG.YCenter-rtBG.Height/2;
55882
- rtBG.Bottom=rtBG.Top+rtBG.Height;
56133
+ var rtBG={ Right:left, Width:textWidth+margin.Left+margin.Right, YCenter:y, Height:textHeight+margin.Top+margin.Bottom };
56134
+ rtBG.Left=rtBG.Right-rtBG.Width;
56135
+ rtBG.Top=rtBG.YCenter-rtBG.Height/2;
56136
+ rtBG.Bottom=rtBG.Top+rtBG.Height;
55883
56137
 
55884
- if (rtBG.Left<0)
55885
- {
55886
- rtBG.Left=0;
55887
- rtBG.Right=rtBG.Left+rtBG.Width;
55888
- }
55889
- }
55890
- else if (this.ShowTextMode.Left==2) //在框架内显示
56138
+ if (rtBG.Left<0)
55891
56139
  {
55892
- var rtBG={ Left:left, Width:textWidth+margin.Left+margin.Right, YCenter:y, Height:textHeight+margin.Top+margin.Bottom };
56140
+ rtBG.Left=0;
55893
56141
  rtBG.Right=rtBG.Left+rtBG.Width;
55894
- rtBG.Top=rtBG.YCenter-rtBG.Height/2;
55895
- rtBG.Bottom=rtBG.Top+rtBG.Height;
55896
- }
55897
-
55898
- if (rtBG)
55899
- {
55900
- this.DrawTextBGRect(rtBG.Left,rtBG.Top,rtBG.Width,rtBG.Height);
55901
- this.Canvas.textAlign="left";
55902
- this.Canvas.textBaseline="bottom";
55903
- this.Canvas.fillStyle=this.TextColor;
55904
- this.Canvas.fillText(text,rtBG.Left+textOffset.X, rtBG.Bottom+textOffset.Y);
55905
56142
  }
56143
+
56144
+ }
56145
+ else if (this.ShowTextMode.Left==2) //在框架内显示
56146
+ {
56147
+ var rtBG={ Left:left, Width:textWidth+margin.Left+margin.Right, YCenter:y, Height:textHeight+margin.Top+margin.Bottom };
56148
+ rtBG.Right=rtBG.Left+rtBG.Width;
56149
+ rtBG.Top=rtBG.YCenter-rtBG.Height/2;
56150
+ rtBG.Bottom=rtBG.Top+rtBG.Height;
55906
56151
  }
55907
56152
 
55908
-
56153
+ if (rtBG)
56154
+ {
56155
+ this.DrawTextBGRect(rtBG.Left,rtBG.Top,rtBG.Width,rtBG.Height);
56156
+ this.Canvas.textAlign="left";
56157
+ this.Canvas.textBaseline="bottom";
56158
+ this.Canvas.fillStyle=this.TextColor;
56159
+ this.Canvas.fillText(text,rtBG.Left+textOffset.X, rtBG.Bottom+textOffset.Y);
56160
+ }
55909
56161
 
55910
56162
  var complexText=
55911
56163
  {
@@ -56095,7 +56347,7 @@ function ChartCorssCursor()
56095
56347
  this.Canvas.textBaseline="bottom";
56096
56348
  this.Canvas.fillStyle=this.TextColor;
56097
56349
  this.Canvas.fillText(text,rtBG.Left+textOffset.X,rtBG.Bottom+textOffset.Y,textWidth);
56098
- }
56350
+ }
56099
56351
  }
56100
56352
 
56101
56353
  //子坐标Y轴
@@ -60070,33 +60322,40 @@ function DynamicChartTitlePainting()
60070
60322
  return aryText;
60071
60323
  }
60072
60324
 
60073
- this.FormatIndexTitle=function(value, dataInfo)
60325
+ this.FormatIndexTitle=function(kItem, dataInfo)
60074
60326
  {
60075
- if (!value) return null;
60327
+ var result=null;
60328
+ var aryText=[];
60329
+ if (dataInfo.Name)
60330
+ {
60331
+ aryText.push({ Text:dataInfo.Name, Color:dataInfo.Color});
60332
+ result={ Text:null, ArrayText:aryText };
60333
+ }
60076
60334
 
60077
- if (IFrameSplitOperator.IsString(value)) return { Text:value, ArrayText:null };
60335
+ if (!kItem) return result;
60336
+ if (!dataInfo.Chart) return result;
60337
+
60338
+ var titleItem=dataInfo.Chart.GetItem(kItem);
60339
+ if (!titleItem || !titleItem.Data) return result;
60340
+ if (!IFrameSplitOperator.IsNonEmptyArray(titleItem.Data.AryText)) return result;
60078
60341
 
60079
- if (IFrameSplitOperator.IsNonEmptyArray(value))
60342
+ if (!result) result={ Text:null, ArrayText:aryText };
60343
+
60344
+ for(var i=0;i<titleItem.Data.AryText.length;++i)
60080
60345
  {
60081
- var aryText=[];
60082
- for(var i=0;i<value.length;++i)
60083
- {
60084
- var item=value[i];
60085
- if (!item) continue;
60086
-
60087
- var textItem={ Name:null, Text:null };
60088
- if (item.Name) textItem.Name=item.Name;
60089
- if (item.Text) textItem.Text=item.Text;
60090
- if (item.Color) textItem.Color=item.Color;
60091
- if (IFrameSplitOperator.IsNumber(item.LeftSpace)) textItem.LeftSpace=item.LeftSpace;
60346
+ var item=titleItem.Data.AryText[i];
60347
+ if (!item) continue;
60092
60348
 
60093
- aryText.push(textItem);
60094
- }
60349
+ var textItem={ Name:null, Text:null };
60350
+ if (item.Name) textItem.Name=item.Name;
60351
+ if (item.Text) textItem.Text=item.Text;
60352
+ if (item.Color) textItem.Color=item.Color;
60353
+ if (IFrameSplitOperator.IsNumber(item.LeftSpace)) textItem.LeftSpace=item.LeftSpace;
60095
60354
 
60096
- return { Text:null, ArrayText:aryText }
60355
+ aryText.push(textItem);
60097
60356
  }
60098
60357
 
60099
- return null;
60358
+ return result;
60100
60359
  }
60101
60360
 
60102
60361
  this.GetColor=function(price,yClose)
@@ -73545,6 +73804,17 @@ function JSChartResource()
73545
73804
  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 } },
73546
73805
  }
73547
73806
 
73807
+ this.Minute.BuySellBar=
73808
+ {
73809
+ BuyColor:"rgb(242,54,69)",
73810
+ SellColor:"rgb(8,153,129)",
73811
+ BarWidth:4*GetDevicePixelRatio(),
73812
+ MaxBarWidth:120,
73813
+ YOffset:1,
73814
+ Font:`${12*GetDevicePixelRatio()}px 微软雅黑`,
73815
+ TextColor:"rgb(128,128,128)",
73816
+ }
73817
+
73548
73818
  this.DefaultTextColor="rgb(43,54,69)"; //图形中默认的字体颜色
73549
73819
  this.DefaultTextFont=14*GetDevicePixelRatio() +'px 微软雅黑'; //图形中默认的字体
73550
73820
  this.TitleFont=13*GetDevicePixelRatio() +'px 微软雅黑'; //指标显示,tooltip显示字体
@@ -74660,6 +74930,7 @@ function JSChartResource()
74660
74930
  {
74661
74931
  BorderColor:'rgb(192,192,192)', //边框线
74662
74932
  SelectedColor:"rgb(180,240,240)", //选中行
74933
+ SelectedLine:{ Color:"rgb(180,240,240)", Width:2 },
74663
74934
  Header:
74664
74935
  {
74665
74936
  Color:"rgb(60,60,60)", //表头文字颜色
@@ -75082,6 +75353,19 @@ function JSChartResource()
75082
75353
  CopyMarginConfig(this.Minute.NightDay.Night.Margin,subItem.Margin);
75083
75354
  }
75084
75355
  }
75356
+
75357
+ if (style.Minute.BuySellBar)
75358
+ {
75359
+ var item=style.Minute.BuySellBar;
75360
+ var dest=this.Minute.BuySellBar;
75361
+ if (item.BuyColor) dest.BuyColor=item.BuyColor;
75362
+ if (item.SellColor) dest.SellColor=item.SellColor;
75363
+ if (item.Font) dest.Font=item.Font;
75364
+ if (item.TextColor) dest.TextColor=item.TextColor;
75365
+ if (IFrameSplitOperator.IsNumber(item.BarWidth)) dest.BarWidth=item.BarWidth;
75366
+ if (IFrameSplitOperator.IsNumber(item.MaxBarWidth)) dest.MaxBarWidth=item.MaxBarWidth;
75367
+ if (IFrameSplitOperator.IsNumber(item.YOffset)) dest.YOffset=item.YOffset;
75368
+ }
75085
75369
  }
75086
75370
 
75087
75371
  if (style.PopMinuteChart)
@@ -75978,6 +76262,14 @@ function JSChartResource()
75978
76262
  if (item.DownTextColor) this.Report.DownTextColor=item.DownTextColor;
75979
76263
  if (item.UnchagneTextColor) this.Report.UnchagneTextColor=item.UnchagneTextColor;
75980
76264
  if (item.BorderColor) this.Report.SelectedColor=item.SelectedColor;
76265
+
76266
+ if (item.SelectedLine)
76267
+ {
76268
+ var subItem=item.SelectedLine;
76269
+ var subDest=this.Report.SelectedLine;
76270
+ if (subItem.Color) subDest.Color=subItem.Color;
76271
+ if (IFrameSplitOperator.IsNumber(subItem.Width)) subDest.Width=subItem.Width;
76272
+ }
75981
76273
 
75982
76274
 
75983
76275
  if (item.CloseLine)
@@ -86482,6 +86774,24 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
86482
86774
  return false;
86483
86775
  }
86484
86776
 
86777
+ this.GetChartMinuteBuySellBar=function()
86778
+ {
86779
+ var chart=this.ChartPaint[3];
86780
+ if (!chart) return null;
86781
+
86782
+ if (chart.Name!="Minute-BuySell-Bar") return null;
86783
+
86784
+ return chart;
86785
+ }
86786
+
86787
+ this.IsShowMinuteBuySellBar=function()
86788
+ {
86789
+ var chart=this.GetChartMinuteBuySellBar();
86790
+ if (!chart) return false;
86791
+
86792
+ return chart.IsShow;
86793
+ }
86794
+
86485
86795
  //左右拖拽
86486
86796
  this.OnDragMode_One=function(moveData, e)
86487
86797
  {
@@ -87941,7 +88251,9 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
87941
88251
  bRButtonSelectRect=this.ChartDragSelectRect.EnableRButton;
87942
88252
  bLButtonSelectRect=this.ChartDragSelectRect.EnableLButton;
87943
88253
  }
87944
-
88254
+
88255
+ var bShowBuySellBar=this.IsShowMinuteBuySellBar();
88256
+
87945
88257
  var minItem=null;
87946
88258
  if (frameID>=0 && option && IFrameSplitOperator.IsNumber(option.CursorIndex))
87947
88259
  {
@@ -88038,6 +88350,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
88038
88350
  SubMenu:
88039
88351
  [
88040
88352
  { Name:"画图工具", Data:{ ID:JSCHART_MENU_ID.CMD_SHOW_DRAWTOOL_ID, Args:[]}, Checked:this.IsShowDrawToolDialog()},
88353
+ { Name:"盘口分析", Data:{ ID:JSCHART_MENU_ID.CMD_SHOW_BUYSELL_BAR_ID, Args:[!bShowBuySellBar]}, Checked:bShowBuySellBar },
88041
88354
 
88042
88355
  { Name:JSPopMenu.SEPARATOR_LINE_NAME },
88043
88356
 
@@ -88730,6 +89043,16 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
88730
89043
  volLine.ShareAfterVol=this.ShareAfterVol;
88731
89044
  this.ChartPaint[2]=volLine;
88732
89045
 
89046
+ var buySellBar=g_ChartPaintFactory.Create("ChartMinuteBuySellBar");
89047
+ buySellBar.Canvas=this.Canvas;
89048
+ buySellBar.ChartBorder=this.Frame.SubFrame[0].Frame.ChartBorder;
89049
+ buySellBar.ChartFrame=this.Frame.SubFrame[0].Frame;
89050
+ buySellBar.Name="Minute-BuySell-Bar";
89051
+ buySellBar.Identify="Minute-BuySell-Bar";
89052
+ buySellBar.BuySellData=this.BuySellData;
89053
+ this.ChartPaint[3]=buySellBar;
89054
+
89055
+
88733
89056
  this.TitlePaint[0]=new DynamicMinuteTitlePainting();
88734
89057
  this.TitlePaint[0].Frame=this.Frame.SubFrame[0].Frame;
88735
89058
  this.TitlePaint[0].Canvas=this.Canvas;
@@ -89335,7 +89658,9 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
89335
89658
  this.AutoUpdateEvent(false, "MinuteChartContainer::ChangeDayCount");
89336
89659
  this.DayCount=count;
89337
89660
  this.ClearMinuteData();
89661
+ this.ClearStockCache();
89338
89662
  this.UnlockCorssCursor();
89663
+ this.Frame.ClearYCoordinateMaxMin();
89339
89664
 
89340
89665
  if (option && option.PageInfo)
89341
89666
  {
@@ -89605,8 +89930,14 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
89605
89930
  }
89606
89931
  }
89607
89932
 
89608
- this.RequestData=function()
89933
+ //option={ ClearYCoordinateMaxMin:true }
89934
+ this.RequestData=function(option)
89609
89935
  {
89936
+ if (option)
89937
+ {
89938
+ if (option.ClearYCoordinateMaxMin===true) this.Frame.ClearYCoordinateMaxMin();
89939
+ }
89940
+
89610
89941
  if (this.DayCount<=1) this.RequestMinuteData();
89611
89942
  else this.RequestHistoryMinuteData();
89612
89943
  }
@@ -89678,11 +90009,13 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
89678
90009
  After:this.IsShowMultiDayAfterData
89679
90010
  } //集合竞价
89680
90011
 
90012
+ var bBuySellBar=this.IsShowMinuteBuySellBar();
90013
+
89681
90014
  var obj=
89682
90015
  {
89683
90016
  Name:'MinuteChartContainer::RequestHistoryMinuteData', //类名::函数
89684
90017
  Explain:'多日分时数据',
89685
- Request:{ Url:self.HistoryMinuteApiUrl, Data:{daycount:self.DayCount, symbol:self.Symbol, callcation:callCation, AryDate:this.AryDate }, Type:'POST' },
90018
+ Request:{ Url:self.HistoryMinuteApiUrl, Data:{daycount:self.DayCount, symbol:self.Symbol, callcation:callCation, AryDate:this.AryDate, IsShowBuySellBar:bBuySellBar }, Type:'POST' },
89686
90019
  Self:this,
89687
90020
  PreventDefault:false
89688
90021
  };
@@ -89729,6 +90062,10 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
89729
90062
 
89730
90063
  this.DataStatus.MultiDay=true;
89731
90064
 
90065
+ var lastDayData=null;
90066
+ if (IFrameSplitOperator.IsNonEmptyArray(data.data) && data.data[0]) lastDayData=data.data[0];
90067
+ if (lastDayData) this.RecvBuySellData(lastDayData.BuySellData);
90068
+
89732
90069
  this.CaclutateCallCationYRange();
89733
90070
  this.Symbol=data.symbol;
89734
90071
  this.Name=data.name;
@@ -90048,6 +90385,9 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
90048
90385
  this.IsAfterData=true;
90049
90386
  }
90050
90387
 
90388
+ //5档买卖盘
90389
+ var bBuySellBar=this.IsShowMinuteBuySellBar();
90390
+
90051
90391
  if (this.NetworkFilter)
90052
90392
  {
90053
90393
  var dateRange=null;
@@ -90072,7 +90412,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
90072
90412
  {
90073
90413
  Name:'MinuteChartContainer::RequestMinuteData', //类名::函数名
90074
90414
  Explain:'最新分时数据',
90075
- Request:{ Url:self.MinuteApiUrl, Data:{field:fields, symbol:[self.Symbol], callcation:callCation, AryDate:this.AryDate }, Type:'POST' },
90415
+ Request:{ Url:self.MinuteApiUrl, Data:{field:fields, symbol:[self.Symbol], callcation:callCation, AryDate:this.AryDate, IsShowBuySellBar:bBuySellBar }, Type:'POST' },
90076
90416
  Self:this,
90077
90417
  PreventDefault:false
90078
90418
  };
@@ -90207,6 +90547,21 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
90207
90547
  }
90208
90548
  }
90209
90549
 
90550
+ this.RecvBuySellData=function(data)
90551
+ {
90552
+ if (!data) return;
90553
+
90554
+ if (Array.isArray(data.AryBuy))
90555
+ {
90556
+ this.BuySellData.AryBuy=data.AryBuy.slice();
90557
+ }
90558
+
90559
+ if (Array.isArray(data.ArySell))
90560
+ {
90561
+ this.BuySellData.ArySell=data.ArySell.slice();
90562
+ }
90563
+ }
90564
+
90210
90565
  this.RecvMinuteData=function(data)
90211
90566
  {
90212
90567
  if (!data)
@@ -90241,7 +90596,12 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
90241
90596
 
90242
90597
  var bFirstData=(this.DataStatus.LatestDay==false); //首条单日数据
90243
90598
 
90244
- this.DataStatus.LatestDate=data.stock[0].date; //保存下最后一天的日期
90599
+ if (IFrameSplitOperator.IsNonEmptyArray(data.stock) && data.stock[0])
90600
+ {
90601
+ this.DataStatus.LatestDate=data.stock[0].date; //保存下最后一天的日期
90602
+ this.RecvBuySellData(data.stock[0].BuySellData);
90603
+ }
90604
+
90245
90605
  this.DataStatus.LatestDay=true;
90246
90606
 
90247
90607
  if (this.DayCount>1) //多日走势图