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
|
@@ -6526,6 +6526,7 @@ var JSCHART_EVENT_ID=
|
|
|
6526
6526
|
ON_DRAW_REPORT_ROW_BG:140, //报价列表整行背景
|
|
6527
6527
|
ON_CLICK_REPORT_CHECKBOX:141, //报价列表checkbox
|
|
6528
6528
|
ON_CLICK_REPORT_BUTTON:142, //报价列表按钮
|
|
6529
|
+
ON_CLICK_REPORT_LINK:143, //报价列表 链接
|
|
6529
6530
|
|
|
6530
6531
|
|
|
6531
6532
|
ON_CHANGE_INDEX:150, //切换指标
|
|
@@ -71364,10 +71365,46 @@ function JSChartResource()
|
|
|
71364
71365
|
CheckBox:
|
|
71365
71366
|
{
|
|
71366
71367
|
Family:"iconfont", Size:15,
|
|
71367
|
-
Checked:{ Color:"rgb(
|
|
71368
|
-
Unchecked:{ Color:"rgb(
|
|
71368
|
+
Checked:{ Color:"rgb(69,147,238)", Symbol:"\ue6b3", DisableColor:"rgb(230,230,230)", MouseOnColor:"rgb(69,147,238)" },
|
|
71369
|
+
Unchecked:{ Color:"rgb(120,120,120)", Symbol:"\ue6b4", DisableColor:"rgb(230,230,230)", MouseOnColor:"rgb(69,147,238)" },
|
|
71369
71370
|
|
|
71370
71371
|
Margin:{ Left:5, Right:5, Bottom:2, Top:4 },
|
|
71372
|
+
},
|
|
71373
|
+
|
|
71374
|
+
Link:
|
|
71375
|
+
{
|
|
71376
|
+
Font:`${12*GetDevicePixelRatio()}px 微软雅黑`,
|
|
71377
|
+
TextColor:"rgb(30,144,255)",
|
|
71378
|
+
|
|
71379
|
+
Disable:{ TextColor:"rgb(211,211,211)" },
|
|
71380
|
+
MouseOn:{ TextColor:"rgb(30,144,255)" },
|
|
71381
|
+
},
|
|
71382
|
+
|
|
71383
|
+
ProgressBar:
|
|
71384
|
+
{
|
|
71385
|
+
BGColor:"rgb(229,231,238)",
|
|
71386
|
+
BarColor:"rgb(26,125,255)",
|
|
71387
|
+
Margin:{ Left:2, Right:2, Bottom:2, Top:2 },
|
|
71388
|
+
BarMargin:{ Left:2, Right:2, Bottom:2, Top:2 },
|
|
71389
|
+
TextColor:"rgb(0,0,0)",
|
|
71390
|
+
Font:`${12*GetDevicePixelRatio()}px 微软雅黑`,
|
|
71391
|
+
TextMargin:{ Left:40, Right:2, Bottom:2, Top:2},
|
|
71392
|
+
Disable:{ BGColor:"rgb(229,231,238)", BarColor:"rgb(131,131,131)", TextColor:"rgb(159,161,159)"}
|
|
71393
|
+
},
|
|
71394
|
+
|
|
71395
|
+
Button:
|
|
71396
|
+
{
|
|
71397
|
+
BGColor:"rgb(61,134,180)",
|
|
71398
|
+
TextColor:"rgb(255,255,255)",
|
|
71399
|
+
BorderColor:"rgb(200,200,200)",
|
|
71400
|
+
|
|
71401
|
+
Disable:{ BGColor:"rgb(105,105,105)", TextColor:"rgb(169,169,169)"},
|
|
71402
|
+
MouseOn:{ BGColor:"rgb(57,125,169)", TextColor:"rgb(230,230,230)" },
|
|
71403
|
+
|
|
71404
|
+
Margin:{ Left:5, Right:5, Bottom:2, Top:2 },
|
|
71405
|
+
TextMargin:{ Bottom:2 },
|
|
71406
|
+
|
|
71407
|
+
Font:`${12*GetDevicePixelRatio()}px 微软雅黑`
|
|
71371
71408
|
}
|
|
71372
71409
|
},
|
|
71373
71410
|
|
|
@@ -72410,6 +72447,58 @@ function JSChartResource()
|
|
|
72410
72447
|
|
|
72411
72448
|
CopyMarginConfig(dest.CheckBox.Margin, subItem.Margin);
|
|
72412
72449
|
}
|
|
72450
|
+
|
|
72451
|
+
if (item.Link)
|
|
72452
|
+
{
|
|
72453
|
+
var subItem=item.Link;
|
|
72454
|
+
if (subItem.Font) dest.Link.Font=subItem.Font;
|
|
72455
|
+
if (subItem.TextColor) dest.Link.TextColor=subItem.TextColor;
|
|
72456
|
+
if (subItem.Disable && subItem.Disable.TextColor) dest.Link.Disable.TextColor=subItem.Disable.TextColor;
|
|
72457
|
+
if (subItem.MouseOn && subItem.MouseOn.TextColor) dest.Link.MouseOn.TextColor=subItem.MouseOn.TextColor;
|
|
72458
|
+
}
|
|
72459
|
+
|
|
72460
|
+
if (item.ProgressBar)
|
|
72461
|
+
{
|
|
72462
|
+
var subItem=item.ProgressBar;
|
|
72463
|
+
if (subItem.BGColor) dest.ProgressBar.BGColor=subItem.BGColor;
|
|
72464
|
+
if (subItem.BarColor) dest.ProgressBar.BarColor=subItem.BarColor;
|
|
72465
|
+
if (subItem.TextColor) dest.ProgressBar.TextColor=subItem.TextColor;
|
|
72466
|
+
if (subItem.Font) dest.ProgressBar.Font=subItem.Font;
|
|
72467
|
+
if (subItem.Disable)
|
|
72468
|
+
{
|
|
72469
|
+
if (subItem.Disable.BGColor) dest.ProgressBar.Disable.BGColor=subItem.Disable.BGColor;
|
|
72470
|
+
if (subItem.Disable.BarColor) dest.ProgressBar.Disable.BarColor=subItem.Disable.BarColor;
|
|
72471
|
+
if (subItem.Disable.TextColor) dest.ProgressBar.Disable.TextColor=subItem.Disable.TextColor;
|
|
72472
|
+
}
|
|
72473
|
+
|
|
72474
|
+
CopyMarginConfig(dest.ProgressBar.Margin, subItem.Margin);
|
|
72475
|
+
CopyMarginConfig(dest.ProgressBar.BarMargin, subItem.BarMargin);
|
|
72476
|
+
CopyMarginConfig(dest.ProgressBar.TextMargin, subItem.TextMargin);
|
|
72477
|
+
}
|
|
72478
|
+
|
|
72479
|
+
if (item.Buttom)
|
|
72480
|
+
{
|
|
72481
|
+
var subItem=item.Buttom;
|
|
72482
|
+
if (subItem.BGColor) dest.Buttom.BGColor=subItem.BGColor;
|
|
72483
|
+
if (subItem.TextColor) dest.Buttom.TextColor=subItem.TextColor;
|
|
72484
|
+
if (subItem.BorderColor) dest.Buttom.BorderColor=subItem.BorderColor;
|
|
72485
|
+
if (subItem.Font) dest.Buttom.Font=subItem.Font;
|
|
72486
|
+
|
|
72487
|
+
if (subItem.Disable)
|
|
72488
|
+
{
|
|
72489
|
+
if (subItem.Disable.BGColor) dest.Buttom.Disable.BGColor=subItem.Disable.BGColor;
|
|
72490
|
+
if (subItem.Disable.TextColor) dest.Buttom.Disable.TextColor=subItem.Disable.TextColor;
|
|
72491
|
+
}
|
|
72492
|
+
|
|
72493
|
+
if (subItem.MouseOn)
|
|
72494
|
+
{
|
|
72495
|
+
if (subItem.MouseOn.BGColor) dest.Buttom.MouseOn.BGColor=subItem.MouseOn.BGColor;
|
|
72496
|
+
if (subItem.MouseOn.TextColor) dest.Buttom.MouseOn.TextColor=subItem.MouseOn.TextColor;
|
|
72497
|
+
}
|
|
72498
|
+
|
|
72499
|
+
CopyMarginConfig(dest.Buttom.Margin, subItem.Margin);
|
|
72500
|
+
CopyMarginConfig(dest.Buttom.TextMargin, subItem.TextMargin);
|
|
72501
|
+
}
|
|
72413
72502
|
|
|
72414
72503
|
}
|
|
72415
72504
|
|
|
@@ -123830,8 +123919,29 @@ function GetBlackStyle()
|
|
|
123830
123919
|
CheckBox:
|
|
123831
123920
|
{
|
|
123832
123921
|
Family:"iconfont", Size:15,
|
|
123833
|
-
Checked:{ Color:"rgb(
|
|
123834
|
-
Unchecked:{ Color:"rgb(
|
|
123922
|
+
Checked:{ Color:"rgb(69,147,238)", Symbol:"\ue6b3", DisableColor:"rgb(120,120,120)", MouseOnColor:"rgb(69,147,238)" },
|
|
123923
|
+
Unchecked:{ Color:"rgb(210,210,210)", Symbol:"\ue6b4", DisableColor:"rgb(120,120,120)", MouseOnColor:"rgb(69,147,238)" },
|
|
123924
|
+
},
|
|
123925
|
+
|
|
123926
|
+
Link:
|
|
123927
|
+
{
|
|
123928
|
+
Font:`${12*GetDevicePixelRatio()}px 微软雅黑`,
|
|
123929
|
+
TextColor:"rgb(0,144,255)",
|
|
123930
|
+
|
|
123931
|
+
Disable:{ TextColor:"rgb(211,211,211)" },
|
|
123932
|
+
MouseOn:{ TextColor:"rgb(0,144,255)" },
|
|
123933
|
+
},
|
|
123934
|
+
|
|
123935
|
+
ProgressBar:
|
|
123936
|
+
{
|
|
123937
|
+
BGColor:"rgb(20,24,28)",
|
|
123938
|
+
BarColor:"rgb(47,124,197)",
|
|
123939
|
+
Margin:{ Left:2, Right:2, Bottom:2, Top:2 },
|
|
123940
|
+
BarMargin:{ Left:2, Right:2, Bottom:2, Top:2 },
|
|
123941
|
+
TextColor:"rgb(230,230,230)",
|
|
123942
|
+
Font:`${12*GetDevicePixelRatio()}px 微软雅黑`,
|
|
123943
|
+
TextMargin:{ Left:40, Right:2, Bottom:2, Top:2},
|
|
123944
|
+
Disable:{ BGColor:"rgb(61,61,61)", BarColor:"rgb(131,131,131)", TextColor:"rgb(159,161,159)"}
|
|
123835
123945
|
}
|
|
123836
123946
|
},
|
|
123837
123947
|
|
|
@@ -125872,7 +125982,8 @@ function JSReportChartContainer(uielement)
|
|
|
125872
125982
|
this.JSPopMenu; //内置菜单
|
|
125873
125983
|
this.IsShowRightMenu=true;
|
|
125874
125984
|
|
|
125875
|
-
|
|
125985
|
+
//MouseOnStatus:{ RowIndex:行, ColumnIndex:列}
|
|
125986
|
+
this.LastMouseStatus={ MoveStatus:null, TooltipStatus:null, MouseOnStatus:null };
|
|
125876
125987
|
|
|
125877
125988
|
this.ChartDestory=function() //销毁
|
|
125878
125989
|
{
|
|
@@ -126111,6 +126222,7 @@ function JSReportChartContainer(uielement)
|
|
|
126111
126222
|
this.Canvas.clearRect(0,0,this.UIElement.width,this.UIElement.height);
|
|
126112
126223
|
var pixelTatio = GetDevicePixelRatio(); //获取设备的分辨率
|
|
126113
126224
|
this.Canvas.lineWidth=pixelTatio; //手机端需要根据分辨率比调整线段宽度
|
|
126225
|
+
this.LastMouseStatus.MouseOnStatus=null;
|
|
126114
126226
|
|
|
126115
126227
|
if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash)
|
|
126116
126228
|
{
|
|
@@ -126127,14 +126239,14 @@ function JSReportChartContainer(uielement)
|
|
|
126127
126239
|
{
|
|
126128
126240
|
var item=this.ChartPaint[i];
|
|
126129
126241
|
if (item.IsDrawFirst)
|
|
126130
|
-
item.Draw();
|
|
126242
|
+
item.Draw(this.LastMouseStatus);
|
|
126131
126243
|
}
|
|
126132
126244
|
|
|
126133
126245
|
for(var i=0; i<this.ChartPaint.length; ++i)
|
|
126134
126246
|
{
|
|
126135
126247
|
var item=this.ChartPaint[i];
|
|
126136
126248
|
if (!item.IsDrawFirst)
|
|
126137
|
-
item.Draw();
|
|
126249
|
+
item.Draw(this.LastMouseStatus);
|
|
126138
126250
|
}
|
|
126139
126251
|
|
|
126140
126252
|
if (this.GlobalOption.FlashBGCount>0)
|
|
@@ -127165,6 +127277,7 @@ function JSReportChartContainer(uielement)
|
|
|
127165
127277
|
var x = (e.clientX-this.UIElement.getBoundingClientRect().left)*pixelTatio;
|
|
127166
127278
|
var y = (e.clientY-this.UIElement.getBoundingClientRect().top)*pixelTatio;
|
|
127167
127279
|
|
|
127280
|
+
var oldMouseOnStatus=this.LastMouseStatus.MouseOnStatus;
|
|
127168
127281
|
this.LastMouseStatus.OnMouseMove=null;
|
|
127169
127282
|
|
|
127170
127283
|
var bDrawTooltip=false;
|
|
@@ -127176,6 +127289,7 @@ function JSReportChartContainer(uielement)
|
|
|
127176
127289
|
if (this.DragColumnWidth) return;
|
|
127177
127290
|
|
|
127178
127291
|
var tabChart=this.GetTabChart();
|
|
127292
|
+
var bDrawTab=false;
|
|
127179
127293
|
if (tabChart)
|
|
127180
127294
|
{
|
|
127181
127295
|
var tabData=tabChart.PtInTab(x,y);
|
|
@@ -127185,9 +127299,18 @@ function JSReportChartContainer(uielement)
|
|
|
127185
127299
|
if (tabChart.MoveOnTabIndex!=index)
|
|
127186
127300
|
{
|
|
127187
127301
|
tabChart.MoveOnTabIndex=index;
|
|
127188
|
-
|
|
127302
|
+
bDrawTab=true;
|
|
127189
127303
|
}
|
|
127190
127304
|
}
|
|
127305
|
+
else
|
|
127306
|
+
{
|
|
127307
|
+
if (tabChart.MoveOnTabIndex>=0)
|
|
127308
|
+
{
|
|
127309
|
+
tabChart.MoveOnTabIndex=-1;
|
|
127310
|
+
bDrawTab=true;
|
|
127311
|
+
}
|
|
127312
|
+
|
|
127313
|
+
}
|
|
127191
127314
|
}
|
|
127192
127315
|
|
|
127193
127316
|
this.LastMouseStatus.OnMouseMove={ X:x, Y:y };
|
|
@@ -127205,12 +127328,28 @@ function JSReportChartContainer(uielement)
|
|
|
127205
127328
|
}
|
|
127206
127329
|
else
|
|
127207
127330
|
{
|
|
127208
|
-
var
|
|
127209
|
-
|
|
127331
|
+
var buttonData=report.GetButtonData(x,y);
|
|
127332
|
+
var mouseOnStatus=null;
|
|
127333
|
+
if (buttonData)
|
|
127210
127334
|
{
|
|
127211
127335
|
mouseStatus={ Cursor:"pointer", Name:"Botton"};
|
|
127336
|
+
if (buttonData.Type==1 || buttonData.Type==0 || buttonData.Type==2)
|
|
127337
|
+
{
|
|
127338
|
+
mouseOnStatus={ Index:buttonData.Index, ColumnIndex:buttonData.ColumnIndex };
|
|
127339
|
+
}
|
|
127212
127340
|
}
|
|
127213
127341
|
|
|
127342
|
+
//console.log("[UIOnMouseMove] ", oldMouseOnStatus, mouseOnStatus)
|
|
127343
|
+
if ((!oldMouseOnStatus && mouseOnStatus) || (oldMouseOnStatus && !mouseOnStatus))
|
|
127344
|
+
{
|
|
127345
|
+
bDraw=true;
|
|
127346
|
+
}
|
|
127347
|
+
else if (oldMouseOnStatus && mouseOnStatus)
|
|
127348
|
+
{
|
|
127349
|
+
if (oldMouseOnStatus.Index!=mouseOnStatus.Index || oldMouseOnStatus.ColumnIndex!=mouseOnStatus.ColumnIndex)
|
|
127350
|
+
bDraw=true;
|
|
127351
|
+
}
|
|
127352
|
+
|
|
127214
127353
|
var tooltipData=report.GetTooltipData(x,y); //单元格提示信息
|
|
127215
127354
|
if (tooltipData)
|
|
127216
127355
|
{
|
|
@@ -127244,7 +127383,7 @@ function JSReportChartContainer(uielement)
|
|
|
127244
127383
|
|
|
127245
127384
|
if (mouseStatus) this.UIElement.style.cursor=mouseStatus.Cursor;
|
|
127246
127385
|
|
|
127247
|
-
if (bDraw) this.Draw();
|
|
127386
|
+
if (bDraw || bDrawTab) this.Draw();
|
|
127248
127387
|
else if (bDrawTooltip) this.DrawTooltip(this.LastMouseStatus.TooltipStatus);
|
|
127249
127388
|
}
|
|
127250
127389
|
|
|
@@ -128562,7 +128701,7 @@ function JSReportChartContainer(uielement)
|
|
|
128562
128701
|
switch(cmdID)
|
|
128563
128702
|
{
|
|
128564
128703
|
case JSCHART_MENU_ID.CMD_REPORT_CHANGE_BLOCK_ID:
|
|
128565
|
-
if (srcParam) this.ChangeSymbol(
|
|
128704
|
+
if (srcParam) this.ChangeSymbol(srcParam);
|
|
128566
128705
|
break;
|
|
128567
128706
|
}
|
|
128568
128707
|
}
|
|
@@ -129093,6 +129232,8 @@ var REPORT_COLUMN_ID=
|
|
|
129093
129232
|
CUSTOM_ICON_ID:103, //自定义图标
|
|
129094
129233
|
CUSTOM_CHECKBOX_ID:104, //自定义checkbox
|
|
129095
129234
|
CUSTOM_BUTTON_ID:105, //自定义按钮
|
|
129235
|
+
CUSTOM_PROGRESS_ID:106, //进度条
|
|
129236
|
+
CUSTOM_LINK_ID:107, //链接
|
|
129096
129237
|
}
|
|
129097
129238
|
|
|
129098
129239
|
var MAP_COLUMN_FIELD=new Map([
|
|
@@ -129263,6 +129404,9 @@ function ChartReport()
|
|
|
129263
129404
|
}
|
|
129264
129405
|
|
|
129265
129406
|
this.CheckBoxConfig=CloneData(g_JSChartResource.Report.CheckBox);
|
|
129407
|
+
this.LinkConfig=CloneData(g_JSChartResource.Report.Link);
|
|
129408
|
+
this.ProgressBarConfig=CloneData(g_JSChartResource.Report.ProgressBar);
|
|
129409
|
+
this.ButtonConfig=CloneData(g_JSChartResource.Report.Button);
|
|
129266
129410
|
|
|
129267
129411
|
//股票代码+股票名称
|
|
129268
129412
|
this.ItemSymbolFontConfig={Size:g_JSChartResource.Report.Item.SymbolFont.Size, Name:g_JSChartResource.Report.Item.SymbolFont.Name};
|
|
@@ -129306,6 +129450,8 @@ function ChartReport()
|
|
|
129306
129450
|
//{ Rect:rtItem, Type: 0=checkedbox, 1=button, 2=link , Stock, Index:index, Column:column }
|
|
129307
129451
|
this.ButtonRect=[];
|
|
129308
129452
|
|
|
129453
|
+
this.LastMouseStatus;
|
|
129454
|
+
|
|
129309
129455
|
this.ReloadResource=function(resource)
|
|
129310
129456
|
{
|
|
129311
129457
|
this.DevicePixelRatio=GetDevicePixelRatio()
|
|
@@ -129396,6 +129542,10 @@ function ChartReport()
|
|
|
129396
129542
|
|
|
129397
129543
|
if (this.Tab) this.Tab.ReloadResource(resource);
|
|
129398
129544
|
if (this.VScrollbar) this.VScrollbar.ReloadResource(resource);
|
|
129545
|
+
|
|
129546
|
+
this.CheckBoxConfig=CloneData(g_JSChartResource.Report.CheckBox);
|
|
129547
|
+
this.LinkConfig=CloneData(g_JSChartResource.Report.Link);
|
|
129548
|
+
this.ProgressBarConfig=CloneData(g_JSChartResource.Report.ProgressBar);
|
|
129399
129549
|
}
|
|
129400
129550
|
|
|
129401
129551
|
this.SetColumn=function(aryColumn)
|
|
@@ -129467,7 +129617,7 @@ function ChartReport()
|
|
|
129467
129617
|
if (IFrameSplitOperator.IsNumber(item.DataIndex)) colItem.DataIndex=item.DataIndex; //数据在扩展数据索引列
|
|
129468
129618
|
if (IFrameSplitOperator.IsNumber(item.BlockIndex)) colItem.BlockIndex=item.BlockIndex;
|
|
129469
129619
|
if (item.CheckBox) colItem.CheckBox=CloneData(item.CheckBox);
|
|
129470
|
-
else colItem.CheckBox=
|
|
129620
|
+
else colItem.CheckBox=this.CheckBoxConfig;
|
|
129471
129621
|
}
|
|
129472
129622
|
else if (item.Type==REPORT_COLUMN_ID.CUSTOM_BUTTON_ID)
|
|
129473
129623
|
{
|
|
@@ -129475,6 +129625,23 @@ function ChartReport()
|
|
|
129475
129625
|
if (IFrameSplitOperator.IsNumber(item.DataIndex)) colItem.DataIndex=item.DataIndex; //数据在扩展数据索引列
|
|
129476
129626
|
if (IFrameSplitOperator.IsNumber(item.BlockIndex)) colItem.BlockIndex=item.BlockIndex;
|
|
129477
129627
|
if (item.Button) colItem.Button=CloneData(item.Button);
|
|
129628
|
+
else colItem.Button=this.ButtonConfig;
|
|
129629
|
+
}
|
|
129630
|
+
else if (item.Type==REPORT_COLUMN_ID.CUSTOM_PROGRESS_ID)
|
|
129631
|
+
{
|
|
129632
|
+
if (!IFrameSplitOperator.IsNumber(item.DataIndex) && !IFrameSplitOperator.IsNumber(item.BlockIndex)) continue;
|
|
129633
|
+
if (IFrameSplitOperator.IsNumber(item.DataIndex)) colItem.DataIndex=item.DataIndex; //数据在扩展数据索引列
|
|
129634
|
+
if (IFrameSplitOperator.IsNumber(item.BlockIndex)) colItem.BlockIndex=item.BlockIndex;
|
|
129635
|
+
if (item.ProgressBar) colItem.ProgressBar=CloneData(item.ProgressBar);
|
|
129636
|
+
else colItem.ProgressBar=this.ProgressBarConfig;
|
|
129637
|
+
}
|
|
129638
|
+
else if (item.Type==REPORT_COLUMN_ID.CUSTOM_LINK_ID)
|
|
129639
|
+
{
|
|
129640
|
+
if (!IFrameSplitOperator.IsNumber(item.DataIndex) && !IFrameSplitOperator.IsNumber(item.BlockIndex)) continue;
|
|
129641
|
+
if (IFrameSplitOperator.IsNumber(item.DataIndex)) colItem.DataIndex=item.DataIndex; //数据在扩展数据索引列
|
|
129642
|
+
if (IFrameSplitOperator.IsNumber(item.BlockIndex)) colItem.BlockIndex=item.BlockIndex;
|
|
129643
|
+
if (item.Link) colItem.Link=CloneData(item.Link);
|
|
129644
|
+
else colItem.Link=this.LinkConfig;
|
|
129478
129645
|
}
|
|
129479
129646
|
else if (item.Type==REPORT_COLUMN_ID.CUSTOM_ICON_ID)
|
|
129480
129647
|
{
|
|
@@ -129593,7 +129760,9 @@ function ChartReport()
|
|
|
129593
129760
|
|
|
129594
129761
|
{ Type:REPORT_COLUMN_ID.CUSTOM_CHECKBOX_ID, Title:"", TextAlign:"center", FixedWidth:20*GetDevicePixelRatio() },
|
|
129595
129762
|
|
|
129596
|
-
{ Type:REPORT_COLUMN_ID.CUSTOM_BUTTON_ID, Title:"", TextAlign:"center", FixedWidth:50*GetDevicePixelRatio() }
|
|
129763
|
+
{ Type:REPORT_COLUMN_ID.CUSTOM_BUTTON_ID, Title:"", TextAlign:"center", FixedWidth:50*GetDevicePixelRatio() },
|
|
129764
|
+
{ Type:REPORT_COLUMN_ID.CUSTOM_PROGRESS_ID, Title:"进度条", TextAlign:"center", FixedWidth:100*GetDevicePixelRatio() },
|
|
129765
|
+
{ Type:REPORT_COLUMN_ID.CUSTOM_LINK_ID, Title:"链接地址", TextAlign:"center", MaxText:"擎擎擎擎擎" }
|
|
129597
129766
|
];
|
|
129598
129767
|
|
|
129599
129768
|
for(var i=0;i<DEFAULT_COLUMN.length;++i)
|
|
@@ -129614,12 +129783,13 @@ function ChartReport()
|
|
|
129614
129783
|
this.Canvas.clip();
|
|
129615
129784
|
}
|
|
129616
129785
|
|
|
129617
|
-
this.Draw=function()
|
|
129786
|
+
this.Draw=function(lastMouseStatus)
|
|
129618
129787
|
{
|
|
129619
129788
|
this.ShowSymbol=[];
|
|
129620
129789
|
this.TooltipRect=[];
|
|
129621
129790
|
this.ButtonRect=[];
|
|
129622
129791
|
this.DevicePixelRatio=GetDevicePixelRatio()
|
|
129792
|
+
this.LastMouseStatus=lastMouseStatus;
|
|
129623
129793
|
|
|
129624
129794
|
if (this.GlobalOption) this.GlobalOption.FlashBGCount=0;
|
|
129625
129795
|
|
|
@@ -129651,6 +129821,7 @@ function ChartReport()
|
|
|
129651
129821
|
this.VScrollbar.DrawScrollbar(this.RectClient.Left,this.RectClient.Top+this.HeaderHeight, this.RectClient.Right, bottom-this.BottomToolbarHeight-4);
|
|
129652
129822
|
}
|
|
129653
129823
|
|
|
129824
|
+
this.LastMouseStatus=null;
|
|
129654
129825
|
this.SizeChange=false;
|
|
129655
129826
|
}
|
|
129656
129827
|
|
|
@@ -130290,7 +130461,7 @@ function ChartReport()
|
|
|
130290
130461
|
for(var i=0;i<this.FixedColumn && i<this.Column.length;++i)
|
|
130291
130462
|
{
|
|
130292
130463
|
var item=this.Column[i];
|
|
130293
|
-
this.DrawItem(dataIndex, data, item, left, top, rowType);
|
|
130464
|
+
this.DrawItem(dataIndex, data, item, left, top, rowType, i);
|
|
130294
130465
|
left+=item.Width;
|
|
130295
130466
|
|
|
130296
130467
|
if (left>=chartRight) break;
|
|
@@ -130299,20 +130470,24 @@ function ChartReport()
|
|
|
130299
130470
|
for(var i=this.FixedColumn+this.Data.XOffset;i<this.Column.length;++i)
|
|
130300
130471
|
{
|
|
130301
130472
|
var item=this.Column[i];
|
|
130302
|
-
this.DrawItem(dataIndex, data, item, left, top, rowType);
|
|
130473
|
+
this.DrawItem(dataIndex, data, item, left, top, rowType, i);
|
|
130303
130474
|
left+=item.Width;
|
|
130304
130475
|
|
|
130305
130476
|
if (left>=chartRight) break;
|
|
130306
130477
|
}
|
|
130307
130478
|
}
|
|
130308
130479
|
|
|
130309
|
-
this.DrawItem=function(index, data, column, left, top, rowType)
|
|
130480
|
+
this.DrawItem=function(index, data, column, left, top, rowType, columnIndex)
|
|
130310
130481
|
{
|
|
130311
130482
|
var itemWidth=column.Width;
|
|
130312
130483
|
var x=left+this.ItemMergin.Left;
|
|
130313
130484
|
var textWidth=column.Width-this.ItemMergin.Left-this.ItemMergin.Right;
|
|
130314
130485
|
var stock=data.Stock;
|
|
130315
|
-
var drawInfo=
|
|
130486
|
+
var drawInfo=
|
|
130487
|
+
{
|
|
130488
|
+
Text:null, TextColor:column.TextColor , TextAlign:column.TextAlign, Tooltip:null,
|
|
130489
|
+
Index:index, ColumnIndex:columnIndex
|
|
130490
|
+
};
|
|
130316
130491
|
var rtItem={ Left:left, Top:top, Width:column.Width, Height:this.RowHeight };
|
|
130317
130492
|
rtItem.Right=rtItem.Left+rtItem.Width;
|
|
130318
130493
|
rtItem.Bottom=rtItem.Top+rtItem.Height;
|
|
@@ -130566,6 +130741,19 @@ function ChartReport()
|
|
|
130566
130741
|
|
|
130567
130742
|
this.GetCustomButtonDrawInfo(data, column, drawInfo);
|
|
130568
130743
|
}
|
|
130744
|
+
else if (column.Type==REPORT_COLUMN_ID.CUSTOM_PROGRESS_ID)
|
|
130745
|
+
{
|
|
130746
|
+
rtItem={ Left:left, Top:top, Width:column.Width, Height:this.RowHeight };
|
|
130747
|
+
rtItem.Right=rtItem.Left+rtItem.Width;
|
|
130748
|
+
rtItem.Bottom=rtItem.Top+rtItem.Height;
|
|
130749
|
+
drawInfo.Rect=rtItem;
|
|
130750
|
+
|
|
130751
|
+
this.GetCustomProgressBarDrawInfo(data, column, drawInfo);
|
|
130752
|
+
}
|
|
130753
|
+
else if (column.Type==REPORT_COLUMN_ID.CUSTOM_LINK_ID)
|
|
130754
|
+
{
|
|
130755
|
+
this.GetCustomLinkDrawInfo(data, column, drawInfo);
|
|
130756
|
+
}
|
|
130569
130757
|
|
|
130570
130758
|
|
|
130571
130759
|
//拖拽行颜色
|
|
@@ -130588,6 +130776,14 @@ function ChartReport()
|
|
|
130588
130776
|
{
|
|
130589
130777
|
this.DrawButton(drawInfo, left, top, itemWidth);
|
|
130590
130778
|
}
|
|
130779
|
+
else if (column.Type==REPORT_COLUMN_ID.CUSTOM_PROGRESS_ID)
|
|
130780
|
+
{
|
|
130781
|
+
this.DrawProgressBar(drawInfo, left, top, itemWidth);
|
|
130782
|
+
}
|
|
130783
|
+
else if (column.Type==REPORT_COLUMN_ID.CUSTOM_LINK_ID)
|
|
130784
|
+
{
|
|
130785
|
+
this.DrawLinkText(drawInfo, x, top, textWidth);
|
|
130786
|
+
}
|
|
130591
130787
|
else
|
|
130592
130788
|
{
|
|
130593
130789
|
if (data.FlashBG && data.FlashBG.Data && column.ID!=undefined)
|
|
@@ -130621,7 +130817,7 @@ function ChartReport()
|
|
|
130621
130817
|
|
|
130622
130818
|
if (drawInfo.Botton)
|
|
130623
130819
|
{
|
|
130624
|
-
var buttonData={ Stock:stock, Index:index, Column:column, Rect:drawInfo.Botton.Rect, Type:drawInfo.Botton.Type, Data:drawInfo.Data };
|
|
130820
|
+
var buttonData={ Stock:stock, Index:index, ColumnIndex:columnIndex, Column:column, Rect:drawInfo.Botton.Rect, Type:drawInfo.Botton.Type, Data:drawInfo.Data };
|
|
130625
130821
|
this.ButtonRect.push(buttonData);
|
|
130626
130822
|
}
|
|
130627
130823
|
}
|
|
@@ -130903,6 +131099,36 @@ function ChartReport()
|
|
|
130903
131099
|
if (IFrameSplitOperator.IsBool(buttonData.Enable)) drawInfo.Enable=buttonData.Enable;
|
|
130904
131100
|
}
|
|
130905
131101
|
|
|
131102
|
+
this.GetCustomProgressBarDrawInfo=function(data, column, drawInfo)
|
|
131103
|
+
{
|
|
131104
|
+
var barData=this.GetExtendData(data, column);
|
|
131105
|
+
if (!barData) return;
|
|
131106
|
+
|
|
131107
|
+
drawInfo.Text=barData.Title;
|
|
131108
|
+
drawInfo.ProgressBar=column.ProgressBar;
|
|
131109
|
+
drawInfo.Enable=true;
|
|
131110
|
+
drawInfo.Value=barData.Value; //占比
|
|
131111
|
+
drawInfo.Data=barData;
|
|
131112
|
+
if (IFrameSplitOperator.IsBool(barData.Enable)) drawInfo.Enable=barData.Enable;
|
|
131113
|
+
if (barData.TextColor) drawInfo.TextColor=barData.TextColor;
|
|
131114
|
+
if (barData.BarColor) drawInfo.BarColor=barData.BarColor;
|
|
131115
|
+
if (barData.BGColor) drawInfo.BGColor=barData.BGColor;
|
|
131116
|
+
}
|
|
131117
|
+
|
|
131118
|
+
this.GetCustomLinkDrawInfo=function(data, column, drawInfo)
|
|
131119
|
+
{
|
|
131120
|
+
var linkData=this.GetExtendData(data, column);
|
|
131121
|
+
if (!linkData) return;
|
|
131122
|
+
|
|
131123
|
+
drawInfo.Text=linkData.Title;
|
|
131124
|
+
drawInfo.Link=column.Link;
|
|
131125
|
+
drawInfo.Enable=true;
|
|
131126
|
+
drawInfo.Data=linkData;
|
|
131127
|
+
drawInfo.MaxText=column.MaxText;
|
|
131128
|
+
if (IFrameSplitOperator.IsBool(linkData.Enable)) drawInfo.Enable=linkData.Enable;
|
|
131129
|
+
if (linkData.TextColor) drawInfo.TextColor=linkData.TextColor;
|
|
131130
|
+
}
|
|
131131
|
+
|
|
130906
131132
|
this.FormaTimeDrawInfo=function(column, stock, drawInfo, data)
|
|
130907
131133
|
{
|
|
130908
131134
|
if (!IFrameSplitOperator.IsNumber(stock.Time)) return;
|
|
@@ -131172,35 +131398,57 @@ function ChartReport()
|
|
|
131172
131398
|
if (!IFrameSplitOperator.IsBool(drawInfo.Checked)) return;
|
|
131173
131399
|
if (!drawInfo.CheckBox) return;
|
|
131174
131400
|
|
|
131175
|
-
|
|
131401
|
+
var config=drawInfo.CheckBox;
|
|
131402
|
+
drawInfo.Font=`${config.Size*this.DevicePixelRatio}px ${config.Family}`;
|
|
131176
131403
|
var textAlign=drawInfo.TextAlign;
|
|
131177
131404
|
var size=drawInfo.CheckBox.Size*this.DevicePixelRatio;
|
|
131178
131405
|
var x=left+drawInfo.CheckBox.Margin.Left;
|
|
131179
131406
|
var y=top+this.RowHeight-drawInfo.CheckBox.Margin.Bottom;
|
|
131407
|
+
|
|
131180
131408
|
if (textAlign=='center') x=left+width/2-size/2;
|
|
131181
|
-
else if (textAlign=='right') x=left+width-
|
|
131409
|
+
else if (textAlign=='right') x=left+width-config.Margin.Right;
|
|
131410
|
+
|
|
131411
|
+
var rtBox={ Left:x, Bottom:y, Width:size, Height:size };
|
|
131412
|
+
rtBox.Right=rtBox.Left+rtBox.Width;
|
|
131413
|
+
rtBox.Top=rtBox.Bottom-rtBox.Height;
|
|
131414
|
+
|
|
131415
|
+
//鼠标在上面
|
|
131416
|
+
var bMouseOn=false;
|
|
131417
|
+
if (drawInfo.Enable && this.LastMouseStatus && this.LastMouseStatus.OnMouseMove)
|
|
131418
|
+
{
|
|
131419
|
+
var xMouse=this.LastMouseStatus.OnMouseMove.X;
|
|
131420
|
+
var yMouse=this.LastMouseStatus.OnMouseMove.Y;
|
|
131421
|
+
if (xMouse>rtBox.Left && xMouse<rtBox.Right && yMouse>rtBox.Top && yMouse<rtBox.Bottom)
|
|
131422
|
+
{
|
|
131423
|
+
bMouseOn=true;
|
|
131424
|
+
this.LastMouseStatus.MouseOnStatus={ Index:drawInfo.Index, ColumnIndex:drawInfo.ColumnIndex, Type:0 };
|
|
131425
|
+
}
|
|
131426
|
+
}
|
|
131182
131427
|
|
|
131183
131428
|
this.Canvas.font=drawInfo.Font;
|
|
131184
131429
|
this.Canvas.textBaseline="bottom";
|
|
131185
131430
|
this.Canvas.textAlign="left";
|
|
131186
131431
|
if (drawInfo.Checked===true)
|
|
131187
131432
|
{
|
|
131188
|
-
|
|
131189
|
-
|
|
131190
|
-
|
|
131433
|
+
var textColor=config.Checked.Color;
|
|
131434
|
+
if (drawInfo.Enable===false) textColor=config.Checked.DisableColor;
|
|
131435
|
+
else if (bMouseOn) textColor=config.Checked.MouseOnColor;
|
|
131436
|
+
|
|
131437
|
+
this.Canvas.fillStyle=textColor;
|
|
131438
|
+
this.Canvas.fillText(config.Checked.Symbol,x,y);
|
|
131191
131439
|
}
|
|
131192
131440
|
else if (drawInfo.Checked===false)
|
|
131193
131441
|
{
|
|
131194
|
-
|
|
131195
|
-
|
|
131196
|
-
|
|
131442
|
+
var textColor=config.Unchecked.Color;
|
|
131443
|
+
if (drawInfo.Enable===false) textColor=config.Unchecked.DisableColor;
|
|
131444
|
+
else if (bMouseOn) textColor=config.Unchecked.MouseOnColor;
|
|
131445
|
+
|
|
131446
|
+
this.Canvas.fillStyle=textColor;
|
|
131447
|
+
this.Canvas.fillText(config.Unchecked.Symbol,x,y);
|
|
131197
131448
|
}
|
|
131198
131449
|
|
|
131199
131450
|
if (drawInfo.Enable)
|
|
131200
131451
|
{
|
|
131201
|
-
var rtBox={ Left:x, Bottom:y, Width:size, Height:size };
|
|
131202
|
-
rtBox.Right=rtBox.Left+rtBox.Width;
|
|
131203
|
-
rtBox.Top=rtBox.Bottom-rtBox.Height;
|
|
131204
131452
|
drawInfo.Botton={ Rect:rtBox, Type:0 };
|
|
131205
131453
|
}
|
|
131206
131454
|
}
|
|
@@ -131209,6 +131457,7 @@ function ChartReport()
|
|
|
131209
131457
|
{
|
|
131210
131458
|
if (!drawInfo.Button) return;
|
|
131211
131459
|
|
|
131460
|
+
var config=drawInfo.Button;
|
|
131212
131461
|
var rtBG=
|
|
131213
131462
|
{
|
|
131214
131463
|
Left:left+drawInfo.Button.Margin.Left, Top:top+drawInfo.Button.Margin.Top,
|
|
@@ -131218,11 +131467,26 @@ function ChartReport()
|
|
|
131218
131467
|
rtBG.Right=rtBG.Left+rtBG.Width;
|
|
131219
131468
|
rtBG.Bottom=rtBG.Top+rtBG.Height;
|
|
131220
131469
|
|
|
131221
|
-
var bgColor=
|
|
131470
|
+
var bgColor=config.BGColor, textColor=config.TextColor;
|
|
131222
131471
|
if (drawInfo.Enable===false)
|
|
131223
131472
|
{
|
|
131224
|
-
bgColor=
|
|
131225
|
-
textColor=
|
|
131473
|
+
bgColor=config.Disable.BGColor;
|
|
131474
|
+
textColor=config.Disable.TextColor;
|
|
131475
|
+
}
|
|
131476
|
+
else
|
|
131477
|
+
{
|
|
131478
|
+
if (this.LastMouseStatus && this.LastMouseStatus.OnMouseMove && config.MouseOn)
|
|
131479
|
+
{
|
|
131480
|
+
var x=this.LastMouseStatus.OnMouseMove.X;
|
|
131481
|
+
var y=this.LastMouseStatus.OnMouseMove.Y;
|
|
131482
|
+
if (x>rtBG.Left && x<rtBG.Right && y>rtBG.Top && y<rtBG.Bottom)
|
|
131483
|
+
{
|
|
131484
|
+
bgColor=config.MouseOn.BGColor;
|
|
131485
|
+
textColor=config.MouseOn.TextColor;
|
|
131486
|
+
|
|
131487
|
+
this.LastMouseStatus.MouseOnStatus={ Index:drawInfo.Index, ColumnIndex:drawInfo.ColumnIndex, Type:1 };
|
|
131488
|
+
}
|
|
131489
|
+
}
|
|
131226
131490
|
}
|
|
131227
131491
|
|
|
131228
131492
|
this.Canvas.fillStyle=bgColor;
|
|
@@ -131245,6 +131509,142 @@ function ChartReport()
|
|
|
131245
131509
|
}
|
|
131246
131510
|
}
|
|
131247
131511
|
|
|
131512
|
+
this.DrawProgressBar=function(drawInfo, left, top, width)
|
|
131513
|
+
{
|
|
131514
|
+
if (!drawInfo.ProgressBar) return;
|
|
131515
|
+
|
|
131516
|
+
var config=drawInfo.ProgressBar;
|
|
131517
|
+
var rtBG=
|
|
131518
|
+
{
|
|
131519
|
+
Left:left+config.Margin.Left, Top:top+config.Margin.Top,
|
|
131520
|
+
Height:this.RowHeight-config.Margin.Top-config.Margin.Bottom,
|
|
131521
|
+
Width:width-config.Margin.Left-config.Margin.Right
|
|
131522
|
+
}
|
|
131523
|
+
rtBG.Right=rtBG.Left+rtBG.Width;
|
|
131524
|
+
rtBG.Bottom=rtBG.Top+rtBG.Height;
|
|
131525
|
+
|
|
131526
|
+
var bgColor=config.BGColor;
|
|
131527
|
+
var barColor=config.BarColor;
|
|
131528
|
+
var textColor=config.TextColor;
|
|
131529
|
+
if (drawInfo.Enable===false)
|
|
131530
|
+
{
|
|
131531
|
+
bgColor=config.Disable.BGColor;
|
|
131532
|
+
barColor=config.Disable.BarColor;
|
|
131533
|
+
textColor=config.Disable.TextColor;
|
|
131534
|
+
}
|
|
131535
|
+
|
|
131536
|
+
if (drawInfo.BGColor) bgColor=drawInfo.BGColor;
|
|
131537
|
+
if (drawInfo.TextColor) textColor=drawInfo.TextColor;
|
|
131538
|
+
if (drawInfo.BarColor) barColor=drawInfo.BarColor;
|
|
131539
|
+
|
|
131540
|
+
if (bgColor)
|
|
131541
|
+
{
|
|
131542
|
+
this.Canvas.fillStyle=bgColor;
|
|
131543
|
+
this.Canvas.fillRect(rtBG.Left, rtBG.Top,rtBG.Width,rtBG.Height);
|
|
131544
|
+
}
|
|
131545
|
+
|
|
131546
|
+
var fullBarWidth=rtBG.Width-config.BarMargin.Left-config.BarMargin.Right;
|
|
131547
|
+
var value=drawInfo.Value; // 0-1 进度条
|
|
131548
|
+
var rtBar={ Left:rtBG.Left+config.BarMargin.Left, Top:rtBG.Top+config.BarMargin.Top, Bottom:rtBG.Bottom-config.BarMargin.Bottom, Width:0 };
|
|
131549
|
+
if (value>0)
|
|
131550
|
+
{
|
|
131551
|
+
if (value>1) value=1;
|
|
131552
|
+
rtBar.Width=fullBarWidth*value;
|
|
131553
|
+
rtBar.Height=rtBar.Bottom-rtBar.Top;
|
|
131554
|
+
if (rtBar.Width<1) rtBG.Width=1;
|
|
131555
|
+
|
|
131556
|
+
this.Canvas.fillStyle=barColor;
|
|
131557
|
+
this.Canvas.fillRect(rtBar.Left, rtBar.Top,rtBar.Width,rtBar.Height);
|
|
131558
|
+
}
|
|
131559
|
+
|
|
131560
|
+
if (textColor && drawInfo.Text)
|
|
131561
|
+
{
|
|
131562
|
+
this.Canvas.font=config.Font;
|
|
131563
|
+
this.Canvas.textBaseline="bottom";
|
|
131564
|
+
this.Canvas.textAlign="left";
|
|
131565
|
+
|
|
131566
|
+
this.Canvas.fillStyle=textColor;
|
|
131567
|
+
var xText=rtBar.Left+config.TextMargin.Left;
|
|
131568
|
+
var yText=rtBar.Bottom-config.TextMargin.Bottom;
|
|
131569
|
+
this.Canvas.fillText(drawInfo.Text, xText, yText);
|
|
131570
|
+
}
|
|
131571
|
+
}
|
|
131572
|
+
|
|
131573
|
+
this.DrawLinkText=function(drawInfo, left, top, width)
|
|
131574
|
+
{
|
|
131575
|
+
if (!drawInfo.Link || !drawInfo.Text) return;
|
|
131576
|
+
|
|
131577
|
+
var config=drawInfo.Link;
|
|
131578
|
+
var text=drawInfo.Text;
|
|
131579
|
+
var textAlign=drawInfo.TextAlign;
|
|
131580
|
+
var font=config.Font;
|
|
131581
|
+
var color=config.TextColor;
|
|
131582
|
+
|
|
131583
|
+
|
|
131584
|
+
|
|
131585
|
+
this.Canvas.font=font;
|
|
131586
|
+
var textWidth=this.Canvas.measureText(text).width;
|
|
131587
|
+
var textHeight=this.Canvas.measureText("擎").width;
|
|
131588
|
+
var x=left;
|
|
131589
|
+
if (width>=textWidth)
|
|
131590
|
+
{
|
|
131591
|
+
if (textAlign=='center') x=left+(width-textWidth)/2;
|
|
131592
|
+
else if (textAlign=='right') x=left+width-textWidth;
|
|
131593
|
+
}
|
|
131594
|
+
else
|
|
131595
|
+
{
|
|
131596
|
+
text=this.TextEllipsis(text, width, drawInfo.MaxText);
|
|
131597
|
+
textWidth=this.Canvas.measureText(text).width;
|
|
131598
|
+
|
|
131599
|
+
//数据截断提示信息
|
|
131600
|
+
drawInfo.Tooltip=
|
|
131601
|
+
{
|
|
131602
|
+
Type:2,
|
|
131603
|
+
Data:{ AryText:[ {Text:drawInfo.Text} ] }
|
|
131604
|
+
}
|
|
131605
|
+
}
|
|
131606
|
+
|
|
131607
|
+
var rtText={Left:x, Bottom:top+this.RowHeight-this.ItemMergin.Bottom, Height:textHeight, Width:textWidth };
|
|
131608
|
+
rtText.Right=rtText.Left+rtText.Width;
|
|
131609
|
+
rtText.Top=rtText.Bottom-rtText.Height;
|
|
131610
|
+
|
|
131611
|
+
var drawLine=false; //下划线
|
|
131612
|
+
if (drawInfo.Enable===false)
|
|
131613
|
+
{
|
|
131614
|
+
color=config.Disable.TextColor;
|
|
131615
|
+
}
|
|
131616
|
+
else if (this.LastMouseStatus && this.LastMouseStatus.OnMouseMove && config.MouseOn)
|
|
131617
|
+
{
|
|
131618
|
+
var x=this.LastMouseStatus.OnMouseMove.X;
|
|
131619
|
+
var y=this.LastMouseStatus.OnMouseMove.Y;
|
|
131620
|
+
if (x>rtText.Left && x<rtText.Right && y>rtText.Top && y<rtText.Bottom)
|
|
131621
|
+
{
|
|
131622
|
+
color=config.MouseOn.TextColor;
|
|
131623
|
+
drawLine=true;
|
|
131624
|
+
this.LastMouseStatus.MouseOnStatus={ Index:drawInfo.Index, ColumnIndex:drawInfo.ColumnIndex, Type:2 };
|
|
131625
|
+
}
|
|
131626
|
+
}
|
|
131627
|
+
|
|
131628
|
+
this.Canvas.textBaseline="bottom";
|
|
131629
|
+
this.Canvas.textAlign="left";
|
|
131630
|
+
this.Canvas.fillStyle=color;
|
|
131631
|
+
this.Canvas.fillText(text,rtText.Left, rtText.Bottom);
|
|
131632
|
+
|
|
131633
|
+
if (drawLine)
|
|
131634
|
+
{
|
|
131635
|
+
this.Canvas.strokeStyle=color;
|
|
131636
|
+
this.Canvas.beginPath();
|
|
131637
|
+
this.Canvas.moveTo(rtText.Left,rtText.Bottom);
|
|
131638
|
+
this.Canvas.lineTo(rtText.Right,rtText.Bottom);
|
|
131639
|
+
this.Canvas.stroke();
|
|
131640
|
+
}
|
|
131641
|
+
|
|
131642
|
+
if (drawInfo.Enable)
|
|
131643
|
+
{
|
|
131644
|
+
drawInfo.Botton={ Rect:rtText, Type:2 };
|
|
131645
|
+
}
|
|
131646
|
+
}
|
|
131647
|
+
|
|
131248
131648
|
//字体由外面设置
|
|
131249
131649
|
this.TextEllipsis=function(text, maxWidth, maxText)
|
|
131250
131650
|
{
|
|
@@ -131957,6 +132357,14 @@ function ChartReport()
|
|
|
131957
132357
|
status.Redraw=true;
|
|
131958
132358
|
return true;
|
|
131959
132359
|
}
|
|
132360
|
+
else if (buttonData.Type===2) //link
|
|
132361
|
+
{
|
|
132362
|
+
var sendData={ Column:buttonData.Column, Index:buttonData.Index, Stock:buttonData.Stock, Data:buttonData.Data };
|
|
132363
|
+
this.SendClickEvent(JSCHART_EVENT_ID.ON_CLICK_REPORT_LINK, sendData)
|
|
132364
|
+
|
|
132365
|
+
status.Redraw=true;
|
|
132366
|
+
return true;
|
|
132367
|
+
}
|
|
131960
132368
|
|
|
131961
132369
|
return false;
|
|
131962
132370
|
}
|
|
@@ -132211,7 +132619,7 @@ function ChartReport()
|
|
|
132211
132619
|
|
|
132212
132620
|
if (x>=rt.Left && x<=rt.Right && y>=rt.Top && y<=rt.Bottom)
|
|
132213
132621
|
{
|
|
132214
|
-
return { Rect:item.Rect, Stock:item.Stock, Column:item.Column, Index:item.Index, Type:item.Type, Data:item.Data };
|
|
132622
|
+
return { Rect:item.Rect, Stock:item.Stock, Column:item.Column, Index:item.Index, Type:item.Type, Data:item.Data, ColumnIndex:item.ColumnIndex };
|
|
132215
132623
|
}
|
|
132216
132624
|
}
|
|
132217
132625
|
}
|
|
@@ -134644,26 +135052,36 @@ function JSScrollBarChart(divElement)
|
|
|
134644
135052
|
{
|
|
134645
135053
|
this.DivElement=divElement;
|
|
134646
135054
|
this.JSChartContainer; //表格控件
|
|
135055
|
+
this.ResizeListener;
|
|
134647
135056
|
|
|
134648
|
-
|
|
134649
|
-
|
|
134650
|
-
|
|
134651
|
-
|
|
134652
|
-
|
|
134653
|
-
|
|
134654
|
-
|
|
134655
|
-
|
|
134656
|
-
|
|
134657
|
-
|
|
134658
|
-
|
|
135057
|
+
//h5 canvas
|
|
135058
|
+
this.CanvasElement=document.createElement("canvas");
|
|
135059
|
+
this.CanvasElement.className='jsscrollbar-drawing';
|
|
135060
|
+
this.CanvasElement.id=Guid();
|
|
135061
|
+
this.CanvasElement.setAttribute("tabindex",0);
|
|
135062
|
+
if (this.CanvasElement.style) this.CanvasElement.style.outline='none';
|
|
135063
|
+
if(divElement.hasChildNodes())
|
|
135064
|
+
{
|
|
135065
|
+
JSConsole.Chart.Log("[JSScrollBarChart::JSScrollBarChart] divElement hasChildNodes", divElement.childNodes);
|
|
135066
|
+
}
|
|
135067
|
+
divElement.appendChild(this.CanvasElement);
|
|
134659
135068
|
|
|
134660
135069
|
|
|
134661
135070
|
this.OnSize=function()
|
|
134662
135071
|
{
|
|
134663
135072
|
//画布大小通过div获取
|
|
134664
|
-
var height=
|
|
135073
|
+
var height=this.DivElement.offsetHeight;
|
|
135074
|
+
var width=this.DivElement.offsetWidth;
|
|
135075
|
+
if (this.DivElement.style.height && this.DivElement.style.width)
|
|
135076
|
+
{
|
|
135077
|
+
if (this.DivElement.style.height.includes("px"))
|
|
135078
|
+
height=parseInt(this.DivElement.style.height.replace("px",""));
|
|
135079
|
+
if (this.DivElement.style.width.includes("px"))
|
|
135080
|
+
width=parseInt(this.DivElement.style.width.replace("px",""));
|
|
135081
|
+
}
|
|
135082
|
+
|
|
134665
135083
|
this.CanvasElement.height=height;
|
|
134666
|
-
this.CanvasElement.width=
|
|
135084
|
+
this.CanvasElement.width=width;
|
|
134667
135085
|
this.CanvasElement.style.width=this.CanvasElement.width+'px';
|
|
134668
135086
|
this.CanvasElement.style.height=this.CanvasElement.height+'px';
|
|
134669
135087
|
|
|
@@ -134685,12 +135103,14 @@ function JSScrollBarChart(divElement)
|
|
|
134685
135103
|
|
|
134686
135104
|
if (!chart) return false;
|
|
134687
135105
|
|
|
135106
|
+
this.JSChartContainer=chart;
|
|
135107
|
+
this.DivElement.JSChart=this; //div中保存一份
|
|
135108
|
+
|
|
135109
|
+
if (option.EnableResize==true) this.CreateResizeListener();
|
|
135110
|
+
|
|
134688
135111
|
if (option.OnCreatedCallback) option.OnCreatedCallback(chart);
|
|
134689
135112
|
|
|
134690
135113
|
chart.Draw();
|
|
134691
|
-
|
|
134692
|
-
this.JSChartContainer=chart;
|
|
134693
|
-
this.DivElement.JSChart=this; //div中保存一份
|
|
134694
135114
|
}
|
|
134695
135115
|
|
|
134696
135116
|
this.CreateJSScrollBarChartContainer=function(option)
|
|
@@ -134735,6 +135155,18 @@ function JSScrollBarChart(divElement)
|
|
|
134735
135155
|
if (IFrameSplitOperator.IsBool(item.AutoRight)) chart.AutoMargin.Right=item.AutoRight;
|
|
134736
135156
|
}
|
|
134737
135157
|
|
|
135158
|
+
this.CreateResizeListener=function()
|
|
135159
|
+
{
|
|
135160
|
+
this.ResizeListener = new ResizeObserver((entries)=>{ this.OnDivResize(entries); });
|
|
135161
|
+
this.ResizeListener.observe(this.DivElement);
|
|
135162
|
+
}
|
|
135163
|
+
|
|
135164
|
+
this.OnDivResize=function(entries)
|
|
135165
|
+
{
|
|
135166
|
+
JSConsole.Chart.Log("[JSScrollBarChart::OnDivResize] entries=", entries);
|
|
135167
|
+
this.OnSize( );
|
|
135168
|
+
}
|
|
135169
|
+
|
|
134738
135170
|
/////////////////////////////////////////////////////////////////////////////
|
|
134739
135171
|
//对外接口
|
|
134740
135172
|
|
|
@@ -134880,6 +135312,11 @@ function JSScrollBarChartContainer(uielement)
|
|
|
134880
135312
|
this.IsDestroy=true;
|
|
134881
135313
|
}
|
|
134882
135314
|
|
|
135315
|
+
this.GetHQChart=function()
|
|
135316
|
+
{
|
|
135317
|
+
return this.HQChart;
|
|
135318
|
+
}
|
|
135319
|
+
|
|
134883
135320
|
//设置事件回调
|
|
134884
135321
|
//{event:事件id, callback:回调函数}
|
|
134885
135322
|
this.AddEventCallback=function(object)
|
|
@@ -134958,6 +135395,36 @@ function JSScrollBarChartContainer(uielement)
|
|
|
134958
135395
|
//this.UIElement.ontouchend=(e)=> {this.OnTouchEnd(e); }
|
|
134959
135396
|
}
|
|
134960
135397
|
|
|
135398
|
+
//创建一个图形
|
|
135399
|
+
this.CreateChartPaint=function(name)
|
|
135400
|
+
{
|
|
135401
|
+
var chart=g_ChartPaintFactory.Create(name);
|
|
135402
|
+
if (!chart) return null;
|
|
135403
|
+
|
|
135404
|
+
chart.ChartFrame=this.Frame;
|
|
135405
|
+
chart.ChartBorder=this.Frame.ChartBorder;
|
|
135406
|
+
chart.Canvas=this.Canvas;
|
|
135407
|
+
chart.Data=this.Frame.Data;
|
|
135408
|
+
chart.GetEventCallback=(id)=> { return this.GetEventCallback(id); }
|
|
135409
|
+
chart.GetHQChartCallback=()=>{ return this.GetHQChart(); }
|
|
135410
|
+
|
|
135411
|
+
return chart;
|
|
135412
|
+
}
|
|
135413
|
+
|
|
135414
|
+
this.GetChartPaintByClassName=function(name)
|
|
135415
|
+
{
|
|
135416
|
+
for(var i=0; i<this.ChartPaint.length; ++i)
|
|
135417
|
+
{
|
|
135418
|
+
var item=this.ChartPaint[i];
|
|
135419
|
+
if (item.ClassName==name)
|
|
135420
|
+
{
|
|
135421
|
+
return { Chart:item, Index:i };
|
|
135422
|
+
}
|
|
135423
|
+
}
|
|
135424
|
+
|
|
135425
|
+
return null;
|
|
135426
|
+
}
|
|
135427
|
+
|
|
134961
135428
|
this.Draw=function()
|
|
134962
135429
|
{
|
|
134963
135430
|
if (this.UIElement.width<=0 || this.UIElement.height<=0) return;
|
|
@@ -136046,7 +136513,7 @@ function ScrollBarBGChart()
|
|
|
136046
136513
|
|
|
136047
136514
|
|
|
136048
136515
|
|
|
136049
|
-
var HQCHART_VERSION="1.1.
|
|
136516
|
+
var HQCHART_VERSION="1.1.13583";
|
|
136050
136517
|
|
|
136051
136518
|
function PrintHQChartVersion()
|
|
136052
136519
|
{
|