hqchart 1.1.13545 → 1.1.13555

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.
@@ -182,6 +182,7 @@ function JSReportChart(divElement)
182
182
  if (IFrameSplitOperator.IsBool(option.EnableDragHeader)) chart.EnableDragHeader=option.EnableDragHeader;
183
183
  if (IFrameSplitOperator.IsNumber(option.WheelPageType)) chart.WheelPageType=option.WheelPageType;
184
184
  if (IFrameSplitOperator.IsBool(option.PageUpDownCycle)) chart.PageUpDownCycle=option.PageUpDownCycle;
185
+
185
186
 
186
187
  if (option.VScrollbar) chart.SetVScrollbar(option.VScrollbar);
187
188
  if (option.SortInfo)
@@ -195,6 +196,7 @@ function JSReportChart(divElement)
195
196
  if (reportChart)
196
197
  {
197
198
  if (IFrameSplitOperator.IsNumber(option.TextOverflowStyle)) reportChart.TextOverflowStyle=option.TextOverflowStyle;
199
+ if (IFrameSplitOperator.IsNumber(option.MultiSelectModel)) reportChart.MultiSelectModel=option.MultiSelectModel;
198
200
  }
199
201
 
200
202
  this.SetChartBorder(chart, option);
@@ -758,6 +760,7 @@ function JSReportChartContainer(uielement)
758
760
  {
759
761
  chart.SelectedRow=-1;
760
762
  chart.SelectedFixedRow=-1;
763
+ chart.MultiSelectedRow=[];
761
764
  }
762
765
  }
763
766
 
@@ -1361,6 +1364,8 @@ function JSReportChartContainer(uielement)
1361
1364
 
1362
1365
  if (IFrameSplitOperator.IsNumber(item[35])) stock.Time=item[35]; //时间 hhmm / hhmmss / hhmmss.fff
1363
1366
  if (IFrameSplitOperator.IsNumber(item[36])) stock.Date=item[36]; //日期
1367
+
1368
+ if (IFrameSplitOperator.IsBool(item[37])) stock.Checked=item[37];
1364
1369
  }
1365
1370
 
1366
1371
 
@@ -1788,6 +1793,12 @@ function JSReportChartContainer(uielement)
1788
1793
  }
1789
1794
  else
1790
1795
  {
1796
+ var bottonData=report.GetButtonData(x,y)
1797
+ if (bottonData)
1798
+ {
1799
+ mouseStatus={ Cursor:"pointer", Name:"Botton"};
1800
+ }
1801
+
1791
1802
  var tooltipData=report.GetTooltipData(x,y); //单元格提示信息
1792
1803
  if (tooltipData)
1793
1804
  {
@@ -2593,6 +2604,100 @@ function JSReportChartContainer(uielement)
2593
2604
 
2594
2605
  var result={ Redraw:false, Update:false }; //Redraw=重绘, Update=更新数据
2595
2606
 
2607
+ if (chart.MultiSelectModel==1)
2608
+ {
2609
+ var pageStatus=chart.GetCurrentPageStatus();
2610
+ if (IFrameSplitOperator.IsNonEmptyArray(pageStatus.MultiSelectedRow))
2611
+ {
2612
+ var selected=pageStatus.MultiSelectedRow[0];
2613
+ if (step>0)
2614
+ {
2615
+ if (selected==this.Data.Data.length-1) return result;
2616
+
2617
+ if (selected<0 || selected<pageStatus.Start || selected>pageStatus.End)
2618
+ {
2619
+ chart.MultiSelectedRow=[pageStatus.Start];
2620
+ result.Redraw=true;
2621
+ return result;
2622
+ }
2623
+
2624
+ var offset=this.Data.YOffset;
2625
+ for(var i=0;i<step;++i)
2626
+ {
2627
+ ++selected;
2628
+ if (selected>pageStatus.End) ++offset;
2629
+
2630
+ if (selected>=this.Data.Data.length)
2631
+ {
2632
+ selected=0;
2633
+ offset=0;
2634
+ }
2635
+ }
2636
+
2637
+ result.Redraw=true;
2638
+ result.Update=(offset!=this.Data.YOffset);
2639
+
2640
+ chart.MultiSelectedRow=[selected];
2641
+ this.Data.YOffset=offset;
2642
+
2643
+ return result;
2644
+
2645
+ }
2646
+ else if (step<0)
2647
+ {
2648
+ if (selected==0) return result;
2649
+
2650
+ if (selected<0 || selected<pageStatus.Start || selected>pageStatus.End)
2651
+ {
2652
+ chart.MultiSelectedRow=[pageStatus.End];
2653
+ result.Redraw=true;
2654
+ return result;
2655
+ }
2656
+
2657
+ step=Math.abs(step);
2658
+ var offset=this.Data.YOffset;
2659
+ for(var i=0;i<step;++i)
2660
+ {
2661
+ --selected;
2662
+ if (selected<pageStatus.Start) --offset;
2663
+
2664
+ if (selected<0)
2665
+ {
2666
+ selected=this.Data.Data.length-1;
2667
+ offset=this.Data.Data.length-pageSize;
2668
+ if (offset<0) offset=0;
2669
+ }
2670
+ }
2671
+
2672
+ result.Redraw=true;
2673
+ result.Update=(offset!=this.Data.YOffset);
2674
+
2675
+ chart.MultiSelectedRow=[selected];
2676
+ this.Data.YOffset=offset;
2677
+
2678
+ return result;
2679
+ }
2680
+ else
2681
+ {
2682
+ return null;
2683
+ }
2684
+
2685
+ return result;
2686
+ }
2687
+ else
2688
+ {
2689
+ var selected=-1;
2690
+ if (step>0) selected=pageStatus.Start;
2691
+ else if (step<0) selected=pageStatus.End;
2692
+ else return null;
2693
+
2694
+ chart.MultiSelectedRow=[selected];
2695
+ result.Redraw=true;
2696
+ }
2697
+
2698
+ return result;
2699
+ }
2700
+
2596
2701
 
2597
2702
  if (chart.SelectedModel==0) //不可翻页模式, 只能在当前页移动
2598
2703
  {
@@ -3565,6 +3670,13 @@ var REPORT_COLUMN_ID=
3565
3670
 
3566
3671
  TIME_ID:31, //时间 hhmmss / hhmm / hhmmss.fff
3567
3672
  DATE_ID:32, //日期
3673
+
3674
+ CHECKBOX_ID:33, //单选框
3675
+ CHECKBOX2_ID:34,
3676
+ CHECKBOX3_ID:35,
3677
+ CHECKBOX4_ID:36,
3678
+ CHECKBOX5_ID:37,
3679
+ CHECKBOX6_ID:38,
3568
3680
 
3569
3681
 
3570
3682
  SYMBOL_NAME_ID:99,
@@ -3639,6 +3751,10 @@ function ChartReport()
3639
3751
  this.SelectedFixedRow=-1; //选中固定行ID
3640
3752
  this.IsDrawBorder=1; //是否绘制单元格边框
3641
3753
 
3754
+ //多选模式
3755
+ this.MultiSelectModel=0; //0=禁用 1=开启
3756
+ this.MultiSelectedRow=[]; //选中行
3757
+
3642
3758
  this.ShowSymbol=[]; //显示的股票列表 { Index:序号(排序用), Symbol:股票代码 }
3643
3759
  this.DragRow; //拖拽行
3644
3760
 
@@ -3738,6 +3854,8 @@ function ChartReport()
3738
3854
  DistanceWidth:g_JSChartResource.Report.KLine.DistanceWidth
3739
3855
  }
3740
3856
 
3857
+ this.CheckBoxConfig=CloneData(g_JSChartResource.Report.CheckBox);
3858
+
3741
3859
  //股票代码+股票名称
3742
3860
  this.ItemSymbolFontConfig={Size:g_JSChartResource.Report.Item.SymbolFont.Size, Name:g_JSChartResource.Report.Item.SymbolFont.Name};
3743
3861
  this.ItemNameFontConfg={Size:g_JSChartResource.Report.Item.NameFont.Size, Name:g_JSChartResource.Report.Item.NameFont.Name};
@@ -3756,6 +3874,7 @@ function ChartReport()
3756
3874
  this.RowHeight=0; //行高度
3757
3875
  this.BottomToolbarHeight=0; //底部工具条高度
3758
3876
  this.IsShowAllColumn=false; //是否已显示所有列
3877
+ this.DevicePixelRatio=GetDevicePixelRatio(); //分辨率
3759
3878
 
3760
3879
  //{
3761
3880
  // Type:列id, Title:标题, TextAlign:文字对齐方式, MaxText:文字最大宽度 , TextColor:文字颜色, Sort:0=不支持排序 1=本地排序 0=远程排序,
@@ -3776,8 +3895,13 @@ function ChartReport()
3776
3895
  // { Text, Color, Title:, TitleColor, Space, Margin:{ Left, Top, Right, Bottom }}
3777
3896
  this.TooltipRect=[];
3778
3897
 
3898
+ //{ Rect:rtItem, Type: 0=checkedbox, 1=button, 2=link , Stock, Index:index, Column:column }
3899
+ this.ButtonRect=[];
3900
+
3779
3901
  this.ReloadResource=function(resource)
3780
3902
  {
3903
+ this.DevicePixelRatio=GetDevicePixelRatio()
3904
+
3781
3905
  this.UpColor=g_JSChartResource.Report.UpTextColor;
3782
3906
  this.DownColor=g_JSChartResource.Report.DownTextColor;
3783
3907
  this.UnchagneColor=g_JSChartResource.Report.UnchagneTextColor;
@@ -4041,6 +4165,8 @@ function ChartReport()
4041
4165
  { Type:REPORT_COLUMN_ID.TIME_ID, Title:"时间", TextAlign:"left", ValueType:0, TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"99:99:99.999" },
4042
4166
  { Type:REPORT_COLUMN_ID.DATE_ID, Title:"日期", TextAlign:"left", FormatType:0, TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999-99-99" },
4043
4167
 
4168
+ { Type:REPORT_COLUMN_ID.CHECKBOX_ID, Title:"", TextAlign:"center", FixedWidth:20*GetDevicePixelRatio() }
4169
+
4044
4170
 
4045
4171
  ];
4046
4172
 
@@ -4066,7 +4192,9 @@ function ChartReport()
4066
4192
  {
4067
4193
  this.ShowSymbol=[];
4068
4194
  this.TooltipRect=[];
4069
-
4195
+ this.ButtonRect=[];
4196
+ this.DevicePixelRatio=GetDevicePixelRatio()
4197
+
4070
4198
  if (this.GlobalOption) this.GlobalOption.FlashBGCount=0;
4071
4199
 
4072
4200
  if (this.SizeChange) this.CalculateSize();
@@ -4118,7 +4246,14 @@ function ChartReport()
4118
4246
 
4119
4247
  this.GetCurrentPageStatus=function() //{ Start:起始索引, End:结束索引(数据), PageSize:页面可以显示几条记录, IsEnd:是否是最后一页, IsSinglePage:是否只有一页数据}
4120
4248
  {
4121
- var result={ Start:this.Data.YOffset, PageSize:this.RowCount, IsEnd:false, SelectedRow:this.SelectedRow, IsSinglePage:false, DataCount:0 };
4249
+ var result={ Start:this.Data.YOffset, PageSize:this.RowCount, IsEnd:false, SelectedRow:this.SelectedRow, IsSinglePage:false, DataCount:0, MultiSelectModel:this.MultiSelectModel };
4250
+ if (this.MultiSelectModel==1)
4251
+ {
4252
+ result.SelectedRow=-1;
4253
+ result.MultiSelectedRow=this.MultiSelectedRow.slice();
4254
+ result.MultiSelectedRow.sort((left, right)=>{ return left>right; });
4255
+ }
4256
+
4122
4257
  if (IFrameSplitOperator.IsNonEmptyArray(this.Data.Data))
4123
4258
  {
4124
4259
  result.End=this.Data.YOffset+this.RowCount-1;
@@ -4539,19 +4674,34 @@ function ChartReport()
4539
4674
 
4540
4675
  textTop=top+this.FixedRowHeight*this.FixedRowCount;
4541
4676
  this.Canvas.font=this.ItemFont;
4677
+
4678
+ var eventDrawBG=this.GetEventCallback(JSCHART_EVENT_ID.ON_DRAW_REPORT_ROW_BG);
4679
+ var selectedSymbol=this.GetSelectedSymbol();
4680
+
4681
+ var setSelected;
4682
+ if (this.MultiSelectModel==1) setSelected=new Set(this.MultiSelectedRow);
4683
+
4542
4684
  for(var i=this.Data.YOffset, j=0; i<this.Data.Data.length && j<this.RowCount ;++i, ++j)
4543
4685
  {
4544
4686
  var symbol=this.Data.Data[i];
4545
4687
 
4546
4688
  var bFillRow=false;
4547
- if (this.SelectedModel==0)
4689
+ if (this.MultiSelectModel==1)
4548
4690
  {
4549
- if (j==this.SelectedRow) bFillRow=true; //选中行
4691
+ if (setSelected.has(i)) bFillRow=true;
4550
4692
  }
4551
4693
  else
4552
4694
  {
4553
- if (i==this.SelectedRow) bFillRow=true; //选中行
4695
+ if (this.SelectedModel==0)
4696
+ {
4697
+ if (j==this.SelectedRow) bFillRow=true; //选中行
4698
+ }
4699
+ else
4700
+ {
4701
+ if (i==this.SelectedRow) bFillRow=true; //选中行
4702
+ }
4554
4703
  }
4704
+
4555
4705
 
4556
4706
  if (this.DragRow)
4557
4707
  {
@@ -4578,6 +4728,18 @@ function ChartReport()
4578
4728
  bFillRow=false;
4579
4729
  }
4580
4730
 
4731
+ if (eventDrawBG && eventDrawBG.Callback)
4732
+ {
4733
+ //Out:{ BGColor: }
4734
+ var sendData={ RowIndex:i, Symbol:symbol, Out:null, Selected:selectedSymbol, MultiSelectModel:this.MultiSelectModel };
4735
+ eventDrawBG.Callback(eventDrawBG,sendData,this);
4736
+ if (sendData.Out && sendData.Out.BGColor)
4737
+ {
4738
+ this.Canvas.fillStyle=sendData.Out.BGColor;
4739
+ this.Canvas.fillRect(left,textTop,rowWidth,this.RowHeight);
4740
+ }
4741
+ }
4742
+
4581
4743
  if (bFillRow)
4582
4744
  {
4583
4745
  this.Canvas.fillStyle=this.SelectedColor;
@@ -4592,6 +4754,36 @@ function ChartReport()
4592
4754
  }
4593
4755
  }
4594
4756
 
4757
+ this.GetSelectedSymbol=function()
4758
+ {
4759
+ if (this.MultiSelectModel==1)
4760
+ {
4761
+ if (!IFrameSplitOperator.IsNonEmptyArray(this.MultiSelectedRow)) return null;
4762
+
4763
+ var aryData=[];
4764
+ for(var i=0;i<this.MultiSelectedRow.length;++i)
4765
+ {
4766
+ var item=this.Data.Data[this.MultiSelectedRow[i]];
4767
+ if (!item) continue;
4768
+
4769
+ aryData.push(item);
4770
+ }
4771
+
4772
+ return aryData;
4773
+ }
4774
+ else
4775
+ {
4776
+ if (this.SelectedRow<0) return null;
4777
+
4778
+ var index=this.SelectedRow;
4779
+ if (this.SelectedModel==0) //当前屏选中
4780
+ index=this.Data.YOffset+this.SelectedRow;
4781
+
4782
+ var symbol=this.Data.Data[index];
4783
+ return [symbol];
4784
+ }
4785
+ }
4786
+
4595
4787
 
4596
4788
  this.DrawFixedSymbolRow=function(top, dataIndex)
4597
4789
  {
@@ -4917,6 +5109,18 @@ function ChartReport()
4917
5109
  {
4918
5110
  this.FormaDateDrawInfo(column, stock, drawInfo, data);
4919
5111
  }
5112
+ else if (column.Type==REPORT_COLUMN_ID.CHECKBOX_ID)
5113
+ {
5114
+ rtItem={ Left:left, Top:top, Width:column.Width, Height:this.RowHeight };
5115
+ rtItem.Right=rtItem.Left+rtItem.Width;
5116
+ rtItem.Bottom=rtItem.Top+rtItem.Height;
5117
+ drawInfo.Rect=rtItem;
5118
+ drawInfo.Checked=false;
5119
+ drawInfo.Font=`${this.CheckBoxConfig.Size*this.DevicePixelRatio}px ${this.CheckBoxConfig.Family}`;
5120
+ if (stock && IFrameSplitOperator.IsBool(stock.Checked))
5121
+ drawInfo.Checked=stock.Checked;
5122
+ }
5123
+
4920
5124
 
4921
5125
  //拖拽行颜色
4922
5126
  if (rowType==3)
@@ -4930,6 +5134,10 @@ function ChartReport()
4930
5134
  {
4931
5135
  this.DrawIconItem(drawInfo, x, top, textWidth);
4932
5136
  }
5137
+ else if (column.Type==REPORT_COLUMN_ID.CHECKBOX_ID)
5138
+ {
5139
+ this.DrawCheckbox(drawInfo, left, top, itemWidth);
5140
+ }
4933
5141
  else
4934
5142
  {
4935
5143
  if (data.FlashBG && data.FlashBG.Data && column.ID!=undefined)
@@ -4960,6 +5168,12 @@ function ChartReport()
4960
5168
  var tooltipData={ Rect:rtItem, Stock:stock, Index:index, Column:column, RowType:rowType, Type:drawInfo.Tooltip.Type, Data:drawInfo.Tooltip.Data };
4961
5169
  this.TooltipRect.push(tooltipData);
4962
5170
  }
5171
+
5172
+ if (drawInfo.Botton)
5173
+ {
5174
+ var buttonData={ Stock:stock, Index:index, Column:column, Rect:drawInfo.Botton.Rect, Type:drawInfo.Botton.Type };
5175
+ this.ButtonRect.push(buttonData);
5176
+ }
4963
5177
  }
4964
5178
 
4965
5179
  this.DrawCustomText=function(drawInfo, column, left, top, cellWidth)
@@ -5477,6 +5691,36 @@ function ChartReport()
5477
5691
  this.Canvas.font=this.ItemFont;
5478
5692
  }
5479
5693
 
5694
+ this.DrawCheckbox=function(drawInfo, left, top, width)
5695
+ {
5696
+ var textAlign=drawInfo.TextAlign;
5697
+ var size=this.CheckBoxConfig.Size*this.DevicePixelRatio;
5698
+ //var boxWidth=size+this.CheckBoxConfig.Margin.Left+this.CheckBoxConfig.Margin.Right;
5699
+ var x=left+this.CheckBoxConfig.Margin.Left;
5700
+ var y=top+this.RowHeight-this.CheckBoxConfig.Margin.Bottom;
5701
+ if (textAlign=='center') x=left+width/2-size/2;
5702
+ else if (textAlign=='right') x=left+width-this.CheckBoxConfig.Margin.Right;
5703
+
5704
+ this.Canvas.font=drawInfo.Font;
5705
+ this.Canvas.textBaseline="bottom";
5706
+ this.Canvas.textAlign="left";
5707
+ if (drawInfo.Checked===true)
5708
+ {
5709
+ this.Canvas.fillStyle=this.CheckBoxConfig.Checked.Color;
5710
+ this.Canvas.fillText(this.CheckBoxConfig.Checked.Symbol,x,y);
5711
+ }
5712
+ else if (drawInfo.Checked===false)
5713
+ {
5714
+ this.Canvas.fillStyle=this.CheckBoxConfig.Unchecked.Color;
5715
+ this.Canvas.fillText(this.CheckBoxConfig.Unchecked.Symbol,x,y);
5716
+ }
5717
+
5718
+ var rtBox={ Left:x, Bottom:y, Width:size, Height:size };
5719
+ rtBox.Right=rtBox.Left+rtBox.Width;
5720
+ rtBox.Top=rtBox.Bottom-rtBox.Height;
5721
+ drawInfo.Botton={ Rect:rtBox, Type:0 };
5722
+ }
5723
+
5480
5724
  //字体由外面设置
5481
5725
  this.TextEllipsis=function(text, maxWidth, maxText)
5482
5726
  {
@@ -5989,6 +6233,7 @@ function ChartReport()
5989
6233
 
5990
6234
  this.SelectedFixedRow=row.Index;
5991
6235
  this.SelectedRow=-1;
6236
+ this.MultiSelectedRow=[];
5992
6237
 
5993
6238
  return { Type:4, Redraw:bRedraw, Row:row }; //行
5994
6239
  }
@@ -5996,18 +6241,45 @@ function ChartReport()
5996
6241
  var row=this.PtInBody(x,y);
5997
6242
  if (row)
5998
6243
  {
6244
+ var btnStatus={ Redraw:false };
6245
+ this.OnClickButton(x, y, e, btnStatus);
6246
+
5999
6247
  var bRedraw=true;
6000
- if (this.SelectedModel==0)
6248
+ if (this.MultiSelectModel==1)
6001
6249
  {
6002
- if (this.SelectedRow==row.Index) bRedraw=false;
6003
- this.SelectedRow=row.Index;
6250
+ if (e && e.ctrlKey) //多选
6251
+ {
6252
+ var pos=this.MultiSelectedRow.indexOf(row.DataIndex);
6253
+ if (pos>=0) this.MultiSelectedRow.splice(pos,1);
6254
+ else this.MultiSelectedRow.push(row.DataIndex);
6255
+
6256
+ }
6257
+ else if (e && e.shiftKey) //批量多选
6258
+ {
6259
+ this.OnShiftClickRow(row);
6260
+ }
6261
+ else
6262
+ {
6263
+ if (this.MultiSelectedRow.length==1 && this.MultiSelectedRow[0]==row.DataIndex) bRedraw=false;
6264
+ else this.MultiSelectedRow=[row.DataIndex];
6265
+ }
6266
+
6004
6267
  this.SelectedFixedRow=-1;
6005
6268
  }
6006
- else
6269
+ else
6007
6270
  {
6008
- if (this.SelectedRow==row.DataIndex) bRedraw=false;
6009
- this.SelectedRow=row.DataIndex;
6010
- this.SelectedFixedRow=-1;
6271
+ if (this.SelectedModel==0)
6272
+ {
6273
+ if (this.SelectedRow==row.Index) bRedraw=false;
6274
+ this.SelectedRow=row.Index;
6275
+ this.SelectedFixedRow=-1;
6276
+ }
6277
+ else
6278
+ {
6279
+ if (this.SelectedRow==row.DataIndex) bRedraw=false;
6280
+ this.SelectedRow=row.DataIndex;
6281
+ this.SelectedFixedRow=-1;
6282
+ }
6011
6283
  }
6012
6284
 
6013
6285
  var eventID=JSCHART_EVENT_ID.ON_CLICK_REPORT_ROW;
@@ -6015,7 +6287,7 @@ function ChartReport()
6015
6287
 
6016
6288
  this.SendClickEvent(eventID, { Data:row, X:x, Y:y, e:e, Inside:insidePoint, UIElement:uiElement });
6017
6289
 
6018
- return { Type:2, Redraw:bRedraw, Row:row }; //行
6290
+ return { Type:2, Redraw:bRedraw || btnStatus.Redraw, Row:row }; //行
6019
6291
  }
6020
6292
 
6021
6293
  var header=this.PtInHeader(x,y);
@@ -6038,6 +6310,62 @@ function ChartReport()
6038
6310
  return null;
6039
6311
  }
6040
6312
 
6313
+ this.OnShiftClickRow=function(row)
6314
+ {
6315
+ if (this.MultiSelectedRow.length<=0)
6316
+ {
6317
+ this.MultiSelectedRow.push(row.DataIndex);
6318
+ return;
6319
+ }
6320
+
6321
+ var max=null, min=null;
6322
+ for(var i=0;i<this.MultiSelectedRow.length;++i)
6323
+ {
6324
+ var value=this.MultiSelectedRow[i];
6325
+ if (max==null || max<value) max=value;
6326
+ if (min==null || min>value) min=value;
6327
+ if (value==row.DataIndex) //移除
6328
+ {
6329
+ this.MultiSelectedRow.splice(i,1);
6330
+ return;
6331
+ }
6332
+ }
6333
+
6334
+ if (max==min)
6335
+ {
6336
+ var start=row.DataIndex, end=max;
6337
+ if (start>end)
6338
+ {
6339
+ start=max;
6340
+ end=row.DataIndex;
6341
+ }
6342
+
6343
+ this.MultiSelectedRow=[];
6344
+ for(var i=start;i<=end;++i)
6345
+ {
6346
+ this.MultiSelectedRow.push(i);
6347
+ }
6348
+ }
6349
+ else
6350
+ {
6351
+ if (row.DataIndex<=max && row.DataIndex>=min)
6352
+ {
6353
+ this.MultiSelectedRow.push(row.DataIndex);
6354
+ }
6355
+ else
6356
+ {
6357
+ var start=Math.min(row.DataIndex, min);
6358
+ var end=Math.max(row.DataIndex, max);
6359
+ this.MultiSelectedRow=[];
6360
+ for(var i=start;i<=end;++i)
6361
+ {
6362
+ this.MultiSelectedRow.push(i);
6363
+ }
6364
+ }
6365
+ }
6366
+
6367
+ }
6368
+
6041
6369
  this.OnDrawgRow=function(x, y, e) //Type: 5=顶部 6=空白行 2=行 7=底部
6042
6370
  {
6043
6371
  if (!this.Data) return null;
@@ -6074,6 +6402,33 @@ function ChartReport()
6074
6402
  return { Type:7 };
6075
6403
  }
6076
6404
 
6405
+ this.OnClickButton=function(x, y, e, status)
6406
+ {
6407
+ if (e.button!=0) return false;
6408
+
6409
+ var buttonData=this.GetButtonData(x,y);
6410
+ if (!buttonData) return true;
6411
+
6412
+ if (buttonData.Type===0)
6413
+ {
6414
+ var sendData={ Column:buttonData.Column, Index:buttonData.Index, Stock:buttonData.Stock, PreventDefault: false };
6415
+ this.SendClickEvent(JSCHART_EVENT_ID.ON_CLICK_REPORT_CHECKBOX, sendData)
6416
+
6417
+ if (!sendData.PreventDefault)
6418
+ {
6419
+ if (IFrameSplitOperator.IsBool(buttonData.Stock.Checked))
6420
+ buttonData.Stock.Checked=!buttonData.Stock.Checked;
6421
+ else
6422
+ buttonData.Stock.Checked=true;
6423
+ }
6424
+
6425
+ status.Redraw=true;
6426
+ return true;
6427
+ }
6428
+
6429
+ return false;
6430
+ }
6431
+
6077
6432
  this.OnDblClick=function(x,y,e)
6078
6433
  {
6079
6434
  if (!this.Data) return false;
@@ -6311,6 +6666,24 @@ function ChartReport()
6311
6666
  return null;
6312
6667
  }
6313
6668
 
6669
+ this.GetButtonData=function(x,y)
6670
+ {
6671
+ if (!IFrameSplitOperator.IsNonEmptyArray(this.ButtonRect)) return null;
6672
+
6673
+ for(var i=0;i<this.ButtonRect.length;++i)
6674
+ {
6675
+ var item=this.ButtonRect[i];
6676
+
6677
+ var rt=item.Rect;
6678
+ if (!rt) continue;
6679
+
6680
+ if (x>=rt.Left && x<=rt.Right && y>=rt.Top && y<=rt.Bottom)
6681
+ {
6682
+ return { Rect:item.Rect, Stock:item.Stock, Column:item.Column, Index:item.Index, Type:item.Type };
6683
+ }
6684
+ }
6685
+ }
6686
+
6314
6687
  this.PtInHeaderDragBorder=function(x, y)
6315
6688
  {
6316
6689
  if (!this.IsShowHeader) return null;
@@ -1,8 +1,8 @@
1
1
  @font-face {
2
2
  font-family: "iconfont"; /* Project id 1040563 */
3
- src: url('iconfont.woff2?t=1720702239957') format('woff2'),
4
- url('iconfont.woff?t=1720702239957') format('woff'),
5
- url('iconfont.ttf?t=1720702239957') format('truetype');
3
+ src: url('iconfont.woff2?t=1721033595459') format('woff2'),
4
+ url('iconfont.woff?t=1721033595459') format('woff'),
5
+ url('iconfont.ttf?t=1721033595459') format('truetype');
6
6
  }
7
7
 
8
8
  .iconfont {
@@ -13,6 +13,14 @@
13
13
  -moz-osx-font-smoothing: grayscale;
14
14
  }
15
15
 
16
+ .icon-Unchecked-box:before {
17
+ content: "\e6b4";
18
+ }
19
+
20
+ .icon-check-box:before {
21
+ content: "\e6b3";
22
+ }
23
+
16
24
  .icon-paixujiantou:before {
17
25
  content: "\e6b1";
18
26
  }
@@ -622,6 +622,13 @@ function GetBlackStyle()
622
622
  BarColor:"rgba(48,48,48,0.9)",
623
623
  BorderColor:'rgba(48,48,48,0.9)',
624
624
  BGColor:"rgba(211,211,211,0.5)",
625
+ },
626
+
627
+ CheckBox:
628
+ {
629
+ Family:"iconfont", Size:15,
630
+ Checked:{ Color:"rgb(237,60,31)", Symbol:"\ue6b3", DisableColor:"rgb(112,128,144)" },
631
+ Unchecked:{ Color:"rgb(237,60,31)", Symbol:"\ue6b4", DisableColor:"rgb(112,128,144)" },
625
632
  }
626
633
  },
627
634