hqchart 1.1.12669 → 1.1.12678

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.
@@ -1230,6 +1230,15 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
1230
1230
  this.CanvasElement.onmouseleave=(e)=>{ }
1231
1231
  }
1232
1232
 
1233
+ if (option.ExtendChart)
1234
+ {
1235
+ for(var i=0;i<option.ExtendChart.length;++i)
1236
+ {
1237
+ var item=option.ExtendChart[i];
1238
+ chart.CreateExtendChart(item.Name, item);
1239
+ }
1240
+ }
1241
+
1233
1242
  return chart;
1234
1243
 
1235
1244
  }
@@ -6662,8 +6671,137 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
6662
6671
  this.Frame.ResetXYSplit();
6663
6672
  }
6664
6673
 
6674
+ this.UpdateFrameMaxMinV2=function()
6675
+ {
6676
+ var mapFrame=new Map(); //key=frameid, value:{ ChartPaint:[] }
6677
+ for(var i=0;i<this.Frame.SubFrame.length;++i)
6678
+ {
6679
+ var subItem=this.Frame.SubFrame[i];
6680
+ if (!subItem || !subItem.Frame) continue;
6681
+
6682
+ var frame=subItem.Frame;
6683
+ var key=frame.Identify;
6684
+ var item=
6685
+ {
6686
+ ID:key, Frame:frame, ChartPaint:[] , Max:null, Min:null,
6687
+ OverlayFrame:[], //共享坐标
6688
+ SingleOverlay:[] //独立坐标
6689
+ };
6690
+
6691
+ for(var j=0;j<subItem.OverlayIndex.length;++j)
6692
+ {
6693
+ var overlayItem=subItem.OverlayIndex[j];
6694
+ var overlayFrame=overlayItem.Frame;
6695
+ if (overlayFrame.IsShareY)
6696
+ {
6697
+ if (!overlayFrame.MainFrame) continue;
6698
+ if (overlayFrame.IsCalculateYMaxMin===false) continue; //叠加坐标Y轴不调整
6699
+ item.OverlayFrame.push(overlayFrame);
6700
+ for(var k=0; k<overlayItem.ChartPaint.length; ++k)
6701
+ {
6702
+ var chart=overlayItem.ChartPaint[k];
6703
+ item.ChartPaint.push(chart);
6704
+ }
6705
+ }
6706
+ else
6707
+ {
6708
+ item.SingleOverlay.push(overlayItem);
6709
+ }
6710
+
6711
+ }
6712
+
6713
+ mapFrame.set(key, item);
6714
+ }
6715
+
6716
+ for(var i=0;i<this.ChartPaint.length;++i)
6717
+ {
6718
+ var chart=this.ChartPaint[i];
6719
+ var key=chart.ChartFrame.Identify;
6720
+ if (!mapFrame.has(key)) continue;
6721
+
6722
+ var finder=mapFrame.get(key);
6723
+ finder.ChartPaint.push(chart);
6724
+ }
6725
+
6726
+ for(var i=0;i<this.OverlayChartPaint.length;++i)
6727
+ {
6728
+ var chart=this.OverlayChartPaint[i];
6729
+ if (!chart.ChartFrame) continue;
6730
+ var key=chart.ChartFrame.Identify;
6731
+ if (!mapFrame.has(key)) continue;
6732
+
6733
+ var finder=mapFrame.get(key);
6734
+ finder.ChartPaint.push(chart);
6735
+ }
6736
+
6737
+ for(var mapItem of mapFrame)
6738
+ {
6739
+ var item=mapItem[1];
6740
+ var frame=item.Frame;
6741
+ //计算主框架最大最小
6742
+ for(var i=0;i<item.ChartPaint.length;++i)
6743
+ {
6744
+ var chart=item.ChartPaint[i];
6745
+ if (chart.IsShow==false) continue; //隐藏的图形不计算
6746
+ if (chart.NotSupportMessage) continue;
6747
+ if (!chart.ChartFrame) continue;
6748
+
6749
+ var range=chart.GetMaxMin();
6750
+ if (range==null || range.Max==null || range.Min==null) continue;
6751
+
6752
+ if (item.Max==null || item.Max<range.Max) item.Max=range.Max;
6753
+ if (item.Min==null || item.Min>range.Min) item.Min=range.Min;
6754
+ }
6755
+
6756
+ if (item.Frame.YSpecificMaxMin) //固定坐标
6757
+ {
6758
+ item.Min=item.Frame.YSpecificMaxMin.Max;
6759
+ item.Max=item.Frame.YSpecificMaxMin.Min;
6760
+ }
6761
+
6762
+ if (!IFrameSplitOperator.IsNumber(frame.YMaxMin.Max) || frame.YMaxMin.Max!=item.Max)
6763
+ {
6764
+ frame.YMaxMin.Max=item.Max;
6765
+ frame.XYSplit=true;
6766
+ }
6767
+
6768
+ if (!IFrameSplitOperator.IsNumber(frame.YMaxMin.Min) || frame.YMaxMin.Min!=item.Min)
6769
+ {
6770
+ frame.YMaxMin.Min=item.Min
6771
+ frame.XYSplit=true;
6772
+ }
6773
+
6774
+ if (frame.XYSplit)
6775
+ {
6776
+ var max=10, min=0;
6777
+ if (item.Max!=null) max=item.Max;
6778
+ if (item.Min!=null) min=item.Min;
6779
+
6780
+ frame.HorizontalMax=max;
6781
+ frame.HorizontalMin=min;
6782
+
6783
+ for(var j=0;j<item.OverlayFrame.length;++j)
6784
+ {
6785
+ item.OverlayFrame[j].XYSplit=true;
6786
+ }
6787
+ }
6788
+
6789
+
6790
+ //独立坐标叠加指标
6791
+ for(var i=0;i<item.SingleOverlay.length;++i)
6792
+ {
6793
+ var overlayItem=item.SingleOverlay[i];
6794
+ overlayItem.UpdateFrameMaxMin();
6795
+ }
6796
+ }
6797
+ }
6798
+
6665
6799
  this.UpdateFrameMaxMin=function()
6666
6800
  {
6801
+ this.UpdateFrameMaxMinV2();
6802
+
6803
+ return;
6804
+
6667
6805
  var frameMaxMinData=new Array();
6668
6806
 
6669
6807
  var chartPaint=new Array();
@@ -9037,6 +9175,9 @@ function IChartFramePainting()
9037
9175
  this.HorizontalMin; //Y轴最小值
9038
9176
  this.XPointCount=10; //X轴数据个数
9039
9177
 
9178
+ //Y轴原始的最大值 最小值
9179
+ this.YMaxMin={ Max:null, Min:null };
9180
+
9040
9181
  this.YSplitOperator; //Y轴分割
9041
9182
  this.XSplitOperator; //X轴分割
9042
9183
  this.Data; //主数据
@@ -25484,57 +25625,122 @@ function ChartKLine()
25484
25625
  var item=orderFlow.Order[i];
25485
25626
  var yPrice=this.GetYFromData(item.Price, false);
25486
25627
  if (!item.Vol) continue;
25487
- if (!IFrameSplitOperator.IsNumber(item.Vol.Value)) continue;
25488
-
25489
- var barWidth=xKLine.Right-xKLine.Left;
25490
- var volWidth=barWidth*(item.Vol.Value-min)/(max-min);
25491
- var rect={ Left:xKLine.Left, Right:xKLine.Right, Bottom:yPrice+cellHeight/2, Top:yPrice-cellHeight/2 };
25492
- rect.Right=rect.Left+volWidth;
25493
25628
 
25494
- if (preItem && item.Price>preItem.Price)
25629
+ if (IFrameSplitOperator.IsNonEmptyArray(item.AryVol))
25495
25630
  {
25496
- rect.Bottom=preItem.Rect.Top-volBarSpace;
25497
- }
25631
+ var barWidth=xKLine.Right-xKLine.Left;
25498
25632
 
25499
- rect.Width=rect.Right-rect.Left;
25500
- rect.Height=rect.Bottom-rect.Top;
25501
-
25502
-
25503
- var rtDraw={ Left:ToFixedRect(rect.Left), Top:ToFixedRect(rect.Top), Width:ToFixedRect(rect.Width), Height:ToFixedRect(rect.Height) };
25504
- rtDraw.Bottom=rtDraw.Top+rtDraw.Height;
25505
- rtDraw.Right=rtDraw.Left+rtDraw.Width;
25506
- if (rtDraw.Width<1) rtDraw.Width=1;
25633
+ var xVolLeft=xKLine.Left;
25634
+ var xVolRight=xVolLeft;
25635
+ var totalVol=0;
25636
+ var rtDraw={ Bottom:yPrice+cellHeight/2, Top:yPrice-cellHeight/2 };
25637
+ for(var j=0;j<item.AryVol.length;++j)
25638
+ {
25639
+ var itemVol=item.AryVol[j];
25640
+ if (!IFrameSplitOperator.IsNumber(itemVol.Value)) continue;
25641
+ totalVol+=itemVol.Value;
25642
+ xVolRight=barWidth*(totalVol-min)/(max-min)+xKLine.Left;
25643
+ var rtBar={ Left:xVolLeft, Right:xVolRight, Bottom:yPrice+cellHeight/2, Top:yPrice-cellHeight/2 };
25644
+ if (preItem && item.Price>preItem.Price)
25645
+ {
25646
+ rtBar.Bottom=preItem.Rect.Top-volBarSpace;
25647
+ }
25648
+ rtBar.Width=rtBar.Right-rtBar.Left;
25649
+ rtBar.Height=rtBar.Bottom-rtBar.Top;
25507
25650
 
25508
- if (item.Vol.BG) //背景色
25509
- {
25510
- this.Canvas.fillStyle=item.Vol.BG;
25511
- this.Canvas.fillRect(rtDraw.Left, rtDraw.Top, rtDraw.Width, rtDraw.Height);
25512
- }
25651
+ rtDraw={ Left:ToFixedRect(rtBar.Left), Top:ToFixedRect(rtBar.Top), Width:ToFixedRect(rtBar.Width), Height:ToFixedRect(rtBar.Height) };
25652
+ rtDraw.Bottom=rtDraw.Top+rtDraw.Height;
25653
+ rtDraw.Right=rtDraw.Left+rtDraw.Width;
25654
+ if (rtDraw.Width<1) rtDraw.Width=1;
25513
25655
 
25514
- if (item.Vol.BorderColor) //边框
25515
- {
25516
- this.Canvas.strokeStyle = item.Vol.BorderColor;
25517
- this.Canvas.strokeRect(ToFixedPoint(rtDraw.Left), ToFixedPoint(rtDraw.Top), rtDraw.Width, rtDraw.Height);
25518
- }
25656
+ if (itemVol.BG) //背景色
25657
+ {
25658
+ this.Canvas.fillStyle=itemVol.BG;
25659
+ this.Canvas.fillRect(rtDraw.Left, rtDraw.Top, rtDraw.Width, rtDraw.Height);
25660
+ }
25519
25661
 
25520
- if (item.Vol.Text && this.IsShowOrderText) //文字
25521
- {
25522
- this.Canvas.fillStyle=item.Vol.Color;
25662
+ xVolLeft=rtDraw.Right;
25663
+ }
25523
25664
 
25524
- if (item.Vol.Font)
25665
+ rtDraw.Left=xKLine.Left;
25666
+ rtDraw.Width=rtDraw.Right-rtDraw.Left;
25667
+ if (item.Vol.Text && this.IsShowOrderText) //文字
25525
25668
  {
25526
- var itemFont=this.GetDynamicOrderFlowFont(cellHeight, barWidth/2, item.Vol.Font);
25527
- this.Canvas.font=itemFont;
25528
- this.Canvas.fillText(text,xKLine.Center+textXOffset,yPrice);
25529
- this.Canvas.font=textFont;
25669
+ this.Canvas.fillStyle=item.Vol.Color;
25670
+
25671
+ if (item.Vol.Font)
25672
+ {
25673
+ var itemFont=this.GetDynamicOrderFlowFont(cellHeight, barWidth/2, item.Vol.Font);
25674
+ this.Canvas.font=itemFont;
25675
+ this.Canvas.fillText(text,xKLine.Center+textXOffset,yPrice);
25676
+ this.Canvas.font=textFont;
25677
+ }
25678
+ else
25679
+ {
25680
+ this.Canvas.fillText(item.Vol.Text,rtDraw.Left+2,yPrice);
25681
+ }
25530
25682
  }
25531
- else
25683
+
25684
+ preItem={ Price: item.Price, Rect:rtDraw };
25685
+ }
25686
+ else if (IFrameSplitOperator.IsNumber(item.Vol.Value))
25687
+ {
25688
+ var barWidth=xKLine.Right-xKLine.Left;
25689
+ var volWidth=barWidth*(item.Vol.Value-min)/(max-min);
25690
+ var rect={ Left:xKLine.Left, Right:xKLine.Right, Bottom:yPrice+cellHeight/2, Top:yPrice-cellHeight/2 };
25691
+ rect.Right=rect.Left+volWidth;
25692
+
25693
+ if (preItem && item.Price>preItem.Price)
25694
+ {
25695
+ rect.Bottom=preItem.Rect.Top-volBarSpace;
25696
+ }
25697
+
25698
+ rect.Width=rect.Right-rect.Left;
25699
+ rect.Height=rect.Bottom-rect.Top;
25700
+
25701
+
25702
+ var rtDraw={ Left:ToFixedRect(rect.Left), Top:ToFixedRect(rect.Top), Width:ToFixedRect(rect.Width), Height:ToFixedRect(rect.Height) };
25703
+ rtDraw.Bottom=rtDraw.Top+rtDraw.Height;
25704
+ rtDraw.Right=rtDraw.Left+rtDraw.Width;
25705
+ if (rtDraw.Width<1) rtDraw.Width=1;
25706
+
25707
+ if (item.Vol.BG) //背景色
25708
+ {
25709
+ this.Canvas.fillStyle=item.Vol.BG;
25710
+ this.Canvas.fillRect(rtDraw.Left, rtDraw.Top, rtDraw.Width, rtDraw.Height);
25711
+ }
25712
+
25713
+ if (item.Vol.BorderColor) //边框
25532
25714
  {
25533
- this.Canvas.fillText(item.Vol.Text,rtDraw.Left+2,yPrice);
25715
+ this.Canvas.strokeStyle = item.Vol.BorderColor;
25716
+ this.Canvas.strokeRect(ToFixedPoint(rtDraw.Left), ToFixedPoint(rtDraw.Top), rtDraw.Width, rtDraw.Height);
25534
25717
  }
25718
+
25719
+ if (item.Vol.Text && this.IsShowOrderText) //文字
25720
+ {
25721
+ this.Canvas.fillStyle=item.Vol.Color;
25722
+
25723
+ if (item.Vol.Font)
25724
+ {
25725
+ var itemFont=this.GetDynamicOrderFlowFont(cellHeight, barWidth/2, item.Vol.Font);
25726
+ this.Canvas.font=itemFont;
25727
+ this.Canvas.fillText(text,xKLine.Center+textXOffset,yPrice);
25728
+ this.Canvas.font=textFont;
25729
+ }
25730
+ else
25731
+ {
25732
+ this.Canvas.fillText(item.Vol.Text,rtDraw.Left+2,yPrice);
25733
+ }
25734
+ }
25735
+
25736
+ preItem={ Price: item.Price, Rect:rtDraw };
25535
25737
  }
25536
-
25537
- preItem={ Price: item.Price, Rect:rtDraw };
25738
+ else
25739
+ {
25740
+ continue;
25741
+ }
25742
+
25743
+
25538
25744
  }
25539
25745
  }
25540
25746
  }
@@ -5374,6 +5374,15 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
5374
5374
  this.CanvasElement.onmouseleave=(e)=>{ }
5375
5375
  }
5376
5376
 
5377
+ if (option.ExtendChart)
5378
+ {
5379
+ for(var i=0;i<option.ExtendChart.length;++i)
5380
+ {
5381
+ var item=option.ExtendChart[i];
5382
+ chart.CreateExtendChart(item.Name, item);
5383
+ }
5384
+ }
5385
+
5377
5386
  return chart;
5378
5387
 
5379
5388
  }
@@ -10806,8 +10815,137 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
10806
10815
  this.Frame.ResetXYSplit();
10807
10816
  }
10808
10817
 
10818
+ this.UpdateFrameMaxMinV2=function()
10819
+ {
10820
+ var mapFrame=new Map(); //key=frameid, value:{ ChartPaint:[] }
10821
+ for(var i=0;i<this.Frame.SubFrame.length;++i)
10822
+ {
10823
+ var subItem=this.Frame.SubFrame[i];
10824
+ if (!subItem || !subItem.Frame) continue;
10825
+
10826
+ var frame=subItem.Frame;
10827
+ var key=frame.Identify;
10828
+ var item=
10829
+ {
10830
+ ID:key, Frame:frame, ChartPaint:[] , Max:null, Min:null,
10831
+ OverlayFrame:[], //共享坐标
10832
+ SingleOverlay:[] //独立坐标
10833
+ };
10834
+
10835
+ for(var j=0;j<subItem.OverlayIndex.length;++j)
10836
+ {
10837
+ var overlayItem=subItem.OverlayIndex[j];
10838
+ var overlayFrame=overlayItem.Frame;
10839
+ if (overlayFrame.IsShareY)
10840
+ {
10841
+ if (!overlayFrame.MainFrame) continue;
10842
+ if (overlayFrame.IsCalculateYMaxMin===false) continue; //叠加坐标Y轴不调整
10843
+ item.OverlayFrame.push(overlayFrame);
10844
+ for(var k=0; k<overlayItem.ChartPaint.length; ++k)
10845
+ {
10846
+ var chart=overlayItem.ChartPaint[k];
10847
+ item.ChartPaint.push(chart);
10848
+ }
10849
+ }
10850
+ else
10851
+ {
10852
+ item.SingleOverlay.push(overlayItem);
10853
+ }
10854
+
10855
+ }
10856
+
10857
+ mapFrame.set(key, item);
10858
+ }
10859
+
10860
+ for(var i=0;i<this.ChartPaint.length;++i)
10861
+ {
10862
+ var chart=this.ChartPaint[i];
10863
+ var key=chart.ChartFrame.Identify;
10864
+ if (!mapFrame.has(key)) continue;
10865
+
10866
+ var finder=mapFrame.get(key);
10867
+ finder.ChartPaint.push(chart);
10868
+ }
10869
+
10870
+ for(var i=0;i<this.OverlayChartPaint.length;++i)
10871
+ {
10872
+ var chart=this.OverlayChartPaint[i];
10873
+ if (!chart.ChartFrame) continue;
10874
+ var key=chart.ChartFrame.Identify;
10875
+ if (!mapFrame.has(key)) continue;
10876
+
10877
+ var finder=mapFrame.get(key);
10878
+ finder.ChartPaint.push(chart);
10879
+ }
10880
+
10881
+ for(var mapItem of mapFrame)
10882
+ {
10883
+ var item=mapItem[1];
10884
+ var frame=item.Frame;
10885
+ //计算主框架最大最小
10886
+ for(var i=0;i<item.ChartPaint.length;++i)
10887
+ {
10888
+ var chart=item.ChartPaint[i];
10889
+ if (chart.IsShow==false) continue; //隐藏的图形不计算
10890
+ if (chart.NotSupportMessage) continue;
10891
+ if (!chart.ChartFrame) continue;
10892
+
10893
+ var range=chart.GetMaxMin();
10894
+ if (range==null || range.Max==null || range.Min==null) continue;
10895
+
10896
+ if (item.Max==null || item.Max<range.Max) item.Max=range.Max;
10897
+ if (item.Min==null || item.Min>range.Min) item.Min=range.Min;
10898
+ }
10899
+
10900
+ if (item.Frame.YSpecificMaxMin) //固定坐标
10901
+ {
10902
+ item.Min=item.Frame.YSpecificMaxMin.Max;
10903
+ item.Max=item.Frame.YSpecificMaxMin.Min;
10904
+ }
10905
+
10906
+ if (!IFrameSplitOperator.IsNumber(frame.YMaxMin.Max) || frame.YMaxMin.Max!=item.Max)
10907
+ {
10908
+ frame.YMaxMin.Max=item.Max;
10909
+ frame.XYSplit=true;
10910
+ }
10911
+
10912
+ if (!IFrameSplitOperator.IsNumber(frame.YMaxMin.Min) || frame.YMaxMin.Min!=item.Min)
10913
+ {
10914
+ frame.YMaxMin.Min=item.Min
10915
+ frame.XYSplit=true;
10916
+ }
10917
+
10918
+ if (frame.XYSplit)
10919
+ {
10920
+ var max=10, min=0;
10921
+ if (item.Max!=null) max=item.Max;
10922
+ if (item.Min!=null) min=item.Min;
10923
+
10924
+ frame.HorizontalMax=max;
10925
+ frame.HorizontalMin=min;
10926
+
10927
+ for(var j=0;j<item.OverlayFrame.length;++j)
10928
+ {
10929
+ item.OverlayFrame[j].XYSplit=true;
10930
+ }
10931
+ }
10932
+
10933
+
10934
+ //独立坐标叠加指标
10935
+ for(var i=0;i<item.SingleOverlay.length;++i)
10936
+ {
10937
+ var overlayItem=item.SingleOverlay[i];
10938
+ overlayItem.UpdateFrameMaxMin();
10939
+ }
10940
+ }
10941
+ }
10942
+
10809
10943
  this.UpdateFrameMaxMin=function()
10810
10944
  {
10945
+ this.UpdateFrameMaxMinV2();
10946
+
10947
+ return;
10948
+
10811
10949
  var frameMaxMinData=new Array();
10812
10950
 
10813
10951
  var chartPaint=new Array();
@@ -13181,6 +13319,9 @@ function IChartFramePainting()
13181
13319
  this.HorizontalMin; //Y轴最小值
13182
13320
  this.XPointCount=10; //X轴数据个数
13183
13321
 
13322
+ //Y轴原始的最大值 最小值
13323
+ this.YMaxMin={ Max:null, Min:null };
13324
+
13184
13325
  this.YSplitOperator; //Y轴分割
13185
13326
  this.XSplitOperator; //X轴分割
13186
13327
  this.Data; //主数据
@@ -29628,57 +29769,122 @@ function ChartKLine()
29628
29769
  var item=orderFlow.Order[i];
29629
29770
  var yPrice=this.GetYFromData(item.Price, false);
29630
29771
  if (!item.Vol) continue;
29631
- if (!IFrameSplitOperator.IsNumber(item.Vol.Value)) continue;
29632
-
29633
- var barWidth=xKLine.Right-xKLine.Left;
29634
- var volWidth=barWidth*(item.Vol.Value-min)/(max-min);
29635
- var rect={ Left:xKLine.Left, Right:xKLine.Right, Bottom:yPrice+cellHeight/2, Top:yPrice-cellHeight/2 };
29636
- rect.Right=rect.Left+volWidth;
29637
29772
 
29638
- if (preItem && item.Price>preItem.Price)
29773
+ if (IFrameSplitOperator.IsNonEmptyArray(item.AryVol))
29639
29774
  {
29640
- rect.Bottom=preItem.Rect.Top-volBarSpace;
29641
- }
29775
+ var barWidth=xKLine.Right-xKLine.Left;
29642
29776
 
29643
- rect.Width=rect.Right-rect.Left;
29644
- rect.Height=rect.Bottom-rect.Top;
29645
-
29646
-
29647
- var rtDraw={ Left:ToFixedRect(rect.Left), Top:ToFixedRect(rect.Top), Width:ToFixedRect(rect.Width), Height:ToFixedRect(rect.Height) };
29648
- rtDraw.Bottom=rtDraw.Top+rtDraw.Height;
29649
- rtDraw.Right=rtDraw.Left+rtDraw.Width;
29650
- if (rtDraw.Width<1) rtDraw.Width=1;
29777
+ var xVolLeft=xKLine.Left;
29778
+ var xVolRight=xVolLeft;
29779
+ var totalVol=0;
29780
+ var rtDraw={ Bottom:yPrice+cellHeight/2, Top:yPrice-cellHeight/2 };
29781
+ for(var j=0;j<item.AryVol.length;++j)
29782
+ {
29783
+ var itemVol=item.AryVol[j];
29784
+ if (!IFrameSplitOperator.IsNumber(itemVol.Value)) continue;
29785
+ totalVol+=itemVol.Value;
29786
+ xVolRight=barWidth*(totalVol-min)/(max-min)+xKLine.Left;
29787
+ var rtBar={ Left:xVolLeft, Right:xVolRight, Bottom:yPrice+cellHeight/2, Top:yPrice-cellHeight/2 };
29788
+ if (preItem && item.Price>preItem.Price)
29789
+ {
29790
+ rtBar.Bottom=preItem.Rect.Top-volBarSpace;
29791
+ }
29792
+ rtBar.Width=rtBar.Right-rtBar.Left;
29793
+ rtBar.Height=rtBar.Bottom-rtBar.Top;
29651
29794
 
29652
- if (item.Vol.BG) //背景色
29653
- {
29654
- this.Canvas.fillStyle=item.Vol.BG;
29655
- this.Canvas.fillRect(rtDraw.Left, rtDraw.Top, rtDraw.Width, rtDraw.Height);
29656
- }
29795
+ rtDraw={ Left:ToFixedRect(rtBar.Left), Top:ToFixedRect(rtBar.Top), Width:ToFixedRect(rtBar.Width), Height:ToFixedRect(rtBar.Height) };
29796
+ rtDraw.Bottom=rtDraw.Top+rtDraw.Height;
29797
+ rtDraw.Right=rtDraw.Left+rtDraw.Width;
29798
+ if (rtDraw.Width<1) rtDraw.Width=1;
29657
29799
 
29658
- if (item.Vol.BorderColor) //边框
29659
- {
29660
- this.Canvas.strokeStyle = item.Vol.BorderColor;
29661
- this.Canvas.strokeRect(ToFixedPoint(rtDraw.Left), ToFixedPoint(rtDraw.Top), rtDraw.Width, rtDraw.Height);
29662
- }
29800
+ if (itemVol.BG) //背景色
29801
+ {
29802
+ this.Canvas.fillStyle=itemVol.BG;
29803
+ this.Canvas.fillRect(rtDraw.Left, rtDraw.Top, rtDraw.Width, rtDraw.Height);
29804
+ }
29663
29805
 
29664
- if (item.Vol.Text && this.IsShowOrderText) //文字
29665
- {
29666
- this.Canvas.fillStyle=item.Vol.Color;
29806
+ xVolLeft=rtDraw.Right;
29807
+ }
29667
29808
 
29668
- if (item.Vol.Font)
29809
+ rtDraw.Left=xKLine.Left;
29810
+ rtDraw.Width=rtDraw.Right-rtDraw.Left;
29811
+ if (item.Vol.Text && this.IsShowOrderText) //文字
29669
29812
  {
29670
- var itemFont=this.GetDynamicOrderFlowFont(cellHeight, barWidth/2, item.Vol.Font);
29671
- this.Canvas.font=itemFont;
29672
- this.Canvas.fillText(text,xKLine.Center+textXOffset,yPrice);
29673
- this.Canvas.font=textFont;
29813
+ this.Canvas.fillStyle=item.Vol.Color;
29814
+
29815
+ if (item.Vol.Font)
29816
+ {
29817
+ var itemFont=this.GetDynamicOrderFlowFont(cellHeight, barWidth/2, item.Vol.Font);
29818
+ this.Canvas.font=itemFont;
29819
+ this.Canvas.fillText(text,xKLine.Center+textXOffset,yPrice);
29820
+ this.Canvas.font=textFont;
29821
+ }
29822
+ else
29823
+ {
29824
+ this.Canvas.fillText(item.Vol.Text,rtDraw.Left+2,yPrice);
29825
+ }
29674
29826
  }
29675
- else
29827
+
29828
+ preItem={ Price: item.Price, Rect:rtDraw };
29829
+ }
29830
+ else if (IFrameSplitOperator.IsNumber(item.Vol.Value))
29831
+ {
29832
+ var barWidth=xKLine.Right-xKLine.Left;
29833
+ var volWidth=barWidth*(item.Vol.Value-min)/(max-min);
29834
+ var rect={ Left:xKLine.Left, Right:xKLine.Right, Bottom:yPrice+cellHeight/2, Top:yPrice-cellHeight/2 };
29835
+ rect.Right=rect.Left+volWidth;
29836
+
29837
+ if (preItem && item.Price>preItem.Price)
29838
+ {
29839
+ rect.Bottom=preItem.Rect.Top-volBarSpace;
29840
+ }
29841
+
29842
+ rect.Width=rect.Right-rect.Left;
29843
+ rect.Height=rect.Bottom-rect.Top;
29844
+
29845
+
29846
+ var rtDraw={ Left:ToFixedRect(rect.Left), Top:ToFixedRect(rect.Top), Width:ToFixedRect(rect.Width), Height:ToFixedRect(rect.Height) };
29847
+ rtDraw.Bottom=rtDraw.Top+rtDraw.Height;
29848
+ rtDraw.Right=rtDraw.Left+rtDraw.Width;
29849
+ if (rtDraw.Width<1) rtDraw.Width=1;
29850
+
29851
+ if (item.Vol.BG) //背景色
29852
+ {
29853
+ this.Canvas.fillStyle=item.Vol.BG;
29854
+ this.Canvas.fillRect(rtDraw.Left, rtDraw.Top, rtDraw.Width, rtDraw.Height);
29855
+ }
29856
+
29857
+ if (item.Vol.BorderColor) //边框
29676
29858
  {
29677
- this.Canvas.fillText(item.Vol.Text,rtDraw.Left+2,yPrice);
29859
+ this.Canvas.strokeStyle = item.Vol.BorderColor;
29860
+ this.Canvas.strokeRect(ToFixedPoint(rtDraw.Left), ToFixedPoint(rtDraw.Top), rtDraw.Width, rtDraw.Height);
29678
29861
  }
29862
+
29863
+ if (item.Vol.Text && this.IsShowOrderText) //文字
29864
+ {
29865
+ this.Canvas.fillStyle=item.Vol.Color;
29866
+
29867
+ if (item.Vol.Font)
29868
+ {
29869
+ var itemFont=this.GetDynamicOrderFlowFont(cellHeight, barWidth/2, item.Vol.Font);
29870
+ this.Canvas.font=itemFont;
29871
+ this.Canvas.fillText(text,xKLine.Center+textXOffset,yPrice);
29872
+ this.Canvas.font=textFont;
29873
+ }
29874
+ else
29875
+ {
29876
+ this.Canvas.fillText(item.Vol.Text,rtDraw.Left+2,yPrice);
29877
+ }
29878
+ }
29879
+
29880
+ preItem={ Price: item.Price, Rect:rtDraw };
29679
29881
  }
29680
-
29681
- preItem={ Price: item.Price, Rect:rtDraw };
29882
+ else
29883
+ {
29884
+ continue;
29885
+ }
29886
+
29887
+
29682
29888
  }
29683
29889
  }
29684
29890
  }
@@ -130309,7 +130515,7 @@ function ScrollBarBGChart()
130309
130515
 
130310
130516
 
130311
130517
 
130312
- var HQCHART_VERSION="1.1.12668";
130518
+ var HQCHART_VERSION="1.1.12677";
130313
130519
 
130314
130520
  function PrintHQChartVersion()
130315
130521
  {
@@ -5,7 +5,7 @@
5
5
 
6
6
 
7
7
 
8
- var HQCHART_VERSION="1.1.12668";
8
+ var HQCHART_VERSION="1.1.12677";
9
9
 
10
10
  function PrintHQChartVersion()
11
11
  {