hqchart 1.1.13100 → 1.1.13105

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.
@@ -55272,6 +55272,7 @@ function DynamicChartTitlePainting()
55272
55272
  this.BGBorderColor=g_JSChartResource.IndexTitleBorderColor;
55273
55273
  this.BGBorderMoveOnColor=g_JSChartResource.IndexTitleBorderMoveOnColor;
55274
55274
  this.BorderRoundRadius=2; //圆角矩形角度
55275
+ this.NameButtonStyle=g_JSChartResource.IndexTitleBorderStyle,
55275
55276
 
55276
55277
  this.OnDrawEvent;
55277
55278
  this.ParamSpace=2; //参数显示的间距
@@ -56567,7 +56568,6 @@ function DynamicChartTitlePainting()
56567
56568
  var roundRadius=this.BorderRoundRadius*pixelRatio;
56568
56569
  var bgWidth=textWidth+4*pixelRatio+roundRadius*2;
56569
56570
 
56570
-
56571
56571
  rtButton.Top=rtButton.YCenter-bgHeight/2-1,
56572
56572
  rtButton.Width=bgWidth;
56573
56573
  rtButton.Height=bgHeight;
@@ -56585,19 +56585,33 @@ function DynamicChartTitlePainting()
56585
56585
  }
56586
56586
  }
56587
56587
 
56588
- this.Canvas.beginPath();
56589
- this.Canvas.roundRect( ToFixedPoint(rtButton.Left), ToFixedPoint(rtButton.Top), ToFixedRect(rtButton.Width), ToFixedRect(rtButton.Height), [roundRadius]);
56590
- this.Canvas.closePath();
56588
+ if (this.NameButtonStyle==1)
56589
+ {
56590
+ this.Canvas.beginPath();
56591
+ this.Canvas.roundRect(ToFixedPoint(rtButton.Left), ToFixedPoint(rtButton.Top), ToFixedRect(rtButton.Width), ToFixedRect(rtButton.Height), [roundRadius]);
56592
+ this.Canvas.closePath();
56591
56593
 
56592
- this.Canvas.fillStyle=this.BGColor;
56593
- this.Canvas.fill();
56594
+ this.Canvas.fillStyle=this.BGColor;
56595
+ this.Canvas.fill();
56594
56596
 
56595
- if (borderColor)
56597
+ if (borderColor)
56598
+ {
56599
+ this.Canvas.strokeStyle=borderColor;
56600
+ this.Canvas.stroke();
56601
+ }
56602
+ }
56603
+ else
56596
56604
  {
56597
- this.Canvas.strokeStyle=borderColor;
56598
- this.Canvas.stroke();
56605
+ this.Canvas.fillStyle=this.BGColor;
56606
+ this.Canvas.fillRect(rtButton.Left, rtButton.Top, rtButton.Width, rtButton.Height);
56607
+
56608
+ if (borderColor)
56609
+ {
56610
+ this.Canvas.strokeStyle=borderColor;
56611
+ this.Canvas.strokeRect(ToFixedPoint(rtButton.Left), ToFixedPoint(rtButton.Top), ToFixedRect(rtButton.Width), ToFixedRect(rtButton.Height), [roundRadius]);
56612
+ }
56599
56613
  }
56600
-
56614
+
56601
56615
  this.Canvas.fillStyle=this.TitleColor;
56602
56616
  this.Canvas.fillText(title,rtButton.Left+roundRadius+2*pixelRatio,rtButton.YCenter,textWidth);
56603
56617
  }
@@ -66946,7 +66960,8 @@ function JSChartResource()
66946
66960
  this.TitleFont=13*GetDevicePixelRatio() +'px 微软雅黑'; //指标显示,tooltip显示字体
66947
66961
  this.IndexTitleBGColor='rgb(250,250,250)'; //指标名字背景色
66948
66962
  this.IndexTitleBorderColor='rgb(180,180,180)'; //指标名字边框颜色
66949
- this.IndexTitleBorderMoveOnColor='rgb(0,0,0)'; //指标名字边框颜色(鼠标在上面)
66963
+ this.IndexTitleBorderMoveOnColor='rgb(0,0,0)'; //指标名字边框颜色(鼠标在上面)
66964
+ this.IndexTitleBorderStyle=1, //0=直角边框 1=圆角变量
66950
66965
  this.IndexTitleColor="rgb(43,54,69)"; //指标名字颜色
66951
66966
  this.IndexTitleSelectedColor="rgb(65,105,225)";
66952
66967
  this.OverlayIndexTitleBGColor='rgba(255,255,255,0.7)';
@@ -67920,6 +67935,16 @@ function JSChartResource()
67920
67935
 
67921
67936
  MoveRowColor:'rgb(240,128,128)',
67922
67937
  SrcRowColor:'rgb(180,240,240)',
67938
+ },
67939
+
67940
+ VScrollbar:
67941
+ {
67942
+ ScrollBarHeight:60,
67943
+ ButtonColor:"rgba(252,252,252,0.8)",
67944
+ BarColor:"rgba(168,168,168,0.9)",
67945
+ BorderColor:'rgba(180,180,180,0.9)',
67946
+ BGColor:"rgba(234,239,248,0.9)",
67947
+ BarWidth:{ Size:12 }
67923
67948
  }
67924
67949
  },
67925
67950
 
@@ -68110,6 +68135,7 @@ function JSChartResource()
68110
68135
  if (style.IndexTitleBGColor) this.IndexTitleBGColor=style.IndexTitleBGColor;
68111
68136
  if (style.IndexTitleBorderColor) this.IndexTitleBorderColor=style.IndexTitleBorderColor;
68112
68137
  if (style.IndexTitleBorderMoveOnColor) this.IndexTitleBorderMoveOnColor=style.IndexTitleBorderMoveOnColor;
68138
+ if (IFrameSplitOperator.IsNumber(style.IndexTitleBorderStyle)) this.IndexTitleBorderStyle=style.IndexTitleBorderStyle;
68113
68139
  if (style.IndexTitleColor) this.IndexTitleColor=style.IndexTitleColor;
68114
68140
  if (style.IndexTitleSelectedColor) this.IndexTitleSelectedColor=style.IndexTitleSelectedColor;
68115
68141
  if (style.OverlayIndexTitleBGColor) this.OverlayIndexTitleBGColor=style.OverlayIndexTitleBGColor;
@@ -68557,205 +68583,8 @@ function JSChartResource()
68557
68583
  }
68558
68584
  }
68559
68585
 
68560
- if (style.Report)
68561
- {
68562
- var item=style.Report;
68563
- if (item.BorderColor) this.Report.BorderColor=item.BorderColor;
68564
- if (item.UpTextColor) this.Report.UpTextColor=item.UpTextColor;
68565
- if (item.DownTextColor) this.Report.DownTextColor=item.DownTextColor;
68566
- if (item.UnchagneTextColor) this.Report.UnchagneTextColor=item.UnchagneTextColor;
68567
- if (item.BorderColor) this.Report.SelectedColor=item.SelectedColor;
68568
-
68569
-
68570
- if (item.CloseLine)
68571
- {
68572
- var closeLine=item.CloseLine;
68573
- if (closeLine.CloseColor) this.Report.CloseLine.CloseColor=closeLine.CloseColor;
68574
- if (closeLine.YCloseColor) this.Report.CloseLine.YCloseColor=closeLine.YCloseColor;
68575
- if (closeLine.AreaColor) this.Report.CloseLine.AreaColor=closeLine.AreaColor;
68576
- }
68577
-
68578
- if (item.KLine)
68579
- {
68580
- var kline=item.KLine;
68581
- if (kline.UpColor) this.Report.KLine.UpColor=kline.UpColor;
68582
- if (kline.DownColor) this.Report.KLine.DownColor=kline.DownColor;
68583
- if (kline.UnchagneColor) this.Report.KLine.UnchagneColor=kline.UnchagneColor;
68584
-
68585
- if (IFrameSplitOperator.IsNumber(kline.DataWidth)) this.Report.KLine.DataWidth=kline.DataWidth;
68586
- if (IFrameSplitOperator.IsNumber(kline.DistanceWidth)) this.Report.KLine.DistanceWidth=kline.DistanceWidth;
68587
- }
68588
-
68589
- if (item.Header)
68590
- {
68591
- var header=item.Header;
68592
- if (header.Color) this.Report.Header.Color=header.Color;
68593
- if (header.SortColor) this.Report.Header.SortColor=header.SortColor;
68594
- if (header.Mergin)
68595
- {
68596
- var mergin=header.Mergin;
68597
- if (IFrameSplitOperator.IsNumber(mergin.Left)) this.Report.Header.Mergin.Left=mergin.Left;
68598
- if (IFrameSplitOperator.IsNumber(mergin.Right)) this.Report.Header.Mergin.Left=mergin.Right;
68599
- if (IFrameSplitOperator.IsNumber(mergin.Top)) this.Report.Header.Mergin.Top=mergin.Top;
68600
- if (IFrameSplitOperator.IsNumber(mergin.Bottom)) this.Report.Header.Mergin.Bottom=mergin.Bottom;
68601
- }
68602
- if (header.Font)
68603
- {
68604
- var font=header.Font;
68605
- if (font.Name) this.Report.Header.Font.Name=font.Name;
68606
- if (IFrameSplitOperator.IsNumber(font.Size)) this.Report.Header.Font.Size=font.Size;
68607
- }
68608
- }
68609
-
68610
- if (item.Item)
68611
- {
68612
- var row=item.Item;
68613
- if (row.Mergin)
68614
- {
68615
- var mergin=row.Mergin;
68616
- if (IFrameSplitOperator.IsNumber(mergin.Left)) this.Report.Item.Mergin.Left=mergin.Left;
68617
- if (IFrameSplitOperator.IsNumber(mergin.Right)) this.Report.Item.Mergin.Right=mergin.Right;
68618
- if (IFrameSplitOperator.IsNumber(mergin.Top)) this.Report.Item.Mergin.Top=mergin.Top;
68619
- if (IFrameSplitOperator.IsNumber(mergin.Bottom)) this.Report.Item.Mergin.Bottom=mergin.Bottom;
68620
- }
68621
-
68622
- if (row.Font)
68623
- {
68624
- var font=row.Font;
68625
- if (font.Name) this.Report.Item.Font.Name=font.Name;
68626
- if (IFrameSplitOperator.IsNumber(font.Size)) this.Report.Item.Font.Size=font.Size;
68627
- }
68628
-
68629
- if (row.BarMergin)
68630
- {
68631
- var mergin=row.BarMergin;
68632
- if (IFrameSplitOperator.IsNumber(mergin.Left)) this.Report.Item.BarMergin.Left=mergin.Left;
68633
- if (IFrameSplitOperator.IsNumber(mergin.Top)) this.Report.Item.BarMergin.Top=mergin.Top;
68634
- if (IFrameSplitOperator.IsNumber(mergin.Right)) this.Report.Item.BarMergin.Right=mergin.Right;
68635
- if (IFrameSplitOperator.IsNumber(mergin.Bottom)) this.Report.Item.BarMergin.Bottom=mergin.Bottom;
68636
- }
68637
-
68638
- if (row.NameFont)
68639
- {
68640
- var font=row.NameFont;
68641
- if (font.Name) this.Report.Item.NameFont.Name=font.Name;
68642
- if (IFrameSplitOperator.IsNumber(font.Size)) this.Report.Item.NameFont.Size=font.Size;
68643
- }
68644
-
68645
- if (row.SymbolFont)
68646
- {
68647
- var font=row.SymbolFont;
68648
- if (font.Name) this.Report.Item.SymbolFont.Name=font.Name;
68649
- if (IFrameSplitOperator.IsNumber(font.Size)) this.Report.Item.SymbolFont.Size=font.Size;
68650
- }
68651
- }
68652
-
68653
- if (item.FixedItem)
68654
- {
68655
- var row=item.FixedItem;
68656
- if (row.Font)
68657
- {
68658
- var font=row.Font;
68659
- if (font.Name) this.Report.FixedItem.Font.Name=font.Name;
68660
- if (IFrameSplitOperator.IsNumber(font.Size)) this.Report.FixedItem.Font.Size=font.Size;
68661
- }
68662
- }
68663
-
68664
- if (item.LimitBorder)
68665
- {
68666
- var limit=item.LimitBorder;
68667
- if (limit.Color) this.Report.LimitBorder.Color=limit.Color;
68668
- if (limit.Mergin)
68669
- {
68670
- var mergin=limit.Mergin;
68671
- if (IFrameSplitOperator.IsNumber(mergin.Left)) this.Report.LimitBorder.Mergin.Left=mergin.Left;
68672
- if (IFrameSplitOperator.IsNumber(mergin.Top)) this.Report.LimitBorder.Mergin.Top=mergin.Top;
68673
- if (IFrameSplitOperator.IsNumber(mergin.Right)) this.Report.LimitBorder.Mergin.Right=mergin.Right;
68674
- if (IFrameSplitOperator.IsNumber(mergin.Bottom)) this.Report.LimitBorder.Mergin.Bottom=mergin.Bottom;
68675
- }
68676
- }
68677
-
68678
- if (item.LimitColor)
68679
- {
68680
- var limit=item.LimitColor;
68681
- if (limit.UpColor) this.Report.LimitColor.UpColor=limit.UpColor;
68682
- if (limit.DownColor) this.Report.LimitColor.DownColor=limit.DownColor;
68683
- if (limit.TextColor) this.Report.LimitColor.UpColor=limit.TextColor;
68684
- }
68685
-
68686
- if (item.FieldColor)
68687
- {
68688
- var filed=item.FieldColor;
68689
- if (filed.Name) this.Report.FieldColor.Name=filed.Name;
68690
- if (filed.Symbol) this.Report.FieldColor.Symbol=filed.Symbol;
68691
- if (filed.Vol) this.Report.FieldColor.Vol=filed.Vol;
68692
- if (filed.Amount) this.Report.FieldColor.Amount=filed.Amount;
68693
- if (filed.Index) this.Report.FieldColor.Index=filed.Index;
68694
- if (filed.BarTitle) this.Report.FieldColor.BarTitle=filed.BarTitle;
68695
- if (filed.Text) this.Report.FieldColor.Text=filed.Text;
68696
-
68697
- if (IFrameSplitOperator.IsNonEmptyArray(filed.Bar))
68698
- {
68699
- for(var i=0;i<filed.Bar.length;++i)
68700
- this.Report.FieldColor.Bar[i]=filed.Bar[i];
68701
- }
68702
- }
68703
-
68704
- if (item.Tab)
68705
- {
68706
- var tab=item.Tab;
68707
- if (tab.Font)
68708
- {
68709
- var font=tab.Font;
68710
- if (font.Name) this.Report.Tab.Font.Name=font.Name;
68711
- if (IFrameSplitOperator.IsNumber(font.Size)) this.Report.Tab.Font.Size=font.Size;
68712
- }
68713
-
68714
- if (IFrameSplitOperator.IsNumber(tab.ScrollBarWidth)) this.Report.Tab.ScrollBarWidth=tab.ScrollBarWidth;
68715
- if (tab.ButtonColor) this.Report.Tab.ButtonColor=tab.ButtonColor;
68716
- if (tab.BarColor) this.Report.Tab.BarColor=tab.BarColor;
68717
- if (tab.BorderColor) this.Report.Tab.BorderColor=tab.BorderColor;
68718
-
68719
- if (tab.TabTitleColor) this.Report.Tab.TabTitleColor=tab.TabTitleColor;
68720
- if (tab.TabSelectedTitleColor) this.Report.Tab.TabSelectedTitleColor=tab.TabSelectedTitleColor;
68721
- if (tab.TabSelectedBGColor) this.Report.Tab.TabSelectedBGColor=tab.TabSelectedBGColor;
68722
- if (tab.TabMoveOnTitleColor) this.Report.Tab.TabMoveOnTitleColor=tab.TabMoveOnTitleColor;
68723
- if (tab.TabBGColor) this.Report.Tab.TabBGColor=tab.TabBGColor;
68724
- }
68725
-
68726
- if (item.PageInfo)
68727
- {
68728
- var pageinfo=item.PageInfo;
68729
- if (pageinfo.Font)
68730
- {
68731
- var font=pageinfo.Font;
68732
- if (font.Name) this.Report.PageInfo.Font.Name=font.Name;
68733
- if (IFrameSplitOperator.IsNumber(font.Size)) this.Report.PageInfo.Font.Size=font.Size;
68734
- }
68735
-
68736
- if (pageinfo.TextColor) this.Report.PageInfo.TextColor=pageinfo.TextColor;
68737
- if (pageinfo.BGColor) this.Report.PageInfo.BGColor=pageinfo.BGColor;
68738
-
68739
- if (pageinfo.Mergin)
68740
- {
68741
- var mergin=pageinfo.Mergin;
68742
- if (IFrameSplitOperator.IsNumber(mergin.Left)) this.Report.PageInfo.Mergin.Left=mergin.Left;
68743
- if (IFrameSplitOperator.IsNumber(mergin.Top)) this.Report.PageInfo.Mergin.Top=mergin.Top;
68744
- if (IFrameSplitOperator.IsNumber(mergin.Right)) this.Report.PageInfo.Mergin.Right=mergin.Right;
68745
- if (IFrameSplitOperator.IsNumber(mergin.Bottom)) this.Report.PageInfo.Mergin.Bottom=mergin.Bottom;
68746
- }
68747
- }
68748
-
68749
- if (item.DragRow)
68750
- {
68751
- var dragRow=item.DragRow;
68752
- if (dragRow.Color) this.Report.DragRow.Color=dragRow.Color;
68753
- if (dragRow.TextColor) this.Report.DragRow.TextColor=dragRow.TextColor;
68754
- if (dragRow.MoveRowColor) this.Report.DragRow.MoveRowColor=dragRow.MoveRowColor;
68755
- if (dragRow.SrcRowColor) this.Report.DragRow.SrcRowColor=dragRow.SrcRowColor;
68756
- }
68757
- }
68758
-
68586
+ if (style.Report) this.SetReportStyle(style.Report);
68587
+
68759
68588
  if (style.TReport) this.SetTReportStyle(style.TReport);
68760
68589
 
68761
68590
  if (style.SelectedChart)
@@ -68858,6 +68687,218 @@ function JSChartResource()
68858
68687
  }
68859
68688
  }
68860
68689
 
68690
+ this.SetReportStyle=function(style)
68691
+ {
68692
+ var item=style;
68693
+ var dest=this.Report;
68694
+
68695
+ if (item.BorderColor) this.Report.BorderColor=item.BorderColor;
68696
+ if (item.UpTextColor) this.Report.UpTextColor=item.UpTextColor;
68697
+ if (item.DownTextColor) this.Report.DownTextColor=item.DownTextColor;
68698
+ if (item.UnchagneTextColor) this.Report.UnchagneTextColor=item.UnchagneTextColor;
68699
+ if (item.BorderColor) this.Report.SelectedColor=item.SelectedColor;
68700
+
68701
+
68702
+ if (item.CloseLine)
68703
+ {
68704
+ var closeLine=item.CloseLine;
68705
+ if (closeLine.CloseColor) this.Report.CloseLine.CloseColor=closeLine.CloseColor;
68706
+ if (closeLine.YCloseColor) this.Report.CloseLine.YCloseColor=closeLine.YCloseColor;
68707
+ if (closeLine.AreaColor) this.Report.CloseLine.AreaColor=closeLine.AreaColor;
68708
+ }
68709
+
68710
+ if (item.KLine)
68711
+ {
68712
+ var kline=item.KLine;
68713
+ if (kline.UpColor) this.Report.KLine.UpColor=kline.UpColor;
68714
+ if (kline.DownColor) this.Report.KLine.DownColor=kline.DownColor;
68715
+ if (kline.UnchagneColor) this.Report.KLine.UnchagneColor=kline.UnchagneColor;
68716
+
68717
+ if (IFrameSplitOperator.IsNumber(kline.DataWidth)) this.Report.KLine.DataWidth=kline.DataWidth;
68718
+ if (IFrameSplitOperator.IsNumber(kline.DistanceWidth)) this.Report.KLine.DistanceWidth=kline.DistanceWidth;
68719
+ }
68720
+
68721
+ if (item.Header)
68722
+ {
68723
+ var header=item.Header;
68724
+ if (header.Color) this.Report.Header.Color=header.Color;
68725
+ if (header.SortColor) this.Report.Header.SortColor=header.SortColor;
68726
+ if (header.Mergin)
68727
+ {
68728
+ var mergin=header.Mergin;
68729
+ if (IFrameSplitOperator.IsNumber(mergin.Left)) this.Report.Header.Mergin.Left=mergin.Left;
68730
+ if (IFrameSplitOperator.IsNumber(mergin.Right)) this.Report.Header.Mergin.Left=mergin.Right;
68731
+ if (IFrameSplitOperator.IsNumber(mergin.Top)) this.Report.Header.Mergin.Top=mergin.Top;
68732
+ if (IFrameSplitOperator.IsNumber(mergin.Bottom)) this.Report.Header.Mergin.Bottom=mergin.Bottom;
68733
+ }
68734
+ if (header.Font)
68735
+ {
68736
+ var font=header.Font;
68737
+ if (font.Name) this.Report.Header.Font.Name=font.Name;
68738
+ if (IFrameSplitOperator.IsNumber(font.Size)) this.Report.Header.Font.Size=font.Size;
68739
+ }
68740
+ }
68741
+
68742
+ if (item.Item)
68743
+ {
68744
+ var row=item.Item;
68745
+ if (row.Mergin)
68746
+ {
68747
+ var mergin=row.Mergin;
68748
+ if (IFrameSplitOperator.IsNumber(mergin.Left)) this.Report.Item.Mergin.Left=mergin.Left;
68749
+ if (IFrameSplitOperator.IsNumber(mergin.Right)) this.Report.Item.Mergin.Right=mergin.Right;
68750
+ if (IFrameSplitOperator.IsNumber(mergin.Top)) this.Report.Item.Mergin.Top=mergin.Top;
68751
+ if (IFrameSplitOperator.IsNumber(mergin.Bottom)) this.Report.Item.Mergin.Bottom=mergin.Bottom;
68752
+ }
68753
+
68754
+ if (row.Font)
68755
+ {
68756
+ var font=row.Font;
68757
+ if (font.Name) this.Report.Item.Font.Name=font.Name;
68758
+ if (IFrameSplitOperator.IsNumber(font.Size)) this.Report.Item.Font.Size=font.Size;
68759
+ }
68760
+
68761
+ if (row.BarMergin)
68762
+ {
68763
+ var mergin=row.BarMergin;
68764
+ if (IFrameSplitOperator.IsNumber(mergin.Left)) this.Report.Item.BarMergin.Left=mergin.Left;
68765
+ if (IFrameSplitOperator.IsNumber(mergin.Top)) this.Report.Item.BarMergin.Top=mergin.Top;
68766
+ if (IFrameSplitOperator.IsNumber(mergin.Right)) this.Report.Item.BarMergin.Right=mergin.Right;
68767
+ if (IFrameSplitOperator.IsNumber(mergin.Bottom)) this.Report.Item.BarMergin.Bottom=mergin.Bottom;
68768
+ }
68769
+
68770
+ if (row.NameFont)
68771
+ {
68772
+ var font=row.NameFont;
68773
+ if (font.Name) this.Report.Item.NameFont.Name=font.Name;
68774
+ if (IFrameSplitOperator.IsNumber(font.Size)) this.Report.Item.NameFont.Size=font.Size;
68775
+ }
68776
+
68777
+ if (row.SymbolFont)
68778
+ {
68779
+ var font=row.SymbolFont;
68780
+ if (font.Name) this.Report.Item.SymbolFont.Name=font.Name;
68781
+ if (IFrameSplitOperator.IsNumber(font.Size)) this.Report.Item.SymbolFont.Size=font.Size;
68782
+ }
68783
+ }
68784
+
68785
+ if (item.FixedItem)
68786
+ {
68787
+ var row=item.FixedItem;
68788
+ if (row.Font)
68789
+ {
68790
+ var font=row.Font;
68791
+ if (font.Name) this.Report.FixedItem.Font.Name=font.Name;
68792
+ if (IFrameSplitOperator.IsNumber(font.Size)) this.Report.FixedItem.Font.Size=font.Size;
68793
+ }
68794
+ }
68795
+
68796
+ if (item.LimitBorder)
68797
+ {
68798
+ var limit=item.LimitBorder;
68799
+ if (limit.Color) this.Report.LimitBorder.Color=limit.Color;
68800
+ if (limit.Mergin)
68801
+ {
68802
+ var mergin=limit.Mergin;
68803
+ if (IFrameSplitOperator.IsNumber(mergin.Left)) this.Report.LimitBorder.Mergin.Left=mergin.Left;
68804
+ if (IFrameSplitOperator.IsNumber(mergin.Top)) this.Report.LimitBorder.Mergin.Top=mergin.Top;
68805
+ if (IFrameSplitOperator.IsNumber(mergin.Right)) this.Report.LimitBorder.Mergin.Right=mergin.Right;
68806
+ if (IFrameSplitOperator.IsNumber(mergin.Bottom)) this.Report.LimitBorder.Mergin.Bottom=mergin.Bottom;
68807
+ }
68808
+ }
68809
+
68810
+ if (item.LimitColor)
68811
+ {
68812
+ var limit=item.LimitColor;
68813
+ if (limit.UpColor) this.Report.LimitColor.UpColor=limit.UpColor;
68814
+ if (limit.DownColor) this.Report.LimitColor.DownColor=limit.DownColor;
68815
+ if (limit.TextColor) this.Report.LimitColor.UpColor=limit.TextColor;
68816
+ }
68817
+
68818
+ if (item.FieldColor)
68819
+ {
68820
+ var filed=item.FieldColor;
68821
+ if (filed.Name) this.Report.FieldColor.Name=filed.Name;
68822
+ if (filed.Symbol) this.Report.FieldColor.Symbol=filed.Symbol;
68823
+ if (filed.Vol) this.Report.FieldColor.Vol=filed.Vol;
68824
+ if (filed.Amount) this.Report.FieldColor.Amount=filed.Amount;
68825
+ if (filed.Index) this.Report.FieldColor.Index=filed.Index;
68826
+ if (filed.BarTitle) this.Report.FieldColor.BarTitle=filed.BarTitle;
68827
+ if (filed.Text) this.Report.FieldColor.Text=filed.Text;
68828
+
68829
+ if (IFrameSplitOperator.IsNonEmptyArray(filed.Bar))
68830
+ {
68831
+ for(var i=0;i<filed.Bar.length;++i)
68832
+ this.Report.FieldColor.Bar[i]=filed.Bar[i];
68833
+ }
68834
+ }
68835
+
68836
+ if (item.Tab)
68837
+ {
68838
+ var tab=item.Tab;
68839
+ if (tab.Font)
68840
+ {
68841
+ var font=tab.Font;
68842
+ if (font.Name) this.Report.Tab.Font.Name=font.Name;
68843
+ if (IFrameSplitOperator.IsNumber(font.Size)) this.Report.Tab.Font.Size=font.Size;
68844
+ }
68845
+
68846
+ if (IFrameSplitOperator.IsNumber(tab.ScrollBarWidth)) this.Report.Tab.ScrollBarWidth=tab.ScrollBarWidth;
68847
+ if (tab.ButtonColor) this.Report.Tab.ButtonColor=tab.ButtonColor;
68848
+ if (tab.BarColor) this.Report.Tab.BarColor=tab.BarColor;
68849
+ if (tab.BorderColor) this.Report.Tab.BorderColor=tab.BorderColor;
68850
+
68851
+ if (tab.TabTitleColor) this.Report.Tab.TabTitleColor=tab.TabTitleColor;
68852
+ if (tab.TabSelectedTitleColor) this.Report.Tab.TabSelectedTitleColor=tab.TabSelectedTitleColor;
68853
+ if (tab.TabSelectedBGColor) this.Report.Tab.TabSelectedBGColor=tab.TabSelectedBGColor;
68854
+ if (tab.TabMoveOnTitleColor) this.Report.Tab.TabMoveOnTitleColor=tab.TabMoveOnTitleColor;
68855
+ if (tab.TabBGColor) this.Report.Tab.TabBGColor=tab.TabBGColor;
68856
+ }
68857
+
68858
+ if (item.PageInfo)
68859
+ {
68860
+ var pageinfo=item.PageInfo;
68861
+ if (pageinfo.Font)
68862
+ {
68863
+ var font=pageinfo.Font;
68864
+ if (font.Name) this.Report.PageInfo.Font.Name=font.Name;
68865
+ if (IFrameSplitOperator.IsNumber(font.Size)) this.Report.PageInfo.Font.Size=font.Size;
68866
+ }
68867
+
68868
+ if (pageinfo.TextColor) this.Report.PageInfo.TextColor=pageinfo.TextColor;
68869
+ if (pageinfo.BGColor) this.Report.PageInfo.BGColor=pageinfo.BGColor;
68870
+
68871
+ if (pageinfo.Mergin)
68872
+ {
68873
+ var mergin=pageinfo.Mergin;
68874
+ if (IFrameSplitOperator.IsNumber(mergin.Left)) this.Report.PageInfo.Mergin.Left=mergin.Left;
68875
+ if (IFrameSplitOperator.IsNumber(mergin.Top)) this.Report.PageInfo.Mergin.Top=mergin.Top;
68876
+ if (IFrameSplitOperator.IsNumber(mergin.Right)) this.Report.PageInfo.Mergin.Right=mergin.Right;
68877
+ if (IFrameSplitOperator.IsNumber(mergin.Bottom)) this.Report.PageInfo.Mergin.Bottom=mergin.Bottom;
68878
+ }
68879
+ }
68880
+
68881
+ if (item.DragRow)
68882
+ {
68883
+ var dragRow=item.DragRow;
68884
+ if (dragRow.Color) this.Report.DragRow.Color=dragRow.Color;
68885
+ if (dragRow.TextColor) this.Report.DragRow.TextColor=dragRow.TextColor;
68886
+ if (dragRow.MoveRowColor) this.Report.DragRow.MoveRowColor=dragRow.MoveRowColor;
68887
+ if (dragRow.SrcRowColor) this.Report.DragRow.SrcRowColor=dragRow.SrcRowColor;
68888
+ }
68889
+
68890
+ if (item.VScrollbar)
68891
+ {
68892
+ var subItem=item.VScrollbar;
68893
+ if (IFrameSplitOperator.IsNumber(subItem.ScrollBarHeight)) dest.VScrollbar.ScrollBarHeight=subItem.ScrollBarHeight;
68894
+ if (subItem.ButtonColor) dest.VScrollbar.ButtonColor=subItem.ButtonColor;
68895
+ if (subItem.BarColor) dest.VScrollbar.BarColor=subItem.BarColor;
68896
+ if (subItem.BorderColor) dest.VScrollbar.BorderColor=subItem.BorderColor;
68897
+ if (subItem.BGColor) dest.VScrollbar.BGColor=subItem.BGColor;
68898
+ }
68899
+
68900
+ }
68901
+
68861
68902
  this.SetTReportStyle=function(style)
68862
68903
  {
68863
68904
  var item=style;
@@ -120631,6 +120672,16 @@ function GetBlackStyle()
120631
120672
 
120632
120673
  MoveRowColor:'rgb(135,206,250)',
120633
120674
  SrcRowColor:'rgb(49,48,56)',
120675
+ },
120676
+
120677
+ VScrollbar:
120678
+ {
120679
+ BarWidth:40,
120680
+ ScrollBarHeight:60,
120681
+ ButtonColor:"rgba(13,12,15,0.8)",
120682
+ BarColor:"rgba(48,48,48,0.9)",
120683
+ BorderColor:'rgba(48,48,48,0.9)',
120684
+ BGColor:"rgba(211,211,211,0.5)",
120634
120685
  }
120635
120686
  },
120636
120687
 
@@ -122276,6 +122327,7 @@ function JSReportChart(divElement)
122276
122327
  if (IFrameSplitOperator.IsBool(option.EnableDragRow)) chart.EnableDragRow=option.EnableDragRow;
122277
122328
  if (IFrameSplitOperator.IsNumber(option.DragRowType)) chart.DragRowType=option.DragRowType;
122278
122329
  if (IFrameSplitOperator.IsBool(option.EnableDragHeader)) chart.EnableDragHeader=option.EnableDragHeader;
122330
+ if (option.VScrollbar) chart.SetVScrollbar(option.VScrollbar);
122279
122331
  if (option.SortInfo)
122280
122332
  {
122281
122333
  var item=option.SortInfo;
@@ -122472,7 +122524,7 @@ function JSReportChartContainer(uielement)
122472
122524
 
122473
122525
  this.FlashBG=new Map();
122474
122526
  this.FlashBGTimer=null; //闪烁背景 Value:{ LastTime:数据最后的时间, Data: { Key:ID, BGColor:, Time: , Count: 次数 } };
122475
- this.GlobalOption={ FlashBGCount:0 }
122527
+ this.GlobalOption={ FlashBGCount:0 };
122476
122528
 
122477
122529
  //this.FixedRowData.Data=[ [null, {Value:11, Text:"11" }], [null, null, null, {Value:12, Text:"ddddd", Color:"rgb(45,200,4)"}]];
122478
122530
 
@@ -122514,6 +122566,8 @@ function JSReportChartContainer(uielement)
122514
122566
 
122515
122567
  //拖拽滚动条
122516
122568
  this.DragXScroll=null; //{Start:{x,y}, End:{x, y}}
122569
+ this.DragYScroll=null;
122570
+ this.IsShowVScrollbar=false;
122517
122571
 
122518
122572
  this.IsDestroy=false; //是否已经销毁了
122519
122573
 
@@ -122630,11 +122684,24 @@ function JSReportChartContainer(uielement)
122630
122684
  chart.GlobalOption=this.GlobalOption;
122631
122685
  chart.FixedRowData=this.FixedRowData;
122632
122686
  chart.SortInfo=this.SortInfo;
122687
+
122633
122688
  chart.Tab=new ChartReportTab();
122634
122689
  chart.Tab.Frame=this.Frame;
122635
122690
  chart.Tab.Canvas=this.Canvas;
122636
122691
  chart.Tab.ChartBorder=this.Frame.ChartBorder;
122637
122692
  chart.Tab.Report=chart;
122693
+
122694
+ chart.VScrollbar=new ChartVScrollbar();
122695
+ chart.VScrollbar.Frame=this.Frame;
122696
+ chart.VScrollbar.Canvas=this.Canvas;
122697
+ chart.VScrollbar.ChartBorder=this.Frame.ChartBorder;
122698
+ chart.VScrollbar.Report=chart;
122699
+ chart.VScrollbar.IsShowCallback=()=>
122700
+ {
122701
+ if (this.DragYScroll) return true;
122702
+ return this.IsShowVScrollbar;
122703
+ }
122704
+
122638
122705
  this.ChartPaint[0]=chart;
122639
122706
 
122640
122707
  //页脚
@@ -123536,6 +123603,7 @@ function JSReportChartContainer(uielement)
123536
123603
  this.UIOnMouseDown=function(e)
123537
123604
  {
123538
123605
  this.DragXScroll=null;
123606
+ this.DragYScroll=null;
123539
123607
  this.DragHeader=null;
123540
123608
  this.DragColumnWidth=null;
123541
123609
  this.DragMove={ Click:{ X:e.clientX, Y:e.clientY }, Move:{X:e.clientX, Y:e.clientY}, PreMove:{X:e.clientX, Y:e.clientY } };
@@ -123612,6 +123680,38 @@ function JSReportChartContainer(uielement)
123612
123680
  this.OnClickTab(tabData, e);
123613
123681
  }
123614
123682
  }
123683
+ else if (clickData.Type==5 && e.button==0) //右侧滚动条
123684
+ {
123685
+ var scroll=clickData.VScrollbar;
123686
+ if (scroll.Type==1) //顶部按钮
123687
+ {
123688
+ if (this.MoveYOffset(-1))
123689
+ {
123690
+ this.Draw();
123691
+ this.DelayUpdateStockData();
123692
+ }
123693
+ }
123694
+ else if (scroll.Type==2) //底部按钮
123695
+ {
123696
+ if (this.MoveYOffset(1))
123697
+ {
123698
+ this.Draw();
123699
+ this.DelayUpdateStockData();
123700
+ }
123701
+ }
123702
+ else if (scroll.Type==3) //滚动条
123703
+ {
123704
+ this.DragYScroll={ Click:{X:x, Y:y}, LastMove:{X:x, Y:y} };
123705
+ }
123706
+ else if (scroll.Type==4) //滚动条内部
123707
+ {
123708
+ if (this.SetYOffset(scroll.Pos))
123709
+ {
123710
+ this.Draw();
123711
+ this.DelayUpdateStockData();
123712
+ }
123713
+ }
123714
+ }
123615
123715
  }
123616
123716
  }
123617
123717
 
@@ -123658,6 +123758,7 @@ function JSReportChartContainer(uielement)
123658
123758
  var mouseStatus={ Cursor:"default", Name:"Default"};; //鼠标状态
123659
123759
  var report=this.GetReportChart();
123660
123760
  var cell=null;
123761
+ var bDraw=false;
123661
123762
  if (report)
123662
123763
  {
123663
123764
  var dragHeaderWidth=report.PtInHeaderDragBorder(x,y);
@@ -123670,6 +123771,18 @@ function JSReportChartContainer(uielement)
123670
123771
  {
123671
123772
  cell=report.PtInCell(x,y); //是否在单元格(EnableTooltip)
123672
123773
  }
123774
+
123775
+ var scrollbar=report.VScrollbar;
123776
+ if (scrollbar.Enable)
123777
+ {
123778
+ var bShowScrollbar=report.PtInClient(x,y);
123779
+ this.IsShowVScrollbar=bShowScrollbar;
123780
+ if (!this.DragYScroll)
123781
+ {
123782
+ if (bShowScrollbar && !scrollbar.LastStatus.Draw) bDraw=true;
123783
+ else if (!bShowScrollbar && scrollbar.LastStatus.Draw) bDraw=true;
123784
+ }
123785
+ }
123673
123786
  }
123674
123787
 
123675
123788
  var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_REPORT_MOUSE_MOVE);
@@ -123680,16 +123793,32 @@ function JSReportChartContainer(uielement)
123680
123793
  }
123681
123794
 
123682
123795
  if (mouseStatus) this.UIElement.style.cursor=mouseStatus.Cursor;
123796
+
123797
+ if (bDraw) this.Draw();
123683
123798
  }
123684
123799
 
123685
123800
  this.UIOnMounseOut=function(e)
123686
123801
  {
123802
+ var bDraw=false;
123687
123803
  var tabChart=this.GetTabChart();
123688
123804
  if (tabChart && tabChart.MoveOnTabIndex>=0)
123689
123805
  {
123690
123806
  tabChart.MoveOnTabIndex=-1;
123807
+ bDraw=true;
123691
123808
  this.Draw();
123692
123809
  }
123810
+
123811
+ var scrollbar=this.GetVScrollbarChart();
123812
+ if (scrollbar.Enable)
123813
+ {
123814
+ this.IsShowVScrollbar=false;
123815
+ if (!this.DragYScroll)
123816
+ {
123817
+ if (scrollbar.LastStatus.Draw) bDraw=true;
123818
+ }
123819
+ }
123820
+
123821
+ if (bDraw) this.Draw();
123693
123822
  }
123694
123823
 
123695
123824
  this.UIOnMouseleave=function(e)
@@ -123781,6 +123910,21 @@ function JSReportChartContainer(uielement)
123781
123910
  var pos=chart.Tab.GetScrollPostionByPoint(x,y);
123782
123911
  if (this.SetXOffset(pos)) this.Draw();
123783
123912
  }
123913
+ else if (this.DragYScroll)
123914
+ {
123915
+ var chart=this.ChartPaint[0];
123916
+ if (!chart || !chart.VScrollbar) return;
123917
+
123918
+ this.DragYScroll.LastMove.X=x;
123919
+ this.DragYScroll.LastMove.Y=y;
123920
+
123921
+ var pos=chart.VScrollbar.GetScrollPostionByPoint(x,y);
123922
+ if (this.SetYOffset(pos))
123923
+ {
123924
+ this.Draw();
123925
+ this.DelayUpdateStockData();
123926
+ }
123927
+ }
123784
123928
  else if (this.DragHeader && this.DragHeader.ClickData) //表头拖拽
123785
123929
  {
123786
123930
  if (this.DragHeader.ClickData.Header.IsFixed) return;
@@ -123923,6 +124067,11 @@ function JSReportChartContainer(uielement)
123923
124067
 
123924
124068
  this.DragHeader=null;
123925
124069
  this.DragXScroll=null;
124070
+ if (this.DragYScroll)
124071
+ {
124072
+ bRedraw=true;
124073
+ this.DragYScroll=null;
124074
+ }
123926
124075
  this.DragRow=null;
123927
124076
  this.DragMove=null;
123928
124077
  this.DragColumnWidth=null;
@@ -124231,6 +124380,14 @@ function JSReportChartContainer(uielement)
124231
124380
  return chart.Tab;
124232
124381
  }
124233
124382
 
124383
+ this.GetVScrollbarChart=function()
124384
+ {
124385
+ var chart=this.ChartPaint[0];
124386
+ if (!chart) return null;
124387
+
124388
+ return chart.VScrollbar;
124389
+ }
124390
+
124234
124391
  this.GetReportChart=function()
124235
124392
  {
124236
124393
  var chart=this.ChartPaint[0];
@@ -124522,6 +124679,21 @@ function JSReportChartContainer(uielement)
124522
124679
  return true;
124523
124680
  }
124524
124681
 
124682
+ this.SetYOffset=function(pos)
124683
+ {
124684
+ if (!IFrameSplitOperator.IsNumber(pos)) return false;
124685
+ var chart=this.ChartPaint[0];
124686
+ if (!chart) return false;
124687
+
124688
+ var maxOffset=chart.GetYScrollRange();
124689
+ if (pos<0) pos=0;
124690
+ if (pos>maxOffset) pos=maxOffset;
124691
+
124692
+ this.Data.YOffset=pos;
124693
+
124694
+ return true;
124695
+ }
124696
+
124525
124697
  this.GotoLastPage=function()
124526
124698
  {
124527
124699
  var chart=this.ChartPaint[0];
@@ -124558,6 +124730,17 @@ function JSReportChartContainer(uielement)
124558
124730
  if (option && option.Redraw) this.Draw();
124559
124731
  }
124560
124732
 
124733
+ this.SetVScrollbar=function(option)
124734
+ {
124735
+ var chart=this.GetReportChart();
124736
+ if (!chart) return;
124737
+
124738
+ var scrollbar=chart.VScrollbar;
124739
+ if (!scrollbar) return;
124740
+
124741
+ if (IFrameSplitOperator.IsBool(option.Enable)) scrollbar.Enable=option.Enable;
124742
+ }
124743
+
124561
124744
  this.SetSelectedTab=function(index, opiton)
124562
124745
  {
124563
124746
  var chart=this.ChartPaint[0];;
@@ -125251,6 +125434,7 @@ function ChartReport()
125251
125434
  this.DragRow; //拖拽行
125252
125435
 
125253
125436
  this.Tab;
125437
+ this.VScrollbar;
125254
125438
 
125255
125439
  this.GlobalOption;
125256
125440
 
@@ -125433,6 +125617,7 @@ function ChartReport()
125433
125617
  }
125434
125618
 
125435
125619
  if (this.Tab) this.Tab.ReloadResource(resource);
125620
+ if (this.VScrollbar) this.VScrollbar.ReloadResource(resource);
125436
125621
  }
125437
125622
 
125438
125623
  this.SetColumn=function(aryColumn)
@@ -125532,6 +125717,15 @@ function ChartReport()
125532
125717
  var maxOffset=this.Column.length-this.FixedColumn-3;
125533
125718
  if (maxOffset<0) return 0;
125534
125719
 
125720
+ return maxOffset;
125721
+ }
125722
+
125723
+ this.GetYScrollRange=function()
125724
+ {
125725
+ if (!IFrameSplitOperator.IsNonEmptyArray(this.Data.Data)) return 0;
125726
+
125727
+ var maxOffset=this.Data.Data.length-this.RowCount;
125728
+
125535
125729
  return maxOffset;
125536
125730
  }
125537
125731
 
@@ -125628,6 +125822,12 @@ function ChartReport()
125628
125822
 
125629
125823
  this.DrawDragRow();
125630
125824
 
125825
+ if (this.VScrollbar)
125826
+ {
125827
+ var bottom=this.ChartBorder.GetBottom();
125828
+ this.VScrollbar.DrawScrollbar(this.RectClient.Left,this.RectClient.Top+this.HeaderHeight, this.RectClient.Right, bottom-this.BottomToolbarHeight-4);
125829
+ }
125830
+
125631
125831
  this.SizeChange=false;
125632
125832
  }
125633
125833
 
@@ -125681,6 +125881,8 @@ function ChartReport()
125681
125881
  this.BottomToolbarHeight=0;
125682
125882
  }
125683
125883
 
125884
+ if (this.VScrollbar && this.VScrollbar.Enable) this.VScrollbar.CalculateSize();
125885
+
125684
125886
  this.UpdateCacheData();
125685
125887
 
125686
125888
  var pixelRatio=GetDevicePixelRatio();
@@ -127241,7 +127443,7 @@ function ChartReport()
127241
127443
  return GetFontHeight(this.Canvas, font, word);
127242
127444
  }
127243
127445
 
127244
- this.OnMouseDown=function(x,y,e) //Type: 1=tab 4=固定行 2=行 3=表头
127446
+ this.OnMouseDown=function(x,y,e) //Type: 1=tab 4=固定行 2=行 3=表头 5=右侧滚动条
127245
127447
  {
127246
127448
  if (!this.Data) return null;
127247
127449
 
@@ -127251,6 +127453,12 @@ function ChartReport()
127251
127453
  if (tab) return { Type:1, Tab: tab }; //底部工具栏
127252
127454
  }
127253
127455
 
127456
+ if (this.VScrollbar)
127457
+ {
127458
+ var item=this.VScrollbar.OnMouseDown(x,y,e);
127459
+ if (item) return { Type:5, VScrollbar:item }; //右侧滚动条
127460
+ }
127461
+
127254
127462
  var pixelTatio = GetDevicePixelRatio();
127255
127463
  var insidePoint={X:x/pixelTatio, Y:y/pixelTatio};
127256
127464
 
@@ -127375,6 +127583,13 @@ function ChartReport()
127375
127583
  return false;
127376
127584
  }
127377
127585
 
127586
+ this.PtInClient=function(x,y)
127587
+ {
127588
+ if (x>this.RectClient.Left && x<this.RectClient.Right && y>this.RectClient.Top && y<this.RectClient.Bottom) return true;
127589
+
127590
+ return false;
127591
+ }
127592
+
127378
127593
  this.PtInBody=function(x,y)
127379
127594
  {
127380
127595
  if (!this.Data) return null;
@@ -128005,6 +128220,164 @@ function ChartReportPageInfo()
128005
128220
  this.SizeChange=false;
128006
128221
  }
128007
128222
  }
128223
+
128224
+
128225
+ function ChartVScrollbar()
128226
+ {
128227
+ this.Canvas; //画布
128228
+ this.ChartBorder; //边框信息
128229
+ this.ChartFrame; //框架画法
128230
+ this.Name; //名称
128231
+ this.ClassName='ChartReportTab'; //类名
128232
+ this.IsDrawFirst=false;
128233
+ this.GetEventCallback; //获取事件
128234
+ this.Report;
128235
+
128236
+ this.MaxPos=15; //滚动条可移动长度
128237
+ this.CurrentPos=15; //当前滚动条移动位置
128238
+ this.Step=1; //滚动条移动步长
128239
+ this.ButtonSize=25;
128240
+ this.Enable=false;
128241
+ this.LastStatus={ Draw:false, };
128242
+ this.GlobalOption;
128243
+
128244
+ this.ScrollBarHeight=g_JSChartResource.Report.VScrollbar.ScrollBarHeight;
128245
+ this.ButtonColor=g_JSChartResource.Report.VScrollbar.ButtonColor;
128246
+ this.BarColor=g_JSChartResource.Report.VScrollbar.BarColor;
128247
+ this.BorderColor=g_JSChartResource.Report.VScrollbar.BorderColor;
128248
+ this.BGColor=g_JSChartResource.Report.VScrollbar.BGColor;
128249
+ this.Mergin={ Left:2, Right:2, Top:2, Bottom:2 };
128250
+ this.BarWithConfig={ Size:g_JSChartResource.Report.VScrollbar.BarWidth.Size };
128251
+
128252
+ this.RectScroll={ Top:null, Bottom:null, Bar:null, Client:null }; //滚动条区域
128253
+
128254
+ this.ReloadResource=function(resource)
128255
+ {
128256
+ this.ScrollBarHeight=g_JSChartResource.Report.VScrollbar.ScrollBarHeight;
128257
+ this.ButtonColor=g_JSChartResource.Report.VScrollbar.ButtonColor;
128258
+ this.BarColor=g_JSChartResource.Report.VScrollbar.BarColor;
128259
+ this.BorderColor=g_JSChartResource.Report.VScrollbar.BorderColor;
128260
+ this.BGColor=g_JSChartResource.Report.VScrollbar.BGColor;
128261
+ this.BarWithConfig={ Size:g_JSChartResource.Report.VScrollbar.BarWidth.Size };
128262
+ }
128263
+
128264
+ this.CalculateSize=function()
128265
+ {
128266
+ var pixelRatio=GetDevicePixelRatio();
128267
+
128268
+ var width=this.BarWithConfig.Size*pixelRatio+this.Mergin.Left+this.Mergin.Right;
128269
+ this.ButtonSize=Math.min(25, width);
128270
+ }
128271
+
128272
+ this.DrawScrollbar=function(left, top, right, bottom)
128273
+ {
128274
+ this.LastStatus.Draw=false;
128275
+ this.RectScroll={ Left:null, Right:null, Bar:null, Client:null };
128276
+ if (!this.Enable) return;
128277
+
128278
+ var isShow=this.IsShowCallback();
128279
+ if (!isShow) return;
128280
+
128281
+ var pageInfo=this.Report.GetCurrentPageStatus();
128282
+ if (pageInfo.IsSinglePage) return;
128283
+
128284
+ var xOffset=pageInfo.Start;
128285
+ var dataCount=pageInfo.DataCount-pageInfo.PageSize;
128286
+ var buttonSize=this.ButtonSize;
128287
+
128288
+ this.MaxPos=dataCount;
128289
+ this.CurrentPos=xOffset;
128290
+
128291
+ var rtTop={ Right:right-this.Mergin.Right, Top:top+this.Mergin.Top, Width:buttonSize, Height:buttonSize };
128292
+ rtTop.Left=rtTop.Right-buttonSize;
128293
+ rtTop.Bottom=rtTop.Top+buttonSize;
128294
+
128295
+ var rtBottom={ Right:right-this.Mergin.Right, Bottom:bottom-this.Mergin.Bottom, Width:buttonSize, Height:buttonSize };
128296
+ rtBottom.Left=rtBottom.Right-buttonSize;
128297
+ rtBottom.Top=rtBottom.Bottom-buttonSize;
128298
+
128299
+ var centerHeight=(rtBottom.Top-2)-(rtTop.Bottom+2);
128300
+ var value = centerHeight - this.ScrollBarHeight;
128301
+ var yOffset = (value * this.CurrentPos) / this.MaxPos;
128302
+ var y = rtTop.Bottom + 2 + yOffset;
128303
+
128304
+ var rtBar = {Right:right-this.Mergin.Right, Top:y, Width:buttonSize, Height: this.ScrollBarHeight };
128305
+ rtBar.Left=rtBar.Right-buttonSize;
128306
+ rtBar.Bottom=rtBar.Top+rtBar.Height;
128307
+
128308
+ this.RectScroll.Top=rtTop;
128309
+ this.RectScroll.Bottom=rtBottom;
128310
+ this.RectScroll.Bar=rtBar;
128311
+ this.RectScroll.Client={ Left:rtTop.Left, Right: rtTop.Right, Top:rtTop.Bottom, Bottom:rtBottom.Top };
128312
+
128313
+ var rtBG={ Right:right, Top:top, Bottom:bottom, Width:buttonSize+this.Mergin.Right+this.Mergin.Left };
128314
+ rtBG.Left=rtBG.Right-rtBG.Width;
128315
+ rtBG.Height=rtBG.Bottom-rtBG.Top;
128316
+ this.Canvas.fillStyle=this.BGColor;
128317
+ this.Canvas.fillRect(rtBG.Left,rtBG.Top,rtBG.Width,rtBG.Height);
128318
+
128319
+ this.Canvas.fillStyle=this.ButtonColor;
128320
+ this.Canvas.fillRect(rtTop.Left,rtTop.Top,rtTop.Width,rtTop.Height);
128321
+ this.Canvas.fillRect(rtBottom.Left,rtBottom.Top,rtBottom.Width,rtBottom.Height);
128322
+
128323
+ this.Canvas.strokeStyle=this.BorderColor;
128324
+ this.Canvas.strokeRect(rtTop.Left,rtTop.Top,rtTop.Width,rtTop.Height);
128325
+ this.Canvas.strokeRect(rtBottom.Left,rtBottom.Top,rtBottom.Width,rtBottom.Height);
128326
+
128327
+ this.Canvas.fillStyle=this.BarColor;
128328
+ this.Canvas.fillRect(rtBar.Left,rtBar.Top,rtBar.Width,rtBar.Height);
128329
+
128330
+ this.LastStatus.Draw=true;
128331
+ }
128332
+
128333
+ this.OnMouseDown=function(x,y, e)
128334
+ {
128335
+ return this.PtInScroll(x,y);
128336
+ }
128337
+
128338
+ // Type 1-4 滚动条
128339
+ this.PtInScroll=function(x,y)
128340
+ {
128341
+ if (!this.RectScroll) return null;
128342
+
128343
+ if (this.RectScroll.Top)
128344
+ {
128345
+ var rtItem=this.RectScroll.Top;
128346
+ if (x>=rtItem.Left && x<=rtItem.Right && y>=rtItem.Top && y<=rtItem.Bottom) return { Type: 1, Rect: rtItem };
128347
+ }
128348
+
128349
+ if (this.RectScroll.Bottom)
128350
+ {
128351
+ var rtItem=this.RectScroll.Bottom;
128352
+ if (x>=rtItem.Left && x<=rtItem.Right && y>=rtItem.Top && y<=rtItem.Bottom) return { Type: 2, Rect: rtItem };
128353
+ }
128354
+
128355
+ if (this.RectScroll.Bar)
128356
+ {
128357
+ var rtItem=this.RectScroll.Bar;
128358
+ if (x>=rtItem.Left && x<=rtItem.Right && y>=rtItem.Top && y<=rtItem.Bottom) return { Type: 3, Rect: rtItem };
128359
+ }
128360
+
128361
+ if (this.RectScroll.Client)
128362
+ {
128363
+ var rtItem=this.RectScroll.Client;
128364
+ if (x>=rtItem.Left && x<=rtItem.Right && y>=rtItem.Top && y<=rtItem.Bottom)
128365
+ {
128366
+ return { Type: 4, Rect: rtItem , Pos: this.GetScrollPostionByPoint(x,y) };
128367
+ }
128368
+ }
128369
+
128370
+ return null;
128371
+ }
128372
+
128373
+ this.GetScrollPostionByPoint=function(x,y)
128374
+ {
128375
+ var rtItem=this.RectScroll.Client;
128376
+ var value=rtItem.Bottom-rtItem.Top-this.ScrollBarHeight;
128377
+ var pos =parseInt((this.MaxPos * (y - rtItem.Top)) / value);
128378
+ return pos;
128379
+ }
128380
+ }
128008
128381
  /*
128009
128382
  Copyright (c) 2018 jones
128010
128383
 
@@ -133543,7 +133916,7 @@ function HQChartScriptWorker()
133543
133916
 
133544
133917
 
133545
133918
 
133546
- var HQCHART_VERSION="1.1.13099";
133919
+ var HQCHART_VERSION="1.1.13104";
133547
133920
 
133548
133921
  function PrintHQChartVersion()
133549
133922
  {