hqchart 1.1.13573 → 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.
- package/lib/umychart.vue.js +72 -58
- package/package.json +1 -1
- package/src/jscommon/umychart.js +91 -2
- package/src/jscommon/umychart.report.js +329 -31
- package/src/jscommon/umychart.scrollbar.js +76 -17
- package/src/jscommon/umychart.style.js +23 -2
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +519 -52
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +519 -52
|
@@ -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(
|
|
71412
|
-
Unchecked:{ Color:"rgb(
|
|
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(
|
|
123878
|
-
Unchecked:{ Color:"rgb(
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
127253
|
-
|
|
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
|
|
|
@@ -128606,7 +128745,7 @@ function JSReportChartContainer(uielement)
|
|
|
128606
128745
|
switch(cmdID)
|
|
128607
128746
|
{
|
|
128608
128747
|
case JSCHART_MENU_ID.CMD_REPORT_CHANGE_BLOCK_ID:
|
|
128609
|
-
if (srcParam) this.ChangeSymbol(
|
|
128748
|
+
if (srcParam) this.ChangeSymbol(srcParam);
|
|
128610
128749
|
break;
|
|
128611
128750
|
}
|
|
128612
128751
|
}
|
|
@@ -129137,6 +129276,8 @@ var REPORT_COLUMN_ID=
|
|
|
129137
129276
|
CUSTOM_ICON_ID:103, //自定义图标
|
|
129138
129277
|
CUSTOM_CHECKBOX_ID:104, //自定义checkbox
|
|
129139
129278
|
CUSTOM_BUTTON_ID:105, //自定义按钮
|
|
129279
|
+
CUSTOM_PROGRESS_ID:106, //进度条
|
|
129280
|
+
CUSTOM_LINK_ID:107, //链接
|
|
129140
129281
|
}
|
|
129141
129282
|
|
|
129142
129283
|
var MAP_COLUMN_FIELD=new Map([
|
|
@@ -129307,6 +129448,9 @@ function ChartReport()
|
|
|
129307
129448
|
}
|
|
129308
129449
|
|
|
129309
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);
|
|
129310
129454
|
|
|
129311
129455
|
//股票代码+股票名称
|
|
129312
129456
|
this.ItemSymbolFontConfig={Size:g_JSChartResource.Report.Item.SymbolFont.Size, Name:g_JSChartResource.Report.Item.SymbolFont.Name};
|
|
@@ -129350,6 +129494,8 @@ function ChartReport()
|
|
|
129350
129494
|
//{ Rect:rtItem, Type: 0=checkedbox, 1=button, 2=link , Stock, Index:index, Column:column }
|
|
129351
129495
|
this.ButtonRect=[];
|
|
129352
129496
|
|
|
129497
|
+
this.LastMouseStatus;
|
|
129498
|
+
|
|
129353
129499
|
this.ReloadResource=function(resource)
|
|
129354
129500
|
{
|
|
129355
129501
|
this.DevicePixelRatio=GetDevicePixelRatio()
|
|
@@ -129440,6 +129586,10 @@ function ChartReport()
|
|
|
129440
129586
|
|
|
129441
129587
|
if (this.Tab) this.Tab.ReloadResource(resource);
|
|
129442
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);
|
|
129443
129593
|
}
|
|
129444
129594
|
|
|
129445
129595
|
this.SetColumn=function(aryColumn)
|
|
@@ -129511,7 +129661,7 @@ function ChartReport()
|
|
|
129511
129661
|
if (IFrameSplitOperator.IsNumber(item.DataIndex)) colItem.DataIndex=item.DataIndex; //数据在扩展数据索引列
|
|
129512
129662
|
if (IFrameSplitOperator.IsNumber(item.BlockIndex)) colItem.BlockIndex=item.BlockIndex;
|
|
129513
129663
|
if (item.CheckBox) colItem.CheckBox=CloneData(item.CheckBox);
|
|
129514
|
-
else colItem.CheckBox=
|
|
129664
|
+
else colItem.CheckBox=this.CheckBoxConfig;
|
|
129515
129665
|
}
|
|
129516
129666
|
else if (item.Type==REPORT_COLUMN_ID.CUSTOM_BUTTON_ID)
|
|
129517
129667
|
{
|
|
@@ -129519,6 +129669,23 @@ function ChartReport()
|
|
|
129519
129669
|
if (IFrameSplitOperator.IsNumber(item.DataIndex)) colItem.DataIndex=item.DataIndex; //数据在扩展数据索引列
|
|
129520
129670
|
if (IFrameSplitOperator.IsNumber(item.BlockIndex)) colItem.BlockIndex=item.BlockIndex;
|
|
129521
129671
|
if (item.Button) colItem.Button=CloneData(item.Button);
|
|
129672
|
+
else colItem.Button=this.ButtonConfig;
|
|
129673
|
+
}
|
|
129674
|
+
else if (item.Type==REPORT_COLUMN_ID.CUSTOM_PROGRESS_ID)
|
|
129675
|
+
{
|
|
129676
|
+
if (!IFrameSplitOperator.IsNumber(item.DataIndex) && !IFrameSplitOperator.IsNumber(item.BlockIndex)) continue;
|
|
129677
|
+
if (IFrameSplitOperator.IsNumber(item.DataIndex)) colItem.DataIndex=item.DataIndex; //数据在扩展数据索引列
|
|
129678
|
+
if (IFrameSplitOperator.IsNumber(item.BlockIndex)) colItem.BlockIndex=item.BlockIndex;
|
|
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;
|
|
129522
129689
|
}
|
|
129523
129690
|
else if (item.Type==REPORT_COLUMN_ID.CUSTOM_ICON_ID)
|
|
129524
129691
|
{
|
|
@@ -129637,7 +129804,9 @@ function ChartReport()
|
|
|
129637
129804
|
|
|
129638
129805
|
{ Type:REPORT_COLUMN_ID.CUSTOM_CHECKBOX_ID, Title:"", TextAlign:"center", FixedWidth:20*GetDevicePixelRatio() },
|
|
129639
129806
|
|
|
129640
|
-
{ Type:REPORT_COLUMN_ID.CUSTOM_BUTTON_ID, Title:"", TextAlign:"center", FixedWidth:50*GetDevicePixelRatio() }
|
|
129807
|
+
{ Type:REPORT_COLUMN_ID.CUSTOM_BUTTON_ID, Title:"", TextAlign:"center", FixedWidth:50*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:"擎擎擎擎擎" }
|
|
129641
129810
|
];
|
|
129642
129811
|
|
|
129643
129812
|
for(var i=0;i<DEFAULT_COLUMN.length;++i)
|
|
@@ -129658,12 +129827,13 @@ function ChartReport()
|
|
|
129658
129827
|
this.Canvas.clip();
|
|
129659
129828
|
}
|
|
129660
129829
|
|
|
129661
|
-
this.Draw=function()
|
|
129830
|
+
this.Draw=function(lastMouseStatus)
|
|
129662
129831
|
{
|
|
129663
129832
|
this.ShowSymbol=[];
|
|
129664
129833
|
this.TooltipRect=[];
|
|
129665
129834
|
this.ButtonRect=[];
|
|
129666
129835
|
this.DevicePixelRatio=GetDevicePixelRatio()
|
|
129836
|
+
this.LastMouseStatus=lastMouseStatus;
|
|
129667
129837
|
|
|
129668
129838
|
if (this.GlobalOption) this.GlobalOption.FlashBGCount=0;
|
|
129669
129839
|
|
|
@@ -129695,6 +129865,7 @@ function ChartReport()
|
|
|
129695
129865
|
this.VScrollbar.DrawScrollbar(this.RectClient.Left,this.RectClient.Top+this.HeaderHeight, this.RectClient.Right, bottom-this.BottomToolbarHeight-4);
|
|
129696
129866
|
}
|
|
129697
129867
|
|
|
129868
|
+
this.LastMouseStatus=null;
|
|
129698
129869
|
this.SizeChange=false;
|
|
129699
129870
|
}
|
|
129700
129871
|
|
|
@@ -130334,7 +130505,7 @@ function ChartReport()
|
|
|
130334
130505
|
for(var i=0;i<this.FixedColumn && i<this.Column.length;++i)
|
|
130335
130506
|
{
|
|
130336
130507
|
var item=this.Column[i];
|
|
130337
|
-
this.DrawItem(dataIndex, data, item, left, top, rowType);
|
|
130508
|
+
this.DrawItem(dataIndex, data, item, left, top, rowType, i);
|
|
130338
130509
|
left+=item.Width;
|
|
130339
130510
|
|
|
130340
130511
|
if (left>=chartRight) break;
|
|
@@ -130343,20 +130514,24 @@ function ChartReport()
|
|
|
130343
130514
|
for(var i=this.FixedColumn+this.Data.XOffset;i<this.Column.length;++i)
|
|
130344
130515
|
{
|
|
130345
130516
|
var item=this.Column[i];
|
|
130346
|
-
this.DrawItem(dataIndex, data, item, left, top, rowType);
|
|
130517
|
+
this.DrawItem(dataIndex, data, item, left, top, rowType, i);
|
|
130347
130518
|
left+=item.Width;
|
|
130348
130519
|
|
|
130349
130520
|
if (left>=chartRight) break;
|
|
130350
130521
|
}
|
|
130351
130522
|
}
|
|
130352
130523
|
|
|
130353
|
-
this.DrawItem=function(index, data, column, left, top, rowType)
|
|
130524
|
+
this.DrawItem=function(index, data, column, left, top, rowType, columnIndex)
|
|
130354
130525
|
{
|
|
130355
130526
|
var itemWidth=column.Width;
|
|
130356
130527
|
var x=left+this.ItemMergin.Left;
|
|
130357
130528
|
var textWidth=column.Width-this.ItemMergin.Left-this.ItemMergin.Right;
|
|
130358
130529
|
var stock=data.Stock;
|
|
130359
|
-
var drawInfo=
|
|
130530
|
+
var drawInfo=
|
|
130531
|
+
{
|
|
130532
|
+
Text:null, TextColor:column.TextColor , TextAlign:column.TextAlign, Tooltip:null,
|
|
130533
|
+
Index:index, ColumnIndex:columnIndex
|
|
130534
|
+
};
|
|
130360
130535
|
var rtItem={ Left:left, Top:top, Width:column.Width, Height:this.RowHeight };
|
|
130361
130536
|
rtItem.Right=rtItem.Left+rtItem.Width;
|
|
130362
130537
|
rtItem.Bottom=rtItem.Top+rtItem.Height;
|
|
@@ -130610,6 +130785,19 @@ function ChartReport()
|
|
|
130610
130785
|
|
|
130611
130786
|
this.GetCustomButtonDrawInfo(data, column, drawInfo);
|
|
130612
130787
|
}
|
|
130788
|
+
else if (column.Type==REPORT_COLUMN_ID.CUSTOM_PROGRESS_ID)
|
|
130789
|
+
{
|
|
130790
|
+
rtItem={ Left:left, Top:top, Width:column.Width, Height:this.RowHeight };
|
|
130791
|
+
rtItem.Right=rtItem.Left+rtItem.Width;
|
|
130792
|
+
rtItem.Bottom=rtItem.Top+rtItem.Height;
|
|
130793
|
+
drawInfo.Rect=rtItem;
|
|
130794
|
+
|
|
130795
|
+
this.GetCustomProgressBarDrawInfo(data, column, drawInfo);
|
|
130796
|
+
}
|
|
130797
|
+
else if (column.Type==REPORT_COLUMN_ID.CUSTOM_LINK_ID)
|
|
130798
|
+
{
|
|
130799
|
+
this.GetCustomLinkDrawInfo(data, column, drawInfo);
|
|
130800
|
+
}
|
|
130613
130801
|
|
|
130614
130802
|
|
|
130615
130803
|
//拖拽行颜色
|
|
@@ -130632,6 +130820,14 @@ function ChartReport()
|
|
|
130632
130820
|
{
|
|
130633
130821
|
this.DrawButton(drawInfo, left, top, itemWidth);
|
|
130634
130822
|
}
|
|
130823
|
+
else if (column.Type==REPORT_COLUMN_ID.CUSTOM_PROGRESS_ID)
|
|
130824
|
+
{
|
|
130825
|
+
this.DrawProgressBar(drawInfo, left, top, itemWidth);
|
|
130826
|
+
}
|
|
130827
|
+
else if (column.Type==REPORT_COLUMN_ID.CUSTOM_LINK_ID)
|
|
130828
|
+
{
|
|
130829
|
+
this.DrawLinkText(drawInfo, x, top, textWidth);
|
|
130830
|
+
}
|
|
130635
130831
|
else
|
|
130636
130832
|
{
|
|
130637
130833
|
if (data.FlashBG && data.FlashBG.Data && column.ID!=undefined)
|
|
@@ -130665,7 +130861,7 @@ function ChartReport()
|
|
|
130665
130861
|
|
|
130666
130862
|
if (drawInfo.Botton)
|
|
130667
130863
|
{
|
|
130668
|
-
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 };
|
|
130669
130865
|
this.ButtonRect.push(buttonData);
|
|
130670
130866
|
}
|
|
130671
130867
|
}
|
|
@@ -130947,6 +131143,36 @@ function ChartReport()
|
|
|
130947
131143
|
if (IFrameSplitOperator.IsBool(buttonData.Enable)) drawInfo.Enable=buttonData.Enable;
|
|
130948
131144
|
}
|
|
130949
131145
|
|
|
131146
|
+
this.GetCustomProgressBarDrawInfo=function(data, column, drawInfo)
|
|
131147
|
+
{
|
|
131148
|
+
var barData=this.GetExtendData(data, column);
|
|
131149
|
+
if (!barData) return;
|
|
131150
|
+
|
|
131151
|
+
drawInfo.Text=barData.Title;
|
|
131152
|
+
drawInfo.ProgressBar=column.ProgressBar;
|
|
131153
|
+
drawInfo.Enable=true;
|
|
131154
|
+
drawInfo.Value=barData.Value; //占比
|
|
131155
|
+
drawInfo.Data=barData;
|
|
131156
|
+
if (IFrameSplitOperator.IsBool(barData.Enable)) drawInfo.Enable=barData.Enable;
|
|
131157
|
+
if (barData.TextColor) drawInfo.TextColor=barData.TextColor;
|
|
131158
|
+
if (barData.BarColor) drawInfo.BarColor=barData.BarColor;
|
|
131159
|
+
if (barData.BGColor) drawInfo.BGColor=barData.BGColor;
|
|
131160
|
+
}
|
|
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
|
+
|
|
130950
131176
|
this.FormaTimeDrawInfo=function(column, stock, drawInfo, data)
|
|
130951
131177
|
{
|
|
130952
131178
|
if (!IFrameSplitOperator.IsNumber(stock.Time)) return;
|
|
@@ -131216,35 +131442,57 @@ function ChartReport()
|
|
|
131216
131442
|
if (!IFrameSplitOperator.IsBool(drawInfo.Checked)) return;
|
|
131217
131443
|
if (!drawInfo.CheckBox) return;
|
|
131218
131444
|
|
|
131219
|
-
|
|
131445
|
+
var config=drawInfo.CheckBox;
|
|
131446
|
+
drawInfo.Font=`${config.Size*this.DevicePixelRatio}px ${config.Family}`;
|
|
131220
131447
|
var textAlign=drawInfo.TextAlign;
|
|
131221
131448
|
var size=drawInfo.CheckBox.Size*this.DevicePixelRatio;
|
|
131222
131449
|
var x=left+drawInfo.CheckBox.Margin.Left;
|
|
131223
131450
|
var y=top+this.RowHeight-drawInfo.CheckBox.Margin.Bottom;
|
|
131451
|
+
|
|
131224
131452
|
if (textAlign=='center') x=left+width/2-size/2;
|
|
131225
|
-
else if (textAlign=='right') x=left+width-
|
|
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
|
+
}
|
|
131226
131471
|
|
|
131227
131472
|
this.Canvas.font=drawInfo.Font;
|
|
131228
131473
|
this.Canvas.textBaseline="bottom";
|
|
131229
131474
|
this.Canvas.textAlign="left";
|
|
131230
131475
|
if (drawInfo.Checked===true)
|
|
131231
131476
|
{
|
|
131232
|
-
|
|
131233
|
-
|
|
131234
|
-
|
|
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);
|
|
131235
131483
|
}
|
|
131236
131484
|
else if (drawInfo.Checked===false)
|
|
131237
131485
|
{
|
|
131238
|
-
|
|
131239
|
-
|
|
131240
|
-
|
|
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);
|
|
131241
131492
|
}
|
|
131242
131493
|
|
|
131243
131494
|
if (drawInfo.Enable)
|
|
131244
131495
|
{
|
|
131245
|
-
var rtBox={ Left:x, Bottom:y, Width:size, Height:size };
|
|
131246
|
-
rtBox.Right=rtBox.Left+rtBox.Width;
|
|
131247
|
-
rtBox.Top=rtBox.Bottom-rtBox.Height;
|
|
131248
131496
|
drawInfo.Botton={ Rect:rtBox, Type:0 };
|
|
131249
131497
|
}
|
|
131250
131498
|
}
|
|
@@ -131253,6 +131501,7 @@ function ChartReport()
|
|
|
131253
131501
|
{
|
|
131254
131502
|
if (!drawInfo.Button) return;
|
|
131255
131503
|
|
|
131504
|
+
var config=drawInfo.Button;
|
|
131256
131505
|
var rtBG=
|
|
131257
131506
|
{
|
|
131258
131507
|
Left:left+drawInfo.Button.Margin.Left, Top:top+drawInfo.Button.Margin.Top,
|
|
@@ -131262,11 +131511,26 @@ function ChartReport()
|
|
|
131262
131511
|
rtBG.Right=rtBG.Left+rtBG.Width;
|
|
131263
131512
|
rtBG.Bottom=rtBG.Top+rtBG.Height;
|
|
131264
131513
|
|
|
131265
|
-
var bgColor=
|
|
131514
|
+
var bgColor=config.BGColor, textColor=config.TextColor;
|
|
131266
131515
|
if (drawInfo.Enable===false)
|
|
131267
131516
|
{
|
|
131268
|
-
bgColor=
|
|
131269
|
-
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
|
+
}
|
|
131270
131534
|
}
|
|
131271
131535
|
|
|
131272
131536
|
this.Canvas.fillStyle=bgColor;
|
|
@@ -131289,6 +131553,142 @@ function ChartReport()
|
|
|
131289
131553
|
}
|
|
131290
131554
|
}
|
|
131291
131555
|
|
|
131556
|
+
this.DrawProgressBar=function(drawInfo, left, top, width)
|
|
131557
|
+
{
|
|
131558
|
+
if (!drawInfo.ProgressBar) return;
|
|
131559
|
+
|
|
131560
|
+
var config=drawInfo.ProgressBar;
|
|
131561
|
+
var rtBG=
|
|
131562
|
+
{
|
|
131563
|
+
Left:left+config.Margin.Left, Top:top+config.Margin.Top,
|
|
131564
|
+
Height:this.RowHeight-config.Margin.Top-config.Margin.Bottom,
|
|
131565
|
+
Width:width-config.Margin.Left-config.Margin.Right
|
|
131566
|
+
}
|
|
131567
|
+
rtBG.Right=rtBG.Left+rtBG.Width;
|
|
131568
|
+
rtBG.Bottom=rtBG.Top+rtBG.Height;
|
|
131569
|
+
|
|
131570
|
+
var bgColor=config.BGColor;
|
|
131571
|
+
var barColor=config.BarColor;
|
|
131572
|
+
var textColor=config.TextColor;
|
|
131573
|
+
if (drawInfo.Enable===false)
|
|
131574
|
+
{
|
|
131575
|
+
bgColor=config.Disable.BGColor;
|
|
131576
|
+
barColor=config.Disable.BarColor;
|
|
131577
|
+
textColor=config.Disable.TextColor;
|
|
131578
|
+
}
|
|
131579
|
+
|
|
131580
|
+
if (drawInfo.BGColor) bgColor=drawInfo.BGColor;
|
|
131581
|
+
if (drawInfo.TextColor) textColor=drawInfo.TextColor;
|
|
131582
|
+
if (drawInfo.BarColor) barColor=drawInfo.BarColor;
|
|
131583
|
+
|
|
131584
|
+
if (bgColor)
|
|
131585
|
+
{
|
|
131586
|
+
this.Canvas.fillStyle=bgColor;
|
|
131587
|
+
this.Canvas.fillRect(rtBG.Left, rtBG.Top,rtBG.Width,rtBG.Height);
|
|
131588
|
+
}
|
|
131589
|
+
|
|
131590
|
+
var fullBarWidth=rtBG.Width-config.BarMargin.Left-config.BarMargin.Right;
|
|
131591
|
+
var value=drawInfo.Value; // 0-1 进度条
|
|
131592
|
+
var rtBar={ Left:rtBG.Left+config.BarMargin.Left, Top:rtBG.Top+config.BarMargin.Top, Bottom:rtBG.Bottom-config.BarMargin.Bottom, Width:0 };
|
|
131593
|
+
if (value>0)
|
|
131594
|
+
{
|
|
131595
|
+
if (value>1) value=1;
|
|
131596
|
+
rtBar.Width=fullBarWidth*value;
|
|
131597
|
+
rtBar.Height=rtBar.Bottom-rtBar.Top;
|
|
131598
|
+
if (rtBar.Width<1) rtBG.Width=1;
|
|
131599
|
+
|
|
131600
|
+
this.Canvas.fillStyle=barColor;
|
|
131601
|
+
this.Canvas.fillRect(rtBar.Left, rtBar.Top,rtBar.Width,rtBar.Height);
|
|
131602
|
+
}
|
|
131603
|
+
|
|
131604
|
+
if (textColor && drawInfo.Text)
|
|
131605
|
+
{
|
|
131606
|
+
this.Canvas.font=config.Font;
|
|
131607
|
+
this.Canvas.textBaseline="bottom";
|
|
131608
|
+
this.Canvas.textAlign="left";
|
|
131609
|
+
|
|
131610
|
+
this.Canvas.fillStyle=textColor;
|
|
131611
|
+
var xText=rtBar.Left+config.TextMargin.Left;
|
|
131612
|
+
var yText=rtBar.Bottom-config.TextMargin.Bottom;
|
|
131613
|
+
this.Canvas.fillText(drawInfo.Text, xText, yText);
|
|
131614
|
+
}
|
|
131615
|
+
}
|
|
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
|
+
|
|
131292
131692
|
//字体由外面设置
|
|
131293
131693
|
this.TextEllipsis=function(text, maxWidth, maxText)
|
|
131294
131694
|
{
|
|
@@ -132001,6 +132401,14 @@ function ChartReport()
|
|
|
132001
132401
|
status.Redraw=true;
|
|
132002
132402
|
return true;
|
|
132003
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
|
+
}
|
|
132004
132412
|
|
|
132005
132413
|
return false;
|
|
132006
132414
|
}
|
|
@@ -132255,7 +132663,7 @@ function ChartReport()
|
|
|
132255
132663
|
|
|
132256
132664
|
if (x>=rt.Left && x<=rt.Right && y>=rt.Top && y<=rt.Bottom)
|
|
132257
132665
|
{
|
|
132258
|
-
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 };
|
|
132259
132667
|
}
|
|
132260
132668
|
}
|
|
132261
132669
|
}
|
|
@@ -137094,26 +137502,36 @@ function JSScrollBarChart(divElement)
|
|
|
137094
137502
|
{
|
|
137095
137503
|
this.DivElement=divElement;
|
|
137096
137504
|
this.JSChartContainer; //表格控件
|
|
137505
|
+
this.ResizeListener;
|
|
137097
137506
|
|
|
137098
|
-
|
|
137099
|
-
|
|
137100
|
-
|
|
137101
|
-
|
|
137102
|
-
|
|
137103
|
-
|
|
137104
|
-
|
|
137105
|
-
|
|
137106
|
-
|
|
137107
|
-
|
|
137108
|
-
|
|
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);
|
|
137109
137518
|
|
|
137110
137519
|
|
|
137111
137520
|
this.OnSize=function()
|
|
137112
137521
|
{
|
|
137113
137522
|
//画布大小通过div获取
|
|
137114
|
-
var height=
|
|
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
|
+
|
|
137115
137533
|
this.CanvasElement.height=height;
|
|
137116
|
-
this.CanvasElement.width=
|
|
137534
|
+
this.CanvasElement.width=width;
|
|
137117
137535
|
this.CanvasElement.style.width=this.CanvasElement.width+'px';
|
|
137118
137536
|
this.CanvasElement.style.height=this.CanvasElement.height+'px';
|
|
137119
137537
|
|
|
@@ -137135,12 +137553,14 @@ function JSScrollBarChart(divElement)
|
|
|
137135
137553
|
|
|
137136
137554
|
if (!chart) return false;
|
|
137137
137555
|
|
|
137556
|
+
this.JSChartContainer=chart;
|
|
137557
|
+
this.DivElement.JSChart=this; //div中保存一份
|
|
137558
|
+
|
|
137559
|
+
if (option.EnableResize==true) this.CreateResizeListener();
|
|
137560
|
+
|
|
137138
137561
|
if (option.OnCreatedCallback) option.OnCreatedCallback(chart);
|
|
137139
137562
|
|
|
137140
137563
|
chart.Draw();
|
|
137141
|
-
|
|
137142
|
-
this.JSChartContainer=chart;
|
|
137143
|
-
this.DivElement.JSChart=this; //div中保存一份
|
|
137144
137564
|
}
|
|
137145
137565
|
|
|
137146
137566
|
this.CreateJSScrollBarChartContainer=function(option)
|
|
@@ -137185,6 +137605,18 @@ function JSScrollBarChart(divElement)
|
|
|
137185
137605
|
if (IFrameSplitOperator.IsBool(item.AutoRight)) chart.AutoMargin.Right=item.AutoRight;
|
|
137186
137606
|
}
|
|
137187
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
|
+
|
|
137188
137620
|
/////////////////////////////////////////////////////////////////////////////
|
|
137189
137621
|
//对外接口
|
|
137190
137622
|
|
|
@@ -137330,6 +137762,11 @@ function JSScrollBarChartContainer(uielement)
|
|
|
137330
137762
|
this.IsDestroy=true;
|
|
137331
137763
|
}
|
|
137332
137764
|
|
|
137765
|
+
this.GetHQChart=function()
|
|
137766
|
+
{
|
|
137767
|
+
return this.HQChart;
|
|
137768
|
+
}
|
|
137769
|
+
|
|
137333
137770
|
//设置事件回调
|
|
137334
137771
|
//{event:事件id, callback:回调函数}
|
|
137335
137772
|
this.AddEventCallback=function(object)
|
|
@@ -137408,6 +137845,36 @@ function JSScrollBarChartContainer(uielement)
|
|
|
137408
137845
|
//this.UIElement.ontouchend=(e)=> {this.OnTouchEnd(e); }
|
|
137409
137846
|
}
|
|
137410
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
|
+
|
|
137411
137878
|
this.Draw=function()
|
|
137412
137879
|
{
|
|
137413
137880
|
if (this.UIElement.width<=0 || this.UIElement.height<=0) return;
|
|
@@ -140002,7 +140469,7 @@ function HQChartScriptWorker()
|
|
|
140002
140469
|
|
|
140003
140470
|
|
|
140004
140471
|
|
|
140005
|
-
var HQCHART_VERSION="1.1.
|
|
140472
|
+
var HQCHART_VERSION="1.1.13583";
|
|
140006
140473
|
|
|
140007
140474
|
function PrintHQChartVersion()
|
|
140008
140475
|
{
|