hqchart 1.1.13550 → 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.
@@ -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
 
@@ -6524,6 +6524,7 @@ var JSCHART_EVENT_ID=
6524
6524
  ON_CLICK_TREPORT_ROW:127, //左键点击点击T型报价列表
6525
6525
 
6526
6526
  ON_DRAW_REPORT_ROW_BG:140, //报价列表整行背景
6527
+ ON_CLICK_REPORT_CHECKBOX:141, //报价列表checkbox
6527
6528
 
6528
6529
 
6529
6530
  ON_CHANGE_INDEX:150, //切换指标
@@ -71164,6 +71165,15 @@ function JSChartResource()
71164
71165
  BorderColor:'rgba(180,180,180,0.9)',
71165
71166
  BGColor:"rgba(234,239,248,0.9)",
71166
71167
  BarWidth:{ Size:12 }
71168
+ },
71169
+
71170
+ CheckBox:
71171
+ {
71172
+ Family:"iconfont", Size:15,
71173
+ Checked:{ Color:"rgb(33,148,240)", Symbol:"\ue6b3", DisableColor:"rgb(112,128,144)" },
71174
+ Unchecked:{ Color:"rgb(33,148,240)", Symbol:"\ue6b4", DisableColor:"rgb(112,128,144)" },
71175
+
71176
+ Margin:{ Left:5, Right:5, Bottom:2, Top:4 },
71167
71177
  }
71168
71178
  },
71169
71179
 
@@ -72179,6 +72189,33 @@ function JSChartResource()
72179
72189
  if (subItem.BorderColor) dest.VScrollbar.BorderColor=subItem.BorderColor;
72180
72190
  if (subItem.BGColor) dest.VScrollbar.BGColor=subItem.BGColor;
72181
72191
  }
72192
+
72193
+ if (item.CheckBox)
72194
+ {
72195
+ var subItem=item.CheckBox;
72196
+ if (subItem.Family) dest.CheckBox.Family=subItem.Family;
72197
+ if (IFrameSplitOperator.IsNumber(subItem.Size)) dest.CheckBox.Size=subItem.Size;
72198
+
72199
+ if (subItem.Checked)
72200
+ {
72201
+ var child=subItem.Checked;
72202
+ if (child.Color) dest.CheckBox.Checked.Color=child.Color;
72203
+ if (child.Symbol) dest.CheckBox.Checked.Symbol=child.Symbol;
72204
+ if (child.DisableColor) dest.CheckBox.Checked.DisableColor=child.DisableColor;
72205
+ }
72206
+
72207
+ if (subItem.Unchecked)
72208
+ {
72209
+ var child=subItem.Unchecked;
72210
+ if (child.Color) dest.CheckBox.Unchecked.Color=child.Color;
72211
+ if (child.Symbol) dest.CheckBox.Unchecked.Symbol=child.Symbol;
72212
+ if (child.DisableColor) dest.CheckBox.Unchecked.DisableColor=child.DisableColor;
72213
+
72214
+
72215
+ }
72216
+
72217
+ CopyMarginConfig(dest.CheckBox.Margin, subItem.Margin);
72218
+ }
72182
72219
 
72183
72220
  }
72184
72221
 
@@ -123582,6 +123619,13 @@ function GetBlackStyle()
123582
123619
  BarColor:"rgba(48,48,48,0.9)",
123583
123620
  BorderColor:'rgba(48,48,48,0.9)',
123584
123621
  BGColor:"rgba(211,211,211,0.5)",
123622
+ },
123623
+
123624
+ CheckBox:
123625
+ {
123626
+ Family:"iconfont", Size:15,
123627
+ Checked:{ Color:"rgb(237,60,31)", Symbol:"\ue6b3", DisableColor:"rgb(112,128,144)" },
123628
+ Unchecked:{ Color:"rgb(237,60,31)", Symbol:"\ue6b4", DisableColor:"rgb(112,128,144)" },
123585
123629
  }
123586
123630
  },
123587
123631
 
@@ -124714,6 +124758,10 @@ function ChartDealList()
124714
124758
  if (!IFrameSplitOperator.IsNumber(item.DataIndex)) continue;
124715
124759
  colItem.DataIndex=item.DataIndex; //柱子数据所在原始数据索引列
124716
124760
  }
124761
+ else if (item.Type==DEAL_COLUMN_ID.TIME_ID)
124762
+ {
124763
+ if (IFrameSplitOperator.IsString(item.Foramt)) colItem.Foramt=item.Foramt; //设置时间格式
124764
+ }
124717
124765
 
124718
124766
  this.Column.push(colItem);
124719
124767
  }
@@ -125340,6 +125388,7 @@ function JSReportChart(divElement)
125340
125388
  if (IFrameSplitOperator.IsBool(option.EnableDragHeader)) chart.EnableDragHeader=option.EnableDragHeader;
125341
125389
  if (IFrameSplitOperator.IsNumber(option.WheelPageType)) chart.WheelPageType=option.WheelPageType;
125342
125390
  if (IFrameSplitOperator.IsBool(option.PageUpDownCycle)) chart.PageUpDownCycle=option.PageUpDownCycle;
125391
+
125343
125392
 
125344
125393
  if (option.VScrollbar) chart.SetVScrollbar(option.VScrollbar);
125345
125394
  if (option.SortInfo)
@@ -125353,6 +125402,7 @@ function JSReportChart(divElement)
125353
125402
  if (reportChart)
125354
125403
  {
125355
125404
  if (IFrameSplitOperator.IsNumber(option.TextOverflowStyle)) reportChart.TextOverflowStyle=option.TextOverflowStyle;
125405
+ if (IFrameSplitOperator.IsNumber(option.MultiSelectModel)) reportChart.MultiSelectModel=option.MultiSelectModel;
125356
125406
  }
125357
125407
 
125358
125408
  this.SetChartBorder(chart, option);
@@ -125916,6 +125966,7 @@ function JSReportChartContainer(uielement)
125916
125966
  {
125917
125967
  chart.SelectedRow=-1;
125918
125968
  chart.SelectedFixedRow=-1;
125969
+ chart.MultiSelectedRow=[];
125919
125970
  }
125920
125971
  }
125921
125972
 
@@ -126519,6 +126570,8 @@ function JSReportChartContainer(uielement)
126519
126570
 
126520
126571
  if (IFrameSplitOperator.IsNumber(item[35])) stock.Time=item[35]; //时间 hhmm / hhmmss / hhmmss.fff
126521
126572
  if (IFrameSplitOperator.IsNumber(item[36])) stock.Date=item[36]; //日期
126573
+
126574
+ if (IFrameSplitOperator.IsBool(item[37])) stock.Checked=item[37];
126522
126575
  }
126523
126576
 
126524
126577
 
@@ -126946,6 +126999,12 @@ function JSReportChartContainer(uielement)
126946
126999
  }
126947
127000
  else
126948
127001
  {
127002
+ var bottonData=report.GetButtonData(x,y)
127003
+ if (bottonData)
127004
+ {
127005
+ mouseStatus={ Cursor:"pointer", Name:"Botton"};
127006
+ }
127007
+
126949
127008
  var tooltipData=report.GetTooltipData(x,y); //单元格提示信息
126950
127009
  if (tooltipData)
126951
127010
  {
@@ -127751,6 +127810,100 @@ function JSReportChartContainer(uielement)
127751
127810
 
127752
127811
  var result={ Redraw:false, Update:false }; //Redraw=重绘, Update=更新数据
127753
127812
 
127813
+ if (chart.MultiSelectModel==1)
127814
+ {
127815
+ var pageStatus=chart.GetCurrentPageStatus();
127816
+ if (IFrameSplitOperator.IsNonEmptyArray(pageStatus.MultiSelectedRow))
127817
+ {
127818
+ var selected=pageStatus.MultiSelectedRow[0];
127819
+ if (step>0)
127820
+ {
127821
+ if (selected==this.Data.Data.length-1) return result;
127822
+
127823
+ if (selected<0 || selected<pageStatus.Start || selected>pageStatus.End)
127824
+ {
127825
+ chart.MultiSelectedRow=[pageStatus.Start];
127826
+ result.Redraw=true;
127827
+ return result;
127828
+ }
127829
+
127830
+ var offset=this.Data.YOffset;
127831
+ for(var i=0;i<step;++i)
127832
+ {
127833
+ ++selected;
127834
+ if (selected>pageStatus.End) ++offset;
127835
+
127836
+ if (selected>=this.Data.Data.length)
127837
+ {
127838
+ selected=0;
127839
+ offset=0;
127840
+ }
127841
+ }
127842
+
127843
+ result.Redraw=true;
127844
+ result.Update=(offset!=this.Data.YOffset);
127845
+
127846
+ chart.MultiSelectedRow=[selected];
127847
+ this.Data.YOffset=offset;
127848
+
127849
+ return result;
127850
+
127851
+ }
127852
+ else if (step<0)
127853
+ {
127854
+ if (selected==0) return result;
127855
+
127856
+ if (selected<0 || selected<pageStatus.Start || selected>pageStatus.End)
127857
+ {
127858
+ chart.MultiSelectedRow=[pageStatus.End];
127859
+ result.Redraw=true;
127860
+ return result;
127861
+ }
127862
+
127863
+ step=Math.abs(step);
127864
+ var offset=this.Data.YOffset;
127865
+ for(var i=0;i<step;++i)
127866
+ {
127867
+ --selected;
127868
+ if (selected<pageStatus.Start) --offset;
127869
+
127870
+ if (selected<0)
127871
+ {
127872
+ selected=this.Data.Data.length-1;
127873
+ offset=this.Data.Data.length-pageSize;
127874
+ if (offset<0) offset=0;
127875
+ }
127876
+ }
127877
+
127878
+ result.Redraw=true;
127879
+ result.Update=(offset!=this.Data.YOffset);
127880
+
127881
+ chart.MultiSelectedRow=[selected];
127882
+ this.Data.YOffset=offset;
127883
+
127884
+ return result;
127885
+ }
127886
+ else
127887
+ {
127888
+ return null;
127889
+ }
127890
+
127891
+ return result;
127892
+ }
127893
+ else
127894
+ {
127895
+ var selected=-1;
127896
+ if (step>0) selected=pageStatus.Start;
127897
+ else if (step<0) selected=pageStatus.End;
127898
+ else return null;
127899
+
127900
+ chart.MultiSelectedRow=[selected];
127901
+ result.Redraw=true;
127902
+ }
127903
+
127904
+ return result;
127905
+ }
127906
+
127754
127907
 
127755
127908
  if (chart.SelectedModel==0) //不可翻页模式, 只能在当前页移动
127756
127909
  {
@@ -128723,6 +128876,13 @@ var REPORT_COLUMN_ID=
128723
128876
 
128724
128877
  TIME_ID:31, //时间 hhmmss / hhmm / hhmmss.fff
128725
128878
  DATE_ID:32, //日期
128879
+
128880
+ CHECKBOX_ID:33, //单选框
128881
+ CHECKBOX2_ID:34,
128882
+ CHECKBOX3_ID:35,
128883
+ CHECKBOX4_ID:36,
128884
+ CHECKBOX5_ID:37,
128885
+ CHECKBOX6_ID:38,
128726
128886
 
128727
128887
 
128728
128888
  SYMBOL_NAME_ID:99,
@@ -128797,6 +128957,10 @@ function ChartReport()
128797
128957
  this.SelectedFixedRow=-1; //选中固定行ID
128798
128958
  this.IsDrawBorder=1; //是否绘制单元格边框
128799
128959
 
128960
+ //多选模式
128961
+ this.MultiSelectModel=0; //0=禁用 1=开启
128962
+ this.MultiSelectedRow=[]; //选中行
128963
+
128800
128964
  this.ShowSymbol=[]; //显示的股票列表 { Index:序号(排序用), Symbol:股票代码 }
128801
128965
  this.DragRow; //拖拽行
128802
128966
 
@@ -128896,6 +129060,8 @@ function ChartReport()
128896
129060
  DistanceWidth:g_JSChartResource.Report.KLine.DistanceWidth
128897
129061
  }
128898
129062
 
129063
+ this.CheckBoxConfig=CloneData(g_JSChartResource.Report.CheckBox);
129064
+
128899
129065
  //股票代码+股票名称
128900
129066
  this.ItemSymbolFontConfig={Size:g_JSChartResource.Report.Item.SymbolFont.Size, Name:g_JSChartResource.Report.Item.SymbolFont.Name};
128901
129067
  this.ItemNameFontConfg={Size:g_JSChartResource.Report.Item.NameFont.Size, Name:g_JSChartResource.Report.Item.NameFont.Name};
@@ -128914,6 +129080,7 @@ function ChartReport()
128914
129080
  this.RowHeight=0; //行高度
128915
129081
  this.BottomToolbarHeight=0; //底部工具条高度
128916
129082
  this.IsShowAllColumn=false; //是否已显示所有列
129083
+ this.DevicePixelRatio=GetDevicePixelRatio(); //分辨率
128917
129084
 
128918
129085
  //{
128919
129086
  // Type:列id, Title:标题, TextAlign:文字对齐方式, MaxText:文字最大宽度 , TextColor:文字颜色, Sort:0=不支持排序 1=本地排序 0=远程排序,
@@ -128934,8 +129101,13 @@ function ChartReport()
128934
129101
  // { Text, Color, Title:, TitleColor, Space, Margin:{ Left, Top, Right, Bottom }}
128935
129102
  this.TooltipRect=[];
128936
129103
 
129104
+ //{ Rect:rtItem, Type: 0=checkedbox, 1=button, 2=link , Stock, Index:index, Column:column }
129105
+ this.ButtonRect=[];
129106
+
128937
129107
  this.ReloadResource=function(resource)
128938
129108
  {
129109
+ this.DevicePixelRatio=GetDevicePixelRatio()
129110
+
128939
129111
  this.UpColor=g_JSChartResource.Report.UpTextColor;
128940
129112
  this.DownColor=g_JSChartResource.Report.DownTextColor;
128941
129113
  this.UnchagneColor=g_JSChartResource.Report.UnchagneTextColor;
@@ -129199,6 +129371,8 @@ function ChartReport()
129199
129371
  { Type:REPORT_COLUMN_ID.TIME_ID, Title:"时间", TextAlign:"left", ValueType:0, TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"99:99:99.999" },
129200
129372
  { Type:REPORT_COLUMN_ID.DATE_ID, Title:"日期", TextAlign:"left", FormatType:0, TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999-99-99" },
129201
129373
 
129374
+ { Type:REPORT_COLUMN_ID.CHECKBOX_ID, Title:"", TextAlign:"center", FixedWidth:20*GetDevicePixelRatio() }
129375
+
129202
129376
 
129203
129377
  ];
129204
129378
 
@@ -129224,7 +129398,9 @@ function ChartReport()
129224
129398
  {
129225
129399
  this.ShowSymbol=[];
129226
129400
  this.TooltipRect=[];
129227
-
129401
+ this.ButtonRect=[];
129402
+ this.DevicePixelRatio=GetDevicePixelRatio()
129403
+
129228
129404
  if (this.GlobalOption) this.GlobalOption.FlashBGCount=0;
129229
129405
 
129230
129406
  if (this.SizeChange) this.CalculateSize();
@@ -129276,7 +129452,14 @@ function ChartReport()
129276
129452
 
129277
129453
  this.GetCurrentPageStatus=function() //{ Start:起始索引, End:结束索引(数据), PageSize:页面可以显示几条记录, IsEnd:是否是最后一页, IsSinglePage:是否只有一页数据}
129278
129454
  {
129279
- var result={ Start:this.Data.YOffset, PageSize:this.RowCount, IsEnd:false, SelectedRow:this.SelectedRow, IsSinglePage:false, DataCount:0 };
129455
+ var result={ Start:this.Data.YOffset, PageSize:this.RowCount, IsEnd:false, SelectedRow:this.SelectedRow, IsSinglePage:false, DataCount:0, MultiSelectModel:this.MultiSelectModel };
129456
+ if (this.MultiSelectModel==1)
129457
+ {
129458
+ result.SelectedRow=-1;
129459
+ result.MultiSelectedRow=this.MultiSelectedRow.slice();
129460
+ result.MultiSelectedRow.sort((left, right)=>{ return left>right; });
129461
+ }
129462
+
129280
129463
  if (IFrameSplitOperator.IsNonEmptyArray(this.Data.Data))
129281
129464
  {
129282
129465
  result.End=this.Data.YOffset+this.RowCount-1;
@@ -129700,19 +129883,31 @@ function ChartReport()
129700
129883
 
129701
129884
  var eventDrawBG=this.GetEventCallback(JSCHART_EVENT_ID.ON_DRAW_REPORT_ROW_BG);
129702
129885
  var selectedSymbol=this.GetSelectedSymbol();
129886
+
129887
+ var setSelected;
129888
+ if (this.MultiSelectModel==1) setSelected=new Set(this.MultiSelectedRow);
129889
+
129703
129890
  for(var i=this.Data.YOffset, j=0; i<this.Data.Data.length && j<this.RowCount ;++i, ++j)
129704
129891
  {
129705
129892
  var symbol=this.Data.Data[i];
129706
129893
 
129707
129894
  var bFillRow=false;
129708
- if (this.SelectedModel==0)
129895
+ if (this.MultiSelectModel==1)
129709
129896
  {
129710
- if (j==this.SelectedRow) bFillRow=true; //选中行
129897
+ if (setSelected.has(i)) bFillRow=true;
129711
129898
  }
129712
129899
  else
129713
129900
  {
129714
- if (i==this.SelectedRow) bFillRow=true; //选中行
129901
+ if (this.SelectedModel==0)
129902
+ {
129903
+ if (j==this.SelectedRow) bFillRow=true; //选中行
129904
+ }
129905
+ else
129906
+ {
129907
+ if (i==this.SelectedRow) bFillRow=true; //选中行
129908
+ }
129715
129909
  }
129910
+
129716
129911
 
129717
129912
  if (this.DragRow)
129718
129913
  {
@@ -129742,7 +129937,7 @@ function ChartReport()
129742
129937
  if (eventDrawBG && eventDrawBG.Callback)
129743
129938
  {
129744
129939
  //Out:{ BGColor: }
129745
- var sendData={ RowIndex:i, Symbol:symbol, Out:null, Selected:selectedSymbol };
129940
+ var sendData={ RowIndex:i, Symbol:symbol, Out:null, Selected:selectedSymbol, MultiSelectModel:this.MultiSelectModel };
129746
129941
  eventDrawBG.Callback(eventDrawBG,sendData,this);
129747
129942
  if (sendData.Out && sendData.Out.BGColor)
129748
129943
  {
@@ -129767,14 +129962,32 @@ function ChartReport()
129767
129962
 
129768
129963
  this.GetSelectedSymbol=function()
129769
129964
  {
129770
- if (this.SelectedRow<0) return null;
129965
+ if (this.MultiSelectModel==1)
129966
+ {
129967
+ if (!IFrameSplitOperator.IsNonEmptyArray(this.MultiSelectedRow)) return null;
129771
129968
 
129772
- var index=this.SelectedRow;
129773
- if (this.SelectedModel==0) //当前屏选中
129774
- index=this.Data.YOffset+this.SelectedRow;
129969
+ var aryData=[];
129970
+ for(var i=0;i<this.MultiSelectedRow.length;++i)
129971
+ {
129972
+ var item=this.Data.Data[this.MultiSelectedRow[i]];
129973
+ if (!item) continue;
129974
+
129975
+ aryData.push(item);
129976
+ }
129775
129977
 
129776
- var symbol=this.Data.Data[index];
129777
- return symbol;
129978
+ return aryData;
129979
+ }
129980
+ else
129981
+ {
129982
+ if (this.SelectedRow<0) return null;
129983
+
129984
+ var index=this.SelectedRow;
129985
+ if (this.SelectedModel==0) //当前屏选中
129986
+ index=this.Data.YOffset+this.SelectedRow;
129987
+
129988
+ var symbol=this.Data.Data[index];
129989
+ return [symbol];
129990
+ }
129778
129991
  }
129779
129992
 
129780
129993
 
@@ -130102,6 +130315,18 @@ function ChartReport()
130102
130315
  {
130103
130316
  this.FormaDateDrawInfo(column, stock, drawInfo, data);
130104
130317
  }
130318
+ else if (column.Type==REPORT_COLUMN_ID.CHECKBOX_ID)
130319
+ {
130320
+ rtItem={ Left:left, Top:top, Width:column.Width, Height:this.RowHeight };
130321
+ rtItem.Right=rtItem.Left+rtItem.Width;
130322
+ rtItem.Bottom=rtItem.Top+rtItem.Height;
130323
+ drawInfo.Rect=rtItem;
130324
+ drawInfo.Checked=false;
130325
+ drawInfo.Font=`${this.CheckBoxConfig.Size*this.DevicePixelRatio}px ${this.CheckBoxConfig.Family}`;
130326
+ if (stock && IFrameSplitOperator.IsBool(stock.Checked))
130327
+ drawInfo.Checked=stock.Checked;
130328
+ }
130329
+
130105
130330
 
130106
130331
  //拖拽行颜色
130107
130332
  if (rowType==3)
@@ -130115,6 +130340,10 @@ function ChartReport()
130115
130340
  {
130116
130341
  this.DrawIconItem(drawInfo, x, top, textWidth);
130117
130342
  }
130343
+ else if (column.Type==REPORT_COLUMN_ID.CHECKBOX_ID)
130344
+ {
130345
+ this.DrawCheckbox(drawInfo, left, top, itemWidth);
130346
+ }
130118
130347
  else
130119
130348
  {
130120
130349
  if (data.FlashBG && data.FlashBG.Data && column.ID!=undefined)
@@ -130145,6 +130374,12 @@ function ChartReport()
130145
130374
  var tooltipData={ Rect:rtItem, Stock:stock, Index:index, Column:column, RowType:rowType, Type:drawInfo.Tooltip.Type, Data:drawInfo.Tooltip.Data };
130146
130375
  this.TooltipRect.push(tooltipData);
130147
130376
  }
130377
+
130378
+ if (drawInfo.Botton)
130379
+ {
130380
+ var buttonData={ Stock:stock, Index:index, Column:column, Rect:drawInfo.Botton.Rect, Type:drawInfo.Botton.Type };
130381
+ this.ButtonRect.push(buttonData);
130382
+ }
130148
130383
  }
130149
130384
 
130150
130385
  this.DrawCustomText=function(drawInfo, column, left, top, cellWidth)
@@ -130662,6 +130897,36 @@ function ChartReport()
130662
130897
  this.Canvas.font=this.ItemFont;
130663
130898
  }
130664
130899
 
130900
+ this.DrawCheckbox=function(drawInfo, left, top, width)
130901
+ {
130902
+ var textAlign=drawInfo.TextAlign;
130903
+ var size=this.CheckBoxConfig.Size*this.DevicePixelRatio;
130904
+ //var boxWidth=size+this.CheckBoxConfig.Margin.Left+this.CheckBoxConfig.Margin.Right;
130905
+ var x=left+this.CheckBoxConfig.Margin.Left;
130906
+ var y=top+this.RowHeight-this.CheckBoxConfig.Margin.Bottom;
130907
+ if (textAlign=='center') x=left+width/2-size/2;
130908
+ else if (textAlign=='right') x=left+width-this.CheckBoxConfig.Margin.Right;
130909
+
130910
+ this.Canvas.font=drawInfo.Font;
130911
+ this.Canvas.textBaseline="bottom";
130912
+ this.Canvas.textAlign="left";
130913
+ if (drawInfo.Checked===true)
130914
+ {
130915
+ this.Canvas.fillStyle=this.CheckBoxConfig.Checked.Color;
130916
+ this.Canvas.fillText(this.CheckBoxConfig.Checked.Symbol,x,y);
130917
+ }
130918
+ else if (drawInfo.Checked===false)
130919
+ {
130920
+ this.Canvas.fillStyle=this.CheckBoxConfig.Unchecked.Color;
130921
+ this.Canvas.fillText(this.CheckBoxConfig.Unchecked.Symbol,x,y);
130922
+ }
130923
+
130924
+ var rtBox={ Left:x, Bottom:y, Width:size, Height:size };
130925
+ rtBox.Right=rtBox.Left+rtBox.Width;
130926
+ rtBox.Top=rtBox.Bottom-rtBox.Height;
130927
+ drawInfo.Botton={ Rect:rtBox, Type:0 };
130928
+ }
130929
+
130665
130930
  //字体由外面设置
130666
130931
  this.TextEllipsis=function(text, maxWidth, maxText)
130667
130932
  {
@@ -131174,6 +131439,7 @@ function ChartReport()
131174
131439
 
131175
131440
  this.SelectedFixedRow=row.Index;
131176
131441
  this.SelectedRow=-1;
131442
+ this.MultiSelectedRow=[];
131177
131443
 
131178
131444
  return { Type:4, Redraw:bRedraw, Row:row }; //行
131179
131445
  }
@@ -131181,18 +131447,45 @@ function ChartReport()
131181
131447
  var row=this.PtInBody(x,y);
131182
131448
  if (row)
131183
131449
  {
131450
+ var btnStatus={ Redraw:false };
131451
+ this.OnClickButton(x, y, e, btnStatus);
131452
+
131184
131453
  var bRedraw=true;
131185
- if (this.SelectedModel==0)
131454
+ if (this.MultiSelectModel==1)
131186
131455
  {
131187
- if (this.SelectedRow==row.Index) bRedraw=false;
131188
- this.SelectedRow=row.Index;
131456
+ if (e && e.ctrlKey) //多选
131457
+ {
131458
+ var pos=this.MultiSelectedRow.indexOf(row.DataIndex);
131459
+ if (pos>=0) this.MultiSelectedRow.splice(pos,1);
131460
+ else this.MultiSelectedRow.push(row.DataIndex);
131461
+
131462
+ }
131463
+ else if (e && e.shiftKey) //批量多选
131464
+ {
131465
+ this.OnShiftClickRow(row);
131466
+ }
131467
+ else
131468
+ {
131469
+ if (this.MultiSelectedRow.length==1 && this.MultiSelectedRow[0]==row.DataIndex) bRedraw=false;
131470
+ else this.MultiSelectedRow=[row.DataIndex];
131471
+ }
131472
+
131189
131473
  this.SelectedFixedRow=-1;
131190
131474
  }
131191
- else
131475
+ else
131192
131476
  {
131193
- if (this.SelectedRow==row.DataIndex) bRedraw=false;
131194
- this.SelectedRow=row.DataIndex;
131195
- this.SelectedFixedRow=-1;
131477
+ if (this.SelectedModel==0)
131478
+ {
131479
+ if (this.SelectedRow==row.Index) bRedraw=false;
131480
+ this.SelectedRow=row.Index;
131481
+ this.SelectedFixedRow=-1;
131482
+ }
131483
+ else
131484
+ {
131485
+ if (this.SelectedRow==row.DataIndex) bRedraw=false;
131486
+ this.SelectedRow=row.DataIndex;
131487
+ this.SelectedFixedRow=-1;
131488
+ }
131196
131489
  }
131197
131490
 
131198
131491
  var eventID=JSCHART_EVENT_ID.ON_CLICK_REPORT_ROW;
@@ -131200,7 +131493,7 @@ function ChartReport()
131200
131493
 
131201
131494
  this.SendClickEvent(eventID, { Data:row, X:x, Y:y, e:e, Inside:insidePoint, UIElement:uiElement });
131202
131495
 
131203
- return { Type:2, Redraw:bRedraw, Row:row }; //行
131496
+ return { Type:2, Redraw:bRedraw || btnStatus.Redraw, Row:row }; //行
131204
131497
  }
131205
131498
 
131206
131499
  var header=this.PtInHeader(x,y);
@@ -131223,6 +131516,62 @@ function ChartReport()
131223
131516
  return null;
131224
131517
  }
131225
131518
 
131519
+ this.OnShiftClickRow=function(row)
131520
+ {
131521
+ if (this.MultiSelectedRow.length<=0)
131522
+ {
131523
+ this.MultiSelectedRow.push(row.DataIndex);
131524
+ return;
131525
+ }
131526
+
131527
+ var max=null, min=null;
131528
+ for(var i=0;i<this.MultiSelectedRow.length;++i)
131529
+ {
131530
+ var value=this.MultiSelectedRow[i];
131531
+ if (max==null || max<value) max=value;
131532
+ if (min==null || min>value) min=value;
131533
+ if (value==row.DataIndex) //移除
131534
+ {
131535
+ this.MultiSelectedRow.splice(i,1);
131536
+ return;
131537
+ }
131538
+ }
131539
+
131540
+ if (max==min)
131541
+ {
131542
+ var start=row.DataIndex, end=max;
131543
+ if (start>end)
131544
+ {
131545
+ start=max;
131546
+ end=row.DataIndex;
131547
+ }
131548
+
131549
+ this.MultiSelectedRow=[];
131550
+ for(var i=start;i<=end;++i)
131551
+ {
131552
+ this.MultiSelectedRow.push(i);
131553
+ }
131554
+ }
131555
+ else
131556
+ {
131557
+ if (row.DataIndex<=max && row.DataIndex>=min)
131558
+ {
131559
+ this.MultiSelectedRow.push(row.DataIndex);
131560
+ }
131561
+ else
131562
+ {
131563
+ var start=Math.min(row.DataIndex, min);
131564
+ var end=Math.max(row.DataIndex, max);
131565
+ this.MultiSelectedRow=[];
131566
+ for(var i=start;i<=end;++i)
131567
+ {
131568
+ this.MultiSelectedRow.push(i);
131569
+ }
131570
+ }
131571
+ }
131572
+
131573
+ }
131574
+
131226
131575
  this.OnDrawgRow=function(x, y, e) //Type: 5=顶部 6=空白行 2=行 7=底部
131227
131576
  {
131228
131577
  if (!this.Data) return null;
@@ -131259,6 +131608,33 @@ function ChartReport()
131259
131608
  return { Type:7 };
131260
131609
  }
131261
131610
 
131611
+ this.OnClickButton=function(x, y, e, status)
131612
+ {
131613
+ if (e.button!=0) return false;
131614
+
131615
+ var buttonData=this.GetButtonData(x,y);
131616
+ if (!buttonData) return true;
131617
+
131618
+ if (buttonData.Type===0)
131619
+ {
131620
+ var sendData={ Column:buttonData.Column, Index:buttonData.Index, Stock:buttonData.Stock, PreventDefault: false };
131621
+ this.SendClickEvent(JSCHART_EVENT_ID.ON_CLICK_REPORT_CHECKBOX, sendData)
131622
+
131623
+ if (!sendData.PreventDefault)
131624
+ {
131625
+ if (IFrameSplitOperator.IsBool(buttonData.Stock.Checked))
131626
+ buttonData.Stock.Checked=!buttonData.Stock.Checked;
131627
+ else
131628
+ buttonData.Stock.Checked=true;
131629
+ }
131630
+
131631
+ status.Redraw=true;
131632
+ return true;
131633
+ }
131634
+
131635
+ return false;
131636
+ }
131637
+
131262
131638
  this.OnDblClick=function(x,y,e)
131263
131639
  {
131264
131640
  if (!this.Data) return false;
@@ -131496,6 +131872,24 @@ function ChartReport()
131496
131872
  return null;
131497
131873
  }
131498
131874
 
131875
+ this.GetButtonData=function(x,y)
131876
+ {
131877
+ if (!IFrameSplitOperator.IsNonEmptyArray(this.ButtonRect)) return null;
131878
+
131879
+ for(var i=0;i<this.ButtonRect.length;++i)
131880
+ {
131881
+ var item=this.ButtonRect[i];
131882
+
131883
+ var rt=item.Rect;
131884
+ if (!rt) continue;
131885
+
131886
+ if (x>=rt.Left && x<=rt.Right && y>=rt.Top && y<=rt.Bottom)
131887
+ {
131888
+ return { Rect:item.Rect, Stock:item.Stock, Column:item.Column, Index:item.Index, Type:item.Type };
131889
+ }
131890
+ }
131891
+ }
131892
+
131499
131893
  this.PtInHeaderDragBorder=function(x, y)
131500
131894
  {
131501
131895
  if (!this.IsShowHeader) return null;
@@ -135326,7 +135720,7 @@ function ScrollBarBGChart()
135326
135720
 
135327
135721
 
135328
135722
 
135329
- var HQCHART_VERSION="1.1.13549";
135723
+ var HQCHART_VERSION="1.1.13554";
135330
135724
 
135331
135725
  function PrintHQChartVersion()
135332
135726
  {
@@ -5,7 +5,7 @@
5
5
 
6
6
 
7
7
 
8
- var HQCHART_VERSION="1.1.13549";
8
+ var HQCHART_VERSION="1.1.13554";
9
9
 
10
10
  function PrintHQChartVersion()
11
11
  {