hqchart 1.1.13577 → 1.1.13584

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.
@@ -6570,6 +6570,7 @@ var JSCHART_EVENT_ID=
6570
6570
  ON_DRAW_REPORT_ROW_BG:140, //报价列表整行背景
6571
6571
  ON_CLICK_REPORT_CHECKBOX:141, //报价列表checkbox
6572
6572
  ON_CLICK_REPORT_BUTTON:142, //报价列表按钮
6573
+ ON_CLICK_REPORT_LINK:143, //报价列表 链接
6573
6574
 
6574
6575
 
6575
6576
  ON_CHANGE_INDEX:150, //切换指标
@@ -71408,10 +71409,46 @@ function JSChartResource()
71408
71409
  CheckBox:
71409
71410
  {
71410
71411
  Family:"iconfont", Size:15,
71411
- Checked:{ Color:"rgb(33,148,240)", Symbol:"\ue6b3", DisableColor:"rgb(112,128,144)" },
71412
- Unchecked:{ Color:"rgb(33,148,240)", Symbol:"\ue6b4", DisableColor:"rgb(112,128,144)" },
71412
+ Checked:{ Color:"rgb(69,147,238)", Symbol:"\ue6b3", DisableColor:"rgb(230,230,230)", MouseOnColor:"rgb(69,147,238)" },
71413
+ Unchecked:{ Color:"rgb(120,120,120)", Symbol:"\ue6b4", DisableColor:"rgb(230,230,230)", MouseOnColor:"rgb(69,147,238)" },
71413
71414
 
71414
71415
  Margin:{ Left:5, Right:5, Bottom:2, Top:4 },
71416
+ },
71417
+
71418
+ Link:
71419
+ {
71420
+ Font:`${12*GetDevicePixelRatio()}px 微软雅黑`,
71421
+ TextColor:"rgb(30,144,255)",
71422
+
71423
+ Disable:{ TextColor:"rgb(211,211,211)" },
71424
+ MouseOn:{ TextColor:"rgb(30,144,255)" },
71425
+ },
71426
+
71427
+ ProgressBar:
71428
+ {
71429
+ BGColor:"rgb(229,231,238)",
71430
+ BarColor:"rgb(26,125,255)",
71431
+ Margin:{ Left:2, Right:2, Bottom:2, Top:2 },
71432
+ BarMargin:{ Left:2, Right:2, Bottom:2, Top:2 },
71433
+ TextColor:"rgb(0,0,0)",
71434
+ Font:`${12*GetDevicePixelRatio()}px 微软雅黑`,
71435
+ TextMargin:{ Left:40, Right:2, Bottom:2, Top:2},
71436
+ Disable:{ BGColor:"rgb(229,231,238)", BarColor:"rgb(131,131,131)", TextColor:"rgb(159,161,159)"}
71437
+ },
71438
+
71439
+ Button:
71440
+ {
71441
+ BGColor:"rgb(61,134,180)",
71442
+ TextColor:"rgb(255,255,255)",
71443
+ BorderColor:"rgb(200,200,200)",
71444
+
71445
+ Disable:{ BGColor:"rgb(105,105,105)", TextColor:"rgb(169,169,169)"},
71446
+ MouseOn:{ BGColor:"rgb(57,125,169)", TextColor:"rgb(230,230,230)" },
71447
+
71448
+ Margin:{ Left:5, Right:5, Bottom:2, Top:2 },
71449
+ TextMargin:{ Bottom:2 },
71450
+
71451
+ Font:`${12*GetDevicePixelRatio()}px 微软雅黑`
71415
71452
  }
71416
71453
  },
71417
71454
 
@@ -72454,6 +72491,58 @@ function JSChartResource()
72454
72491
 
72455
72492
  CopyMarginConfig(dest.CheckBox.Margin, subItem.Margin);
72456
72493
  }
72494
+
72495
+ if (item.Link)
72496
+ {
72497
+ var subItem=item.Link;
72498
+ if (subItem.Font) dest.Link.Font=subItem.Font;
72499
+ if (subItem.TextColor) dest.Link.TextColor=subItem.TextColor;
72500
+ if (subItem.Disable && subItem.Disable.TextColor) dest.Link.Disable.TextColor=subItem.Disable.TextColor;
72501
+ if (subItem.MouseOn && subItem.MouseOn.TextColor) dest.Link.MouseOn.TextColor=subItem.MouseOn.TextColor;
72502
+ }
72503
+
72504
+ if (item.ProgressBar)
72505
+ {
72506
+ var subItem=item.ProgressBar;
72507
+ if (subItem.BGColor) dest.ProgressBar.BGColor=subItem.BGColor;
72508
+ if (subItem.BarColor) dest.ProgressBar.BarColor=subItem.BarColor;
72509
+ if (subItem.TextColor) dest.ProgressBar.TextColor=subItem.TextColor;
72510
+ if (subItem.Font) dest.ProgressBar.Font=subItem.Font;
72511
+ if (subItem.Disable)
72512
+ {
72513
+ if (subItem.Disable.BGColor) dest.ProgressBar.Disable.BGColor=subItem.Disable.BGColor;
72514
+ if (subItem.Disable.BarColor) dest.ProgressBar.Disable.BarColor=subItem.Disable.BarColor;
72515
+ if (subItem.Disable.TextColor) dest.ProgressBar.Disable.TextColor=subItem.Disable.TextColor;
72516
+ }
72517
+
72518
+ CopyMarginConfig(dest.ProgressBar.Margin, subItem.Margin);
72519
+ CopyMarginConfig(dest.ProgressBar.BarMargin, subItem.BarMargin);
72520
+ CopyMarginConfig(dest.ProgressBar.TextMargin, subItem.TextMargin);
72521
+ }
72522
+
72523
+ if (item.Buttom)
72524
+ {
72525
+ var subItem=item.Buttom;
72526
+ if (subItem.BGColor) dest.Buttom.BGColor=subItem.BGColor;
72527
+ if (subItem.TextColor) dest.Buttom.TextColor=subItem.TextColor;
72528
+ if (subItem.BorderColor) dest.Buttom.BorderColor=subItem.BorderColor;
72529
+ if (subItem.Font) dest.Buttom.Font=subItem.Font;
72530
+
72531
+ if (subItem.Disable)
72532
+ {
72533
+ if (subItem.Disable.BGColor) dest.Buttom.Disable.BGColor=subItem.Disable.BGColor;
72534
+ if (subItem.Disable.TextColor) dest.Buttom.Disable.TextColor=subItem.Disable.TextColor;
72535
+ }
72536
+
72537
+ if (subItem.MouseOn)
72538
+ {
72539
+ if (subItem.MouseOn.BGColor) dest.Buttom.MouseOn.BGColor=subItem.MouseOn.BGColor;
72540
+ if (subItem.MouseOn.TextColor) dest.Buttom.MouseOn.TextColor=subItem.MouseOn.TextColor;
72541
+ }
72542
+
72543
+ CopyMarginConfig(dest.Buttom.Margin, subItem.Margin);
72544
+ CopyMarginConfig(dest.Buttom.TextMargin, subItem.TextMargin);
72545
+ }
72457
72546
 
72458
72547
  }
72459
72548
 
@@ -123874,8 +123963,29 @@ function GetBlackStyle()
123874
123963
  CheckBox:
123875
123964
  {
123876
123965
  Family:"iconfont", Size:15,
123877
- Checked:{ Color:"rgb(237,60,31)", Symbol:"\ue6b3", DisableColor:"rgb(112,128,144)" },
123878
- Unchecked:{ Color:"rgb(237,60,31)", Symbol:"\ue6b4", DisableColor:"rgb(112,128,144)" },
123966
+ Checked:{ Color:"rgb(69,147,238)", Symbol:"\ue6b3", DisableColor:"rgb(120,120,120)", MouseOnColor:"rgb(69,147,238)" },
123967
+ Unchecked:{ Color:"rgb(210,210,210)", Symbol:"\ue6b4", DisableColor:"rgb(120,120,120)", MouseOnColor:"rgb(69,147,238)" },
123968
+ },
123969
+
123970
+ Link:
123971
+ {
123972
+ Font:`${12*GetDevicePixelRatio()}px 微软雅黑`,
123973
+ TextColor:"rgb(0,144,255)",
123974
+
123975
+ Disable:{ TextColor:"rgb(211,211,211)" },
123976
+ MouseOn:{ TextColor:"rgb(0,144,255)" },
123977
+ },
123978
+
123979
+ ProgressBar:
123980
+ {
123981
+ BGColor:"rgb(20,24,28)",
123982
+ BarColor:"rgb(47,124,197)",
123983
+ Margin:{ Left:2, Right:2, Bottom:2, Top:2 },
123984
+ BarMargin:{ Left:2, Right:2, Bottom:2, Top:2 },
123985
+ TextColor:"rgb(230,230,230)",
123986
+ Font:`${12*GetDevicePixelRatio()}px 微软雅黑`,
123987
+ TextMargin:{ Left:40, Right:2, Bottom:2, Top:2},
123988
+ Disable:{ BGColor:"rgb(61,61,61)", BarColor:"rgb(131,131,131)", TextColor:"rgb(159,161,159)"}
123879
123989
  }
123880
123990
  },
123881
123991
 
@@ -125916,7 +126026,8 @@ function JSReportChartContainer(uielement)
125916
126026
  this.JSPopMenu; //内置菜单
125917
126027
  this.IsShowRightMenu=true;
125918
126028
 
125919
- this.LastMouseStatus={ MoveStatus:null, TooltipStatus:null };
126029
+ //MouseOnStatus:{ RowIndex:行, ColumnIndex:列}
126030
+ this.LastMouseStatus={ MoveStatus:null, TooltipStatus:null, MouseOnStatus:null };
125920
126031
 
125921
126032
  this.ChartDestory=function() //销毁
125922
126033
  {
@@ -126155,6 +126266,7 @@ function JSReportChartContainer(uielement)
126155
126266
  this.Canvas.clearRect(0,0,this.UIElement.width,this.UIElement.height);
126156
126267
  var pixelTatio = GetDevicePixelRatio(); //获取设备的分辨率
126157
126268
  this.Canvas.lineWidth=pixelTatio; //手机端需要根据分辨率比调整线段宽度
126269
+ this.LastMouseStatus.MouseOnStatus=null;
126158
126270
 
126159
126271
  if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash)
126160
126272
  {
@@ -126171,14 +126283,14 @@ function JSReportChartContainer(uielement)
126171
126283
  {
126172
126284
  var item=this.ChartPaint[i];
126173
126285
  if (item.IsDrawFirst)
126174
- item.Draw();
126286
+ item.Draw(this.LastMouseStatus);
126175
126287
  }
126176
126288
 
126177
126289
  for(var i=0; i<this.ChartPaint.length; ++i)
126178
126290
  {
126179
126291
  var item=this.ChartPaint[i];
126180
126292
  if (!item.IsDrawFirst)
126181
- item.Draw();
126293
+ item.Draw(this.LastMouseStatus);
126182
126294
  }
126183
126295
 
126184
126296
  if (this.GlobalOption.FlashBGCount>0)
@@ -127209,6 +127321,7 @@ function JSReportChartContainer(uielement)
127209
127321
  var x = (e.clientX-this.UIElement.getBoundingClientRect().left)*pixelTatio;
127210
127322
  var y = (e.clientY-this.UIElement.getBoundingClientRect().top)*pixelTatio;
127211
127323
 
127324
+ var oldMouseOnStatus=this.LastMouseStatus.MouseOnStatus;
127212
127325
  this.LastMouseStatus.OnMouseMove=null;
127213
127326
 
127214
127327
  var bDrawTooltip=false;
@@ -127220,6 +127333,7 @@ function JSReportChartContainer(uielement)
127220
127333
  if (this.DragColumnWidth) return;
127221
127334
 
127222
127335
  var tabChart=this.GetTabChart();
127336
+ var bDrawTab=false;
127223
127337
  if (tabChart)
127224
127338
  {
127225
127339
  var tabData=tabChart.PtInTab(x,y);
@@ -127229,9 +127343,18 @@ function JSReportChartContainer(uielement)
127229
127343
  if (tabChart.MoveOnTabIndex!=index)
127230
127344
  {
127231
127345
  tabChart.MoveOnTabIndex=index;
127232
- this.Draw();
127346
+ bDrawTab=true;
127233
127347
  }
127234
127348
  }
127349
+ else
127350
+ {
127351
+ if (tabChart.MoveOnTabIndex>=0)
127352
+ {
127353
+ tabChart.MoveOnTabIndex=-1;
127354
+ bDrawTab=true;
127355
+ }
127356
+
127357
+ }
127235
127358
  }
127236
127359
 
127237
127360
  this.LastMouseStatus.OnMouseMove={ X:x, Y:y };
@@ -127249,12 +127372,28 @@ function JSReportChartContainer(uielement)
127249
127372
  }
127250
127373
  else
127251
127374
  {
127252
- var bottonData=report.GetButtonData(x,y)
127253
- if (bottonData)
127375
+ var buttonData=report.GetButtonData(x,y);
127376
+ var mouseOnStatus=null;
127377
+ if (buttonData)
127254
127378
  {
127255
127379
  mouseStatus={ Cursor:"pointer", Name:"Botton"};
127380
+ if (buttonData.Type==1 || buttonData.Type==0 || buttonData.Type==2)
127381
+ {
127382
+ mouseOnStatus={ Index:buttonData.Index, ColumnIndex:buttonData.ColumnIndex };
127383
+ }
127256
127384
  }
127257
127385
 
127386
+ //console.log("[UIOnMouseMove] ", oldMouseOnStatus, mouseOnStatus)
127387
+ if ((!oldMouseOnStatus && mouseOnStatus) || (oldMouseOnStatus && !mouseOnStatus))
127388
+ {
127389
+ bDraw=true;
127390
+ }
127391
+ else if (oldMouseOnStatus && mouseOnStatus)
127392
+ {
127393
+ if (oldMouseOnStatus.Index!=mouseOnStatus.Index || oldMouseOnStatus.ColumnIndex!=mouseOnStatus.ColumnIndex)
127394
+ bDraw=true;
127395
+ }
127396
+
127258
127397
  var tooltipData=report.GetTooltipData(x,y); //单元格提示信息
127259
127398
  if (tooltipData)
127260
127399
  {
@@ -127288,7 +127427,7 @@ function JSReportChartContainer(uielement)
127288
127427
 
127289
127428
  if (mouseStatus) this.UIElement.style.cursor=mouseStatus.Cursor;
127290
127429
 
127291
- if (bDraw) this.Draw();
127430
+ if (bDraw || bDrawTab) this.Draw();
127292
127431
  else if (bDrawTooltip) this.DrawTooltip(this.LastMouseStatus.TooltipStatus);
127293
127432
  }
127294
127433
 
@@ -129138,6 +129277,7 @@ var REPORT_COLUMN_ID=
129138
129277
  CUSTOM_CHECKBOX_ID:104, //自定义checkbox
129139
129278
  CUSTOM_BUTTON_ID:105, //自定义按钮
129140
129279
  CUSTOM_PROGRESS_ID:106, //进度条
129280
+ CUSTOM_LINK_ID:107, //链接
129141
129281
  }
129142
129282
 
129143
129283
  var MAP_COLUMN_FIELD=new Map([
@@ -129308,6 +129448,9 @@ function ChartReport()
129308
129448
  }
129309
129449
 
129310
129450
  this.CheckBoxConfig=CloneData(g_JSChartResource.Report.CheckBox);
129451
+ this.LinkConfig=CloneData(g_JSChartResource.Report.Link);
129452
+ this.ProgressBarConfig=CloneData(g_JSChartResource.Report.ProgressBar);
129453
+ this.ButtonConfig=CloneData(g_JSChartResource.Report.Button);
129311
129454
 
129312
129455
  //股票代码+股票名称
129313
129456
  this.ItemSymbolFontConfig={Size:g_JSChartResource.Report.Item.SymbolFont.Size, Name:g_JSChartResource.Report.Item.SymbolFont.Name};
@@ -129351,6 +129494,8 @@ function ChartReport()
129351
129494
  //{ Rect:rtItem, Type: 0=checkedbox, 1=button, 2=link , Stock, Index:index, Column:column }
129352
129495
  this.ButtonRect=[];
129353
129496
 
129497
+ this.LastMouseStatus;
129498
+
129354
129499
  this.ReloadResource=function(resource)
129355
129500
  {
129356
129501
  this.DevicePixelRatio=GetDevicePixelRatio()
@@ -129441,6 +129586,10 @@ function ChartReport()
129441
129586
 
129442
129587
  if (this.Tab) this.Tab.ReloadResource(resource);
129443
129588
  if (this.VScrollbar) this.VScrollbar.ReloadResource(resource);
129589
+
129590
+ this.CheckBoxConfig=CloneData(g_JSChartResource.Report.CheckBox);
129591
+ this.LinkConfig=CloneData(g_JSChartResource.Report.Link);
129592
+ this.ProgressBarConfig=CloneData(g_JSChartResource.Report.ProgressBar);
129444
129593
  }
129445
129594
 
129446
129595
  this.SetColumn=function(aryColumn)
@@ -129512,7 +129661,7 @@ function ChartReport()
129512
129661
  if (IFrameSplitOperator.IsNumber(item.DataIndex)) colItem.DataIndex=item.DataIndex; //数据在扩展数据索引列
129513
129662
  if (IFrameSplitOperator.IsNumber(item.BlockIndex)) colItem.BlockIndex=item.BlockIndex;
129514
129663
  if (item.CheckBox) colItem.CheckBox=CloneData(item.CheckBox);
129515
- else colItem.CheckBox=CloneData(g_JSChartResource.Report.CheckBox);
129664
+ else colItem.CheckBox=this.CheckBoxConfig;
129516
129665
  }
129517
129666
  else if (item.Type==REPORT_COLUMN_ID.CUSTOM_BUTTON_ID)
129518
129667
  {
@@ -129520,6 +129669,7 @@ function ChartReport()
129520
129669
  if (IFrameSplitOperator.IsNumber(item.DataIndex)) colItem.DataIndex=item.DataIndex; //数据在扩展数据索引列
129521
129670
  if (IFrameSplitOperator.IsNumber(item.BlockIndex)) colItem.BlockIndex=item.BlockIndex;
129522
129671
  if (item.Button) colItem.Button=CloneData(item.Button);
129672
+ else colItem.Button=this.ButtonConfig;
129523
129673
  }
129524
129674
  else if (item.Type==REPORT_COLUMN_ID.CUSTOM_PROGRESS_ID)
129525
129675
  {
@@ -129527,6 +129677,15 @@ function ChartReport()
129527
129677
  if (IFrameSplitOperator.IsNumber(item.DataIndex)) colItem.DataIndex=item.DataIndex; //数据在扩展数据索引列
129528
129678
  if (IFrameSplitOperator.IsNumber(item.BlockIndex)) colItem.BlockIndex=item.BlockIndex;
129529
129679
  if (item.ProgressBar) colItem.ProgressBar=CloneData(item.ProgressBar);
129680
+ else colItem.ProgressBar=this.ProgressBarConfig;
129681
+ }
129682
+ else if (item.Type==REPORT_COLUMN_ID.CUSTOM_LINK_ID)
129683
+ {
129684
+ if (!IFrameSplitOperator.IsNumber(item.DataIndex) && !IFrameSplitOperator.IsNumber(item.BlockIndex)) continue;
129685
+ if (IFrameSplitOperator.IsNumber(item.DataIndex)) colItem.DataIndex=item.DataIndex; //数据在扩展数据索引列
129686
+ if (IFrameSplitOperator.IsNumber(item.BlockIndex)) colItem.BlockIndex=item.BlockIndex;
129687
+ if (item.Link) colItem.Link=CloneData(item.Link);
129688
+ else colItem.Link=this.LinkConfig;
129530
129689
  }
129531
129690
  else if (item.Type==REPORT_COLUMN_ID.CUSTOM_ICON_ID)
129532
129691
  {
@@ -129646,7 +129805,8 @@ function ChartReport()
129646
129805
  { Type:REPORT_COLUMN_ID.CUSTOM_CHECKBOX_ID, Title:"", TextAlign:"center", FixedWidth:20*GetDevicePixelRatio() },
129647
129806
 
129648
129807
  { Type:REPORT_COLUMN_ID.CUSTOM_BUTTON_ID, Title:"", TextAlign:"center", FixedWidth:50*GetDevicePixelRatio() },
129649
- { Type:REPORT_COLUMN_ID.CUSTOM_PROGRESS_ID, Title:"进度条", TextAlign:"center", FixedWidth:100*GetDevicePixelRatio() }
129808
+ { Type:REPORT_COLUMN_ID.CUSTOM_PROGRESS_ID, Title:"进度条", TextAlign:"center", FixedWidth:100*GetDevicePixelRatio() },
129809
+ { Type:REPORT_COLUMN_ID.CUSTOM_LINK_ID, Title:"链接地址", TextAlign:"center", MaxText:"擎擎擎擎擎" }
129650
129810
  ];
129651
129811
 
129652
129812
  for(var i=0;i<DEFAULT_COLUMN.length;++i)
@@ -129667,12 +129827,13 @@ function ChartReport()
129667
129827
  this.Canvas.clip();
129668
129828
  }
129669
129829
 
129670
- this.Draw=function()
129830
+ this.Draw=function(lastMouseStatus)
129671
129831
  {
129672
129832
  this.ShowSymbol=[];
129673
129833
  this.TooltipRect=[];
129674
129834
  this.ButtonRect=[];
129675
129835
  this.DevicePixelRatio=GetDevicePixelRatio()
129836
+ this.LastMouseStatus=lastMouseStatus;
129676
129837
 
129677
129838
  if (this.GlobalOption) this.GlobalOption.FlashBGCount=0;
129678
129839
 
@@ -129704,6 +129865,7 @@ function ChartReport()
129704
129865
  this.VScrollbar.DrawScrollbar(this.RectClient.Left,this.RectClient.Top+this.HeaderHeight, this.RectClient.Right, bottom-this.BottomToolbarHeight-4);
129705
129866
  }
129706
129867
 
129868
+ this.LastMouseStatus=null;
129707
129869
  this.SizeChange=false;
129708
129870
  }
129709
129871
 
@@ -130343,7 +130505,7 @@ function ChartReport()
130343
130505
  for(var i=0;i<this.FixedColumn && i<this.Column.length;++i)
130344
130506
  {
130345
130507
  var item=this.Column[i];
130346
- this.DrawItem(dataIndex, data, item, left, top, rowType);
130508
+ this.DrawItem(dataIndex, data, item, left, top, rowType, i);
130347
130509
  left+=item.Width;
130348
130510
 
130349
130511
  if (left>=chartRight) break;
@@ -130352,20 +130514,24 @@ function ChartReport()
130352
130514
  for(var i=this.FixedColumn+this.Data.XOffset;i<this.Column.length;++i)
130353
130515
  {
130354
130516
  var item=this.Column[i];
130355
- this.DrawItem(dataIndex, data, item, left, top, rowType);
130517
+ this.DrawItem(dataIndex, data, item, left, top, rowType, i);
130356
130518
  left+=item.Width;
130357
130519
 
130358
130520
  if (left>=chartRight) break;
130359
130521
  }
130360
130522
  }
130361
130523
 
130362
- this.DrawItem=function(index, data, column, left, top, rowType)
130524
+ this.DrawItem=function(index, data, column, left, top, rowType, columnIndex)
130363
130525
  {
130364
130526
  var itemWidth=column.Width;
130365
130527
  var x=left+this.ItemMergin.Left;
130366
130528
  var textWidth=column.Width-this.ItemMergin.Left-this.ItemMergin.Right;
130367
130529
  var stock=data.Stock;
130368
- var drawInfo={ Text:null, TextColor:column.TextColor , TextAlign:column.TextAlign, Tooltip:null };
130530
+ var drawInfo=
130531
+ {
130532
+ Text:null, TextColor:column.TextColor , TextAlign:column.TextAlign, Tooltip:null,
130533
+ Index:index, ColumnIndex:columnIndex
130534
+ };
130369
130535
  var rtItem={ Left:left, Top:top, Width:column.Width, Height:this.RowHeight };
130370
130536
  rtItem.Right=rtItem.Left+rtItem.Width;
130371
130537
  rtItem.Bottom=rtItem.Top+rtItem.Height;
@@ -130628,6 +130794,10 @@ function ChartReport()
130628
130794
 
130629
130795
  this.GetCustomProgressBarDrawInfo(data, column, drawInfo);
130630
130796
  }
130797
+ else if (column.Type==REPORT_COLUMN_ID.CUSTOM_LINK_ID)
130798
+ {
130799
+ this.GetCustomLinkDrawInfo(data, column, drawInfo);
130800
+ }
130631
130801
 
130632
130802
 
130633
130803
  //拖拽行颜色
@@ -130654,6 +130824,10 @@ function ChartReport()
130654
130824
  {
130655
130825
  this.DrawProgressBar(drawInfo, left, top, itemWidth);
130656
130826
  }
130827
+ else if (column.Type==REPORT_COLUMN_ID.CUSTOM_LINK_ID)
130828
+ {
130829
+ this.DrawLinkText(drawInfo, x, top, textWidth);
130830
+ }
130657
130831
  else
130658
130832
  {
130659
130833
  if (data.FlashBG && data.FlashBG.Data && column.ID!=undefined)
@@ -130687,7 +130861,7 @@ function ChartReport()
130687
130861
 
130688
130862
  if (drawInfo.Botton)
130689
130863
  {
130690
- var buttonData={ Stock:stock, Index:index, Column:column, Rect:drawInfo.Botton.Rect, Type:drawInfo.Botton.Type, Data:drawInfo.Data };
130864
+ var buttonData={ Stock:stock, Index:index, ColumnIndex:columnIndex, Column:column, Rect:drawInfo.Botton.Rect, Type:drawInfo.Botton.Type, Data:drawInfo.Data };
130691
130865
  this.ButtonRect.push(buttonData);
130692
130866
  }
130693
130867
  }
@@ -130985,6 +131159,20 @@ function ChartReport()
130985
131159
  if (barData.BGColor) drawInfo.BGColor=barData.BGColor;
130986
131160
  }
130987
131161
 
131162
+ this.GetCustomLinkDrawInfo=function(data, column, drawInfo)
131163
+ {
131164
+ var linkData=this.GetExtendData(data, column);
131165
+ if (!linkData) return;
131166
+
131167
+ drawInfo.Text=linkData.Title;
131168
+ drawInfo.Link=column.Link;
131169
+ drawInfo.Enable=true;
131170
+ drawInfo.Data=linkData;
131171
+ drawInfo.MaxText=column.MaxText;
131172
+ if (IFrameSplitOperator.IsBool(linkData.Enable)) drawInfo.Enable=linkData.Enable;
131173
+ if (linkData.TextColor) drawInfo.TextColor=linkData.TextColor;
131174
+ }
131175
+
130988
131176
  this.FormaTimeDrawInfo=function(column, stock, drawInfo, data)
130989
131177
  {
130990
131178
  if (!IFrameSplitOperator.IsNumber(stock.Time)) return;
@@ -131254,35 +131442,57 @@ function ChartReport()
131254
131442
  if (!IFrameSplitOperator.IsBool(drawInfo.Checked)) return;
131255
131443
  if (!drawInfo.CheckBox) return;
131256
131444
 
131257
- drawInfo.Font=`${drawInfo.CheckBox.Size*this.DevicePixelRatio}px ${drawInfo.CheckBox.Family}`;
131445
+ var config=drawInfo.CheckBox;
131446
+ drawInfo.Font=`${config.Size*this.DevicePixelRatio}px ${config.Family}`;
131258
131447
  var textAlign=drawInfo.TextAlign;
131259
131448
  var size=drawInfo.CheckBox.Size*this.DevicePixelRatio;
131260
131449
  var x=left+drawInfo.CheckBox.Margin.Left;
131261
131450
  var y=top+this.RowHeight-drawInfo.CheckBox.Margin.Bottom;
131451
+
131262
131452
  if (textAlign=='center') x=left+width/2-size/2;
131263
- else if (textAlign=='right') x=left+width-drawInfo.CheckBox.Margin.Right;
131453
+ else if (textAlign=='right') x=left+width-config.Margin.Right;
131454
+
131455
+ var rtBox={ Left:x, Bottom:y, Width:size, Height:size };
131456
+ rtBox.Right=rtBox.Left+rtBox.Width;
131457
+ rtBox.Top=rtBox.Bottom-rtBox.Height;
131458
+
131459
+ //鼠标在上面
131460
+ var bMouseOn=false;
131461
+ if (drawInfo.Enable && this.LastMouseStatus && this.LastMouseStatus.OnMouseMove)
131462
+ {
131463
+ var xMouse=this.LastMouseStatus.OnMouseMove.X;
131464
+ var yMouse=this.LastMouseStatus.OnMouseMove.Y;
131465
+ if (xMouse>rtBox.Left && xMouse<rtBox.Right && yMouse>rtBox.Top && yMouse<rtBox.Bottom)
131466
+ {
131467
+ bMouseOn=true;
131468
+ this.LastMouseStatus.MouseOnStatus={ Index:drawInfo.Index, ColumnIndex:drawInfo.ColumnIndex, Type:0 };
131469
+ }
131470
+ }
131264
131471
 
131265
131472
  this.Canvas.font=drawInfo.Font;
131266
131473
  this.Canvas.textBaseline="bottom";
131267
131474
  this.Canvas.textAlign="left";
131268
131475
  if (drawInfo.Checked===true)
131269
131476
  {
131270
- if (drawInfo.Enable===false) this.Canvas.fillStyle=drawInfo.CheckBox.Checked.DisableColor;
131271
- else this.Canvas.fillStyle=drawInfo.CheckBox.Checked.Color;
131272
- this.Canvas.fillText(drawInfo.CheckBox.Checked.Symbol,x,y);
131477
+ var textColor=config.Checked.Color;
131478
+ if (drawInfo.Enable===false) textColor=config.Checked.DisableColor;
131479
+ else if (bMouseOn) textColor=config.Checked.MouseOnColor;
131480
+
131481
+ this.Canvas.fillStyle=textColor;
131482
+ this.Canvas.fillText(config.Checked.Symbol,x,y);
131273
131483
  }
131274
131484
  else if (drawInfo.Checked===false)
131275
131485
  {
131276
- if (drawInfo.Enable===false) this.Canvas.fillStyle=drawInfo.CheckBox.Unchecked.DisableColor;
131277
- else this.Canvas.fillStyle=drawInfo.CheckBox.Unchecked.Color;
131278
- this.Canvas.fillText(drawInfo.CheckBox.Unchecked.Symbol,x,y);
131486
+ var textColor=config.Unchecked.Color;
131487
+ if (drawInfo.Enable===false) textColor=config.Unchecked.DisableColor;
131488
+ else if (bMouseOn) textColor=config.Unchecked.MouseOnColor;
131489
+
131490
+ this.Canvas.fillStyle=textColor;
131491
+ this.Canvas.fillText(config.Unchecked.Symbol,x,y);
131279
131492
  }
131280
131493
 
131281
131494
  if (drawInfo.Enable)
131282
131495
  {
131283
- var rtBox={ Left:x, Bottom:y, Width:size, Height:size };
131284
- rtBox.Right=rtBox.Left+rtBox.Width;
131285
- rtBox.Top=rtBox.Bottom-rtBox.Height;
131286
131496
  drawInfo.Botton={ Rect:rtBox, Type:0 };
131287
131497
  }
131288
131498
  }
@@ -131291,6 +131501,7 @@ function ChartReport()
131291
131501
  {
131292
131502
  if (!drawInfo.Button) return;
131293
131503
 
131504
+ var config=drawInfo.Button;
131294
131505
  var rtBG=
131295
131506
  {
131296
131507
  Left:left+drawInfo.Button.Margin.Left, Top:top+drawInfo.Button.Margin.Top,
@@ -131300,11 +131511,26 @@ function ChartReport()
131300
131511
  rtBG.Right=rtBG.Left+rtBG.Width;
131301
131512
  rtBG.Bottom=rtBG.Top+rtBG.Height;
131302
131513
 
131303
- var bgColor=drawInfo.Button.BGColor, textColor=drawInfo.Button.TextColor;
131514
+ var bgColor=config.BGColor, textColor=config.TextColor;
131304
131515
  if (drawInfo.Enable===false)
131305
131516
  {
131306
- bgColor=drawInfo.Button.Disable.BGColor;
131307
- textColor=drawInfo.Button.Disable.TextColor;
131517
+ bgColor=config.Disable.BGColor;
131518
+ textColor=config.Disable.TextColor;
131519
+ }
131520
+ else
131521
+ {
131522
+ if (this.LastMouseStatus && this.LastMouseStatus.OnMouseMove && config.MouseOn)
131523
+ {
131524
+ var x=this.LastMouseStatus.OnMouseMove.X;
131525
+ var y=this.LastMouseStatus.OnMouseMove.Y;
131526
+ if (x>rtBG.Left && x<rtBG.Right && y>rtBG.Top && y<rtBG.Bottom)
131527
+ {
131528
+ bgColor=config.MouseOn.BGColor;
131529
+ textColor=config.MouseOn.TextColor;
131530
+
131531
+ this.LastMouseStatus.MouseOnStatus={ Index:drawInfo.Index, ColumnIndex:drawInfo.ColumnIndex, Type:1 };
131532
+ }
131533
+ }
131308
131534
  }
131309
131535
 
131310
131536
  this.Canvas.fillStyle=bgColor;
@@ -131388,6 +131614,81 @@ function ChartReport()
131388
131614
  }
131389
131615
  }
131390
131616
 
131617
+ this.DrawLinkText=function(drawInfo, left, top, width)
131618
+ {
131619
+ if (!drawInfo.Link || !drawInfo.Text) return;
131620
+
131621
+ var config=drawInfo.Link;
131622
+ var text=drawInfo.Text;
131623
+ var textAlign=drawInfo.TextAlign;
131624
+ var font=config.Font;
131625
+ var color=config.TextColor;
131626
+
131627
+
131628
+
131629
+ this.Canvas.font=font;
131630
+ var textWidth=this.Canvas.measureText(text).width;
131631
+ var textHeight=this.Canvas.measureText("擎").width;
131632
+ var x=left;
131633
+ if (width>=textWidth)
131634
+ {
131635
+ if (textAlign=='center') x=left+(width-textWidth)/2;
131636
+ else if (textAlign=='right') x=left+width-textWidth;
131637
+ }
131638
+ else
131639
+ {
131640
+ text=this.TextEllipsis(text, width, drawInfo.MaxText);
131641
+ textWidth=this.Canvas.measureText(text).width;
131642
+
131643
+ //数据截断提示信息
131644
+ drawInfo.Tooltip=
131645
+ {
131646
+ Type:2,
131647
+ Data:{ AryText:[ {Text:drawInfo.Text} ] }
131648
+ }
131649
+ }
131650
+
131651
+ var rtText={Left:x, Bottom:top+this.RowHeight-this.ItemMergin.Bottom, Height:textHeight, Width:textWidth };
131652
+ rtText.Right=rtText.Left+rtText.Width;
131653
+ rtText.Top=rtText.Bottom-rtText.Height;
131654
+
131655
+ var drawLine=false; //下划线
131656
+ if (drawInfo.Enable===false)
131657
+ {
131658
+ color=config.Disable.TextColor;
131659
+ }
131660
+ else if (this.LastMouseStatus && this.LastMouseStatus.OnMouseMove && config.MouseOn)
131661
+ {
131662
+ var x=this.LastMouseStatus.OnMouseMove.X;
131663
+ var y=this.LastMouseStatus.OnMouseMove.Y;
131664
+ if (x>rtText.Left && x<rtText.Right && y>rtText.Top && y<rtText.Bottom)
131665
+ {
131666
+ color=config.MouseOn.TextColor;
131667
+ drawLine=true;
131668
+ this.LastMouseStatus.MouseOnStatus={ Index:drawInfo.Index, ColumnIndex:drawInfo.ColumnIndex, Type:2 };
131669
+ }
131670
+ }
131671
+
131672
+ this.Canvas.textBaseline="bottom";
131673
+ this.Canvas.textAlign="left";
131674
+ this.Canvas.fillStyle=color;
131675
+ this.Canvas.fillText(text,rtText.Left, rtText.Bottom);
131676
+
131677
+ if (drawLine)
131678
+ {
131679
+ this.Canvas.strokeStyle=color;
131680
+ this.Canvas.beginPath();
131681
+ this.Canvas.moveTo(rtText.Left,rtText.Bottom);
131682
+ this.Canvas.lineTo(rtText.Right,rtText.Bottom);
131683
+ this.Canvas.stroke();
131684
+ }
131685
+
131686
+ if (drawInfo.Enable)
131687
+ {
131688
+ drawInfo.Botton={ Rect:rtText, Type:2 };
131689
+ }
131690
+ }
131691
+
131391
131692
  //字体由外面设置
131392
131693
  this.TextEllipsis=function(text, maxWidth, maxText)
131393
131694
  {
@@ -132100,6 +132401,14 @@ function ChartReport()
132100
132401
  status.Redraw=true;
132101
132402
  return true;
132102
132403
  }
132404
+ else if (buttonData.Type===2) //link
132405
+ {
132406
+ var sendData={ Column:buttonData.Column, Index:buttonData.Index, Stock:buttonData.Stock, Data:buttonData.Data };
132407
+ this.SendClickEvent(JSCHART_EVENT_ID.ON_CLICK_REPORT_LINK, sendData)
132408
+
132409
+ status.Redraw=true;
132410
+ return true;
132411
+ }
132103
132412
 
132104
132413
  return false;
132105
132414
  }
@@ -132354,7 +132663,7 @@ function ChartReport()
132354
132663
 
132355
132664
  if (x>=rt.Left && x<=rt.Right && y>=rt.Top && y<=rt.Bottom)
132356
132665
  {
132357
- return { Rect:item.Rect, Stock:item.Stock, Column:item.Column, Index:item.Index, Type:item.Type, Data:item.Data };
132666
+ return { Rect:item.Rect, Stock:item.Stock, Column:item.Column, Index:item.Index, Type:item.Type, Data:item.Data, ColumnIndex:item.ColumnIndex };
132358
132667
  }
132359
132668
  }
132360
132669
  }
@@ -137193,26 +137502,36 @@ function JSScrollBarChart(divElement)
137193
137502
  {
137194
137503
  this.DivElement=divElement;
137195
137504
  this.JSChartContainer; //表格控件
137505
+ this.ResizeListener;
137196
137506
 
137197
- //h5 canvas
137198
- this.CanvasElement=document.createElement("canvas");
137199
- this.CanvasElement.className='jsscrollbar-drawing';
137200
- this.CanvasElement.id=Guid();
137201
- this.CanvasElement.setAttribute("tabindex",0);
137202
- if (this.CanvasElement.style) this.CanvasElement.style.outline='none';
137203
- if(divElement.hasChildNodes())
137204
- {
137205
- JSConsole.Chart.Log("[JSScrollBarChart::JSScrollBarChart] divElement hasChildNodes", divElement.childNodes);
137206
- }
137207
- divElement.appendChild(this.CanvasElement);
137507
+ //h5 canvas
137508
+ this.CanvasElement=document.createElement("canvas");
137509
+ this.CanvasElement.className='jsscrollbar-drawing';
137510
+ this.CanvasElement.id=Guid();
137511
+ this.CanvasElement.setAttribute("tabindex",0);
137512
+ if (this.CanvasElement.style) this.CanvasElement.style.outline='none';
137513
+ if(divElement.hasChildNodes())
137514
+ {
137515
+ JSConsole.Chart.Log("[JSScrollBarChart::JSScrollBarChart] divElement hasChildNodes", divElement.childNodes);
137516
+ }
137517
+ divElement.appendChild(this.CanvasElement);
137208
137518
 
137209
137519
 
137210
137520
  this.OnSize=function()
137211
137521
  {
137212
137522
  //画布大小通过div获取
137213
- var height=parseInt(this.DivElement.style.height.replace("px",""));
137523
+ var height=this.DivElement.offsetHeight;
137524
+ var width=this.DivElement.offsetWidth;
137525
+ if (this.DivElement.style.height && this.DivElement.style.width)
137526
+ {
137527
+ if (this.DivElement.style.height.includes("px"))
137528
+ height=parseInt(this.DivElement.style.height.replace("px",""));
137529
+ if (this.DivElement.style.width.includes("px"))
137530
+ width=parseInt(this.DivElement.style.width.replace("px",""));
137531
+ }
137532
+
137214
137533
  this.CanvasElement.height=height;
137215
- this.CanvasElement.width=parseInt(this.DivElement.style.width.replace("px",""));
137534
+ this.CanvasElement.width=width;
137216
137535
  this.CanvasElement.style.width=this.CanvasElement.width+'px';
137217
137536
  this.CanvasElement.style.height=this.CanvasElement.height+'px';
137218
137537
 
@@ -137234,12 +137553,14 @@ function JSScrollBarChart(divElement)
137234
137553
 
137235
137554
  if (!chart) return false;
137236
137555
 
137556
+ this.JSChartContainer=chart;
137557
+ this.DivElement.JSChart=this; //div中保存一份
137558
+
137559
+ if (option.EnableResize==true) this.CreateResizeListener();
137560
+
137237
137561
  if (option.OnCreatedCallback) option.OnCreatedCallback(chart);
137238
137562
 
137239
137563
  chart.Draw();
137240
-
137241
- this.JSChartContainer=chart;
137242
- this.DivElement.JSChart=this; //div中保存一份
137243
137564
  }
137244
137565
 
137245
137566
  this.CreateJSScrollBarChartContainer=function(option)
@@ -137284,6 +137605,18 @@ function JSScrollBarChart(divElement)
137284
137605
  if (IFrameSplitOperator.IsBool(item.AutoRight)) chart.AutoMargin.Right=item.AutoRight;
137285
137606
  }
137286
137607
 
137608
+ this.CreateResizeListener=function()
137609
+ {
137610
+ this.ResizeListener = new ResizeObserver((entries)=>{ this.OnDivResize(entries); });
137611
+ this.ResizeListener.observe(this.DivElement);
137612
+ }
137613
+
137614
+ this.OnDivResize=function(entries)
137615
+ {
137616
+ JSConsole.Chart.Log("[JSScrollBarChart::OnDivResize] entries=", entries);
137617
+ this.OnSize( );
137618
+ }
137619
+
137287
137620
  /////////////////////////////////////////////////////////////////////////////
137288
137621
  //对外接口
137289
137622
 
@@ -137429,6 +137762,11 @@ function JSScrollBarChartContainer(uielement)
137429
137762
  this.IsDestroy=true;
137430
137763
  }
137431
137764
 
137765
+ this.GetHQChart=function()
137766
+ {
137767
+ return this.HQChart;
137768
+ }
137769
+
137432
137770
  //设置事件回调
137433
137771
  //{event:事件id, callback:回调函数}
137434
137772
  this.AddEventCallback=function(object)
@@ -137507,6 +137845,36 @@ function JSScrollBarChartContainer(uielement)
137507
137845
  //this.UIElement.ontouchend=(e)=> {this.OnTouchEnd(e); }
137508
137846
  }
137509
137847
 
137848
+ //创建一个图形
137849
+ this.CreateChartPaint=function(name)
137850
+ {
137851
+ var chart=g_ChartPaintFactory.Create(name);
137852
+ if (!chart) return null;
137853
+
137854
+ chart.ChartFrame=this.Frame;
137855
+ chart.ChartBorder=this.Frame.ChartBorder;
137856
+ chart.Canvas=this.Canvas;
137857
+ chart.Data=this.Frame.Data;
137858
+ chart.GetEventCallback=(id)=> { return this.GetEventCallback(id); }
137859
+ chart.GetHQChartCallback=()=>{ return this.GetHQChart(); }
137860
+
137861
+ return chart;
137862
+ }
137863
+
137864
+ this.GetChartPaintByClassName=function(name)
137865
+ {
137866
+ for(var i=0; i<this.ChartPaint.length; ++i)
137867
+ {
137868
+ var item=this.ChartPaint[i];
137869
+ if (item.ClassName==name)
137870
+ {
137871
+ return { Chart:item, Index:i };
137872
+ }
137873
+ }
137874
+
137875
+ return null;
137876
+ }
137877
+
137510
137878
  this.Draw=function()
137511
137879
  {
137512
137880
  if (this.UIElement.width<=0 || this.UIElement.height<=0) return;
@@ -140101,7 +140469,7 @@ function HQChartScriptWorker()
140101
140469
 
140102
140470
 
140103
140471
 
140104
- var HQCHART_VERSION="1.1.13576";
140472
+ var HQCHART_VERSION="1.1.13583";
140105
140473
 
140106
140474
  function PrintHQChartVersion()
140107
140475
  {