hqchart 1.1.14258 → 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 +250 -56
- package/package.json +1 -1
- package/src/jscommon/umychart.DialogTooltip.js +43 -0
- package/src/jscommon/umychart.NetworkFilterTest.js +406 -1
- package/src/jscommon/umychart.complier.js +0 -3
- package/src/jscommon/umychart.js +140 -18
- package/src/jscommon/umychart.report.js +241 -231
- package/src/jscommon/umychart.style.js +11 -1
- package/src/jscommon/umychart.testdata.js +406 -1
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +393 -254
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.NetworkFilterTest.vue.js +406 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +436 -254
|
@@ -6727,6 +6727,8 @@ var JSCHART_BUTTON_ID=
|
|
|
6727
6727
|
INDEX_NAME_BUTTON:43,
|
|
6728
6728
|
|
|
6729
6729
|
ADD_INDEX_WINDOW:44, //增加指标窗口
|
|
6730
|
+
|
|
6731
|
+
CHIP_CLOSE:45, //关闭筹码图
|
|
6730
6732
|
}
|
|
6731
6733
|
|
|
6732
6734
|
var JSCHART_DATA_FIELD_ID=
|
|
@@ -8811,6 +8813,34 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
8811
8813
|
|
|
8812
8814
|
}
|
|
8813
8815
|
|
|
8816
|
+
this.TryPhoneClickButton=function(x,y,e)
|
|
8817
|
+
{
|
|
8818
|
+
if (this.TryClickLock || this.TryClickIndexTitle) //指标枷锁区域 , 指标标题点击
|
|
8819
|
+
{
|
|
8820
|
+
if (this.TryClickLock && this.TryClickLock(x, y)) return true;
|
|
8821
|
+
if (this.TryClickIndexTitle && this.TryClickIndexTitle(x,y)) return true;
|
|
8822
|
+
}
|
|
8823
|
+
|
|
8824
|
+
if (this.ClickFrameButton)
|
|
8825
|
+
{
|
|
8826
|
+
var button=this.Frame.PtInButtons(x,y);
|
|
8827
|
+
if (button)
|
|
8828
|
+
{
|
|
8829
|
+
this.ClickFrameButton(button, e);
|
|
8830
|
+
return true;
|
|
8831
|
+
}
|
|
8832
|
+
}
|
|
8833
|
+
|
|
8834
|
+
button=this.PtInExtendChartButtons(x,y);
|
|
8835
|
+
if (button && this.ClickExtendChartButton)
|
|
8836
|
+
{
|
|
8837
|
+
this.ClickExtendChartButton(button, e);
|
|
8838
|
+
return true;
|
|
8839
|
+
}
|
|
8840
|
+
|
|
8841
|
+
return false;
|
|
8842
|
+
}
|
|
8843
|
+
|
|
8814
8844
|
this.OnTouchStart=function(e)
|
|
8815
8845
|
{
|
|
8816
8846
|
if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash == true) return;
|
|
@@ -8833,23 +8863,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
8833
8863
|
var touches = this.GetToucheData(e, this.IsForceLandscape);
|
|
8834
8864
|
var pt=this.PointAbsoluteToRelative(touches[0].clientX, touches[0].clientY, true);
|
|
8835
8865
|
|
|
8836
|
-
if (this.
|
|
8837
|
-
{
|
|
8838
|
-
var x = pt.X;
|
|
8839
|
-
var y = pt.Y;
|
|
8840
|
-
if (this.TryClickLock && this.TryClickLock(x, y)) return;
|
|
8841
|
-
if (this.TryClickIndexTitle && this.TryClickIndexTitle(x,y)) return;
|
|
8842
|
-
}
|
|
8843
|
-
|
|
8844
|
-
if (this.ClickFrameButton)
|
|
8845
|
-
{
|
|
8846
|
-
var button=this.Frame.PtInButtons(pt.X,pt.Y);
|
|
8847
|
-
if (button)
|
|
8848
|
-
{
|
|
8849
|
-
this.ClickFrameButton(button, e);
|
|
8850
|
-
return;
|
|
8851
|
-
}
|
|
8852
|
-
}
|
|
8866
|
+
if (this.TryPhoneClickButton(pt.X, pt.Y, e)) return;
|
|
8853
8867
|
|
|
8854
8868
|
if (this.EnableVerticalDrag )
|
|
8855
8869
|
{
|
|
@@ -48730,8 +48744,12 @@ function StockChipPhone()
|
|
|
48730
48744
|
//手机端没有按钮
|
|
48731
48745
|
this.DrawToolbar=function(moveonPoint, mouseStatus) { }
|
|
48732
48746
|
|
|
48747
|
+
this.CloseButtonConfig=CloneData(g_JSChartResource.StockChip.PhoneCloseButton);
|
|
48748
|
+
|
|
48749
|
+
|
|
48733
48750
|
this.Draw=function()
|
|
48734
48751
|
{
|
|
48752
|
+
this.Buttons=[];
|
|
48735
48753
|
this.IsHScreen=this.ChartFrame.IsHScreen==true;
|
|
48736
48754
|
this.PixelRatio=GetDevicePixelRatio();
|
|
48737
48755
|
if (this.IsHScreen)
|
|
@@ -48774,6 +48792,7 @@ function StockChipPhone()
|
|
|
48774
48792
|
}
|
|
48775
48793
|
|
|
48776
48794
|
this.DrawBorder();
|
|
48795
|
+
this.DrawCloseButton();
|
|
48777
48796
|
this.SizeChange=false;
|
|
48778
48797
|
}
|
|
48779
48798
|
|
|
@@ -49136,6 +49155,73 @@ function StockChipPhone()
|
|
|
49136
49155
|
|
|
49137
49156
|
this.Canvas.fill();
|
|
49138
49157
|
}
|
|
49158
|
+
|
|
49159
|
+
//关闭按钮
|
|
49160
|
+
this.DrawCloseButton=function()
|
|
49161
|
+
{
|
|
49162
|
+
var config=this.CloseButtonConfig;
|
|
49163
|
+
var font=`${config.Size}px ${config.Family}`;
|
|
49164
|
+
var rtButton=null;
|
|
49165
|
+
if (this.IsHScreen)
|
|
49166
|
+
{
|
|
49167
|
+
var border=this.ChartBorder.GetHScreenBorder();
|
|
49168
|
+
var right=border.Left-2;
|
|
49169
|
+
var bottom=border.ChartHeight-2;
|
|
49170
|
+
var left=right-config.Size;
|
|
49171
|
+
var top=bottom-config.Size;
|
|
49172
|
+
|
|
49173
|
+
var rtButton={ Left:left, Top:top, Bottom:bottom, Right:right };
|
|
49174
|
+
rtButton.Width=rtButton.Right-rtButton.Left;
|
|
49175
|
+
rtButton.Height=rtButton.Bottom-rtButton.Top;
|
|
49176
|
+
}
|
|
49177
|
+
else
|
|
49178
|
+
{
|
|
49179
|
+
var border=this.ChartBorder.GetBorder();
|
|
49180
|
+
var top=border.Bottom+2;
|
|
49181
|
+
var bottom=top+config.Size;
|
|
49182
|
+
var right=border.ChartWidth-2;
|
|
49183
|
+
var left=right-config.Size;
|
|
49184
|
+
|
|
49185
|
+
var rtButton={ Left:left, Top:top, Bottom:bottom, Right:right };
|
|
49186
|
+
rtButton.Width=rtButton.Right-rtButton.Left;
|
|
49187
|
+
rtButton.Height=rtButton.Bottom-rtButton.Top;
|
|
49188
|
+
}
|
|
49189
|
+
|
|
49190
|
+
if (!rtButton) return;
|
|
49191
|
+
|
|
49192
|
+
if (config.Border)
|
|
49193
|
+
{
|
|
49194
|
+
if (config.Border.BGColor)
|
|
49195
|
+
{
|
|
49196
|
+
this.Canvas.fillStyle=config.Border.BGColor;
|
|
49197
|
+
this.Canvas.fillRect(rtButton.Left,rtButton.Top,rtButton.Width,rtButton.Height);
|
|
49198
|
+
}
|
|
49199
|
+
}
|
|
49200
|
+
|
|
49201
|
+
this.Canvas.fillStyle=config.Color;
|
|
49202
|
+
this.Canvas.font=font;
|
|
49203
|
+
this.Canvas.textAlign="left";
|
|
49204
|
+
this.Canvas.textBaseline="bottom";
|
|
49205
|
+
if (this.IsHScreen)
|
|
49206
|
+
{
|
|
49207
|
+
var radius=config.Size/2;
|
|
49208
|
+
var x=rtButton.Left+radius, y=rtButton.Bottom-radius;
|
|
49209
|
+
this.Canvas.save();
|
|
49210
|
+
this.Canvas.translate(x,y);
|
|
49211
|
+
this.Canvas.rotate(90 * Math.PI / 180);
|
|
49212
|
+
this.Canvas.fillText(config.Text,-radius,radius);
|
|
49213
|
+
this.Canvas.restore();
|
|
49214
|
+
|
|
49215
|
+
}
|
|
49216
|
+
else
|
|
49217
|
+
{
|
|
49218
|
+
this.Canvas.fillText(config.Text, rtButton.Left, rtButton.Bottom);
|
|
49219
|
+
}
|
|
49220
|
+
|
|
49221
|
+
var btnItem={ ID:JSCHART_BUTTON_ID.CHIP_CLOSE, Rect:rtButton };
|
|
49222
|
+
this.Buttons.push(btnItem);
|
|
49223
|
+
|
|
49224
|
+
}
|
|
49139
49225
|
}
|
|
49140
49226
|
|
|
49141
49227
|
//窗口分割
|
|
@@ -52817,6 +52903,10 @@ IFrameSplitOperator.FormatDateString=function(value,format, languageID)
|
|
|
52817
52903
|
{
|
|
52818
52904
|
case 'MM-DD':
|
|
52819
52905
|
return IFrameSplitOperator.NumberToString(month) + '-' + IFrameSplitOperator.NumberToString(day);
|
|
52906
|
+
case "MM-DD/W":
|
|
52907
|
+
var date=new Date(year,month-1,day);
|
|
52908
|
+
var week=g_JSChartLocalization.GetText(WEEK_NAME[date.getDay()],languageID);
|
|
52909
|
+
return `${IFrameSplitOperator.NumberToString(month)}-${IFrameSplitOperator.NumberToString(day)}/${week}`;
|
|
52820
52910
|
case "MM/DD":
|
|
52821
52911
|
return `${IFrameSplitOperator.NumberToString(month)}/${IFrameSplitOperator.NumberToString(day)}`;
|
|
52822
52912
|
case "MM/DD/W":
|
|
@@ -74370,6 +74460,16 @@ function JSChartResource()
|
|
|
74370
74460
|
Size:13*GetDevicePixelRatio(),
|
|
74371
74461
|
MerginLeft:4
|
|
74372
74462
|
},
|
|
74463
|
+
|
|
74464
|
+
//手机端
|
|
74465
|
+
PhoneCloseButton:
|
|
74466
|
+
{
|
|
74467
|
+
Family:"iconfont",
|
|
74468
|
+
Size:16*GetDevicePixelRatio(),
|
|
74469
|
+
Text:"\ue60c",
|
|
74470
|
+
Color:"rgb(255,255,255)",
|
|
74471
|
+
Border:{ BGColor:"rgb(169,169,169)" }
|
|
74472
|
+
}
|
|
74373
74473
|
}
|
|
74374
74474
|
|
|
74375
74475
|
//深度图
|
|
@@ -74504,7 +74604,7 @@ function JSChartResource()
|
|
|
74504
74604
|
Size:12, Family:"iconfont",
|
|
74505
74605
|
Arrow:[null, "\ue6b2", "\ue6b1"], //[0]=默认排序的图标背景色
|
|
74506
74606
|
Color:[null, "rgb(255,0,0)", "rgb(255,0,0)"],
|
|
74507
|
-
Margin:{ Left:0, Bottom:
|
|
74607
|
+
Margin:{ Left:0, Bottom:2, Right:0,}
|
|
74508
74608
|
},
|
|
74509
74609
|
|
|
74510
74610
|
Item:
|
|
@@ -75288,6 +75388,20 @@ function JSChartResource()
|
|
|
75288
75388
|
if (item.DefaultButton) T_SetButtonStyle(item.DefaultButton, this.StockChip.DefaultButton);
|
|
75289
75389
|
if (item.LongButton) T_SetButtonStyle(item.LongButton, this.StockChip.LongButton);
|
|
75290
75390
|
if (item.RecentButton) T_SetButtonStyle(item.RecentButton, this.StockChip.RecentButton);
|
|
75391
|
+
if (item.CloseButton) T_SetButtonStyle(item.CloseButton, this.StockChip.CloseButton);
|
|
75392
|
+
|
|
75393
|
+
if (item.PhoneCloseButton)
|
|
75394
|
+
{
|
|
75395
|
+
var subItem=item.PhoneCloseButton;
|
|
75396
|
+
if (subItem.Family) this.StockChip.PhoneCloseButton.Family=subItem.Family;
|
|
75397
|
+
if (subItem.Text) this.StockChip.PhoneCloseButton.Text=subItem.Text;
|
|
75398
|
+
if (subItem.Color) this.StockChip.PhoneCloseButton.Color=subItem.Color;
|
|
75399
|
+
if (IFrameSplitOperator.IsNumber(subItem.Size)) this.StockChip.PhoneCloseButton.Size=subItem.Size;
|
|
75400
|
+
if (subItem.Border)
|
|
75401
|
+
{
|
|
75402
|
+
if (subItem.Border.BGColor) this.StockChip.PhoneCloseButton.Border.BGColor=subItem.Border.BGColor;
|
|
75403
|
+
}
|
|
75404
|
+
}
|
|
75291
75405
|
}
|
|
75292
75406
|
|
|
75293
75407
|
if (style.DepthChart)
|
|
@@ -84534,6 +84648,10 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
84534
84648
|
button.Chart.ShowType=2;
|
|
84535
84649
|
this.Draw();
|
|
84536
84650
|
}
|
|
84651
|
+
else if (button.ID==JSCHART_BUTTON_ID.CHIP_CLOSE)
|
|
84652
|
+
{
|
|
84653
|
+
if (this.DeleteStockChipChart) this.DeleteStockChipChart();
|
|
84654
|
+
}
|
|
84537
84655
|
}
|
|
84538
84656
|
|
|
84539
84657
|
//成交量分布图数据请求
|
|
@@ -92134,6 +92252,9 @@ function KLineChartHScreenContainer(uielement)
|
|
|
92134
92252
|
var touches = this.GetToucheData(e, false);
|
|
92135
92253
|
var pt=this.PointAbsoluteToRelative(touches[0].clientX, touches[0].clientY, true);
|
|
92136
92254
|
|
|
92255
|
+
if (this.TryPhoneClickButton(pt.X,pt.Y,e)) return;
|
|
92256
|
+
|
|
92257
|
+
/*
|
|
92137
92258
|
if (this.TryClickLock || this.TryClickIndexTitle) //指标枷锁区域, 指标标题点击
|
|
92138
92259
|
{
|
|
92139
92260
|
var x = pt.X;
|
|
@@ -92151,6 +92272,7 @@ function KLineChartHScreenContainer(uielement)
|
|
|
92151
92272
|
return;
|
|
92152
92273
|
}
|
|
92153
92274
|
}
|
|
92275
|
+
*/
|
|
92154
92276
|
|
|
92155
92277
|
if (this.EnableVerticalDrag )
|
|
92156
92278
|
{
|
|
@@ -116587,9 +116709,6 @@ function JSExecute(ast,option)
|
|
|
116587
116709
|
|
|
116588
116710
|
case JS_EXECUTE_JOB_ID.JOB_DOWNLOAD_OTHER_SYMBOL_DATA: //指定股票数据
|
|
116589
116711
|
return this.SymbolData.GetOtherSymbolData(jobItem);
|
|
116590
|
-
|
|
116591
|
-
case JS_EXECUTE_JOB_ID.JOB_DOWNLOAD_RELEASE_DATE_DATA:
|
|
116592
|
-
return this.SymbolData.GetCompanyReleaseDate(jobItem.ID);
|
|
116593
116712
|
|
|
116594
116713
|
case JS_EXECUTE_JOB_ID.JOB_DOWNLOAD_MARGIN_BALANCE:
|
|
116595
116714
|
case JS_EXECUTE_JOB_ID.JOB_DOWNLOAD_MARGIN_RATE:
|
|
@@ -126044,7 +126163,17 @@ function GetBlackStyle()
|
|
|
126044
126163
|
StockChip:
|
|
126045
126164
|
{
|
|
126046
126165
|
InfoColor:'rgb(255,255,255)', //文字颜色
|
|
126047
|
-
DayInfoColor:'rgb(0,0,0)' //周期颜色内文字颜色
|
|
126166
|
+
DayInfoColor:'rgb(0,0,0)', //周期颜色内文字颜色
|
|
126167
|
+
|
|
126168
|
+
//手机端
|
|
126169
|
+
PhoneCloseButton:
|
|
126170
|
+
{
|
|
126171
|
+
Family:"iconfont",
|
|
126172
|
+
Size:16*GetDevicePixelRatio(),
|
|
126173
|
+
Text:"\ue60c",
|
|
126174
|
+
Color:"rgb(255,255,255)",
|
|
126175
|
+
Border:{ BGColor:"rgb(40,42,44)" }
|
|
126176
|
+
}
|
|
126048
126177
|
},
|
|
126049
126178
|
|
|
126050
126179
|
//深度图
|
|
@@ -128055,15 +128184,8 @@ function JSReportChart(divElement)
|
|
|
128055
128184
|
if (option.EnableResize==true) this.CreateResizeListener();
|
|
128056
128185
|
|
|
128057
128186
|
if (option.EnablePopMenuV2===true) chart.InitalPopMenu();
|
|
128058
|
-
if (option.
|
|
128059
|
-
|
|
128060
|
-
this.CreateExtraCanvasElement(JSReportChart.TooltipCursorCanvasKey, { ZIndex:99 });
|
|
128061
|
-
}
|
|
128062
|
-
|
|
128063
|
-
if (option.MinuteChartTooltip && option.MinuteChartTooltip.Enable)
|
|
128064
|
-
{
|
|
128065
|
-
chart.InitalMinuteChartTooltip(option.MinuteChartTooltip);
|
|
128066
|
-
}
|
|
128187
|
+
if (option.FloatTooltip && option.FloatTooltip.Enable) chart.InitalFloatTooltip(option.FloatTooltip); //提示信息
|
|
128188
|
+
if (option.MinuteChartTooltip && option.MinuteChartTooltip.Enable) chart.InitalMinuteChartTooltip(option.MinuteChartTooltip);
|
|
128067
128189
|
|
|
128068
128190
|
if (option.Symbol) chart.Symbol=option.Symbol;
|
|
128069
128191
|
if (option.Name) chart.Name=option.Name;
|
|
@@ -128233,8 +128355,6 @@ function JSReportChart(divElement)
|
|
|
128233
128355
|
}
|
|
128234
128356
|
}
|
|
128235
128357
|
|
|
128236
|
-
JSReportChart.TooltipCursorCanvasKey="hq_report_tooltip"; //提示信息
|
|
128237
|
-
|
|
128238
128358
|
|
|
128239
128359
|
JSReportChart.Init=function(divElement)
|
|
128240
128360
|
{
|
|
@@ -128313,9 +128433,6 @@ function JSReportChartContainer(uielement)
|
|
|
128313
128433
|
this.SplashTitle={ StockList:"下载码表中.....", MemberList:"下载成分中....." } ;
|
|
128314
128434
|
|
|
128315
128435
|
this.Canvas=uielement.getContext("2d"); //画布
|
|
128316
|
-
|
|
128317
|
-
this.TooltipCanvas;
|
|
128318
|
-
this.ChartTooltip;
|
|
128319
128436
|
|
|
128320
128437
|
this.Tooltip=document.createElement("div");
|
|
128321
128438
|
this.Tooltip.className='jsreport-tooltip';
|
|
@@ -128399,6 +128516,7 @@ function JSReportChartContainer(uielement)
|
|
|
128399
128516
|
this.StopAutoUpdate();
|
|
128400
128517
|
|
|
128401
128518
|
this.DestroyMinuteChartTooltip();
|
|
128519
|
+
this.DestroyFloatTooltip();
|
|
128402
128520
|
}
|
|
128403
128521
|
|
|
128404
128522
|
this.StopAutoDragScrollTimer=function()
|
|
@@ -128437,6 +128555,51 @@ function JSReportChartContainer(uielement)
|
|
|
128437
128555
|
this.TooltipMinuteChart=null;
|
|
128438
128556
|
}
|
|
128439
128557
|
|
|
128558
|
+
this.InitalFloatTooltip=function(option)
|
|
128559
|
+
{
|
|
128560
|
+
if (this.FloatTooltip) return;
|
|
128561
|
+
|
|
128562
|
+
this.FloatTooltip=new JSFloatTooltip();
|
|
128563
|
+
this.FloatTooltip.Inital(this, option);
|
|
128564
|
+
this.FloatTooltip.Create();
|
|
128565
|
+
}
|
|
128566
|
+
|
|
128567
|
+
this.HideFloatTooltip=function()
|
|
128568
|
+
{
|
|
128569
|
+
if (!this.FloatTooltip) return;
|
|
128570
|
+
|
|
128571
|
+
this.FloatTooltip.Hide();
|
|
128572
|
+
}
|
|
128573
|
+
|
|
128574
|
+
this.DestroyFloatTooltip=function()
|
|
128575
|
+
{
|
|
128576
|
+
if (!this.FloatTooltip) return;
|
|
128577
|
+
|
|
128578
|
+
this.FloatTooltip.Destroy();
|
|
128579
|
+
this.FloatTooltip=null;
|
|
128580
|
+
}
|
|
128581
|
+
|
|
128582
|
+
this.DrawFloatTooltip=function(point,toolTip)
|
|
128583
|
+
{
|
|
128584
|
+
if (!this.FloatTooltip) return;
|
|
128585
|
+
|
|
128586
|
+
this.UpdateFloatTooltip(point, toolTip)
|
|
128587
|
+
}
|
|
128588
|
+
|
|
128589
|
+
this.UpdateFloatTooltip=function(point, toolTip)
|
|
128590
|
+
{
|
|
128591
|
+
if (!this.FloatTooltip) return;
|
|
128592
|
+
|
|
128593
|
+
var sendData=
|
|
128594
|
+
{
|
|
128595
|
+
Tooltip:toolTip,
|
|
128596
|
+
Point:point,
|
|
128597
|
+
DataType:3,
|
|
128598
|
+
};
|
|
128599
|
+
|
|
128600
|
+
this.FloatTooltip.Update(sendData);
|
|
128601
|
+
}
|
|
128602
|
+
|
|
128440
128603
|
//data={ Symbol }
|
|
128441
128604
|
this.ShowMinuteChartTooltip=function(x,y, data)
|
|
128442
128605
|
{
|
|
@@ -128587,12 +128750,6 @@ function JSReportChartContainer(uielement)
|
|
|
128587
128750
|
|
|
128588
128751
|
this.ChartPaint[0]=chart;
|
|
128589
128752
|
|
|
128590
|
-
//提示信息
|
|
128591
|
-
var chartTooltip=new ChartCellTooltip();
|
|
128592
|
-
chartTooltip.Frame=this.Frame;
|
|
128593
|
-
chartTooltip.ChartBorder=this.Frame.ChartBorder;
|
|
128594
|
-
this.ChartTooltip=chartTooltip;
|
|
128595
|
-
|
|
128596
128753
|
//页脚
|
|
128597
128754
|
if (option && option.PageInfo===true)
|
|
128598
128755
|
{
|
|
@@ -128614,6 +128771,7 @@ function JSReportChartContainer(uielement)
|
|
|
128614
128771
|
if (IFrameSplitOperator.IsNumber(option.FixedRowCount)) chart.FixedRowCount=option.FixedRowCount; //固定行
|
|
128615
128772
|
if (IFrameSplitOperator.IsBool(option.ItemBorder)) chart.IsDrawBorder=option.ItemBorder; //单元格边框
|
|
128616
128773
|
if (IFrameSplitOperator.IsNumber(option.SelectedModel)) chart.SelectedModel=option.SelectedModel;
|
|
128774
|
+
if (IFrameSplitOperator.IsNumber(option.HeaderRowCount)) chart.HeaderRowCount=option.HeaderRowCount;
|
|
128617
128775
|
|
|
128618
128776
|
if (IFrameSplitOperator.IsNonEmptyArray(option.FixedSymbol))
|
|
128619
128777
|
{
|
|
@@ -128705,8 +128863,6 @@ function JSReportChartContainer(uielement)
|
|
|
128705
128863
|
{
|
|
128706
128864
|
this.DelayDraw(500);
|
|
128707
128865
|
}
|
|
128708
|
-
|
|
128709
|
-
this.DrawTooltip(this.LastMouseStatus.TooltipStatus);
|
|
128710
128866
|
}
|
|
128711
128867
|
|
|
128712
128868
|
this.DelayDraw=function(frequency)
|
|
@@ -129638,6 +129794,7 @@ function JSReportChartContainer(uielement)
|
|
|
129638
129794
|
{
|
|
129639
129795
|
this.LastMouseStatus.TooltipStatus=null;
|
|
129640
129796
|
this.HideMinuteChartTooltip();
|
|
129797
|
+
this.HideFloatTooltip();
|
|
129641
129798
|
if (this.GotoNextItem(1))
|
|
129642
129799
|
{
|
|
129643
129800
|
this.Draw();
|
|
@@ -129648,6 +129805,7 @@ function JSReportChartContainer(uielement)
|
|
|
129648
129805
|
{
|
|
129649
129806
|
this.LastMouseStatus.TooltipStatus=null;
|
|
129650
129807
|
this.HideMinuteChartTooltip();
|
|
129808
|
+
this.HideFloatTooltip();
|
|
129651
129809
|
if (this.GotoNextItem(-1))
|
|
129652
129810
|
{
|
|
129653
129811
|
this.Draw();
|
|
@@ -129661,6 +129819,7 @@ function JSReportChartContainer(uielement)
|
|
|
129661
129819
|
{
|
|
129662
129820
|
this.LastMouseStatus.TooltipStatus=null;
|
|
129663
129821
|
this.HideMinuteChartTooltip();
|
|
129822
|
+
this.HideFloatTooltip();
|
|
129664
129823
|
if (this.GotoNextPage(this.PageUpDownCycle))
|
|
129665
129824
|
{
|
|
129666
129825
|
this.Draw();
|
|
@@ -129671,6 +129830,7 @@ function JSReportChartContainer(uielement)
|
|
|
129671
129830
|
{
|
|
129672
129831
|
this.LastMouseStatus.TooltipStatus=null;
|
|
129673
129832
|
this.HideMinuteChartTooltip();
|
|
129833
|
+
this.HideFloatTooltip();
|
|
129674
129834
|
if (this.GotoPreviousPage(this.PageUpDownCycle))
|
|
129675
129835
|
{
|
|
129676
129836
|
this.Draw();
|
|
@@ -129693,6 +129853,7 @@ function JSReportChartContainer(uielement)
|
|
|
129693
129853
|
if (keyID==116) return; //F15刷新不处理
|
|
129694
129854
|
|
|
129695
129855
|
this.HideMinuteChartTooltip();
|
|
129856
|
+
this.HideFloatTooltip();
|
|
129696
129857
|
switch(keyID)
|
|
129697
129858
|
{
|
|
129698
129859
|
case 33: //page up
|
|
@@ -130093,7 +130254,17 @@ function JSReportChartContainer(uielement)
|
|
|
130093
130254
|
if (mouseStatus) this.UIElement.style.cursor=mouseStatus.Cursor;
|
|
130094
130255
|
|
|
130095
130256
|
if (bDraw || bDrawTab) this.Draw();
|
|
130096
|
-
|
|
130257
|
+
|
|
130258
|
+
if (this.LastMouseStatus.TooltipStatus)
|
|
130259
|
+
{
|
|
130260
|
+
var xTooltip = e.clientX-this.UIElement.getBoundingClientRect().left;
|
|
130261
|
+
var yTooltip = e.clientY-this.UIElement.getBoundingClientRect().top;
|
|
130262
|
+
this.DrawFloatTooltip({X:xTooltip, Y:yTooltip, YMove:20/pixelTatio},this.LastMouseStatus.TooltipStatus.Data);
|
|
130263
|
+
}
|
|
130264
|
+
else
|
|
130265
|
+
{
|
|
130266
|
+
this.HideFloatTooltip();
|
|
130267
|
+
}
|
|
130097
130268
|
|
|
130098
130269
|
if (bShowChartTooltip)
|
|
130099
130270
|
{
|
|
@@ -130108,6 +130279,7 @@ function JSReportChartContainer(uielement)
|
|
|
130108
130279
|
this.UIOnMounseOut=function(e)
|
|
130109
130280
|
{
|
|
130110
130281
|
this.HideMinuteChartTooltip();
|
|
130282
|
+
this.HideFloatTooltip();
|
|
130111
130283
|
|
|
130112
130284
|
var bDraw=false;
|
|
130113
130285
|
var tabChart=this.GetTabChart();
|
|
@@ -130134,6 +130306,7 @@ function JSReportChartContainer(uielement)
|
|
|
130134
130306
|
this.UIOnMouseleave=function(e)
|
|
130135
130307
|
{
|
|
130136
130308
|
this.HideMinuteChartTooltip();
|
|
130309
|
+
this.HideFloatTooltip();
|
|
130137
130310
|
|
|
130138
130311
|
var tabChart=this.GetTabChart();
|
|
130139
130312
|
if (tabChart && tabChart.MoveOnTabIndex>=0)
|
|
@@ -131690,16 +131863,16 @@ function JSReportChartContainer(uielement)
|
|
|
131690
131863
|
case REPORT_COLUMN_ID.VOL_OUT_ID:
|
|
131691
131864
|
case REPORT_COLUMN_ID.DATE_ID:
|
|
131692
131865
|
|
|
131693
|
-
case
|
|
131694
|
-
case
|
|
131695
|
-
case
|
|
131696
|
-
case
|
|
131697
|
-
case
|
|
131698
|
-
case
|
|
131699
|
-
case
|
|
131700
|
-
case
|
|
131701
|
-
case
|
|
131702
|
-
case
|
|
131866
|
+
case REPORT_COLUMN_ID.RESERVE_NUMBER1_ID:
|
|
131867
|
+
case REPORT_COLUMN_ID.RESERVE_NUMBER2_ID:
|
|
131868
|
+
case REPORT_COLUMN_ID.RESERVE_NUMBER3_ID:
|
|
131869
|
+
case REPORT_COLUMN_ID.RESERVE_NUMBER4_ID:
|
|
131870
|
+
case REPORT_COLUMN_ID.RESERVE_NUMBER5_ID:
|
|
131871
|
+
case REPORT_COLUMN_ID.RESERVE_NUMBER6_ID:
|
|
131872
|
+
case REPORT_COLUMN_ID.RESERVE_NUMBER7_ID:
|
|
131873
|
+
case REPORT_COLUMN_ID.RESERVE_NUMBER8_ID:
|
|
131874
|
+
case REPORT_COLUMN_ID.RESERVE_NUMBER9_ID:
|
|
131875
|
+
case REPORT_COLUMN_ID.RESERVE_NUMBER10_ID:
|
|
131703
131876
|
|
|
131704
131877
|
return this.LocalNumberSort(left, right, column, sortType);
|
|
131705
131878
|
case REPORT_COLUMN_ID.CUSTOM_NUMBER_TEXT_ID: //自定义数值字段
|
|
@@ -132085,28 +132258,6 @@ function JSReportChartContainer(uielement)
|
|
|
132085
132258
|
|
|
132086
132259
|
return true;
|
|
132087
132260
|
}
|
|
132088
|
-
|
|
132089
|
-
this.DrawTooltip=function(tooltipStatus)
|
|
132090
|
-
{
|
|
132091
|
-
if (!this.GetExtraCanvas) return;
|
|
132092
|
-
if (!this.TooltipCanvas)
|
|
132093
|
-
{
|
|
132094
|
-
var finder=this.GetExtraCanvas(JSReportChart.TooltipCursorCanvasKey);
|
|
132095
|
-
if (!finder) return;
|
|
132096
|
-
this.TooltipCanvas=finder.Canvas;
|
|
132097
|
-
}
|
|
132098
|
-
|
|
132099
|
-
if (!this.TooltipCanvas) return;
|
|
132100
|
-
this.ClearCanvas(this.TooltipCanvas);
|
|
132101
|
-
if (!this.ChartTooltip) return;
|
|
132102
|
-
|
|
132103
|
-
if (!tooltipStatus || !tooltipStatus.Data) return;
|
|
132104
|
-
|
|
132105
|
-
this.ChartTooltip.Canvas=this.TooltipCanvas;
|
|
132106
|
-
this.ChartTooltip.Point={ X:tooltipStatus.X, Y:tooltipStatus.Y };
|
|
132107
|
-
this.ChartTooltip.Data=tooltipStatus.Data.Data;
|
|
132108
|
-
this.ChartTooltip.Draw();
|
|
132109
|
-
}
|
|
132110
132261
|
}
|
|
132111
132262
|
|
|
132112
132263
|
|
|
@@ -132435,6 +132586,7 @@ function ChartReport()
|
|
|
132435
132586
|
this.SelectedRow=-1; //选中行ID
|
|
132436
132587
|
this.SelectedFixedRow=-1; //选中固定行ID
|
|
132437
132588
|
this.IsDrawBorder=1; //是否绘制单元格边框
|
|
132589
|
+
this.HeaderRowCount=1; //表头行数
|
|
132438
132590
|
|
|
132439
132591
|
//多选模式
|
|
132440
132592
|
this.MultiSelectModel=0; //0=禁用 1=开启
|
|
@@ -132479,6 +132631,7 @@ function ChartReport()
|
|
|
132479
132631
|
Margin:
|
|
132480
132632
|
{
|
|
132481
132633
|
Left:g_JSChartResource.Report.SortIcon.Margin.Left,
|
|
132634
|
+
Right:g_JSChartResource.Report.SortIcon.Margin.Right,
|
|
132482
132635
|
Bottom:g_JSChartResource.Report.SortIcon.Margin.Bottom
|
|
132483
132636
|
}
|
|
132484
132637
|
}
|
|
@@ -132567,6 +132720,7 @@ function ChartReport()
|
|
|
132567
132720
|
this.NameSymbolFont={ Symbol:null, Name:null };
|
|
132568
132721
|
this.RowCount=0; //一屏显示行数
|
|
132569
132722
|
this.HeaderHeight=0; //表头高度
|
|
132723
|
+
this.HeaderFontHeight=0; //表头字体高度
|
|
132570
132724
|
this.FixedRowHeight=0; //固定行高度
|
|
132571
132725
|
this.RowHeight=0; //行高度
|
|
132572
132726
|
this.ItemTextLines=1; //单元格输出行数
|
|
@@ -132700,6 +132854,7 @@ function ChartReport()
|
|
|
132700
132854
|
if (!colItem) return null;
|
|
132701
132855
|
|
|
132702
132856
|
if (item.Title) colItem.Title=item.Title;
|
|
132857
|
+
if (IFrameSplitOperator.IsNonEmptyArray(item.AryTitle)) colItem.AryTitle=item.AryTitle;
|
|
132703
132858
|
if (item.TextAlign) colItem.TextAlign=item.TextAlign;
|
|
132704
132859
|
if (item.TextColor) colItem.TextColor=item.TextColor;
|
|
132705
132860
|
if (item.HeaderColor) colItem.HeaderColor=item.HeaderColor;
|
|
@@ -133232,7 +133387,17 @@ function ChartReport()
|
|
|
133232
133387
|
if (item.Width<itemWidth) item.Width=itemWidth;
|
|
133233
133388
|
}
|
|
133234
133389
|
|
|
133235
|
-
this.
|
|
133390
|
+
this.HeaderFontHeight=this.GetFontHeight(this.HeaderFont,"擎");
|
|
133391
|
+
if (this.HeaderRowCount<=1) //单行
|
|
133392
|
+
{
|
|
133393
|
+
this.HeaderHeight=this.HeaderFontHeight+(this.HeaderMergin.Top+this.HeaderMergin.Bottom);
|
|
133394
|
+
}
|
|
133395
|
+
else
|
|
133396
|
+
{
|
|
133397
|
+
this.HeaderHeight=(this.HeaderFontHeight*this.HeaderRowCount)+(this.HeaderMergin.Top+this.HeaderMergin.Bottom);
|
|
133398
|
+
}
|
|
133399
|
+
|
|
133400
|
+
|
|
133236
133401
|
if (!this.IsShowHeader) this.HeaderHeight=0;
|
|
133237
133402
|
if (this.FixedRowCount<=0) this.FixedRowHeight=0;
|
|
133238
133403
|
|
|
@@ -133249,90 +133414,70 @@ function ChartReport()
|
|
|
133249
133414
|
this.IsShowAllColumn=(subWidth<reportWidth);
|
|
133250
133415
|
}
|
|
133251
133416
|
|
|
133252
|
-
this.
|
|
133417
|
+
this.DrawHeaderItem=function(column, rtCell, index)
|
|
133253
133418
|
{
|
|
133254
|
-
if (
|
|
133255
|
-
|
|
133256
|
-
var left=this.RectClient.Left;
|
|
133257
|
-
var top=this.RectClient.Top;
|
|
133258
|
-
var y=top+this.HeaderMergin.Top+(this.HeaderHeight-this.HeaderMergin.Top-this.HeaderMergin.Bottom)/2;
|
|
133259
|
-
var yBottom=top+this.HeaderHeight;
|
|
133260
|
-
var bDrawSortBG=this.IsDrawSortBGIcon();
|
|
133261
|
-
|
|
133262
|
-
this.Canvas.font=this.HeaderFont;
|
|
133263
|
-
|
|
133264
|
-
var textLeft=left;
|
|
133265
|
-
//固定列
|
|
133266
|
-
for(var i=0;i<this.FixedColumn && i<this.Column.length;++i)
|
|
133419
|
+
if (column.HeaderBGColor) //背景色
|
|
133267
133420
|
{
|
|
133268
|
-
|
|
133269
|
-
|
|
133270
|
-
var textWidth=itemWidth-this.HeaderMergin.Left-this.HeaderMergin.Right;
|
|
133271
|
-
var x=textLeft+this.HeaderMergin.Left;
|
|
133421
|
+
this.DrawItemBG({ Rect:rtCell, BGColor:column.HeaderBGColor });
|
|
133422
|
+
}
|
|
133272
133423
|
|
|
133273
|
-
|
|
133274
|
-
|
|
133275
|
-
|
|
133276
|
-
rtBG.Right=rtBG.Left+rtBG.Width;
|
|
133277
|
-
rtBG.Bottom=rtBG.Top+rtBG.Height;
|
|
133278
|
-
this.DrawItemBG({ Rect:rtBG, BGColor:item.HeaderBGColor });
|
|
133279
|
-
}
|
|
133424
|
+
var textWidth=rtCell.Width-this.HeaderMergin.Left-this.HeaderMergin.Right;
|
|
133425
|
+
//AryText=[ { Text:标题, Sort:{Type:排序}, Icon:图标 }]
|
|
133426
|
+
var drawInfo={ Rect:rtCell, AryText:[ { Text:null} ], YText:rtCell.Bottom-this.HeaderMergin.Bottom, Index:index, TextWidth:textWidth };
|
|
133280
133427
|
|
|
133281
|
-
|
|
133282
|
-
|
|
133428
|
+
if (this.HeaderRowCount>1) //多行
|
|
133429
|
+
{
|
|
133430
|
+
if (IFrameSplitOperator.IsNonEmptyArray(column.AryTitle))
|
|
133283
133431
|
{
|
|
133284
|
-
|
|
133285
|
-
|
|
133432
|
+
drawInfo.AryText=[];
|
|
133433
|
+
for(var i=0;i<column.AryTitle.length && i<this.HeaderRowCount;++i)
|
|
133286
133434
|
{
|
|
133287
|
-
var
|
|
133288
|
-
|
|
133289
|
-
if (IFrameSplitOperator.IsNumber(margin.Right)) iconWidth+=margin.Right;
|
|
133435
|
+
var text=column.AryTitle[i];
|
|
133436
|
+
drawInfo.AryText.push({ Text:text } );
|
|
133290
133437
|
}
|
|
133291
|
-
|
|
133292
|
-
textWidth-=iconWidth;
|
|
133293
|
-
|
|
133294
|
-
if (item.HeaderColor) this.Canvas.fillStyle=item.HeaderColor;
|
|
133295
|
-
else this.Canvas.fillStyle=this.HeaderColor;
|
|
133296
|
-
|
|
133297
|
-
var textSize={ }
|
|
133298
|
-
if (this.SortInfo && this.SortInfo.Field==i && this.SortInfo.Sort>0)
|
|
133299
|
-
{
|
|
133300
|
-
this.DrawSortHeader(item.Title,item.TextAlign,x,yBottom,textWidth,this.SortInfo.Sort, textSize);
|
|
133301
|
-
}
|
|
133302
|
-
else if (item.Sort>0 && bDrawSortBG)
|
|
133303
|
-
{
|
|
133304
|
-
this.DrawSortHeader(item.Title,item.TextAlign,x,yBottom,textWidth,0,textSize);
|
|
133438
|
+
drawInfo.YText-=((this.HeaderRowCount-1)*this.HeaderFontHeight);
|
|
133305
133439
|
}
|
|
133306
133440
|
else
|
|
133307
133441
|
{
|
|
133308
|
-
|
|
133442
|
+
if (column.Title) drawInfo.AryText[0].Text=column.Title;
|
|
133443
|
+
drawInfo.YText=rtCell.Bottom-this.HeaderMergin.Bottom-(this.HeaderRowCount*this.HeaderFontHeight)/2+this.HeaderFontHeight/2;
|
|
133309
133444
|
}
|
|
133445
|
+
}
|
|
133446
|
+
else //单行
|
|
133447
|
+
{
|
|
133448
|
+
if (column.Title) drawInfo.AryText[0].Text=column.Title;
|
|
133449
|
+
}
|
|
133310
133450
|
|
|
133311
|
-
|
|
133312
|
-
{
|
|
133313
|
-
this.DrawHeaderIcon(item.Icon, textSize.Right, yBottom, i, item);
|
|
133314
|
-
this.Canvas.font=this.HeaderFont;
|
|
133315
|
-
}
|
|
133451
|
+
var lastItem=drawInfo.AryText[drawInfo.AryText.length-1];
|
|
133316
133452
|
|
|
133317
|
-
|
|
133453
|
+
//排序
|
|
133454
|
+
var bDrawSortBG=this.IsDrawSortBGIcon();
|
|
133455
|
+
if (this.SortInfo && this.SortInfo.Field==index && this.SortInfo.Sort>0) lastItem.Sort={ Type:this.SortInfo.Sort };
|
|
133456
|
+
else if (column.Sort>0 && bDrawSortBG) lastItem.Sort={ Type:0 };
|
|
133318
133457
|
|
|
133319
|
-
|
|
133320
|
-
|
|
133458
|
+
//图标
|
|
133459
|
+
if (column.Icon) lastItem.Icon=column.Icon;
|
|
133321
133460
|
|
|
133322
|
-
|
|
133323
|
-
|
|
133324
|
-
var item=this.Column[i];
|
|
133325
|
-
var itemWidth=item.Width;
|
|
133326
|
-
var textWidth=itemWidth-this.HeaderMergin.Left-this.HeaderMergin.Right;
|
|
133327
|
-
var x=textLeft+this.HeaderMergin.Left;
|
|
133461
|
+
this.DrawHeaderText(column, drawInfo);
|
|
133462
|
+
}
|
|
133328
133463
|
|
|
133329
|
-
|
|
133330
|
-
|
|
133331
|
-
|
|
133332
|
-
|
|
133333
|
-
|
|
133334
|
-
|
|
133335
|
-
|
|
133464
|
+
this.DrawHeaderText=function(column, drawInfo)
|
|
133465
|
+
{
|
|
133466
|
+
if (column.HeaderColor) this.Canvas.fillStyle=column.HeaderColor;
|
|
133467
|
+
else this.Canvas.fillStyle=this.HeaderColor;
|
|
133468
|
+
|
|
133469
|
+
var pixelRatio=GetDevicePixelRatio();
|
|
133470
|
+
var cellWidth=drawInfo.Rect.Width;
|
|
133471
|
+
|
|
133472
|
+
if (drawInfo.AryText.length>1)
|
|
133473
|
+
var nnnn=10;
|
|
133474
|
+
|
|
133475
|
+
var y=drawInfo.YText;
|
|
133476
|
+
for(var i=0;i<drawInfo.AryText.length;++i)
|
|
133477
|
+
{
|
|
133478
|
+
var x=drawInfo.Rect.Left+this.HeaderMergin.Left;
|
|
133479
|
+
var item=drawInfo.AryText[i];
|
|
133480
|
+
var textSize={ TextMaxWidth:drawInfo.TextWidth };
|
|
133336
133481
|
|
|
133337
133482
|
var iconWidth=0;
|
|
133338
133483
|
if (item.Icon && item.Icon.Symbol) //图标
|
|
@@ -133345,81 +133490,113 @@ function ChartReport()
|
|
|
133345
133490
|
if (IFrameSplitOperator.IsNumber(margin.Right)) iconWidth+=margin.Right;
|
|
133346
133491
|
}
|
|
133347
133492
|
}
|
|
133493
|
+
if (iconWidth>0) textSize.TextMaxWidth-=iconWidth;
|
|
133348
133494
|
|
|
133349
|
-
|
|
133350
|
-
|
|
133351
|
-
|
|
133352
|
-
|
|
133495
|
+
var sortWidth=0; //排序图标
|
|
133496
|
+
if (item.Sort && this.SortConfig && IFrameSplitOperator.IsPlusNumber(this.SortConfig.Size))
|
|
133497
|
+
{
|
|
133498
|
+
sortWidth=this.SortConfig.Size*pixelRatio;
|
|
133499
|
+
if (this.SortConfig.Margin)
|
|
133500
|
+
{
|
|
133501
|
+
var margin=this.SortConfig.Margin;
|
|
133502
|
+
if (IFrameSplitOperator.IsNumber(margin.Left)) sortWidth+=margin.Left;
|
|
133503
|
+
if (IFrameSplitOperator.IsNumber(margin.Right)) sortWidth+=margin.Right;
|
|
133504
|
+
}
|
|
133505
|
+
}
|
|
133506
|
+
if (sortWidth>0) textSize.TextMaxWidth-=sortWidth;
|
|
133507
|
+
|
|
133353
133508
|
|
|
133354
|
-
var
|
|
133355
|
-
if (
|
|
133509
|
+
var textWidth=0;
|
|
133510
|
+
if (item.Text)
|
|
133356
133511
|
{
|
|
133357
|
-
this.
|
|
133512
|
+
this.Canvas.font=this.HeaderFont;
|
|
133513
|
+
textWidth=this.Canvas.measureText(item.Text).width;
|
|
133358
133514
|
}
|
|
133359
|
-
|
|
133515
|
+
|
|
133516
|
+
if (column.TextAlign=='center') x=x+(cellWidth-textWidth)/2;
|
|
133517
|
+
else if (column.TextAlign=='right') x=x+textSize.TextMaxWidth-textWidth;
|
|
133518
|
+
|
|
133519
|
+
if (item.Text) //文字
|
|
133360
133520
|
{
|
|
133361
|
-
this.
|
|
133521
|
+
this.Canvas.fillText(item.Text,x,y);
|
|
133522
|
+
x+=textWidth;
|
|
133362
133523
|
}
|
|
133363
|
-
|
|
133524
|
+
|
|
133525
|
+
if (sortWidth>1) //排序
|
|
133364
133526
|
{
|
|
133365
|
-
this.
|
|
133527
|
+
var sortText=this.SortConfig.Arrow[item.Sort.Type];
|
|
133528
|
+
var sortColor=this.SortConfig.Color[item.Sort.Type];
|
|
133529
|
+
this.Canvas.font=this.SortFont;
|
|
133530
|
+
this.Canvas.fillStyle=sortColor;
|
|
133531
|
+
this.Canvas.fillText(sortText,x,y-this.SortConfig.Margin.Bottom);
|
|
133532
|
+
x+=sortWidth;
|
|
133366
133533
|
}
|
|
133367
133534
|
|
|
133368
|
-
if (iconWidth>
|
|
133535
|
+
if (iconWidth>1) //图标
|
|
133369
133536
|
{
|
|
133370
|
-
|
|
133371
|
-
|
|
133537
|
+
var icon=item.Icon;
|
|
133538
|
+
var iconFont=`${icon.Size}px ${icon.Family}`;
|
|
133539
|
+
this.Canvas.font=iconFont;
|
|
133540
|
+
if (icon.Color) this.Canvas.fillStyle=icon.Color;
|
|
133541
|
+
var yOffset=0, xOffset=0;
|
|
133542
|
+
if (icon.Margin && IFrameSplitOperator.IsNumber(icon.Margin.Left)) xOffset=icon.Margin.Left;
|
|
133543
|
+
if (icon.Margin && IFrameSplitOperator.IsNumber(icon.Margin.Bottom)) yOffset=-icon.Margin.Bottom;
|
|
133544
|
+
this.Canvas.fillText(icon.Symbol, x+xOffset, y+yOffset);
|
|
133545
|
+
|
|
133546
|
+
if (icon.Tooltip)
|
|
133547
|
+
{
|
|
133548
|
+
var rtIcon={ Left:x+xOffset, Bottom:y+yOffset, Width:icon.Size, Height:icon.Size };
|
|
133549
|
+
rtIcon.Right=rtIcon.Left+rtIcon.Width;
|
|
133550
|
+
rtIcon.Top=rtIcon.Bottom-rtIcon.Height;
|
|
133551
|
+
|
|
133552
|
+
var tooltipData={ Rect:rtIcon, Type:2, Column:column, Index:drawInfo.Index, Data:icon.Tooltip.Data };
|
|
133553
|
+
this.TooltipRect.push(tooltipData);
|
|
133554
|
+
}
|
|
133372
133555
|
}
|
|
133373
133556
|
|
|
133374
|
-
|
|
133375
|
-
}
|
|
133557
|
+
y+=this.HeaderFontHeight;
|
|
133558
|
+
}
|
|
133376
133559
|
}
|
|
133377
133560
|
|
|
133378
|
-
this.
|
|
133561
|
+
this.DrawHeader=function()
|
|
133379
133562
|
{
|
|
133380
|
-
|
|
133381
|
-
if (textAlign=='center')
|
|
133382
|
-
{
|
|
133383
|
-
x=x+(cellWidth-textWidth)/2;
|
|
133384
|
-
}
|
|
133385
|
-
else if (textAlign=='right')
|
|
133386
|
-
{
|
|
133387
|
-
x=x+cellWidth-textWidth;
|
|
133388
|
-
}
|
|
133563
|
+
if (!this.IsShowHeader) return;
|
|
133389
133564
|
|
|
133565
|
+
var left=this.RectClient.Left;
|
|
133566
|
+
var top=this.RectClient.Top;
|
|
133567
|
+
this.Canvas.font=this.HeaderFont;
|
|
133568
|
+
|
|
133569
|
+
var textLeft=left;
|
|
133390
133570
|
this.Canvas.textAlign="left";
|
|
133391
133571
|
this.Canvas.textBaseline="bottom";
|
|
133392
|
-
|
|
133393
|
-
|
|
133394
|
-
if (textSize)
|
|
133572
|
+
//固定列
|
|
133573
|
+
for(var i=0;i<this.FixedColumn && i<this.Column.length;++i)
|
|
133395
133574
|
{
|
|
133396
|
-
|
|
133397
|
-
|
|
133398
|
-
|
|
133399
|
-
}
|
|
133575
|
+
var item=this.Column[i];
|
|
133576
|
+
var itemWidth=item.Width;
|
|
133577
|
+
//var textWidth=itemWidth-this.HeaderMergin.Left-this.HeaderMergin.Right;
|
|
133400
133578
|
|
|
133401
|
-
|
|
133402
|
-
|
|
133403
|
-
|
|
133404
|
-
this.Canvas.font=iconFont;
|
|
133405
|
-
this.Canvas.textAlign="left";
|
|
133406
|
-
if (icon.Color) this.Canvas.fillStyle=icon.Color;
|
|
133579
|
+
var rtCell={ Left:textLeft, Width:itemWidth, Top:top, Height:this.HeaderHeight };
|
|
133580
|
+
rtCell.Right=rtCell.Left+rtCell.Width;
|
|
133581
|
+
rtCell.Bottom=rtCell.Top+rtCell.Height;
|
|
133407
133582
|
|
|
133408
|
-
|
|
133409
|
-
|
|
133410
|
-
|
|
133411
|
-
if (icon.Margin && IFrameSplitOperator.IsNumber(icon.Margin.Bottom)) yIcon-=icon.Margin.Bottom;
|
|
133412
|
-
this.Canvas.fillText(icon.Symbol, xIcon, yIcon);
|
|
133583
|
+
this.DrawHeaderItem(item, rtCell, i);
|
|
133584
|
+
textLeft+=item.Width;
|
|
133585
|
+
}
|
|
133413
133586
|
|
|
133414
|
-
|
|
133587
|
+
for(var i=this.FixedColumn+this.Data.XOffset;i<this.Column.length;++i)
|
|
133415
133588
|
{
|
|
133416
|
-
var
|
|
133417
|
-
|
|
133418
|
-
|
|
133589
|
+
var item=this.Column[i];
|
|
133590
|
+
var itemWidth=item.Width;
|
|
133591
|
+
//var textWidth=itemWidth-this.HeaderMergin.Left-this.HeaderMergin.Right;
|
|
133419
133592
|
|
|
133420
|
-
var
|
|
133421
|
-
|
|
133422
|
-
|
|
133593
|
+
var rtCell={ Left:textLeft, Width:itemWidth, Top:top, Height:this.HeaderHeight };
|
|
133594
|
+
rtCell.Right=rtCell.Left+rtCell.Width;
|
|
133595
|
+
rtCell.Bottom=rtCell.Top+rtCell.Height;
|
|
133596
|
+
|
|
133597
|
+
this.DrawHeaderItem(item, rtCell, i);
|
|
133598
|
+
textLeft+=item.Width;
|
|
133599
|
+
}
|
|
133423
133600
|
}
|
|
133424
133601
|
|
|
133425
133602
|
//是否绘制排序背景图标
|
|
@@ -133434,57 +133611,6 @@ function ChartReport()
|
|
|
133434
133611
|
return true;
|
|
133435
133612
|
}
|
|
133436
133613
|
|
|
133437
|
-
this.DrawSortHeader=function(text, textAlign, x, yBottom, width, sortType,textSize)
|
|
133438
|
-
{
|
|
133439
|
-
var pixelRatio=GetDevicePixelRatio();
|
|
133440
|
-
var sortText=this.SortConfig.Arrow[sortType];
|
|
133441
|
-
var sortBGText=this.SortConfig.Arrow[0];
|
|
133442
|
-
var sortBGColor=this.SortConfig.Color[0];
|
|
133443
|
-
this.Canvas.font=this.HeaderFont;
|
|
133444
|
-
var textWidth=this.Canvas.measureText(text).width;
|
|
133445
|
-
var sortTextWidth=this.SortConfig.Size*pixelRatio+this.SortConfig.Margin.Left;
|
|
133446
|
-
|
|
133447
|
-
if (textAlign=='center')
|
|
133448
|
-
{
|
|
133449
|
-
x=x+width/2-(sortTextWidth+textWidth)/2;
|
|
133450
|
-
}
|
|
133451
|
-
else if (textAlign=='right')
|
|
133452
|
-
{
|
|
133453
|
-
x=(x+width)-sortTextWidth-textWidth;
|
|
133454
|
-
}
|
|
133455
|
-
|
|
133456
|
-
this.Canvas.textBaseline="bottom";
|
|
133457
|
-
this.Canvas.textAlign="left";
|
|
133458
|
-
|
|
133459
|
-
var xText=x;
|
|
133460
|
-
this.Canvas.font=this.HeaderFont;
|
|
133461
|
-
this.Canvas.fillStyle=this.HeaderColor;
|
|
133462
|
-
this.Canvas.fillText(text,xText,yBottom-this.HeaderMergin.Bottom);
|
|
133463
|
-
|
|
133464
|
-
xText+=(textWidth+this.SortConfig.Margin.Left);
|
|
133465
|
-
this.Canvas.font=this.SortFont;
|
|
133466
|
-
if (sortBGText && sortBGColor)
|
|
133467
|
-
{
|
|
133468
|
-
this.Canvas.fillStyle=sortBGColor;
|
|
133469
|
-
this.Canvas.fillText(sortBGText,xText,yBottom-this.SortConfig.Margin.Bottom);
|
|
133470
|
-
}
|
|
133471
|
-
|
|
133472
|
-
if (sortType>0)
|
|
133473
|
-
{
|
|
133474
|
-
this.Canvas.fillStyle=this.SortConfig.Color[sortType];
|
|
133475
|
-
this.Canvas.fillText(sortText,xText,yBottom-this.SortConfig.Margin.Bottom);
|
|
133476
|
-
}
|
|
133477
|
-
|
|
133478
|
-
this.Canvas.font=this.HeaderFont;
|
|
133479
|
-
this.Canvas.fillStyle=this.HeaderColor;
|
|
133480
|
-
|
|
133481
|
-
if (textSize)
|
|
133482
|
-
{
|
|
133483
|
-
textSize.Right=x+textWidth+sortTextWidth;
|
|
133484
|
-
textSize.Width=textWidth+sortTextWidth;
|
|
133485
|
-
}
|
|
133486
|
-
}
|
|
133487
|
-
|
|
133488
133614
|
this.DrawBorder=function()
|
|
133489
133615
|
{
|
|
133490
133616
|
if (!this.IsDrawBorder) return;
|
|
@@ -134108,9 +134234,7 @@ function ChartReport()
|
|
|
134108
134234
|
{
|
|
134109
134235
|
this.FormatReserveNumber(column, stock, drawInfo);
|
|
134110
134236
|
}
|
|
134111
|
-
else if (
|
|
134112
|
-
REPORT_COLUMN_ID.RESERVE_STRING5_ID,REPORT_COLUMN_ID.RESERVE_STRING6_ID,REPORT_COLUMN_ID.RESERVE_STRING7_ID,REPORT_COLUMN_ID.RESERVE_STRING8_ID,
|
|
134113
|
-
REPORT_COLUMN_ID.RESERVE_STRING9_ID,REPORT_COLUMN_ID.RESERVE_STRING10_ID].includes(column.Type))
|
|
134237
|
+
else if (this.IsReserveString(column.Type))
|
|
134114
134238
|
{
|
|
134115
134239
|
this.FormatReserveString(column, stock, drawInfo);
|
|
134116
134240
|
}
|
|
@@ -134169,7 +134293,7 @@ function ChartReport()
|
|
|
134169
134293
|
|
|
134170
134294
|
this.DrawItemBG(drawInfo);
|
|
134171
134295
|
|
|
134172
|
-
if (column.Type==REPORT_COLUMN_ID.CUSTOM_STRING_TEXT_ID)
|
|
134296
|
+
if (column.Type==REPORT_COLUMN_ID.CUSTOM_STRING_TEXT_ID || this.IsReserveString(column.Type))
|
|
134173
134297
|
this.DrawCustomText(drawInfo,column, x, top, textWidth);
|
|
134174
134298
|
else
|
|
134175
134299
|
this.DrawItemText(drawInfo.Text, drawInfo.TextColor, drawInfo.TextAlign, x, top, textWidth, drawInfo.BGColor);
|
|
@@ -134221,6 +134345,20 @@ function ChartReport()
|
|
|
134221
134345
|
return ARARY_TYPE.includes(value);
|
|
134222
134346
|
}
|
|
134223
134347
|
|
|
134348
|
+
this.IsReserveString=function(value)
|
|
134349
|
+
{
|
|
134350
|
+
var ARARY_TYPE=
|
|
134351
|
+
[
|
|
134352
|
+
REPORT_COLUMN_ID.RESERVE_STRING1_ID,REPORT_COLUMN_ID.RESERVE_STRING2_ID,REPORT_COLUMN_ID.RESERVE_STRING3_ID,REPORT_COLUMN_ID.RESERVE_STRING4_ID,
|
|
134353
|
+
REPORT_COLUMN_ID.RESERVE_STRING5_ID,REPORT_COLUMN_ID.RESERVE_STRING6_ID,REPORT_COLUMN_ID.RESERVE_STRING7_ID,REPORT_COLUMN_ID.RESERVE_STRING8_ID,
|
|
134354
|
+
REPORT_COLUMN_ID.RESERVE_STRING9_ID,REPORT_COLUMN_ID.RESERVE_STRING10_ID
|
|
134355
|
+
];
|
|
134356
|
+
|
|
134357
|
+
return ARARY_TYPE.includes(value);
|
|
134358
|
+
}
|
|
134359
|
+
|
|
134360
|
+
|
|
134361
|
+
|
|
134224
134362
|
this.DrawCustomText=function(drawInfo, column, left, top, cellWidth)
|
|
134225
134363
|
{
|
|
134226
134364
|
if (!drawInfo.Text) return;
|
|
@@ -136950,7 +137088,7 @@ function ChartVScrollbar()
|
|
|
136950
137088
|
}
|
|
136951
137089
|
}
|
|
136952
137090
|
|
|
136953
|
-
|
|
137091
|
+
/* 使用div替换掉了
|
|
136954
137092
|
function ChartCellTooltip()
|
|
136955
137093
|
{
|
|
136956
137094
|
this.Canvas; //画布
|
|
@@ -137112,6 +137250,7 @@ function ChartCellTooltip()
|
|
|
137112
137250
|
}
|
|
137113
137251
|
}
|
|
137114
137252
|
}
|
|
137253
|
+
*/
|
|
137115
137254
|
/*
|
|
137116
137255
|
Copyright (c) 2018 jones
|
|
137117
137256
|
|
|
@@ -147074,11 +147213,26 @@ function JSFloatTooltip()
|
|
|
147074
147213
|
{
|
|
147075
147214
|
this.UpdateChartDrawSVGV2Tooltip(data);
|
|
147076
147215
|
}
|
|
147216
|
+
|
|
147077
147217
|
}
|
|
147078
147218
|
else if (data.DataType==2) //更新实时行情数据
|
|
147079
147219
|
{
|
|
147080
147220
|
this.UpdateRealtimeHQTooltip(data);
|
|
147081
147221
|
}
|
|
147222
|
+
else if (data.DataType==3) //报价列表
|
|
147223
|
+
{
|
|
147224
|
+
var tooltipData=data.Tooltip;
|
|
147225
|
+
if (!tooltipData) return;
|
|
147226
|
+
|
|
147227
|
+
if (tooltipData.Type==2) //报价列表表头图标提示信息
|
|
147228
|
+
{
|
|
147229
|
+
this.ReportHeaderIconTooltip(data);
|
|
147230
|
+
}
|
|
147231
|
+
else if (tooltipData.Type==1) //单元格截断内容
|
|
147232
|
+
{
|
|
147233
|
+
this.ReportCellTruncateTooltip(data);
|
|
147234
|
+
}
|
|
147235
|
+
}
|
|
147082
147236
|
}
|
|
147083
147237
|
|
|
147084
147238
|
this.UpdateRealtimeHQTooltip=function(data)
|
|
@@ -147318,6 +147472,34 @@ function JSFloatTooltip()
|
|
|
147318
147472
|
|
|
147319
147473
|
this.ShowTooltip(data);
|
|
147320
147474
|
}
|
|
147475
|
+
|
|
147476
|
+
//表头图标
|
|
147477
|
+
this.ReportHeaderIconTooltip=function(data)
|
|
147478
|
+
{
|
|
147479
|
+
var tooltipData=data.Tooltip;
|
|
147480
|
+
if (!tooltipData.Data || !IFrameSplitOperator.IsNonEmptyArray(tooltipData.Data.AryText)) return;
|
|
147481
|
+
|
|
147482
|
+
this.AryText=tooltipData.Data.AryText;
|
|
147483
|
+
this.UpdateTableDOM();
|
|
147484
|
+
|
|
147485
|
+
this.ShowTooltip(data);
|
|
147486
|
+
}
|
|
147487
|
+
|
|
147488
|
+
//表格单元格截断内容
|
|
147489
|
+
this.ReportCellTruncateTooltip=function(data)
|
|
147490
|
+
{
|
|
147491
|
+
var tooltipData=data.Tooltip;
|
|
147492
|
+
if (!tooltipData.Data || !IFrameSplitOperator.IsNonEmptyArray(tooltipData.Data.AryText)) return;
|
|
147493
|
+
|
|
147494
|
+
var item=tooltipData.Data.AryText[0];
|
|
147495
|
+
if (!item.Text) return;
|
|
147496
|
+
|
|
147497
|
+
this.AryText=[ { Title:item.Text, IsMergeCell:true } ];
|
|
147498
|
+
|
|
147499
|
+
this.UpdateTableDOM();
|
|
147500
|
+
|
|
147501
|
+
this.ShowTooltip(data);
|
|
147502
|
+
}
|
|
147321
147503
|
|
|
147322
147504
|
this.UpdateTableDOM=function()
|
|
147323
147505
|
{
|
|
@@ -150014,7 +150196,7 @@ function HQChartScriptWorker()
|
|
|
150014
150196
|
|
|
150015
150197
|
|
|
150016
150198
|
|
|
150017
|
-
var HQCHART_VERSION="1.1.
|
|
150199
|
+
var HQCHART_VERSION="1.1.14273";
|
|
150018
150200
|
|
|
150019
150201
|
function PrintHQChartVersion()
|
|
150020
150202
|
{
|