hqchart 1.1.14269 → 1.1.14274
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 +214 -41
- package/package.json +1 -1
- package/src/jscommon/umychart.DialogTooltip.js +43 -0
- package/src/jscommon/umychart.NetworkFilterTest.js +139 -1
- package/src/jscommon/umychart.complier.js +0 -3
- package/src/jscommon/umychart.js +1 -1
- package/src/jscommon/umychart.report.js +241 -231
- package/src/jscommon/umychart.testdata.js +139 -1
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +243 -236
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.NetworkFilterTest.vue.js +139 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +286 -236
|
@@ -74560,7 +74560,7 @@ function JSChartResource()
|
|
|
74560
74560
|
Size:12, Family:"iconfont",
|
|
74561
74561
|
Arrow:[null, "\ue6b2", "\ue6b1"], //[0]=默认排序的图标背景色
|
|
74562
74562
|
Color:[null, "rgb(255,0,0)", "rgb(255,0,0)"],
|
|
74563
|
-
Margin:{ Left:0, Bottom:
|
|
74563
|
+
Margin:{ Left:0, Bottom:2, Right:0,}
|
|
74564
74564
|
},
|
|
74565
74565
|
|
|
74566
74566
|
Item:
|
|
@@ -116665,9 +116665,6 @@ function JSExecute(ast,option)
|
|
|
116665
116665
|
|
|
116666
116666
|
case JS_EXECUTE_JOB_ID.JOB_DOWNLOAD_OTHER_SYMBOL_DATA: //指定股票数据
|
|
116667
116667
|
return this.SymbolData.GetOtherSymbolData(jobItem);
|
|
116668
|
-
|
|
116669
|
-
case JS_EXECUTE_JOB_ID.JOB_DOWNLOAD_RELEASE_DATE_DATA:
|
|
116670
|
-
return this.SymbolData.GetCompanyReleaseDate(jobItem.ID);
|
|
116671
116668
|
|
|
116672
116669
|
case JS_EXECUTE_JOB_ID.JOB_DOWNLOAD_MARGIN_BALANCE:
|
|
116673
116670
|
case JS_EXECUTE_JOB_ID.JOB_DOWNLOAD_MARGIN_RATE:
|
|
@@ -128143,15 +128140,8 @@ function JSReportChart(divElement)
|
|
|
128143
128140
|
if (option.EnableResize==true) this.CreateResizeListener();
|
|
128144
128141
|
|
|
128145
128142
|
if (option.EnablePopMenuV2===true) chart.InitalPopMenu();
|
|
128146
|
-
if (option.
|
|
128147
|
-
|
|
128148
|
-
this.CreateExtraCanvasElement(JSReportChart.TooltipCursorCanvasKey, { ZIndex:99 });
|
|
128149
|
-
}
|
|
128150
|
-
|
|
128151
|
-
if (option.MinuteChartTooltip && option.MinuteChartTooltip.Enable)
|
|
128152
|
-
{
|
|
128153
|
-
chart.InitalMinuteChartTooltip(option.MinuteChartTooltip);
|
|
128154
|
-
}
|
|
128143
|
+
if (option.FloatTooltip && option.FloatTooltip.Enable) chart.InitalFloatTooltip(option.FloatTooltip); //提示信息
|
|
128144
|
+
if (option.MinuteChartTooltip && option.MinuteChartTooltip.Enable) chart.InitalMinuteChartTooltip(option.MinuteChartTooltip);
|
|
128155
128145
|
|
|
128156
128146
|
if (option.Symbol) chart.Symbol=option.Symbol;
|
|
128157
128147
|
if (option.Name) chart.Name=option.Name;
|
|
@@ -128321,8 +128311,6 @@ function JSReportChart(divElement)
|
|
|
128321
128311
|
}
|
|
128322
128312
|
}
|
|
128323
128313
|
|
|
128324
|
-
JSReportChart.TooltipCursorCanvasKey="hq_report_tooltip"; //提示信息
|
|
128325
|
-
|
|
128326
128314
|
|
|
128327
128315
|
JSReportChart.Init=function(divElement)
|
|
128328
128316
|
{
|
|
@@ -128401,9 +128389,6 @@ function JSReportChartContainer(uielement)
|
|
|
128401
128389
|
this.SplashTitle={ StockList:"下载码表中.....", MemberList:"下载成分中....." } ;
|
|
128402
128390
|
|
|
128403
128391
|
this.Canvas=uielement.getContext("2d"); //画布
|
|
128404
|
-
|
|
128405
|
-
this.TooltipCanvas;
|
|
128406
|
-
this.ChartTooltip;
|
|
128407
128392
|
|
|
128408
128393
|
this.Tooltip=document.createElement("div");
|
|
128409
128394
|
this.Tooltip.className='jsreport-tooltip';
|
|
@@ -128487,6 +128472,7 @@ function JSReportChartContainer(uielement)
|
|
|
128487
128472
|
this.StopAutoUpdate();
|
|
128488
128473
|
|
|
128489
128474
|
this.DestroyMinuteChartTooltip();
|
|
128475
|
+
this.DestroyFloatTooltip();
|
|
128490
128476
|
}
|
|
128491
128477
|
|
|
128492
128478
|
this.StopAutoDragScrollTimer=function()
|
|
@@ -128525,6 +128511,51 @@ function JSReportChartContainer(uielement)
|
|
|
128525
128511
|
this.TooltipMinuteChart=null;
|
|
128526
128512
|
}
|
|
128527
128513
|
|
|
128514
|
+
this.InitalFloatTooltip=function(option)
|
|
128515
|
+
{
|
|
128516
|
+
if (this.FloatTooltip) return;
|
|
128517
|
+
|
|
128518
|
+
this.FloatTooltip=new JSFloatTooltip();
|
|
128519
|
+
this.FloatTooltip.Inital(this, option);
|
|
128520
|
+
this.FloatTooltip.Create();
|
|
128521
|
+
}
|
|
128522
|
+
|
|
128523
|
+
this.HideFloatTooltip=function()
|
|
128524
|
+
{
|
|
128525
|
+
if (!this.FloatTooltip) return;
|
|
128526
|
+
|
|
128527
|
+
this.FloatTooltip.Hide();
|
|
128528
|
+
}
|
|
128529
|
+
|
|
128530
|
+
this.DestroyFloatTooltip=function()
|
|
128531
|
+
{
|
|
128532
|
+
if (!this.FloatTooltip) return;
|
|
128533
|
+
|
|
128534
|
+
this.FloatTooltip.Destroy();
|
|
128535
|
+
this.FloatTooltip=null;
|
|
128536
|
+
}
|
|
128537
|
+
|
|
128538
|
+
this.DrawFloatTooltip=function(point,toolTip)
|
|
128539
|
+
{
|
|
128540
|
+
if (!this.FloatTooltip) return;
|
|
128541
|
+
|
|
128542
|
+
this.UpdateFloatTooltip(point, toolTip)
|
|
128543
|
+
}
|
|
128544
|
+
|
|
128545
|
+
this.UpdateFloatTooltip=function(point, toolTip)
|
|
128546
|
+
{
|
|
128547
|
+
if (!this.FloatTooltip) return;
|
|
128548
|
+
|
|
128549
|
+
var sendData=
|
|
128550
|
+
{
|
|
128551
|
+
Tooltip:toolTip,
|
|
128552
|
+
Point:point,
|
|
128553
|
+
DataType:3,
|
|
128554
|
+
};
|
|
128555
|
+
|
|
128556
|
+
this.FloatTooltip.Update(sendData);
|
|
128557
|
+
}
|
|
128558
|
+
|
|
128528
128559
|
//data={ Symbol }
|
|
128529
128560
|
this.ShowMinuteChartTooltip=function(x,y, data)
|
|
128530
128561
|
{
|
|
@@ -128675,12 +128706,6 @@ function JSReportChartContainer(uielement)
|
|
|
128675
128706
|
|
|
128676
128707
|
this.ChartPaint[0]=chart;
|
|
128677
128708
|
|
|
128678
|
-
//提示信息
|
|
128679
|
-
var chartTooltip=new ChartCellTooltip();
|
|
128680
|
-
chartTooltip.Frame=this.Frame;
|
|
128681
|
-
chartTooltip.ChartBorder=this.Frame.ChartBorder;
|
|
128682
|
-
this.ChartTooltip=chartTooltip;
|
|
128683
|
-
|
|
128684
128709
|
//页脚
|
|
128685
128710
|
if (option && option.PageInfo===true)
|
|
128686
128711
|
{
|
|
@@ -128702,6 +128727,7 @@ function JSReportChartContainer(uielement)
|
|
|
128702
128727
|
if (IFrameSplitOperator.IsNumber(option.FixedRowCount)) chart.FixedRowCount=option.FixedRowCount; //固定行
|
|
128703
128728
|
if (IFrameSplitOperator.IsBool(option.ItemBorder)) chart.IsDrawBorder=option.ItemBorder; //单元格边框
|
|
128704
128729
|
if (IFrameSplitOperator.IsNumber(option.SelectedModel)) chart.SelectedModel=option.SelectedModel;
|
|
128730
|
+
if (IFrameSplitOperator.IsNumber(option.HeaderRowCount)) chart.HeaderRowCount=option.HeaderRowCount;
|
|
128705
128731
|
|
|
128706
128732
|
if (IFrameSplitOperator.IsNonEmptyArray(option.FixedSymbol))
|
|
128707
128733
|
{
|
|
@@ -128793,8 +128819,6 @@ function JSReportChartContainer(uielement)
|
|
|
128793
128819
|
{
|
|
128794
128820
|
this.DelayDraw(500);
|
|
128795
128821
|
}
|
|
128796
|
-
|
|
128797
|
-
this.DrawTooltip(this.LastMouseStatus.TooltipStatus);
|
|
128798
128822
|
}
|
|
128799
128823
|
|
|
128800
128824
|
this.DelayDraw=function(frequency)
|
|
@@ -129726,6 +129750,7 @@ function JSReportChartContainer(uielement)
|
|
|
129726
129750
|
{
|
|
129727
129751
|
this.LastMouseStatus.TooltipStatus=null;
|
|
129728
129752
|
this.HideMinuteChartTooltip();
|
|
129753
|
+
this.HideFloatTooltip();
|
|
129729
129754
|
if (this.GotoNextItem(1))
|
|
129730
129755
|
{
|
|
129731
129756
|
this.Draw();
|
|
@@ -129736,6 +129761,7 @@ function JSReportChartContainer(uielement)
|
|
|
129736
129761
|
{
|
|
129737
129762
|
this.LastMouseStatus.TooltipStatus=null;
|
|
129738
129763
|
this.HideMinuteChartTooltip();
|
|
129764
|
+
this.HideFloatTooltip();
|
|
129739
129765
|
if (this.GotoNextItem(-1))
|
|
129740
129766
|
{
|
|
129741
129767
|
this.Draw();
|
|
@@ -129749,6 +129775,7 @@ function JSReportChartContainer(uielement)
|
|
|
129749
129775
|
{
|
|
129750
129776
|
this.LastMouseStatus.TooltipStatus=null;
|
|
129751
129777
|
this.HideMinuteChartTooltip();
|
|
129778
|
+
this.HideFloatTooltip();
|
|
129752
129779
|
if (this.GotoNextPage(this.PageUpDownCycle))
|
|
129753
129780
|
{
|
|
129754
129781
|
this.Draw();
|
|
@@ -129759,6 +129786,7 @@ function JSReportChartContainer(uielement)
|
|
|
129759
129786
|
{
|
|
129760
129787
|
this.LastMouseStatus.TooltipStatus=null;
|
|
129761
129788
|
this.HideMinuteChartTooltip();
|
|
129789
|
+
this.HideFloatTooltip();
|
|
129762
129790
|
if (this.GotoPreviousPage(this.PageUpDownCycle))
|
|
129763
129791
|
{
|
|
129764
129792
|
this.Draw();
|
|
@@ -129781,6 +129809,7 @@ function JSReportChartContainer(uielement)
|
|
|
129781
129809
|
if (keyID==116) return; //F15刷新不处理
|
|
129782
129810
|
|
|
129783
129811
|
this.HideMinuteChartTooltip();
|
|
129812
|
+
this.HideFloatTooltip();
|
|
129784
129813
|
switch(keyID)
|
|
129785
129814
|
{
|
|
129786
129815
|
case 33: //page up
|
|
@@ -130181,7 +130210,17 @@ function JSReportChartContainer(uielement)
|
|
|
130181
130210
|
if (mouseStatus) this.UIElement.style.cursor=mouseStatus.Cursor;
|
|
130182
130211
|
|
|
130183
130212
|
if (bDraw || bDrawTab) this.Draw();
|
|
130184
|
-
|
|
130213
|
+
|
|
130214
|
+
if (this.LastMouseStatus.TooltipStatus)
|
|
130215
|
+
{
|
|
130216
|
+
var xTooltip = e.clientX-this.UIElement.getBoundingClientRect().left;
|
|
130217
|
+
var yTooltip = e.clientY-this.UIElement.getBoundingClientRect().top;
|
|
130218
|
+
this.DrawFloatTooltip({X:xTooltip, Y:yTooltip, YMove:20/pixelTatio},this.LastMouseStatus.TooltipStatus.Data);
|
|
130219
|
+
}
|
|
130220
|
+
else
|
|
130221
|
+
{
|
|
130222
|
+
this.HideFloatTooltip();
|
|
130223
|
+
}
|
|
130185
130224
|
|
|
130186
130225
|
if (bShowChartTooltip)
|
|
130187
130226
|
{
|
|
@@ -130196,6 +130235,7 @@ function JSReportChartContainer(uielement)
|
|
|
130196
130235
|
this.UIOnMounseOut=function(e)
|
|
130197
130236
|
{
|
|
130198
130237
|
this.HideMinuteChartTooltip();
|
|
130238
|
+
this.HideFloatTooltip();
|
|
130199
130239
|
|
|
130200
130240
|
var bDraw=false;
|
|
130201
130241
|
var tabChart=this.GetTabChart();
|
|
@@ -130222,6 +130262,7 @@ function JSReportChartContainer(uielement)
|
|
|
130222
130262
|
this.UIOnMouseleave=function(e)
|
|
130223
130263
|
{
|
|
130224
130264
|
this.HideMinuteChartTooltip();
|
|
130265
|
+
this.HideFloatTooltip();
|
|
130225
130266
|
|
|
130226
130267
|
var tabChart=this.GetTabChart();
|
|
130227
130268
|
if (tabChart && tabChart.MoveOnTabIndex>=0)
|
|
@@ -131778,16 +131819,16 @@ function JSReportChartContainer(uielement)
|
|
|
131778
131819
|
case REPORT_COLUMN_ID.VOL_OUT_ID:
|
|
131779
131820
|
case REPORT_COLUMN_ID.DATE_ID:
|
|
131780
131821
|
|
|
131781
|
-
case
|
|
131782
|
-
case
|
|
131783
|
-
case
|
|
131784
|
-
case
|
|
131785
|
-
case
|
|
131786
|
-
case
|
|
131787
|
-
case
|
|
131788
|
-
case
|
|
131789
|
-
case
|
|
131790
|
-
case
|
|
131822
|
+
case REPORT_COLUMN_ID.RESERVE_NUMBER1_ID:
|
|
131823
|
+
case REPORT_COLUMN_ID.RESERVE_NUMBER2_ID:
|
|
131824
|
+
case REPORT_COLUMN_ID.RESERVE_NUMBER3_ID:
|
|
131825
|
+
case REPORT_COLUMN_ID.RESERVE_NUMBER4_ID:
|
|
131826
|
+
case REPORT_COLUMN_ID.RESERVE_NUMBER5_ID:
|
|
131827
|
+
case REPORT_COLUMN_ID.RESERVE_NUMBER6_ID:
|
|
131828
|
+
case REPORT_COLUMN_ID.RESERVE_NUMBER7_ID:
|
|
131829
|
+
case REPORT_COLUMN_ID.RESERVE_NUMBER8_ID:
|
|
131830
|
+
case REPORT_COLUMN_ID.RESERVE_NUMBER9_ID:
|
|
131831
|
+
case REPORT_COLUMN_ID.RESERVE_NUMBER10_ID:
|
|
131791
131832
|
|
|
131792
131833
|
return this.LocalNumberSort(left, right, column, sortType);
|
|
131793
131834
|
case REPORT_COLUMN_ID.CUSTOM_NUMBER_TEXT_ID: //自定义数值字段
|
|
@@ -132173,28 +132214,6 @@ function JSReportChartContainer(uielement)
|
|
|
132173
132214
|
|
|
132174
132215
|
return true;
|
|
132175
132216
|
}
|
|
132176
|
-
|
|
132177
|
-
this.DrawTooltip=function(tooltipStatus)
|
|
132178
|
-
{
|
|
132179
|
-
if (!this.GetExtraCanvas) return;
|
|
132180
|
-
if (!this.TooltipCanvas)
|
|
132181
|
-
{
|
|
132182
|
-
var finder=this.GetExtraCanvas(JSReportChart.TooltipCursorCanvasKey);
|
|
132183
|
-
if (!finder) return;
|
|
132184
|
-
this.TooltipCanvas=finder.Canvas;
|
|
132185
|
-
}
|
|
132186
|
-
|
|
132187
|
-
if (!this.TooltipCanvas) return;
|
|
132188
|
-
this.ClearCanvas(this.TooltipCanvas);
|
|
132189
|
-
if (!this.ChartTooltip) return;
|
|
132190
|
-
|
|
132191
|
-
if (!tooltipStatus || !tooltipStatus.Data) return;
|
|
132192
|
-
|
|
132193
|
-
this.ChartTooltip.Canvas=this.TooltipCanvas;
|
|
132194
|
-
this.ChartTooltip.Point={ X:tooltipStatus.X, Y:tooltipStatus.Y };
|
|
132195
|
-
this.ChartTooltip.Data=tooltipStatus.Data.Data;
|
|
132196
|
-
this.ChartTooltip.Draw();
|
|
132197
|
-
}
|
|
132198
132217
|
}
|
|
132199
132218
|
|
|
132200
132219
|
|
|
@@ -132523,6 +132542,7 @@ function ChartReport()
|
|
|
132523
132542
|
this.SelectedRow=-1; //选中行ID
|
|
132524
132543
|
this.SelectedFixedRow=-1; //选中固定行ID
|
|
132525
132544
|
this.IsDrawBorder=1; //是否绘制单元格边框
|
|
132545
|
+
this.HeaderRowCount=1; //表头行数
|
|
132526
132546
|
|
|
132527
132547
|
//多选模式
|
|
132528
132548
|
this.MultiSelectModel=0; //0=禁用 1=开启
|
|
@@ -132567,6 +132587,7 @@ function ChartReport()
|
|
|
132567
132587
|
Margin:
|
|
132568
132588
|
{
|
|
132569
132589
|
Left:g_JSChartResource.Report.SortIcon.Margin.Left,
|
|
132590
|
+
Right:g_JSChartResource.Report.SortIcon.Margin.Right,
|
|
132570
132591
|
Bottom:g_JSChartResource.Report.SortIcon.Margin.Bottom
|
|
132571
132592
|
}
|
|
132572
132593
|
}
|
|
@@ -132655,6 +132676,7 @@ function ChartReport()
|
|
|
132655
132676
|
this.NameSymbolFont={ Symbol:null, Name:null };
|
|
132656
132677
|
this.RowCount=0; //一屏显示行数
|
|
132657
132678
|
this.HeaderHeight=0; //表头高度
|
|
132679
|
+
this.HeaderFontHeight=0; //表头字体高度
|
|
132658
132680
|
this.FixedRowHeight=0; //固定行高度
|
|
132659
132681
|
this.RowHeight=0; //行高度
|
|
132660
132682
|
this.ItemTextLines=1; //单元格输出行数
|
|
@@ -132788,6 +132810,7 @@ function ChartReport()
|
|
|
132788
132810
|
if (!colItem) return null;
|
|
132789
132811
|
|
|
132790
132812
|
if (item.Title) colItem.Title=item.Title;
|
|
132813
|
+
if (IFrameSplitOperator.IsNonEmptyArray(item.AryTitle)) colItem.AryTitle=item.AryTitle;
|
|
132791
132814
|
if (item.TextAlign) colItem.TextAlign=item.TextAlign;
|
|
132792
132815
|
if (item.TextColor) colItem.TextColor=item.TextColor;
|
|
132793
132816
|
if (item.HeaderColor) colItem.HeaderColor=item.HeaderColor;
|
|
@@ -133320,7 +133343,17 @@ function ChartReport()
|
|
|
133320
133343
|
if (item.Width<itemWidth) item.Width=itemWidth;
|
|
133321
133344
|
}
|
|
133322
133345
|
|
|
133323
|
-
this.
|
|
133346
|
+
this.HeaderFontHeight=this.GetFontHeight(this.HeaderFont,"擎");
|
|
133347
|
+
if (this.HeaderRowCount<=1) //单行
|
|
133348
|
+
{
|
|
133349
|
+
this.HeaderHeight=this.HeaderFontHeight+(this.HeaderMergin.Top+this.HeaderMergin.Bottom);
|
|
133350
|
+
}
|
|
133351
|
+
else
|
|
133352
|
+
{
|
|
133353
|
+
this.HeaderHeight=(this.HeaderFontHeight*this.HeaderRowCount)+(this.HeaderMergin.Top+this.HeaderMergin.Bottom);
|
|
133354
|
+
}
|
|
133355
|
+
|
|
133356
|
+
|
|
133324
133357
|
if (!this.IsShowHeader) this.HeaderHeight=0;
|
|
133325
133358
|
if (this.FixedRowCount<=0) this.FixedRowHeight=0;
|
|
133326
133359
|
|
|
@@ -133337,90 +133370,70 @@ function ChartReport()
|
|
|
133337
133370
|
this.IsShowAllColumn=(subWidth<reportWidth);
|
|
133338
133371
|
}
|
|
133339
133372
|
|
|
133340
|
-
this.
|
|
133373
|
+
this.DrawHeaderItem=function(column, rtCell, index)
|
|
133341
133374
|
{
|
|
133342
|
-
if (
|
|
133343
|
-
|
|
133344
|
-
var left=this.RectClient.Left;
|
|
133345
|
-
var top=this.RectClient.Top;
|
|
133346
|
-
var y=top+this.HeaderMergin.Top+(this.HeaderHeight-this.HeaderMergin.Top-this.HeaderMergin.Bottom)/2;
|
|
133347
|
-
var yBottom=top+this.HeaderHeight;
|
|
133348
|
-
var bDrawSortBG=this.IsDrawSortBGIcon();
|
|
133349
|
-
|
|
133350
|
-
this.Canvas.font=this.HeaderFont;
|
|
133351
|
-
|
|
133352
|
-
var textLeft=left;
|
|
133353
|
-
//固定列
|
|
133354
|
-
for(var i=0;i<this.FixedColumn && i<this.Column.length;++i)
|
|
133375
|
+
if (column.HeaderBGColor) //背景色
|
|
133355
133376
|
{
|
|
133356
|
-
|
|
133357
|
-
|
|
133358
|
-
var textWidth=itemWidth-this.HeaderMergin.Left-this.HeaderMergin.Right;
|
|
133359
|
-
var x=textLeft+this.HeaderMergin.Left;
|
|
133377
|
+
this.DrawItemBG({ Rect:rtCell, BGColor:column.HeaderBGColor });
|
|
133378
|
+
}
|
|
133360
133379
|
|
|
133361
|
-
|
|
133362
|
-
|
|
133363
|
-
|
|
133364
|
-
rtBG.Right=rtBG.Left+rtBG.Width;
|
|
133365
|
-
rtBG.Bottom=rtBG.Top+rtBG.Height;
|
|
133366
|
-
this.DrawItemBG({ Rect:rtBG, BGColor:item.HeaderBGColor });
|
|
133367
|
-
}
|
|
133380
|
+
var textWidth=rtCell.Width-this.HeaderMergin.Left-this.HeaderMergin.Right;
|
|
133381
|
+
//AryText=[ { Text:标题, Sort:{Type:排序}, Icon:图标 }]
|
|
133382
|
+
var drawInfo={ Rect:rtCell, AryText:[ { Text:null} ], YText:rtCell.Bottom-this.HeaderMergin.Bottom, Index:index, TextWidth:textWidth };
|
|
133368
133383
|
|
|
133369
|
-
|
|
133370
|
-
|
|
133384
|
+
if (this.HeaderRowCount>1) //多行
|
|
133385
|
+
{
|
|
133386
|
+
if (IFrameSplitOperator.IsNonEmptyArray(column.AryTitle))
|
|
133371
133387
|
{
|
|
133372
|
-
|
|
133373
|
-
|
|
133388
|
+
drawInfo.AryText=[];
|
|
133389
|
+
for(var i=0;i<column.AryTitle.length && i<this.HeaderRowCount;++i)
|
|
133374
133390
|
{
|
|
133375
|
-
var
|
|
133376
|
-
|
|
133377
|
-
if (IFrameSplitOperator.IsNumber(margin.Right)) iconWidth+=margin.Right;
|
|
133391
|
+
var text=column.AryTitle[i];
|
|
133392
|
+
drawInfo.AryText.push({ Text:text } );
|
|
133378
133393
|
}
|
|
133379
|
-
|
|
133380
|
-
textWidth-=iconWidth;
|
|
133381
|
-
|
|
133382
|
-
if (item.HeaderColor) this.Canvas.fillStyle=item.HeaderColor;
|
|
133383
|
-
else this.Canvas.fillStyle=this.HeaderColor;
|
|
133384
|
-
|
|
133385
|
-
var textSize={ }
|
|
133386
|
-
if (this.SortInfo && this.SortInfo.Field==i && this.SortInfo.Sort>0)
|
|
133387
|
-
{
|
|
133388
|
-
this.DrawSortHeader(item.Title,item.TextAlign,x,yBottom,textWidth,this.SortInfo.Sort, textSize);
|
|
133389
|
-
}
|
|
133390
|
-
else if (item.Sort>0 && bDrawSortBG)
|
|
133391
|
-
{
|
|
133392
|
-
this.DrawSortHeader(item.Title,item.TextAlign,x,yBottom,textWidth,0,textSize);
|
|
133394
|
+
drawInfo.YText-=((this.HeaderRowCount-1)*this.HeaderFontHeight);
|
|
133393
133395
|
}
|
|
133394
133396
|
else
|
|
133395
133397
|
{
|
|
133396
|
-
|
|
133398
|
+
if (column.Title) drawInfo.AryText[0].Text=column.Title;
|
|
133399
|
+
drawInfo.YText=rtCell.Bottom-this.HeaderMergin.Bottom-(this.HeaderRowCount*this.HeaderFontHeight)/2+this.HeaderFontHeight/2;
|
|
133397
133400
|
}
|
|
133401
|
+
}
|
|
133402
|
+
else //单行
|
|
133403
|
+
{
|
|
133404
|
+
if (column.Title) drawInfo.AryText[0].Text=column.Title;
|
|
133405
|
+
}
|
|
133398
133406
|
|
|
133399
|
-
|
|
133400
|
-
{
|
|
133401
|
-
this.DrawHeaderIcon(item.Icon, textSize.Right, yBottom, i, item);
|
|
133402
|
-
this.Canvas.font=this.HeaderFont;
|
|
133403
|
-
}
|
|
133407
|
+
var lastItem=drawInfo.AryText[drawInfo.AryText.length-1];
|
|
133404
133408
|
|
|
133405
|
-
|
|
133409
|
+
//排序
|
|
133410
|
+
var bDrawSortBG=this.IsDrawSortBGIcon();
|
|
133411
|
+
if (this.SortInfo && this.SortInfo.Field==index && this.SortInfo.Sort>0) lastItem.Sort={ Type:this.SortInfo.Sort };
|
|
133412
|
+
else if (column.Sort>0 && bDrawSortBG) lastItem.Sort={ Type:0 };
|
|
133406
133413
|
|
|
133407
|
-
|
|
133408
|
-
|
|
133414
|
+
//图标
|
|
133415
|
+
if (column.Icon) lastItem.Icon=column.Icon;
|
|
133409
133416
|
|
|
133410
|
-
|
|
133411
|
-
|
|
133412
|
-
var item=this.Column[i];
|
|
133413
|
-
var itemWidth=item.Width;
|
|
133414
|
-
var textWidth=itemWidth-this.HeaderMergin.Left-this.HeaderMergin.Right;
|
|
133415
|
-
var x=textLeft+this.HeaderMergin.Left;
|
|
133417
|
+
this.DrawHeaderText(column, drawInfo);
|
|
133418
|
+
}
|
|
133416
133419
|
|
|
133417
|
-
|
|
133418
|
-
|
|
133419
|
-
|
|
133420
|
-
|
|
133421
|
-
|
|
133422
|
-
|
|
133423
|
-
|
|
133420
|
+
this.DrawHeaderText=function(column, drawInfo)
|
|
133421
|
+
{
|
|
133422
|
+
if (column.HeaderColor) this.Canvas.fillStyle=column.HeaderColor;
|
|
133423
|
+
else this.Canvas.fillStyle=this.HeaderColor;
|
|
133424
|
+
|
|
133425
|
+
var pixelRatio=GetDevicePixelRatio();
|
|
133426
|
+
var cellWidth=drawInfo.Rect.Width;
|
|
133427
|
+
|
|
133428
|
+
if (drawInfo.AryText.length>1)
|
|
133429
|
+
var nnnn=10;
|
|
133430
|
+
|
|
133431
|
+
var y=drawInfo.YText;
|
|
133432
|
+
for(var i=0;i<drawInfo.AryText.length;++i)
|
|
133433
|
+
{
|
|
133434
|
+
var x=drawInfo.Rect.Left+this.HeaderMergin.Left;
|
|
133435
|
+
var item=drawInfo.AryText[i];
|
|
133436
|
+
var textSize={ TextMaxWidth:drawInfo.TextWidth };
|
|
133424
133437
|
|
|
133425
133438
|
var iconWidth=0;
|
|
133426
133439
|
if (item.Icon && item.Icon.Symbol) //图标
|
|
@@ -133433,81 +133446,113 @@ function ChartReport()
|
|
|
133433
133446
|
if (IFrameSplitOperator.IsNumber(margin.Right)) iconWidth+=margin.Right;
|
|
133434
133447
|
}
|
|
133435
133448
|
}
|
|
133449
|
+
if (iconWidth>0) textSize.TextMaxWidth-=iconWidth;
|
|
133436
133450
|
|
|
133437
|
-
|
|
133438
|
-
|
|
133439
|
-
|
|
133440
|
-
|
|
133451
|
+
var sortWidth=0; //排序图标
|
|
133452
|
+
if (item.Sort && this.SortConfig && IFrameSplitOperator.IsPlusNumber(this.SortConfig.Size))
|
|
133453
|
+
{
|
|
133454
|
+
sortWidth=this.SortConfig.Size*pixelRatio;
|
|
133455
|
+
if (this.SortConfig.Margin)
|
|
133456
|
+
{
|
|
133457
|
+
var margin=this.SortConfig.Margin;
|
|
133458
|
+
if (IFrameSplitOperator.IsNumber(margin.Left)) sortWidth+=margin.Left;
|
|
133459
|
+
if (IFrameSplitOperator.IsNumber(margin.Right)) sortWidth+=margin.Right;
|
|
133460
|
+
}
|
|
133461
|
+
}
|
|
133462
|
+
if (sortWidth>0) textSize.TextMaxWidth-=sortWidth;
|
|
133463
|
+
|
|
133441
133464
|
|
|
133442
|
-
var
|
|
133443
|
-
if (
|
|
133465
|
+
var textWidth=0;
|
|
133466
|
+
if (item.Text)
|
|
133444
133467
|
{
|
|
133445
|
-
this.
|
|
133468
|
+
this.Canvas.font=this.HeaderFont;
|
|
133469
|
+
textWidth=this.Canvas.measureText(item.Text).width;
|
|
133446
133470
|
}
|
|
133447
|
-
|
|
133471
|
+
|
|
133472
|
+
if (column.TextAlign=='center') x=x+(cellWidth-textWidth)/2;
|
|
133473
|
+
else if (column.TextAlign=='right') x=x+textSize.TextMaxWidth-textWidth;
|
|
133474
|
+
|
|
133475
|
+
if (item.Text) //文字
|
|
133448
133476
|
{
|
|
133449
|
-
this.
|
|
133477
|
+
this.Canvas.fillText(item.Text,x,y);
|
|
133478
|
+
x+=textWidth;
|
|
133450
133479
|
}
|
|
133451
|
-
|
|
133480
|
+
|
|
133481
|
+
if (sortWidth>1) //排序
|
|
133452
133482
|
{
|
|
133453
|
-
this.
|
|
133483
|
+
var sortText=this.SortConfig.Arrow[item.Sort.Type];
|
|
133484
|
+
var sortColor=this.SortConfig.Color[item.Sort.Type];
|
|
133485
|
+
this.Canvas.font=this.SortFont;
|
|
133486
|
+
this.Canvas.fillStyle=sortColor;
|
|
133487
|
+
this.Canvas.fillText(sortText,x,y-this.SortConfig.Margin.Bottom);
|
|
133488
|
+
x+=sortWidth;
|
|
133454
133489
|
}
|
|
133455
133490
|
|
|
133456
|
-
if (iconWidth>
|
|
133491
|
+
if (iconWidth>1) //图标
|
|
133457
133492
|
{
|
|
133458
|
-
|
|
133459
|
-
|
|
133493
|
+
var icon=item.Icon;
|
|
133494
|
+
var iconFont=`${icon.Size}px ${icon.Family}`;
|
|
133495
|
+
this.Canvas.font=iconFont;
|
|
133496
|
+
if (icon.Color) this.Canvas.fillStyle=icon.Color;
|
|
133497
|
+
var yOffset=0, xOffset=0;
|
|
133498
|
+
if (icon.Margin && IFrameSplitOperator.IsNumber(icon.Margin.Left)) xOffset=icon.Margin.Left;
|
|
133499
|
+
if (icon.Margin && IFrameSplitOperator.IsNumber(icon.Margin.Bottom)) yOffset=-icon.Margin.Bottom;
|
|
133500
|
+
this.Canvas.fillText(icon.Symbol, x+xOffset, y+yOffset);
|
|
133501
|
+
|
|
133502
|
+
if (icon.Tooltip)
|
|
133503
|
+
{
|
|
133504
|
+
var rtIcon={ Left:x+xOffset, Bottom:y+yOffset, Width:icon.Size, Height:icon.Size };
|
|
133505
|
+
rtIcon.Right=rtIcon.Left+rtIcon.Width;
|
|
133506
|
+
rtIcon.Top=rtIcon.Bottom-rtIcon.Height;
|
|
133507
|
+
|
|
133508
|
+
var tooltipData={ Rect:rtIcon, Type:2, Column:column, Index:drawInfo.Index, Data:icon.Tooltip.Data };
|
|
133509
|
+
this.TooltipRect.push(tooltipData);
|
|
133510
|
+
}
|
|
133460
133511
|
}
|
|
133461
133512
|
|
|
133462
|
-
|
|
133463
|
-
}
|
|
133513
|
+
y+=this.HeaderFontHeight;
|
|
133514
|
+
}
|
|
133464
133515
|
}
|
|
133465
133516
|
|
|
133466
|
-
this.
|
|
133517
|
+
this.DrawHeader=function()
|
|
133467
133518
|
{
|
|
133468
|
-
|
|
133469
|
-
if (textAlign=='center')
|
|
133470
|
-
{
|
|
133471
|
-
x=x+(cellWidth-textWidth)/2;
|
|
133472
|
-
}
|
|
133473
|
-
else if (textAlign=='right')
|
|
133474
|
-
{
|
|
133475
|
-
x=x+cellWidth-textWidth;
|
|
133476
|
-
}
|
|
133519
|
+
if (!this.IsShowHeader) return;
|
|
133477
133520
|
|
|
133521
|
+
var left=this.RectClient.Left;
|
|
133522
|
+
var top=this.RectClient.Top;
|
|
133523
|
+
this.Canvas.font=this.HeaderFont;
|
|
133524
|
+
|
|
133525
|
+
var textLeft=left;
|
|
133478
133526
|
this.Canvas.textAlign="left";
|
|
133479
133527
|
this.Canvas.textBaseline="bottom";
|
|
133480
|
-
|
|
133481
|
-
|
|
133482
|
-
if (textSize)
|
|
133528
|
+
//固定列
|
|
133529
|
+
for(var i=0;i<this.FixedColumn && i<this.Column.length;++i)
|
|
133483
133530
|
{
|
|
133484
|
-
|
|
133485
|
-
|
|
133486
|
-
|
|
133487
|
-
}
|
|
133531
|
+
var item=this.Column[i];
|
|
133532
|
+
var itemWidth=item.Width;
|
|
133533
|
+
//var textWidth=itemWidth-this.HeaderMergin.Left-this.HeaderMergin.Right;
|
|
133488
133534
|
|
|
133489
|
-
|
|
133490
|
-
|
|
133491
|
-
|
|
133492
|
-
this.Canvas.font=iconFont;
|
|
133493
|
-
this.Canvas.textAlign="left";
|
|
133494
|
-
if (icon.Color) this.Canvas.fillStyle=icon.Color;
|
|
133535
|
+
var rtCell={ Left:textLeft, Width:itemWidth, Top:top, Height:this.HeaderHeight };
|
|
133536
|
+
rtCell.Right=rtCell.Left+rtCell.Width;
|
|
133537
|
+
rtCell.Bottom=rtCell.Top+rtCell.Height;
|
|
133495
133538
|
|
|
133496
|
-
|
|
133497
|
-
|
|
133498
|
-
|
|
133499
|
-
if (icon.Margin && IFrameSplitOperator.IsNumber(icon.Margin.Bottom)) yIcon-=icon.Margin.Bottom;
|
|
133500
|
-
this.Canvas.fillText(icon.Symbol, xIcon, yIcon);
|
|
133539
|
+
this.DrawHeaderItem(item, rtCell, i);
|
|
133540
|
+
textLeft+=item.Width;
|
|
133541
|
+
}
|
|
133501
133542
|
|
|
133502
|
-
|
|
133543
|
+
for(var i=this.FixedColumn+this.Data.XOffset;i<this.Column.length;++i)
|
|
133503
133544
|
{
|
|
133504
|
-
var
|
|
133505
|
-
|
|
133506
|
-
|
|
133545
|
+
var item=this.Column[i];
|
|
133546
|
+
var itemWidth=item.Width;
|
|
133547
|
+
//var textWidth=itemWidth-this.HeaderMergin.Left-this.HeaderMergin.Right;
|
|
133507
133548
|
|
|
133508
|
-
var
|
|
133509
|
-
|
|
133510
|
-
|
|
133549
|
+
var rtCell={ Left:textLeft, Width:itemWidth, Top:top, Height:this.HeaderHeight };
|
|
133550
|
+
rtCell.Right=rtCell.Left+rtCell.Width;
|
|
133551
|
+
rtCell.Bottom=rtCell.Top+rtCell.Height;
|
|
133552
|
+
|
|
133553
|
+
this.DrawHeaderItem(item, rtCell, i);
|
|
133554
|
+
textLeft+=item.Width;
|
|
133555
|
+
}
|
|
133511
133556
|
}
|
|
133512
133557
|
|
|
133513
133558
|
//是否绘制排序背景图标
|
|
@@ -133522,57 +133567,6 @@ function ChartReport()
|
|
|
133522
133567
|
return true;
|
|
133523
133568
|
}
|
|
133524
133569
|
|
|
133525
|
-
this.DrawSortHeader=function(text, textAlign, x, yBottom, width, sortType,textSize)
|
|
133526
|
-
{
|
|
133527
|
-
var pixelRatio=GetDevicePixelRatio();
|
|
133528
|
-
var sortText=this.SortConfig.Arrow[sortType];
|
|
133529
|
-
var sortBGText=this.SortConfig.Arrow[0];
|
|
133530
|
-
var sortBGColor=this.SortConfig.Color[0];
|
|
133531
|
-
this.Canvas.font=this.HeaderFont;
|
|
133532
|
-
var textWidth=this.Canvas.measureText(text).width;
|
|
133533
|
-
var sortTextWidth=this.SortConfig.Size*pixelRatio+this.SortConfig.Margin.Left;
|
|
133534
|
-
|
|
133535
|
-
if (textAlign=='center')
|
|
133536
|
-
{
|
|
133537
|
-
x=x+width/2-(sortTextWidth+textWidth)/2;
|
|
133538
|
-
}
|
|
133539
|
-
else if (textAlign=='right')
|
|
133540
|
-
{
|
|
133541
|
-
x=(x+width)-sortTextWidth-textWidth;
|
|
133542
|
-
}
|
|
133543
|
-
|
|
133544
|
-
this.Canvas.textBaseline="bottom";
|
|
133545
|
-
this.Canvas.textAlign="left";
|
|
133546
|
-
|
|
133547
|
-
var xText=x;
|
|
133548
|
-
this.Canvas.font=this.HeaderFont;
|
|
133549
|
-
this.Canvas.fillStyle=this.HeaderColor;
|
|
133550
|
-
this.Canvas.fillText(text,xText,yBottom-this.HeaderMergin.Bottom);
|
|
133551
|
-
|
|
133552
|
-
xText+=(textWidth+this.SortConfig.Margin.Left);
|
|
133553
|
-
this.Canvas.font=this.SortFont;
|
|
133554
|
-
if (sortBGText && sortBGColor)
|
|
133555
|
-
{
|
|
133556
|
-
this.Canvas.fillStyle=sortBGColor;
|
|
133557
|
-
this.Canvas.fillText(sortBGText,xText,yBottom-this.SortConfig.Margin.Bottom);
|
|
133558
|
-
}
|
|
133559
|
-
|
|
133560
|
-
if (sortType>0)
|
|
133561
|
-
{
|
|
133562
|
-
this.Canvas.fillStyle=this.SortConfig.Color[sortType];
|
|
133563
|
-
this.Canvas.fillText(sortText,xText,yBottom-this.SortConfig.Margin.Bottom);
|
|
133564
|
-
}
|
|
133565
|
-
|
|
133566
|
-
this.Canvas.font=this.HeaderFont;
|
|
133567
|
-
this.Canvas.fillStyle=this.HeaderColor;
|
|
133568
|
-
|
|
133569
|
-
if (textSize)
|
|
133570
|
-
{
|
|
133571
|
-
textSize.Right=x+textWidth+sortTextWidth;
|
|
133572
|
-
textSize.Width=textWidth+sortTextWidth;
|
|
133573
|
-
}
|
|
133574
|
-
}
|
|
133575
|
-
|
|
133576
133570
|
this.DrawBorder=function()
|
|
133577
133571
|
{
|
|
133578
133572
|
if (!this.IsDrawBorder) return;
|
|
@@ -134196,9 +134190,7 @@ function ChartReport()
|
|
|
134196
134190
|
{
|
|
134197
134191
|
this.FormatReserveNumber(column, stock, drawInfo);
|
|
134198
134192
|
}
|
|
134199
|
-
else if (
|
|
134200
|
-
REPORT_COLUMN_ID.RESERVE_STRING5_ID,REPORT_COLUMN_ID.RESERVE_STRING6_ID,REPORT_COLUMN_ID.RESERVE_STRING7_ID,REPORT_COLUMN_ID.RESERVE_STRING8_ID,
|
|
134201
|
-
REPORT_COLUMN_ID.RESERVE_STRING9_ID,REPORT_COLUMN_ID.RESERVE_STRING10_ID].includes(column.Type))
|
|
134193
|
+
else if (this.IsReserveString(column.Type))
|
|
134202
134194
|
{
|
|
134203
134195
|
this.FormatReserveString(column, stock, drawInfo);
|
|
134204
134196
|
}
|
|
@@ -134257,7 +134249,7 @@ function ChartReport()
|
|
|
134257
134249
|
|
|
134258
134250
|
this.DrawItemBG(drawInfo);
|
|
134259
134251
|
|
|
134260
|
-
if (column.Type==REPORT_COLUMN_ID.CUSTOM_STRING_TEXT_ID)
|
|
134252
|
+
if (column.Type==REPORT_COLUMN_ID.CUSTOM_STRING_TEXT_ID || this.IsReserveString(column.Type))
|
|
134261
134253
|
this.DrawCustomText(drawInfo,column, x, top, textWidth);
|
|
134262
134254
|
else
|
|
134263
134255
|
this.DrawItemText(drawInfo.Text, drawInfo.TextColor, drawInfo.TextAlign, x, top, textWidth, drawInfo.BGColor);
|
|
@@ -134309,6 +134301,20 @@ function ChartReport()
|
|
|
134309
134301
|
return ARARY_TYPE.includes(value);
|
|
134310
134302
|
}
|
|
134311
134303
|
|
|
134304
|
+
this.IsReserveString=function(value)
|
|
134305
|
+
{
|
|
134306
|
+
var ARARY_TYPE=
|
|
134307
|
+
[
|
|
134308
|
+
REPORT_COLUMN_ID.RESERVE_STRING1_ID,REPORT_COLUMN_ID.RESERVE_STRING2_ID,REPORT_COLUMN_ID.RESERVE_STRING3_ID,REPORT_COLUMN_ID.RESERVE_STRING4_ID,
|
|
134309
|
+
REPORT_COLUMN_ID.RESERVE_STRING5_ID,REPORT_COLUMN_ID.RESERVE_STRING6_ID,REPORT_COLUMN_ID.RESERVE_STRING7_ID,REPORT_COLUMN_ID.RESERVE_STRING8_ID,
|
|
134310
|
+
REPORT_COLUMN_ID.RESERVE_STRING9_ID,REPORT_COLUMN_ID.RESERVE_STRING10_ID
|
|
134311
|
+
];
|
|
134312
|
+
|
|
134313
|
+
return ARARY_TYPE.includes(value);
|
|
134314
|
+
}
|
|
134315
|
+
|
|
134316
|
+
|
|
134317
|
+
|
|
134312
134318
|
this.DrawCustomText=function(drawInfo, column, left, top, cellWidth)
|
|
134313
134319
|
{
|
|
134314
134320
|
if (!drawInfo.Text) return;
|
|
@@ -137038,7 +137044,7 @@ function ChartVScrollbar()
|
|
|
137038
137044
|
}
|
|
137039
137045
|
}
|
|
137040
137046
|
|
|
137041
|
-
|
|
137047
|
+
/* 使用div替换掉了
|
|
137042
137048
|
function ChartCellTooltip()
|
|
137043
137049
|
{
|
|
137044
137050
|
this.Canvas; //画布
|
|
@@ -137200,6 +137206,7 @@ function ChartCellTooltip()
|
|
|
137200
137206
|
}
|
|
137201
137207
|
}
|
|
137202
137208
|
}
|
|
137209
|
+
*/
|
|
137203
137210
|
/*
|
|
137204
137211
|
Copyright (c) 2018 jones
|
|
137205
137212
|
|
|
@@ -140541,7 +140548,7 @@ function ScrollBarBGChart()
|
|
|
140541
140548
|
|
|
140542
140549
|
|
|
140543
140550
|
|
|
140544
|
-
var HQCHART_VERSION="1.1.
|
|
140551
|
+
var HQCHART_VERSION="1.1.14273";
|
|
140545
140552
|
|
|
140546
140553
|
function PrintHQChartVersion()
|
|
140547
140554
|
{
|