hqchart 1.1.13100 → 1.1.13107

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.
@@ -8290,6 +8290,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
8290
8290
  drag.LastMove.Y=touches[0].clientY;
8291
8291
 
8292
8292
  this.MouseDrag=drag;
8293
+ var drawPictureActive=this.GetActiveDrawPicture(); //上一次选中的
8294
+ var selectedChart={ Chart:this.SelectedChart.Selected.Chart, Identify:this.SelectedChart.Selected.Identify }; //上一次选中的图形
8293
8295
  this.PhoneTouchInfo={ Start:{X:touches[0].clientX, Y:touches[0].clientY }, End:{ X:touches[0].clientX, Y:touches[0].clientY } };
8294
8296
  if (this.SelectChartDrawPicture) this.SelectChartDrawPicture.IsSelected=false;
8295
8297
  this.SelectChartDrawPicture=null;
@@ -8303,7 +8305,11 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
8303
8305
  {
8304
8306
  this.SetChartDrawPictureFirstPoint(drag.Click.X,drag.Click.Y,true);
8305
8307
  //只有1个点 直接完成
8306
- if (this.FinishChartDrawPicturePoint()) this.DrawDynamicInfo({Corss:false, Tooltip:false});
8308
+ if (this.FinishChartDrawPicturePoint())
8309
+ {
8310
+ if (drawPicture.IsDrawMain) this.Draw();
8311
+ else this.DrawDynamicInfo( {Corss:false, Tooltip:false} );
8312
+ }
8307
8313
  }
8308
8314
 
8309
8315
  if (e.cancelable) e.preventDefault();
@@ -8329,6 +8335,12 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
8329
8335
  event.Callback(event,sendData,this);
8330
8336
  }
8331
8337
 
8338
+ var drawType=0;
8339
+ if (drawPictrueData.ChartDrawPicture.IsDrawMain) drawType=1;
8340
+ else if (drawPictureActive.Select.Guid && drawPictureActive.Select.Chart && drawPictureActive.Select.Chart.IsDrawMain) drawType=1;
8341
+
8342
+ if (drawType==1) this.Draw();
8343
+
8332
8344
  if (e.cancelable) e.preventDefault();
8333
8345
  return;
8334
8346
  }
@@ -8385,6 +8397,14 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
8385
8397
  }
8386
8398
 
8387
8399
  this.TouchEvent({ EventID:JSCHART_EVENT_ID.ON_PHONE_TOUCH, FunctionName:"OnTouchStart"}, e);
8400
+
8401
+ var drawType=0;
8402
+ if (drawPictureActive.Select.Guid!=null)
8403
+ {
8404
+ if (drawPictureActive.Select.Guid && drawPictureActive.Select.Chart) drawType=1;
8405
+ }
8406
+
8407
+ if (drawType==1) this.Draw();
8388
8408
  }
8389
8409
  else if (this.IsPhonePinching(e))
8390
8410
  {
@@ -55228,6 +55248,7 @@ function DynamicChartTitlePainting()
55228
55248
  this.BGBorderColor=g_JSChartResource.IndexTitleBorderColor;
55229
55249
  this.BGBorderMoveOnColor=g_JSChartResource.IndexTitleBorderMoveOnColor;
55230
55250
  this.BorderRoundRadius=2; //圆角矩形角度
55251
+ this.NameButtonStyle=g_JSChartResource.IndexTitleBorderStyle,
55231
55252
 
55232
55253
  this.OnDrawEvent;
55233
55254
  this.ParamSpace=2; //参数显示的间距
@@ -56523,7 +56544,6 @@ function DynamicChartTitlePainting()
56523
56544
  var roundRadius=this.BorderRoundRadius*pixelRatio;
56524
56545
  var bgWidth=textWidth+4*pixelRatio+roundRadius*2;
56525
56546
 
56526
-
56527
56547
  rtButton.Top=rtButton.YCenter-bgHeight/2-1,
56528
56548
  rtButton.Width=bgWidth;
56529
56549
  rtButton.Height=bgHeight;
@@ -56541,19 +56561,33 @@ function DynamicChartTitlePainting()
56541
56561
  }
56542
56562
  }
56543
56563
 
56544
- this.Canvas.beginPath();
56545
- this.Canvas.roundRect( ToFixedPoint(rtButton.Left), ToFixedPoint(rtButton.Top), ToFixedRect(rtButton.Width), ToFixedRect(rtButton.Height), [roundRadius]);
56546
- this.Canvas.closePath();
56564
+ if (this.NameButtonStyle==1)
56565
+ {
56566
+ this.Canvas.beginPath();
56567
+ this.Canvas.roundRect(ToFixedPoint(rtButton.Left), ToFixedPoint(rtButton.Top), ToFixedRect(rtButton.Width), ToFixedRect(rtButton.Height), [roundRadius]);
56568
+ this.Canvas.closePath();
56547
56569
 
56548
- this.Canvas.fillStyle=this.BGColor;
56549
- this.Canvas.fill();
56570
+ this.Canvas.fillStyle=this.BGColor;
56571
+ this.Canvas.fill();
56550
56572
 
56551
- if (borderColor)
56573
+ if (borderColor)
56574
+ {
56575
+ this.Canvas.strokeStyle=borderColor;
56576
+ this.Canvas.stroke();
56577
+ }
56578
+ }
56579
+ else
56552
56580
  {
56553
- this.Canvas.strokeStyle=borderColor;
56554
- this.Canvas.stroke();
56581
+ this.Canvas.fillStyle=this.BGColor;
56582
+ this.Canvas.fillRect(rtButton.Left, rtButton.Top, rtButton.Width, rtButton.Height);
56583
+
56584
+ if (borderColor)
56585
+ {
56586
+ this.Canvas.strokeStyle=borderColor;
56587
+ this.Canvas.strokeRect(ToFixedPoint(rtButton.Left), ToFixedPoint(rtButton.Top), ToFixedRect(rtButton.Width), ToFixedRect(rtButton.Height), [roundRadius]);
56588
+ }
56555
56589
  }
56556
-
56590
+
56557
56591
  this.Canvas.fillStyle=this.TitleColor;
56558
56592
  this.Canvas.fillText(title,rtButton.Left+roundRadius+2*pixelRatio,rtButton.YCenter,textWidth);
56559
56593
  }
@@ -58875,6 +58909,15 @@ function ChartDrawHLine()
58875
58909
 
58876
58910
  this.AryButton=[];
58877
58911
  this.ExtendData; //扩展数据
58912
+ this.ShowPriceTextConfig=
58913
+ {
58914
+ IsShow:[false, false, true], //[0]=left内 [1]=right内 [2]=right外
58915
+ Font:
58916
+ [
58917
+ `${12*GetDevicePixelRatio()}px 微软雅黑`,
58918
+ `${12*GetDevicePixelRatio()}px 微软雅黑`,
58919
+ ],
58920
+ };
58878
58921
 
58879
58922
  //内部变量
58880
58923
  this.ColseButtonSize=0;
@@ -58906,6 +58949,15 @@ function ChartDrawHLine()
58906
58949
  if (item.SettingIcon) this.Button.SettingIcon=CloneData(item.SettingIcon);
58907
58950
  }
58908
58951
  if (option.ExtendData) this.ExtendData=option.ExtendData;
58952
+
58953
+ if (IFrameSplitOperator.IsNonEmptyArray(option.IsShowPriceText))
58954
+ {
58955
+ for(var i=0;i<option.IsShowPriceText.length && i<3;++i)
58956
+ {
58957
+ var value=option.IsShowPriceText[i]
58958
+ if (IFrameSplitOperator.IsBool(value)) this.ShowPriceTextConfig.IsShow[i]=value;
58959
+ }
58960
+ }
58909
58961
  }
58910
58962
  }
58911
58963
 
@@ -58994,6 +59046,7 @@ function ChartDrawHLine()
58994
59046
  this.Canvas.stroke();
58995
59047
  this.RestoreLineWidth();
58996
59048
 
59049
+ //画水平线段
58997
59050
  var line={Start:new Point(), End:new Point()};
58998
59051
  if (isHScreen)
58999
59052
  {
@@ -59011,6 +59064,18 @@ function ChartDrawHLine()
59011
59064
  }
59012
59065
  this.LinePoint.push(line);
59013
59066
 
59067
+ var yValue=this.Frame.GetYData(drawPoint[0].Y);
59068
+ var strPrice=yValue.toFixed(this.Precision);
59069
+ if (this.ShowPriceTextConfig.IsShow[0])
59070
+ {
59071
+ this.DrawPriceText(strPrice, line.Start, line.End, 0);
59072
+ }
59073
+
59074
+ if (this.ShowPriceTextConfig.IsShow[1])
59075
+ {
59076
+ this.DrawPriceText(strPrice, line.Start, line.End, 1);
59077
+ }
59078
+
59014
59079
  var labInfo;
59015
59080
  if (this.GetLabelCallback) labInfo=this.GetLabelCallback(this);
59016
59081
 
@@ -59025,14 +59090,17 @@ function ChartDrawHLine()
59025
59090
 
59026
59091
  this.Canvas.restore();
59027
59092
 
59028
- var rtDraw={ };
59029
59093
 
59030
- //显示价格
59031
- this.CalculateButtonSize();
59032
- this.DrawValueText(drawPoint[0].Y, rtDraw, labInfo);
59033
- if (labInfo)
59034
- this.DrawRightLab(labInfo, rtDraw);
59094
+ //外部右侧显示价格
59095
+ if (this.ShowPriceTextConfig.IsShow[2])
59096
+ {
59097
+ var rtDraw={ };
59098
+ this.CalculateButtonSize();
59099
+ this.DrawValueText(drawPoint[0].Y, rtDraw, labInfo);
59100
+ if (labInfo) this.DrawRightLab(labInfo, rtDraw);
59101
+ }
59035
59102
 
59103
+
59036
59104
  //鼠标是否在按钮上
59037
59105
  if (moveonPoint && mouseStatus)
59038
59106
  {
@@ -59212,6 +59280,39 @@ function ChartDrawHLine()
59212
59280
  this.DrawButton(rtBG.Top, rtBG.Right, lineHeight, rtDraw);
59213
59281
  }
59214
59282
 
59283
+ this.DrawPriceText=function(text, ptStart, ptEnd, position)
59284
+ {
59285
+ if (position!=1 && position!=0) return;
59286
+
59287
+ var font=this.ShowPriceTextConfig.Font[position];
59288
+ this.Canvas.fillStyle=this.LineColor;
59289
+ this.Canvas.font=font;
59290
+ var textWidth=this.Canvas.measureText(text).width;
59291
+ var lineHeight=this.GetFontHeight();
59292
+
59293
+ var rtBG=null;
59294
+ if (position==1)
59295
+ {
59296
+ var rtBG={ Left:ptStart.X, Top:ptStart.Y-lineHeight/2, Width:textWidth+4, Height:lineHeight };
59297
+ rtBG.Right=rtBG.Left+rtBG.Width;
59298
+ rtBG.Bottom=rtBG.Top+rtBG.Height;
59299
+ }
59300
+ else if (position==0)
59301
+ {
59302
+ var rtBG={ Right:ptEnd.X, Top:ptEnd.Y-lineHeight/2, Width:textWidth+4, Height:lineHeight };
59303
+ rtBG.Left=rtBG.Right-rtBG.Width;
59304
+ rtBG.Bottom=rtBG.Top+rtBG.Height;
59305
+ }
59306
+
59307
+ this.Canvas.fillRect(ToFixedRect(rtBG.Left),ToFixedRect(rtBG.Top), ToFixedRect(rtBG.Width+this.ButtonBGWidth),ToFixedRect(rtBG.Height));
59308
+
59309
+ this.Canvas.fillStyle=this.ValueTextColor
59310
+ this.Canvas.textAlign="left";
59311
+ this.Canvas.textBaseline="middle";
59312
+ this.Canvas.fillText(text,rtBG.Left+2,ptStart.Y);
59313
+
59314
+ }
59315
+
59215
59316
  this.CalculateButtonSize=function()
59216
59317
  {
59217
59318
  var pixelRatio=GetDevicePixelRatio();
@@ -59265,7 +59366,7 @@ function ChartDrawHLine()
59265
59366
 
59266
59367
  left+=1;
59267
59368
  var pixelRatio=GetDevicePixelRatio();
59268
- if (this.Button.SettingIcon)
59369
+ if (this.Button.SettingIcon && this.Button.SettingIcon.Text)
59269
59370
  {
59270
59371
  var rtButton={Left:left, Top:drawTop, Width:this.SettingButtonSize, Height:drawHeight };
59271
59372
  rtButton.Right=rtButton.Left+rtButton.Width;
@@ -59298,7 +59399,7 @@ function ChartDrawHLine()
59298
59399
  left=rtButton.Right+this.ButtonSpace;
59299
59400
  }
59300
59401
 
59301
- if (this.Button.CloseIcon)
59402
+ if (this.Button.CloseIcon && this.Button.CloseIcon.Text)
59302
59403
  {
59303
59404
  var rtButton={Left:left, Top:drawTop, Width:this.ColseButtonSize, Height:drawHeight };
59304
59405
  rtButton.Right=rtButton.Left+rtButton.Width;
@@ -66902,7 +67003,8 @@ function JSChartResource()
66902
67003
  this.TitleFont=13*GetDevicePixelRatio() +'px 微软雅黑'; //指标显示,tooltip显示字体
66903
67004
  this.IndexTitleBGColor='rgb(250,250,250)'; //指标名字背景色
66904
67005
  this.IndexTitleBorderColor='rgb(180,180,180)'; //指标名字边框颜色
66905
- this.IndexTitleBorderMoveOnColor='rgb(0,0,0)'; //指标名字边框颜色(鼠标在上面)
67006
+ this.IndexTitleBorderMoveOnColor='rgb(0,0,0)'; //指标名字边框颜色(鼠标在上面)
67007
+ this.IndexTitleBorderStyle=1, //0=直角边框 1=圆角边框
66906
67008
  this.IndexTitleColor="rgb(43,54,69)"; //指标名字颜色
66907
67009
  this.IndexTitleSelectedColor="rgb(65,105,225)";
66908
67010
  this.OverlayIndexTitleBGColor='rgba(255,255,255,0.7)';
@@ -67876,6 +67978,16 @@ function JSChartResource()
67876
67978
 
67877
67979
  MoveRowColor:'rgb(240,128,128)',
67878
67980
  SrcRowColor:'rgb(180,240,240)',
67981
+ },
67982
+
67983
+ VScrollbar:
67984
+ {
67985
+ ScrollBarHeight:60,
67986
+ ButtonColor:"rgba(252,252,252,0.8)",
67987
+ BarColor:"rgba(168,168,168,0.9)",
67988
+ BorderColor:'rgba(180,180,180,0.9)',
67989
+ BGColor:"rgba(234,239,248,0.9)",
67990
+ BarWidth:{ Size:12 }
67879
67991
  }
67880
67992
  },
67881
67993
 
@@ -68066,6 +68178,7 @@ function JSChartResource()
68066
68178
  if (style.IndexTitleBGColor) this.IndexTitleBGColor=style.IndexTitleBGColor;
68067
68179
  if (style.IndexTitleBorderColor) this.IndexTitleBorderColor=style.IndexTitleBorderColor;
68068
68180
  if (style.IndexTitleBorderMoveOnColor) this.IndexTitleBorderMoveOnColor=style.IndexTitleBorderMoveOnColor;
68181
+ if (IFrameSplitOperator.IsNumber(style.IndexTitleBorderStyle)) this.IndexTitleBorderStyle=style.IndexTitleBorderStyle;
68069
68182
  if (style.IndexTitleColor) this.IndexTitleColor=style.IndexTitleColor;
68070
68183
  if (style.IndexTitleSelectedColor) this.IndexTitleSelectedColor=style.IndexTitleSelectedColor;
68071
68184
  if (style.OverlayIndexTitleBGColor) this.OverlayIndexTitleBGColor=style.OverlayIndexTitleBGColor;
@@ -68513,205 +68626,8 @@ function JSChartResource()
68513
68626
  }
68514
68627
  }
68515
68628
 
68516
- if (style.Report)
68517
- {
68518
- var item=style.Report;
68519
- if (item.BorderColor) this.Report.BorderColor=item.BorderColor;
68520
- if (item.UpTextColor) this.Report.UpTextColor=item.UpTextColor;
68521
- if (item.DownTextColor) this.Report.DownTextColor=item.DownTextColor;
68522
- if (item.UnchagneTextColor) this.Report.UnchagneTextColor=item.UnchagneTextColor;
68523
- if (item.BorderColor) this.Report.SelectedColor=item.SelectedColor;
68524
-
68525
-
68526
- if (item.CloseLine)
68527
- {
68528
- var closeLine=item.CloseLine;
68529
- if (closeLine.CloseColor) this.Report.CloseLine.CloseColor=closeLine.CloseColor;
68530
- if (closeLine.YCloseColor) this.Report.CloseLine.YCloseColor=closeLine.YCloseColor;
68531
- if (closeLine.AreaColor) this.Report.CloseLine.AreaColor=closeLine.AreaColor;
68532
- }
68533
-
68534
- if (item.KLine)
68535
- {
68536
- var kline=item.KLine;
68537
- if (kline.UpColor) this.Report.KLine.UpColor=kline.UpColor;
68538
- if (kline.DownColor) this.Report.KLine.DownColor=kline.DownColor;
68539
- if (kline.UnchagneColor) this.Report.KLine.UnchagneColor=kline.UnchagneColor;
68540
-
68541
- if (IFrameSplitOperator.IsNumber(kline.DataWidth)) this.Report.KLine.DataWidth=kline.DataWidth;
68542
- if (IFrameSplitOperator.IsNumber(kline.DistanceWidth)) this.Report.KLine.DistanceWidth=kline.DistanceWidth;
68543
- }
68544
-
68545
- if (item.Header)
68546
- {
68547
- var header=item.Header;
68548
- if (header.Color) this.Report.Header.Color=header.Color;
68549
- if (header.SortColor) this.Report.Header.SortColor=header.SortColor;
68550
- if (header.Mergin)
68551
- {
68552
- var mergin=header.Mergin;
68553
- if (IFrameSplitOperator.IsNumber(mergin.Left)) this.Report.Header.Mergin.Left=mergin.Left;
68554
- if (IFrameSplitOperator.IsNumber(mergin.Right)) this.Report.Header.Mergin.Left=mergin.Right;
68555
- if (IFrameSplitOperator.IsNumber(mergin.Top)) this.Report.Header.Mergin.Top=mergin.Top;
68556
- if (IFrameSplitOperator.IsNumber(mergin.Bottom)) this.Report.Header.Mergin.Bottom=mergin.Bottom;
68557
- }
68558
- if (header.Font)
68559
- {
68560
- var font=header.Font;
68561
- if (font.Name) this.Report.Header.Font.Name=font.Name;
68562
- if (IFrameSplitOperator.IsNumber(font.Size)) this.Report.Header.Font.Size=font.Size;
68563
- }
68564
- }
68565
-
68566
- if (item.Item)
68567
- {
68568
- var row=item.Item;
68569
- if (row.Mergin)
68570
- {
68571
- var mergin=row.Mergin;
68572
- if (IFrameSplitOperator.IsNumber(mergin.Left)) this.Report.Item.Mergin.Left=mergin.Left;
68573
- if (IFrameSplitOperator.IsNumber(mergin.Right)) this.Report.Item.Mergin.Right=mergin.Right;
68574
- if (IFrameSplitOperator.IsNumber(mergin.Top)) this.Report.Item.Mergin.Top=mergin.Top;
68575
- if (IFrameSplitOperator.IsNumber(mergin.Bottom)) this.Report.Item.Mergin.Bottom=mergin.Bottom;
68576
- }
68577
-
68578
- if (row.Font)
68579
- {
68580
- var font=row.Font;
68581
- if (font.Name) this.Report.Item.Font.Name=font.Name;
68582
- if (IFrameSplitOperator.IsNumber(font.Size)) this.Report.Item.Font.Size=font.Size;
68583
- }
68584
-
68585
- if (row.BarMergin)
68586
- {
68587
- var mergin=row.BarMergin;
68588
- if (IFrameSplitOperator.IsNumber(mergin.Left)) this.Report.Item.BarMergin.Left=mergin.Left;
68589
- if (IFrameSplitOperator.IsNumber(mergin.Top)) this.Report.Item.BarMergin.Top=mergin.Top;
68590
- if (IFrameSplitOperator.IsNumber(mergin.Right)) this.Report.Item.BarMergin.Right=mergin.Right;
68591
- if (IFrameSplitOperator.IsNumber(mergin.Bottom)) this.Report.Item.BarMergin.Bottom=mergin.Bottom;
68592
- }
68593
-
68594
- if (row.NameFont)
68595
- {
68596
- var font=row.NameFont;
68597
- if (font.Name) this.Report.Item.NameFont.Name=font.Name;
68598
- if (IFrameSplitOperator.IsNumber(font.Size)) this.Report.Item.NameFont.Size=font.Size;
68599
- }
68600
-
68601
- if (row.SymbolFont)
68602
- {
68603
- var font=row.SymbolFont;
68604
- if (font.Name) this.Report.Item.SymbolFont.Name=font.Name;
68605
- if (IFrameSplitOperator.IsNumber(font.Size)) this.Report.Item.SymbolFont.Size=font.Size;
68606
- }
68607
- }
68608
-
68609
- if (item.FixedItem)
68610
- {
68611
- var row=item.FixedItem;
68612
- if (row.Font)
68613
- {
68614
- var font=row.Font;
68615
- if (font.Name) this.Report.FixedItem.Font.Name=font.Name;
68616
- if (IFrameSplitOperator.IsNumber(font.Size)) this.Report.FixedItem.Font.Size=font.Size;
68617
- }
68618
- }
68619
-
68620
- if (item.LimitBorder)
68621
- {
68622
- var limit=item.LimitBorder;
68623
- if (limit.Color) this.Report.LimitBorder.Color=limit.Color;
68624
- if (limit.Mergin)
68625
- {
68626
- var mergin=limit.Mergin;
68627
- if (IFrameSplitOperator.IsNumber(mergin.Left)) this.Report.LimitBorder.Mergin.Left=mergin.Left;
68628
- if (IFrameSplitOperator.IsNumber(mergin.Top)) this.Report.LimitBorder.Mergin.Top=mergin.Top;
68629
- if (IFrameSplitOperator.IsNumber(mergin.Right)) this.Report.LimitBorder.Mergin.Right=mergin.Right;
68630
- if (IFrameSplitOperator.IsNumber(mergin.Bottom)) this.Report.LimitBorder.Mergin.Bottom=mergin.Bottom;
68631
- }
68632
- }
68633
-
68634
- if (item.LimitColor)
68635
- {
68636
- var limit=item.LimitColor;
68637
- if (limit.UpColor) this.Report.LimitColor.UpColor=limit.UpColor;
68638
- if (limit.DownColor) this.Report.LimitColor.DownColor=limit.DownColor;
68639
- if (limit.TextColor) this.Report.LimitColor.UpColor=limit.TextColor;
68640
- }
68641
-
68642
- if (item.FieldColor)
68643
- {
68644
- var filed=item.FieldColor;
68645
- if (filed.Name) this.Report.FieldColor.Name=filed.Name;
68646
- if (filed.Symbol) this.Report.FieldColor.Symbol=filed.Symbol;
68647
- if (filed.Vol) this.Report.FieldColor.Vol=filed.Vol;
68648
- if (filed.Amount) this.Report.FieldColor.Amount=filed.Amount;
68649
- if (filed.Index) this.Report.FieldColor.Index=filed.Index;
68650
- if (filed.BarTitle) this.Report.FieldColor.BarTitle=filed.BarTitle;
68651
- if (filed.Text) this.Report.FieldColor.Text=filed.Text;
68652
-
68653
- if (IFrameSplitOperator.IsNonEmptyArray(filed.Bar))
68654
- {
68655
- for(var i=0;i<filed.Bar.length;++i)
68656
- this.Report.FieldColor.Bar[i]=filed.Bar[i];
68657
- }
68658
- }
68659
-
68660
- if (item.Tab)
68661
- {
68662
- var tab=item.Tab;
68663
- if (tab.Font)
68664
- {
68665
- var font=tab.Font;
68666
- if (font.Name) this.Report.Tab.Font.Name=font.Name;
68667
- if (IFrameSplitOperator.IsNumber(font.Size)) this.Report.Tab.Font.Size=font.Size;
68668
- }
68669
-
68670
- if (IFrameSplitOperator.IsNumber(tab.ScrollBarWidth)) this.Report.Tab.ScrollBarWidth=tab.ScrollBarWidth;
68671
- if (tab.ButtonColor) this.Report.Tab.ButtonColor=tab.ButtonColor;
68672
- if (tab.BarColor) this.Report.Tab.BarColor=tab.BarColor;
68673
- if (tab.BorderColor) this.Report.Tab.BorderColor=tab.BorderColor;
68674
-
68675
- if (tab.TabTitleColor) this.Report.Tab.TabTitleColor=tab.TabTitleColor;
68676
- if (tab.TabSelectedTitleColor) this.Report.Tab.TabSelectedTitleColor=tab.TabSelectedTitleColor;
68677
- if (tab.TabSelectedBGColor) this.Report.Tab.TabSelectedBGColor=tab.TabSelectedBGColor;
68678
- if (tab.TabMoveOnTitleColor) this.Report.Tab.TabMoveOnTitleColor=tab.TabMoveOnTitleColor;
68679
- if (tab.TabBGColor) this.Report.Tab.TabBGColor=tab.TabBGColor;
68680
- }
68681
-
68682
- if (item.PageInfo)
68683
- {
68684
- var pageinfo=item.PageInfo;
68685
- if (pageinfo.Font)
68686
- {
68687
- var font=pageinfo.Font;
68688
- if (font.Name) this.Report.PageInfo.Font.Name=font.Name;
68689
- if (IFrameSplitOperator.IsNumber(font.Size)) this.Report.PageInfo.Font.Size=font.Size;
68690
- }
68691
-
68692
- if (pageinfo.TextColor) this.Report.PageInfo.TextColor=pageinfo.TextColor;
68693
- if (pageinfo.BGColor) this.Report.PageInfo.BGColor=pageinfo.BGColor;
68694
-
68695
- if (pageinfo.Mergin)
68696
- {
68697
- var mergin=pageinfo.Mergin;
68698
- if (IFrameSplitOperator.IsNumber(mergin.Left)) this.Report.PageInfo.Mergin.Left=mergin.Left;
68699
- if (IFrameSplitOperator.IsNumber(mergin.Top)) this.Report.PageInfo.Mergin.Top=mergin.Top;
68700
- if (IFrameSplitOperator.IsNumber(mergin.Right)) this.Report.PageInfo.Mergin.Right=mergin.Right;
68701
- if (IFrameSplitOperator.IsNumber(mergin.Bottom)) this.Report.PageInfo.Mergin.Bottom=mergin.Bottom;
68702
- }
68703
- }
68704
-
68705
- if (item.DragRow)
68706
- {
68707
- var dragRow=item.DragRow;
68708
- if (dragRow.Color) this.Report.DragRow.Color=dragRow.Color;
68709
- if (dragRow.TextColor) this.Report.DragRow.TextColor=dragRow.TextColor;
68710
- if (dragRow.MoveRowColor) this.Report.DragRow.MoveRowColor=dragRow.MoveRowColor;
68711
- if (dragRow.SrcRowColor) this.Report.DragRow.SrcRowColor=dragRow.SrcRowColor;
68712
- }
68713
- }
68714
-
68629
+ if (style.Report) this.SetReportStyle(style.Report);
68630
+
68715
68631
  if (style.TReport) this.SetTReportStyle(style.TReport);
68716
68632
 
68717
68633
  if (style.SelectedChart)
@@ -68814,6 +68730,218 @@ function JSChartResource()
68814
68730
  }
68815
68731
  }
68816
68732
 
68733
+ this.SetReportStyle=function(style)
68734
+ {
68735
+ var item=style;
68736
+ var dest=this.Report;
68737
+
68738
+ if (item.BorderColor) this.Report.BorderColor=item.BorderColor;
68739
+ if (item.UpTextColor) this.Report.UpTextColor=item.UpTextColor;
68740
+ if (item.DownTextColor) this.Report.DownTextColor=item.DownTextColor;
68741
+ if (item.UnchagneTextColor) this.Report.UnchagneTextColor=item.UnchagneTextColor;
68742
+ if (item.BorderColor) this.Report.SelectedColor=item.SelectedColor;
68743
+
68744
+
68745
+ if (item.CloseLine)
68746
+ {
68747
+ var closeLine=item.CloseLine;
68748
+ if (closeLine.CloseColor) this.Report.CloseLine.CloseColor=closeLine.CloseColor;
68749
+ if (closeLine.YCloseColor) this.Report.CloseLine.YCloseColor=closeLine.YCloseColor;
68750
+ if (closeLine.AreaColor) this.Report.CloseLine.AreaColor=closeLine.AreaColor;
68751
+ }
68752
+
68753
+ if (item.KLine)
68754
+ {
68755
+ var kline=item.KLine;
68756
+ if (kline.UpColor) this.Report.KLine.UpColor=kline.UpColor;
68757
+ if (kline.DownColor) this.Report.KLine.DownColor=kline.DownColor;
68758
+ if (kline.UnchagneColor) this.Report.KLine.UnchagneColor=kline.UnchagneColor;
68759
+
68760
+ if (IFrameSplitOperator.IsNumber(kline.DataWidth)) this.Report.KLine.DataWidth=kline.DataWidth;
68761
+ if (IFrameSplitOperator.IsNumber(kline.DistanceWidth)) this.Report.KLine.DistanceWidth=kline.DistanceWidth;
68762
+ }
68763
+
68764
+ if (item.Header)
68765
+ {
68766
+ var header=item.Header;
68767
+ if (header.Color) this.Report.Header.Color=header.Color;
68768
+ if (header.SortColor) this.Report.Header.SortColor=header.SortColor;
68769
+ if (header.Mergin)
68770
+ {
68771
+ var mergin=header.Mergin;
68772
+ if (IFrameSplitOperator.IsNumber(mergin.Left)) this.Report.Header.Mergin.Left=mergin.Left;
68773
+ if (IFrameSplitOperator.IsNumber(mergin.Right)) this.Report.Header.Mergin.Left=mergin.Right;
68774
+ if (IFrameSplitOperator.IsNumber(mergin.Top)) this.Report.Header.Mergin.Top=mergin.Top;
68775
+ if (IFrameSplitOperator.IsNumber(mergin.Bottom)) this.Report.Header.Mergin.Bottom=mergin.Bottom;
68776
+ }
68777
+ if (header.Font)
68778
+ {
68779
+ var font=header.Font;
68780
+ if (font.Name) this.Report.Header.Font.Name=font.Name;
68781
+ if (IFrameSplitOperator.IsNumber(font.Size)) this.Report.Header.Font.Size=font.Size;
68782
+ }
68783
+ }
68784
+
68785
+ if (item.Item)
68786
+ {
68787
+ var row=item.Item;
68788
+ if (row.Mergin)
68789
+ {
68790
+ var mergin=row.Mergin;
68791
+ if (IFrameSplitOperator.IsNumber(mergin.Left)) this.Report.Item.Mergin.Left=mergin.Left;
68792
+ if (IFrameSplitOperator.IsNumber(mergin.Right)) this.Report.Item.Mergin.Right=mergin.Right;
68793
+ if (IFrameSplitOperator.IsNumber(mergin.Top)) this.Report.Item.Mergin.Top=mergin.Top;
68794
+ if (IFrameSplitOperator.IsNumber(mergin.Bottom)) this.Report.Item.Mergin.Bottom=mergin.Bottom;
68795
+ }
68796
+
68797
+ if (row.Font)
68798
+ {
68799
+ var font=row.Font;
68800
+ if (font.Name) this.Report.Item.Font.Name=font.Name;
68801
+ if (IFrameSplitOperator.IsNumber(font.Size)) this.Report.Item.Font.Size=font.Size;
68802
+ }
68803
+
68804
+ if (row.BarMergin)
68805
+ {
68806
+ var mergin=row.BarMergin;
68807
+ if (IFrameSplitOperator.IsNumber(mergin.Left)) this.Report.Item.BarMergin.Left=mergin.Left;
68808
+ if (IFrameSplitOperator.IsNumber(mergin.Top)) this.Report.Item.BarMergin.Top=mergin.Top;
68809
+ if (IFrameSplitOperator.IsNumber(mergin.Right)) this.Report.Item.BarMergin.Right=mergin.Right;
68810
+ if (IFrameSplitOperator.IsNumber(mergin.Bottom)) this.Report.Item.BarMergin.Bottom=mergin.Bottom;
68811
+ }
68812
+
68813
+ if (row.NameFont)
68814
+ {
68815
+ var font=row.NameFont;
68816
+ if (font.Name) this.Report.Item.NameFont.Name=font.Name;
68817
+ if (IFrameSplitOperator.IsNumber(font.Size)) this.Report.Item.NameFont.Size=font.Size;
68818
+ }
68819
+
68820
+ if (row.SymbolFont)
68821
+ {
68822
+ var font=row.SymbolFont;
68823
+ if (font.Name) this.Report.Item.SymbolFont.Name=font.Name;
68824
+ if (IFrameSplitOperator.IsNumber(font.Size)) this.Report.Item.SymbolFont.Size=font.Size;
68825
+ }
68826
+ }
68827
+
68828
+ if (item.FixedItem)
68829
+ {
68830
+ var row=item.FixedItem;
68831
+ if (row.Font)
68832
+ {
68833
+ var font=row.Font;
68834
+ if (font.Name) this.Report.FixedItem.Font.Name=font.Name;
68835
+ if (IFrameSplitOperator.IsNumber(font.Size)) this.Report.FixedItem.Font.Size=font.Size;
68836
+ }
68837
+ }
68838
+
68839
+ if (item.LimitBorder)
68840
+ {
68841
+ var limit=item.LimitBorder;
68842
+ if (limit.Color) this.Report.LimitBorder.Color=limit.Color;
68843
+ if (limit.Mergin)
68844
+ {
68845
+ var mergin=limit.Mergin;
68846
+ if (IFrameSplitOperator.IsNumber(mergin.Left)) this.Report.LimitBorder.Mergin.Left=mergin.Left;
68847
+ if (IFrameSplitOperator.IsNumber(mergin.Top)) this.Report.LimitBorder.Mergin.Top=mergin.Top;
68848
+ if (IFrameSplitOperator.IsNumber(mergin.Right)) this.Report.LimitBorder.Mergin.Right=mergin.Right;
68849
+ if (IFrameSplitOperator.IsNumber(mergin.Bottom)) this.Report.LimitBorder.Mergin.Bottom=mergin.Bottom;
68850
+ }
68851
+ }
68852
+
68853
+ if (item.LimitColor)
68854
+ {
68855
+ var limit=item.LimitColor;
68856
+ if (limit.UpColor) this.Report.LimitColor.UpColor=limit.UpColor;
68857
+ if (limit.DownColor) this.Report.LimitColor.DownColor=limit.DownColor;
68858
+ if (limit.TextColor) this.Report.LimitColor.UpColor=limit.TextColor;
68859
+ }
68860
+
68861
+ if (item.FieldColor)
68862
+ {
68863
+ var filed=item.FieldColor;
68864
+ if (filed.Name) this.Report.FieldColor.Name=filed.Name;
68865
+ if (filed.Symbol) this.Report.FieldColor.Symbol=filed.Symbol;
68866
+ if (filed.Vol) this.Report.FieldColor.Vol=filed.Vol;
68867
+ if (filed.Amount) this.Report.FieldColor.Amount=filed.Amount;
68868
+ if (filed.Index) this.Report.FieldColor.Index=filed.Index;
68869
+ if (filed.BarTitle) this.Report.FieldColor.BarTitle=filed.BarTitle;
68870
+ if (filed.Text) this.Report.FieldColor.Text=filed.Text;
68871
+
68872
+ if (IFrameSplitOperator.IsNonEmptyArray(filed.Bar))
68873
+ {
68874
+ for(var i=0;i<filed.Bar.length;++i)
68875
+ this.Report.FieldColor.Bar[i]=filed.Bar[i];
68876
+ }
68877
+ }
68878
+
68879
+ if (item.Tab)
68880
+ {
68881
+ var tab=item.Tab;
68882
+ if (tab.Font)
68883
+ {
68884
+ var font=tab.Font;
68885
+ if (font.Name) this.Report.Tab.Font.Name=font.Name;
68886
+ if (IFrameSplitOperator.IsNumber(font.Size)) this.Report.Tab.Font.Size=font.Size;
68887
+ }
68888
+
68889
+ if (IFrameSplitOperator.IsNumber(tab.ScrollBarWidth)) this.Report.Tab.ScrollBarWidth=tab.ScrollBarWidth;
68890
+ if (tab.ButtonColor) this.Report.Tab.ButtonColor=tab.ButtonColor;
68891
+ if (tab.BarColor) this.Report.Tab.BarColor=tab.BarColor;
68892
+ if (tab.BorderColor) this.Report.Tab.BorderColor=tab.BorderColor;
68893
+
68894
+ if (tab.TabTitleColor) this.Report.Tab.TabTitleColor=tab.TabTitleColor;
68895
+ if (tab.TabSelectedTitleColor) this.Report.Tab.TabSelectedTitleColor=tab.TabSelectedTitleColor;
68896
+ if (tab.TabSelectedBGColor) this.Report.Tab.TabSelectedBGColor=tab.TabSelectedBGColor;
68897
+ if (tab.TabMoveOnTitleColor) this.Report.Tab.TabMoveOnTitleColor=tab.TabMoveOnTitleColor;
68898
+ if (tab.TabBGColor) this.Report.Tab.TabBGColor=tab.TabBGColor;
68899
+ }
68900
+
68901
+ if (item.PageInfo)
68902
+ {
68903
+ var pageinfo=item.PageInfo;
68904
+ if (pageinfo.Font)
68905
+ {
68906
+ var font=pageinfo.Font;
68907
+ if (font.Name) this.Report.PageInfo.Font.Name=font.Name;
68908
+ if (IFrameSplitOperator.IsNumber(font.Size)) this.Report.PageInfo.Font.Size=font.Size;
68909
+ }
68910
+
68911
+ if (pageinfo.TextColor) this.Report.PageInfo.TextColor=pageinfo.TextColor;
68912
+ if (pageinfo.BGColor) this.Report.PageInfo.BGColor=pageinfo.BGColor;
68913
+
68914
+ if (pageinfo.Mergin)
68915
+ {
68916
+ var mergin=pageinfo.Mergin;
68917
+ if (IFrameSplitOperator.IsNumber(mergin.Left)) this.Report.PageInfo.Mergin.Left=mergin.Left;
68918
+ if (IFrameSplitOperator.IsNumber(mergin.Top)) this.Report.PageInfo.Mergin.Top=mergin.Top;
68919
+ if (IFrameSplitOperator.IsNumber(mergin.Right)) this.Report.PageInfo.Mergin.Right=mergin.Right;
68920
+ if (IFrameSplitOperator.IsNumber(mergin.Bottom)) this.Report.PageInfo.Mergin.Bottom=mergin.Bottom;
68921
+ }
68922
+ }
68923
+
68924
+ if (item.DragRow)
68925
+ {
68926
+ var dragRow=item.DragRow;
68927
+ if (dragRow.Color) this.Report.DragRow.Color=dragRow.Color;
68928
+ if (dragRow.TextColor) this.Report.DragRow.TextColor=dragRow.TextColor;
68929
+ if (dragRow.MoveRowColor) this.Report.DragRow.MoveRowColor=dragRow.MoveRowColor;
68930
+ if (dragRow.SrcRowColor) this.Report.DragRow.SrcRowColor=dragRow.SrcRowColor;
68931
+ }
68932
+
68933
+ if (item.VScrollbar)
68934
+ {
68935
+ var subItem=item.VScrollbar;
68936
+ if (IFrameSplitOperator.IsNumber(subItem.ScrollBarHeight)) dest.VScrollbar.ScrollBarHeight=subItem.ScrollBarHeight;
68937
+ if (subItem.ButtonColor) dest.VScrollbar.ButtonColor=subItem.ButtonColor;
68938
+ if (subItem.BarColor) dest.VScrollbar.BarColor=subItem.BarColor;
68939
+ if (subItem.BorderColor) dest.VScrollbar.BorderColor=subItem.BorderColor;
68940
+ if (subItem.BGColor) dest.VScrollbar.BGColor=subItem.BGColor;
68941
+ }
68942
+
68943
+ }
68944
+
68817
68945
  this.SetTReportStyle=function(style)
68818
68946
  {
68819
68947
  var item=style;
@@ -120587,6 +120715,16 @@ function GetBlackStyle()
120587
120715
 
120588
120716
  MoveRowColor:'rgb(135,206,250)',
120589
120717
  SrcRowColor:'rgb(49,48,56)',
120718
+ },
120719
+
120720
+ VScrollbar:
120721
+ {
120722
+ BarWidth:40,
120723
+ ScrollBarHeight:60,
120724
+ ButtonColor:"rgba(13,12,15,0.8)",
120725
+ BarColor:"rgba(48,48,48,0.9)",
120726
+ BorderColor:'rgba(48,48,48,0.9)',
120727
+ BGColor:"rgba(211,211,211,0.5)",
120590
120728
  }
120591
120729
  },
120592
120730
 
@@ -122232,6 +122370,7 @@ function JSReportChart(divElement)
122232
122370
  if (IFrameSplitOperator.IsBool(option.EnableDragRow)) chart.EnableDragRow=option.EnableDragRow;
122233
122371
  if (IFrameSplitOperator.IsNumber(option.DragRowType)) chart.DragRowType=option.DragRowType;
122234
122372
  if (IFrameSplitOperator.IsBool(option.EnableDragHeader)) chart.EnableDragHeader=option.EnableDragHeader;
122373
+ if (option.VScrollbar) chart.SetVScrollbar(option.VScrollbar);
122235
122374
  if (option.SortInfo)
122236
122375
  {
122237
122376
  var item=option.SortInfo;
@@ -122428,7 +122567,7 @@ function JSReportChartContainer(uielement)
122428
122567
 
122429
122568
  this.FlashBG=new Map();
122430
122569
  this.FlashBGTimer=null; //闪烁背景 Value:{ LastTime:数据最后的时间, Data: { Key:ID, BGColor:, Time: , Count: 次数 } };
122431
- this.GlobalOption={ FlashBGCount:0 }
122570
+ this.GlobalOption={ FlashBGCount:0 };
122432
122571
 
122433
122572
  //this.FixedRowData.Data=[ [null, {Value:11, Text:"11" }], [null, null, null, {Value:12, Text:"ddddd", Color:"rgb(45,200,4)"}]];
122434
122573
 
@@ -122470,6 +122609,8 @@ function JSReportChartContainer(uielement)
122470
122609
 
122471
122610
  //拖拽滚动条
122472
122611
  this.DragXScroll=null; //{Start:{x,y}, End:{x, y}}
122612
+ this.DragYScroll=null;
122613
+ this.IsShowVScrollbar=false;
122473
122614
 
122474
122615
  this.IsDestroy=false; //是否已经销毁了
122475
122616
 
@@ -122586,11 +122727,24 @@ function JSReportChartContainer(uielement)
122586
122727
  chart.GlobalOption=this.GlobalOption;
122587
122728
  chart.FixedRowData=this.FixedRowData;
122588
122729
  chart.SortInfo=this.SortInfo;
122730
+
122589
122731
  chart.Tab=new ChartReportTab();
122590
122732
  chart.Tab.Frame=this.Frame;
122591
122733
  chart.Tab.Canvas=this.Canvas;
122592
122734
  chart.Tab.ChartBorder=this.Frame.ChartBorder;
122593
122735
  chart.Tab.Report=chart;
122736
+
122737
+ chart.VScrollbar=new ChartVScrollbar();
122738
+ chart.VScrollbar.Frame=this.Frame;
122739
+ chart.VScrollbar.Canvas=this.Canvas;
122740
+ chart.VScrollbar.ChartBorder=this.Frame.ChartBorder;
122741
+ chart.VScrollbar.Report=chart;
122742
+ chart.VScrollbar.IsShowCallback=()=>
122743
+ {
122744
+ if (this.DragYScroll) return true;
122745
+ return this.IsShowVScrollbar;
122746
+ }
122747
+
122594
122748
  this.ChartPaint[0]=chart;
122595
122749
 
122596
122750
  //页脚
@@ -123492,6 +123646,7 @@ function JSReportChartContainer(uielement)
123492
123646
  this.UIOnMouseDown=function(e)
123493
123647
  {
123494
123648
  this.DragXScroll=null;
123649
+ this.DragYScroll=null;
123495
123650
  this.DragHeader=null;
123496
123651
  this.DragColumnWidth=null;
123497
123652
  this.DragMove={ Click:{ X:e.clientX, Y:e.clientY }, Move:{X:e.clientX, Y:e.clientY}, PreMove:{X:e.clientX, Y:e.clientY } };
@@ -123568,6 +123723,38 @@ function JSReportChartContainer(uielement)
123568
123723
  this.OnClickTab(tabData, e);
123569
123724
  }
123570
123725
  }
123726
+ else if (clickData.Type==5 && e.button==0) //右侧滚动条
123727
+ {
123728
+ var scroll=clickData.VScrollbar;
123729
+ if (scroll.Type==1) //顶部按钮
123730
+ {
123731
+ if (this.MoveYOffset(-1))
123732
+ {
123733
+ this.Draw();
123734
+ this.DelayUpdateStockData();
123735
+ }
123736
+ }
123737
+ else if (scroll.Type==2) //底部按钮
123738
+ {
123739
+ if (this.MoveYOffset(1))
123740
+ {
123741
+ this.Draw();
123742
+ this.DelayUpdateStockData();
123743
+ }
123744
+ }
123745
+ else if (scroll.Type==3) //滚动条
123746
+ {
123747
+ this.DragYScroll={ Click:{X:x, Y:y}, LastMove:{X:x, Y:y} };
123748
+ }
123749
+ else if (scroll.Type==4) //滚动条内部
123750
+ {
123751
+ if (this.SetYOffset(scroll.Pos))
123752
+ {
123753
+ this.Draw();
123754
+ this.DelayUpdateStockData();
123755
+ }
123756
+ }
123757
+ }
123571
123758
  }
123572
123759
  }
123573
123760
 
@@ -123614,6 +123801,7 @@ function JSReportChartContainer(uielement)
123614
123801
  var mouseStatus={ Cursor:"default", Name:"Default"};; //鼠标状态
123615
123802
  var report=this.GetReportChart();
123616
123803
  var cell=null;
123804
+ var bDraw=false;
123617
123805
  if (report)
123618
123806
  {
123619
123807
  var dragHeaderWidth=report.PtInHeaderDragBorder(x,y);
@@ -123626,6 +123814,18 @@ function JSReportChartContainer(uielement)
123626
123814
  {
123627
123815
  cell=report.PtInCell(x,y); //是否在单元格(EnableTooltip)
123628
123816
  }
123817
+
123818
+ var scrollbar=report.VScrollbar;
123819
+ if (scrollbar.Enable)
123820
+ {
123821
+ var bShowScrollbar=report.PtInClient(x,y);
123822
+ this.IsShowVScrollbar=bShowScrollbar;
123823
+ if (!this.DragYScroll)
123824
+ {
123825
+ if (bShowScrollbar && !scrollbar.LastStatus.Draw) bDraw=true;
123826
+ else if (!bShowScrollbar && scrollbar.LastStatus.Draw) bDraw=true;
123827
+ }
123828
+ }
123629
123829
  }
123630
123830
 
123631
123831
  var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_REPORT_MOUSE_MOVE);
@@ -123636,16 +123836,32 @@ function JSReportChartContainer(uielement)
123636
123836
  }
123637
123837
 
123638
123838
  if (mouseStatus) this.UIElement.style.cursor=mouseStatus.Cursor;
123839
+
123840
+ if (bDraw) this.Draw();
123639
123841
  }
123640
123842
 
123641
123843
  this.UIOnMounseOut=function(e)
123642
123844
  {
123845
+ var bDraw=false;
123643
123846
  var tabChart=this.GetTabChart();
123644
123847
  if (tabChart && tabChart.MoveOnTabIndex>=0)
123645
123848
  {
123646
123849
  tabChart.MoveOnTabIndex=-1;
123850
+ bDraw=true;
123647
123851
  this.Draw();
123648
123852
  }
123853
+
123854
+ var scrollbar=this.GetVScrollbarChart();
123855
+ if (scrollbar.Enable)
123856
+ {
123857
+ this.IsShowVScrollbar=false;
123858
+ if (!this.DragYScroll)
123859
+ {
123860
+ if (scrollbar.LastStatus.Draw) bDraw=true;
123861
+ }
123862
+ }
123863
+
123864
+ if (bDraw) this.Draw();
123649
123865
  }
123650
123866
 
123651
123867
  this.UIOnMouseleave=function(e)
@@ -123737,6 +123953,21 @@ function JSReportChartContainer(uielement)
123737
123953
  var pos=chart.Tab.GetScrollPostionByPoint(x,y);
123738
123954
  if (this.SetXOffset(pos)) this.Draw();
123739
123955
  }
123956
+ else if (this.DragYScroll)
123957
+ {
123958
+ var chart=this.ChartPaint[0];
123959
+ if (!chart || !chart.VScrollbar) return;
123960
+
123961
+ this.DragYScroll.LastMove.X=x;
123962
+ this.DragYScroll.LastMove.Y=y;
123963
+
123964
+ var pos=chart.VScrollbar.GetScrollPostionByPoint(x,y);
123965
+ if (this.SetYOffset(pos))
123966
+ {
123967
+ this.Draw();
123968
+ this.DelayUpdateStockData();
123969
+ }
123970
+ }
123740
123971
  else if (this.DragHeader && this.DragHeader.ClickData) //表头拖拽
123741
123972
  {
123742
123973
  if (this.DragHeader.ClickData.Header.IsFixed) return;
@@ -123879,6 +124110,11 @@ function JSReportChartContainer(uielement)
123879
124110
 
123880
124111
  this.DragHeader=null;
123881
124112
  this.DragXScroll=null;
124113
+ if (this.DragYScroll)
124114
+ {
124115
+ bRedraw=true;
124116
+ this.DragYScroll=null;
124117
+ }
123882
124118
  this.DragRow=null;
123883
124119
  this.DragMove=null;
123884
124120
  this.DragColumnWidth=null;
@@ -124187,6 +124423,14 @@ function JSReportChartContainer(uielement)
124187
124423
  return chart.Tab;
124188
124424
  }
124189
124425
 
124426
+ this.GetVScrollbarChart=function()
124427
+ {
124428
+ var chart=this.ChartPaint[0];
124429
+ if (!chart) return null;
124430
+
124431
+ return chart.VScrollbar;
124432
+ }
124433
+
124190
124434
  this.GetReportChart=function()
124191
124435
  {
124192
124436
  var chart=this.ChartPaint[0];
@@ -124478,6 +124722,21 @@ function JSReportChartContainer(uielement)
124478
124722
  return true;
124479
124723
  }
124480
124724
 
124725
+ this.SetYOffset=function(pos)
124726
+ {
124727
+ if (!IFrameSplitOperator.IsNumber(pos)) return false;
124728
+ var chart=this.ChartPaint[0];
124729
+ if (!chart) return false;
124730
+
124731
+ var maxOffset=chart.GetYScrollRange();
124732
+ if (pos<0) pos=0;
124733
+ if (pos>maxOffset) pos=maxOffset;
124734
+
124735
+ this.Data.YOffset=pos;
124736
+
124737
+ return true;
124738
+ }
124739
+
124481
124740
  this.GotoLastPage=function()
124482
124741
  {
124483
124742
  var chart=this.ChartPaint[0];
@@ -124514,6 +124773,17 @@ function JSReportChartContainer(uielement)
124514
124773
  if (option && option.Redraw) this.Draw();
124515
124774
  }
124516
124775
 
124776
+ this.SetVScrollbar=function(option)
124777
+ {
124778
+ var chart=this.GetReportChart();
124779
+ if (!chart) return;
124780
+
124781
+ var scrollbar=chart.VScrollbar;
124782
+ if (!scrollbar) return;
124783
+
124784
+ if (IFrameSplitOperator.IsBool(option.Enable)) scrollbar.Enable=option.Enable;
124785
+ }
124786
+
124517
124787
  this.SetSelectedTab=function(index, opiton)
124518
124788
  {
124519
124789
  var chart=this.ChartPaint[0];;
@@ -125207,6 +125477,7 @@ function ChartReport()
125207
125477
  this.DragRow; //拖拽行
125208
125478
 
125209
125479
  this.Tab;
125480
+ this.VScrollbar;
125210
125481
 
125211
125482
  this.GlobalOption;
125212
125483
 
@@ -125389,6 +125660,7 @@ function ChartReport()
125389
125660
  }
125390
125661
 
125391
125662
  if (this.Tab) this.Tab.ReloadResource(resource);
125663
+ if (this.VScrollbar) this.VScrollbar.ReloadResource(resource);
125392
125664
  }
125393
125665
 
125394
125666
  this.SetColumn=function(aryColumn)
@@ -125488,6 +125760,15 @@ function ChartReport()
125488
125760
  var maxOffset=this.Column.length-this.FixedColumn-3;
125489
125761
  if (maxOffset<0) return 0;
125490
125762
 
125763
+ return maxOffset;
125764
+ }
125765
+
125766
+ this.GetYScrollRange=function()
125767
+ {
125768
+ if (!IFrameSplitOperator.IsNonEmptyArray(this.Data.Data)) return 0;
125769
+
125770
+ var maxOffset=this.Data.Data.length-this.RowCount;
125771
+
125491
125772
  return maxOffset;
125492
125773
  }
125493
125774
 
@@ -125584,6 +125865,12 @@ function ChartReport()
125584
125865
 
125585
125866
  this.DrawDragRow();
125586
125867
 
125868
+ if (this.VScrollbar)
125869
+ {
125870
+ var bottom=this.ChartBorder.GetBottom();
125871
+ this.VScrollbar.DrawScrollbar(this.RectClient.Left,this.RectClient.Top+this.HeaderHeight, this.RectClient.Right, bottom-this.BottomToolbarHeight-4);
125872
+ }
125873
+
125587
125874
  this.SizeChange=false;
125588
125875
  }
125589
125876
 
@@ -125637,6 +125924,8 @@ function ChartReport()
125637
125924
  this.BottomToolbarHeight=0;
125638
125925
  }
125639
125926
 
125927
+ if (this.VScrollbar && this.VScrollbar.Enable) this.VScrollbar.CalculateSize();
125928
+
125640
125929
  this.UpdateCacheData();
125641
125930
 
125642
125931
  var pixelRatio=GetDevicePixelRatio();
@@ -127197,7 +127486,7 @@ function ChartReport()
127197
127486
  return GetFontHeight(this.Canvas, font, word);
127198
127487
  }
127199
127488
 
127200
- this.OnMouseDown=function(x,y,e) //Type: 1=tab 4=固定行 2=行 3=表头
127489
+ this.OnMouseDown=function(x,y,e) //Type: 1=tab 4=固定行 2=行 3=表头 5=右侧滚动条
127201
127490
  {
127202
127491
  if (!this.Data) return null;
127203
127492
 
@@ -127207,6 +127496,12 @@ function ChartReport()
127207
127496
  if (tab) return { Type:1, Tab: tab }; //底部工具栏
127208
127497
  }
127209
127498
 
127499
+ if (this.VScrollbar)
127500
+ {
127501
+ var item=this.VScrollbar.OnMouseDown(x,y,e);
127502
+ if (item) return { Type:5, VScrollbar:item }; //右侧滚动条
127503
+ }
127504
+
127210
127505
  var pixelTatio = GetDevicePixelRatio();
127211
127506
  var insidePoint={X:x/pixelTatio, Y:y/pixelTatio};
127212
127507
 
@@ -127331,6 +127626,13 @@ function ChartReport()
127331
127626
  return false;
127332
127627
  }
127333
127628
 
127629
+ this.PtInClient=function(x,y)
127630
+ {
127631
+ if (x>this.RectClient.Left && x<this.RectClient.Right && y>this.RectClient.Top && y<this.RectClient.Bottom) return true;
127632
+
127633
+ return false;
127634
+ }
127635
+
127334
127636
  this.PtInBody=function(x,y)
127335
127637
  {
127336
127638
  if (!this.Data) return null;
@@ -127961,6 +128263,164 @@ function ChartReportPageInfo()
127961
128263
  this.SizeChange=false;
127962
128264
  }
127963
128265
  }
128266
+
128267
+
128268
+ function ChartVScrollbar()
128269
+ {
128270
+ this.Canvas; //画布
128271
+ this.ChartBorder; //边框信息
128272
+ this.ChartFrame; //框架画法
128273
+ this.Name; //名称
128274
+ this.ClassName='ChartReportTab'; //类名
128275
+ this.IsDrawFirst=false;
128276
+ this.GetEventCallback; //获取事件
128277
+ this.Report;
128278
+
128279
+ this.MaxPos=15; //滚动条可移动长度
128280
+ this.CurrentPos=15; //当前滚动条移动位置
128281
+ this.Step=1; //滚动条移动步长
128282
+ this.ButtonSize=25;
128283
+ this.Enable=false;
128284
+ this.LastStatus={ Draw:false, };
128285
+ this.GlobalOption;
128286
+
128287
+ this.ScrollBarHeight=g_JSChartResource.Report.VScrollbar.ScrollBarHeight;
128288
+ this.ButtonColor=g_JSChartResource.Report.VScrollbar.ButtonColor;
128289
+ this.BarColor=g_JSChartResource.Report.VScrollbar.BarColor;
128290
+ this.BorderColor=g_JSChartResource.Report.VScrollbar.BorderColor;
128291
+ this.BGColor=g_JSChartResource.Report.VScrollbar.BGColor;
128292
+ this.Mergin={ Left:2, Right:2, Top:2, Bottom:2 };
128293
+ this.BarWithConfig={ Size:g_JSChartResource.Report.VScrollbar.BarWidth.Size };
128294
+
128295
+ this.RectScroll={ Top:null, Bottom:null, Bar:null, Client:null }; //滚动条区域
128296
+
128297
+ this.ReloadResource=function(resource)
128298
+ {
128299
+ this.ScrollBarHeight=g_JSChartResource.Report.VScrollbar.ScrollBarHeight;
128300
+ this.ButtonColor=g_JSChartResource.Report.VScrollbar.ButtonColor;
128301
+ this.BarColor=g_JSChartResource.Report.VScrollbar.BarColor;
128302
+ this.BorderColor=g_JSChartResource.Report.VScrollbar.BorderColor;
128303
+ this.BGColor=g_JSChartResource.Report.VScrollbar.BGColor;
128304
+ this.BarWithConfig={ Size:g_JSChartResource.Report.VScrollbar.BarWidth.Size };
128305
+ }
128306
+
128307
+ this.CalculateSize=function()
128308
+ {
128309
+ var pixelRatio=GetDevicePixelRatio();
128310
+
128311
+ var width=this.BarWithConfig.Size*pixelRatio+this.Mergin.Left+this.Mergin.Right;
128312
+ this.ButtonSize=Math.min(25, width);
128313
+ }
128314
+
128315
+ this.DrawScrollbar=function(left, top, right, bottom)
128316
+ {
128317
+ this.LastStatus.Draw=false;
128318
+ this.RectScroll={ Left:null, Right:null, Bar:null, Client:null };
128319
+ if (!this.Enable) return;
128320
+
128321
+ var isShow=this.IsShowCallback();
128322
+ if (!isShow) return;
128323
+
128324
+ var pageInfo=this.Report.GetCurrentPageStatus();
128325
+ if (pageInfo.IsSinglePage) return;
128326
+
128327
+ var xOffset=pageInfo.Start;
128328
+ var dataCount=pageInfo.DataCount-pageInfo.PageSize;
128329
+ var buttonSize=this.ButtonSize;
128330
+
128331
+ this.MaxPos=dataCount;
128332
+ this.CurrentPos=xOffset;
128333
+
128334
+ var rtTop={ Right:right-this.Mergin.Right, Top:top+this.Mergin.Top, Width:buttonSize, Height:buttonSize };
128335
+ rtTop.Left=rtTop.Right-buttonSize;
128336
+ rtTop.Bottom=rtTop.Top+buttonSize;
128337
+
128338
+ var rtBottom={ Right:right-this.Mergin.Right, Bottom:bottom-this.Mergin.Bottom, Width:buttonSize, Height:buttonSize };
128339
+ rtBottom.Left=rtBottom.Right-buttonSize;
128340
+ rtBottom.Top=rtBottom.Bottom-buttonSize;
128341
+
128342
+ var centerHeight=(rtBottom.Top-2)-(rtTop.Bottom+2);
128343
+ var value = centerHeight - this.ScrollBarHeight;
128344
+ var yOffset = (value * this.CurrentPos) / this.MaxPos;
128345
+ var y = rtTop.Bottom + 2 + yOffset;
128346
+
128347
+ var rtBar = {Right:right-this.Mergin.Right, Top:y, Width:buttonSize, Height: this.ScrollBarHeight };
128348
+ rtBar.Left=rtBar.Right-buttonSize;
128349
+ rtBar.Bottom=rtBar.Top+rtBar.Height;
128350
+
128351
+ this.RectScroll.Top=rtTop;
128352
+ this.RectScroll.Bottom=rtBottom;
128353
+ this.RectScroll.Bar=rtBar;
128354
+ this.RectScroll.Client={ Left:rtTop.Left, Right: rtTop.Right, Top:rtTop.Bottom, Bottom:rtBottom.Top };
128355
+
128356
+ var rtBG={ Right:right, Top:top, Bottom:bottom, Width:buttonSize+this.Mergin.Right+this.Mergin.Left };
128357
+ rtBG.Left=rtBG.Right-rtBG.Width;
128358
+ rtBG.Height=rtBG.Bottom-rtBG.Top;
128359
+ this.Canvas.fillStyle=this.BGColor;
128360
+ this.Canvas.fillRect(rtBG.Left,rtBG.Top,rtBG.Width,rtBG.Height);
128361
+
128362
+ this.Canvas.fillStyle=this.ButtonColor;
128363
+ this.Canvas.fillRect(rtTop.Left,rtTop.Top,rtTop.Width,rtTop.Height);
128364
+ this.Canvas.fillRect(rtBottom.Left,rtBottom.Top,rtBottom.Width,rtBottom.Height);
128365
+
128366
+ this.Canvas.strokeStyle=this.BorderColor;
128367
+ this.Canvas.strokeRect(rtTop.Left,rtTop.Top,rtTop.Width,rtTop.Height);
128368
+ this.Canvas.strokeRect(rtBottom.Left,rtBottom.Top,rtBottom.Width,rtBottom.Height);
128369
+
128370
+ this.Canvas.fillStyle=this.BarColor;
128371
+ this.Canvas.fillRect(rtBar.Left,rtBar.Top,rtBar.Width,rtBar.Height);
128372
+
128373
+ this.LastStatus.Draw=true;
128374
+ }
128375
+
128376
+ this.OnMouseDown=function(x,y, e)
128377
+ {
128378
+ return this.PtInScroll(x,y);
128379
+ }
128380
+
128381
+ // Type 1-4 滚动条
128382
+ this.PtInScroll=function(x,y)
128383
+ {
128384
+ if (!this.RectScroll) return null;
128385
+
128386
+ if (this.RectScroll.Top)
128387
+ {
128388
+ var rtItem=this.RectScroll.Top;
128389
+ if (x>=rtItem.Left && x<=rtItem.Right && y>=rtItem.Top && y<=rtItem.Bottom) return { Type: 1, Rect: rtItem };
128390
+ }
128391
+
128392
+ if (this.RectScroll.Bottom)
128393
+ {
128394
+ var rtItem=this.RectScroll.Bottom;
128395
+ if (x>=rtItem.Left && x<=rtItem.Right && y>=rtItem.Top && y<=rtItem.Bottom) return { Type: 2, Rect: rtItem };
128396
+ }
128397
+
128398
+ if (this.RectScroll.Bar)
128399
+ {
128400
+ var rtItem=this.RectScroll.Bar;
128401
+ if (x>=rtItem.Left && x<=rtItem.Right && y>=rtItem.Top && y<=rtItem.Bottom) return { Type: 3, Rect: rtItem };
128402
+ }
128403
+
128404
+ if (this.RectScroll.Client)
128405
+ {
128406
+ var rtItem=this.RectScroll.Client;
128407
+ if (x>=rtItem.Left && x<=rtItem.Right && y>=rtItem.Top && y<=rtItem.Bottom)
128408
+ {
128409
+ return { Type: 4, Rect: rtItem , Pos: this.GetScrollPostionByPoint(x,y) };
128410
+ }
128411
+ }
128412
+
128413
+ return null;
128414
+ }
128415
+
128416
+ this.GetScrollPostionByPoint=function(x,y)
128417
+ {
128418
+ var rtItem=this.RectScroll.Client;
128419
+ var value=rtItem.Bottom-rtItem.Top-this.ScrollBarHeight;
128420
+ var pos =parseInt((this.MaxPos * (y - rtItem.Top)) / value);
128421
+ return pos;
128422
+ }
128423
+ }
127964
128424
  /*
127965
128425
  Copyright (c) 2018 jones
127966
128426
 
@@ -130979,7 +131439,7 @@ function ScrollBarBGChart()
130979
131439
 
130980
131440
 
130981
131441
 
130982
- var HQCHART_VERSION="1.1.13099";
131442
+ var HQCHART_VERSION="1.1.13106";
130983
131443
 
130984
131444
  function PrintHQChartVersion()
130985
131445
  {