hqchart 1.1.13577 → 1.1.13588
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 +127 -64
- package/package.json +1 -1
- package/src/jscommon/umychart.DialogDrawTool.js +2 -1
- package/src/jscommon/umychart.js +177 -3
- package/src/jscommon/umychart.report.js +277 -30
- 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 +553 -52
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +555 -53
|
@@ -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, //切换指标
|
|
@@ -60335,7 +60336,8 @@ IChartDrawPicture.ArrayDrawPricture=
|
|
|
60335
60336
|
{ Name:"PriceRange", ClassName:"ChartPriceRange", Create:function() { return new ChartPriceRange(); }},
|
|
60336
60337
|
{ Name:"DateRange", ClassName:"ChartDateRange", Create:function() { return new ChartDateRange(); }},
|
|
60337
60338
|
{ Name:"InfoLine", ClassName:"ChartInfoLine", Create:function() { return new ChartInfoLine(); }},
|
|
60338
|
-
{ Name:"TrendAngle", ClassName:"ChartTrendAngle", Create:function() { return new ChartTrendAngle(); }}
|
|
60339
|
+
{ Name:"TrendAngle", ClassName:"ChartTrendAngle", Create:function() { return new ChartTrendAngle(); }},
|
|
60340
|
+
{ Name:"ArrowMarker", ClassName:"ChartArrowMarker", Create:function() { return new ChartArrowMarker(); } },
|
|
60339
60341
|
];
|
|
60340
60342
|
|
|
60341
60343
|
IChartDrawPicture.MapIonFont=new Map(
|
|
@@ -60860,6 +60862,90 @@ function ChartDrawArrowLine()
|
|
|
60860
60862
|
}
|
|
60861
60863
|
}
|
|
60862
60864
|
|
|
60865
|
+
function ChartArrowMarker()
|
|
60866
|
+
{
|
|
60867
|
+
this.newMethod=IChartDrawPicture; //派生
|
|
60868
|
+
this.newMethod();
|
|
60869
|
+
delete this.newMethod;
|
|
60870
|
+
|
|
60871
|
+
this.ClassName='ChartArrowMarker';
|
|
60872
|
+
this.IsPointIn=this.IsPointIn_XYValue_Line;
|
|
60873
|
+
|
|
60874
|
+
this.InsideAngle=25;
|
|
60875
|
+
this.InsideWidth=70;
|
|
60876
|
+
|
|
60877
|
+
this.OutAngle=35;
|
|
60878
|
+
this.OutWidth=100;
|
|
60879
|
+
|
|
60880
|
+
this.GetXYCoordinate=this.GetXYCoordinate_default;
|
|
60881
|
+
this.OnlyMoveXIndex=true;
|
|
60882
|
+
this.IsSupportMagnet=true;
|
|
60883
|
+
|
|
60884
|
+
this.CalculatePoint=function(angle, ptStart, ptEnd, lineWidth)
|
|
60885
|
+
{
|
|
60886
|
+
var theta=angle; //三角斜边一直线夹角
|
|
60887
|
+
var headlen=lineWidth; //三角斜边长度
|
|
60888
|
+
|
|
60889
|
+
var angle = Math.atan2(ptStart.Y - ptEnd.Y, ptStart.X - ptEnd.X) * 180 / Math.PI,
|
|
60890
|
+
angle1 = (angle + theta) * Math.PI / 180,
|
|
60891
|
+
angle2 = (angle - theta) * Math.PI / 180,
|
|
60892
|
+
topX = headlen * Math.cos(angle1),
|
|
60893
|
+
topY = headlen * Math.sin(angle1),
|
|
60894
|
+
botX = headlen * Math.cos(angle2),
|
|
60895
|
+
botY = headlen * Math.sin(angle2);
|
|
60896
|
+
|
|
60897
|
+
return { Top:{X:topX+ptEnd.X, Y:topY+ptEnd.Y}, Bottom:{X:botX+ptEnd.X, Y:botY+ptEnd.Y} };
|
|
60898
|
+
}
|
|
60899
|
+
|
|
60900
|
+
this.Draw=function()
|
|
60901
|
+
{
|
|
60902
|
+
this.LinePoint=[];
|
|
60903
|
+
if (this.IsFrameMinSize()) return;
|
|
60904
|
+
if (!this.IsShow) return;
|
|
60905
|
+
|
|
60906
|
+
var drawPoint=this.CalculateDrawPoint( {IsCheckX:true, IsCheckY:true} );
|
|
60907
|
+
if (!drawPoint) return;
|
|
60908
|
+
if (drawPoint.length!=2) return;
|
|
60909
|
+
|
|
60910
|
+
this.ClipFrame();
|
|
60911
|
+
|
|
60912
|
+
var ptStart=drawPoint[0];
|
|
60913
|
+
var ptEnd=drawPoint[1];
|
|
60914
|
+
|
|
60915
|
+
//计算箭头 的两条边线坐标
|
|
60916
|
+
var outArrow=this.CalculatePoint(this.OutAngle, ptStart, ptEnd, this.OutWidth);
|
|
60917
|
+
var insideArrow=this.CalculatePoint(this.InsideAngle, ptStart, ptEnd, this.InsideWidth);
|
|
60918
|
+
|
|
60919
|
+
this.Canvas.beginPath();
|
|
60920
|
+
this.Canvas.moveTo(ptStart.X,ptStart.Y);
|
|
60921
|
+
this.Canvas.lineTo(insideArrow.Top.X,insideArrow.Top.Y);
|
|
60922
|
+
this.Canvas.lineTo(outArrow.Top.X,outArrow.Top.Y);
|
|
60923
|
+
this.Canvas.lineTo(ptEnd.X,ptEnd.Y);
|
|
60924
|
+
this.Canvas.lineTo(outArrow.Bottom.X,outArrow.Bottom.Y);
|
|
60925
|
+
this.Canvas.lineTo(insideArrow.Bottom.X,insideArrow.Bottom.Y);
|
|
60926
|
+
this.Canvas.lineTo(ptStart.X,ptStart.Y);
|
|
60927
|
+
this.Canvas.closePath();
|
|
60928
|
+
|
|
60929
|
+
this.Canvas.fillStyle=this.LineColor;
|
|
60930
|
+
this.Canvas.fill();
|
|
60931
|
+
|
|
60932
|
+
/*
|
|
60933
|
+
if (this.IsSelected)
|
|
60934
|
+
{
|
|
60935
|
+
this.Canvas.strokeStyle='rgba(255,0,0,0.5)';
|
|
60936
|
+
this.Canvas.lineWidth=20 * GetDevicePixelRatio();
|
|
60937
|
+
this.Canvas.stroke();
|
|
60938
|
+
}
|
|
60939
|
+
*/
|
|
60940
|
+
|
|
60941
|
+
var line={Start:ptStart, End:ptEnd};
|
|
60942
|
+
this.LinePoint.push(line);
|
|
60943
|
+
|
|
60944
|
+
this.DrawPoint([ptStart,ptEnd]); //画点
|
|
60945
|
+
this.Canvas.restore();
|
|
60946
|
+
}
|
|
60947
|
+
}
|
|
60948
|
+
|
|
60863
60949
|
//画图工具-射线
|
|
60864
60950
|
function ChartDrawPictureHaflLine()
|
|
60865
60951
|
{
|
|
@@ -71364,10 +71450,46 @@ function JSChartResource()
|
|
|
71364
71450
|
CheckBox:
|
|
71365
71451
|
{
|
|
71366
71452
|
Family:"iconfont", Size:15,
|
|
71367
|
-
Checked:{ Color:"rgb(
|
|
71368
|
-
Unchecked:{ Color:"rgb(
|
|
71453
|
+
Checked:{ Color:"rgb(69,147,238)", Symbol:"\ue6b3", DisableColor:"rgb(230,230,230)", MouseOnColor:"rgb(69,147,238)" },
|
|
71454
|
+
Unchecked:{ Color:"rgb(120,120,120)", Symbol:"\ue6b4", DisableColor:"rgb(230,230,230)", MouseOnColor:"rgb(69,147,238)" },
|
|
71369
71455
|
|
|
71370
71456
|
Margin:{ Left:5, Right:5, Bottom:2, Top:4 },
|
|
71457
|
+
},
|
|
71458
|
+
|
|
71459
|
+
Link:
|
|
71460
|
+
{
|
|
71461
|
+
Font:`${12*GetDevicePixelRatio()}px 微软雅黑`,
|
|
71462
|
+
TextColor:"rgb(30,144,255)",
|
|
71463
|
+
|
|
71464
|
+
Disable:{ TextColor:"rgb(211,211,211)" },
|
|
71465
|
+
MouseOn:{ TextColor:"rgb(30,144,255)" },
|
|
71466
|
+
},
|
|
71467
|
+
|
|
71468
|
+
ProgressBar:
|
|
71469
|
+
{
|
|
71470
|
+
BGColor:"rgb(229,231,238)",
|
|
71471
|
+
BarColor:"rgb(26,125,255)",
|
|
71472
|
+
Margin:{ Left:2, Right:2, Bottom:2, Top:2 },
|
|
71473
|
+
BarMargin:{ Left:2, Right:2, Bottom:2, Top:2 },
|
|
71474
|
+
TextColor:"rgb(0,0,0)",
|
|
71475
|
+
Font:`${12*GetDevicePixelRatio()}px 微软雅黑`,
|
|
71476
|
+
TextMargin:{ Left:40, Right:2, Bottom:2, Top:2},
|
|
71477
|
+
Disable:{ BGColor:"rgb(229,231,238)", BarColor:"rgb(131,131,131)", TextColor:"rgb(159,161,159)"}
|
|
71478
|
+
},
|
|
71479
|
+
|
|
71480
|
+
Button:
|
|
71481
|
+
{
|
|
71482
|
+
BGColor:"rgb(61,134,180)",
|
|
71483
|
+
TextColor:"rgb(255,255,255)",
|
|
71484
|
+
BorderColor:"rgb(200,200,200)",
|
|
71485
|
+
|
|
71486
|
+
Disable:{ BGColor:"rgb(105,105,105)", TextColor:"rgb(169,169,169)"},
|
|
71487
|
+
MouseOn:{ BGColor:"rgb(57,125,169)", TextColor:"rgb(230,230,230)" },
|
|
71488
|
+
|
|
71489
|
+
Margin:{ Left:5, Right:5, Bottom:2, Top:2 },
|
|
71490
|
+
TextMargin:{ Bottom:2 },
|
|
71491
|
+
|
|
71492
|
+
Font:`${12*GetDevicePixelRatio()}px 微软雅黑`
|
|
71371
71493
|
}
|
|
71372
71494
|
},
|
|
71373
71495
|
|
|
@@ -72410,6 +72532,58 @@ function JSChartResource()
|
|
|
72410
72532
|
|
|
72411
72533
|
CopyMarginConfig(dest.CheckBox.Margin, subItem.Margin);
|
|
72412
72534
|
}
|
|
72535
|
+
|
|
72536
|
+
if (item.Link)
|
|
72537
|
+
{
|
|
72538
|
+
var subItem=item.Link;
|
|
72539
|
+
if (subItem.Font) dest.Link.Font=subItem.Font;
|
|
72540
|
+
if (subItem.TextColor) dest.Link.TextColor=subItem.TextColor;
|
|
72541
|
+
if (subItem.Disable && subItem.Disable.TextColor) dest.Link.Disable.TextColor=subItem.Disable.TextColor;
|
|
72542
|
+
if (subItem.MouseOn && subItem.MouseOn.TextColor) dest.Link.MouseOn.TextColor=subItem.MouseOn.TextColor;
|
|
72543
|
+
}
|
|
72544
|
+
|
|
72545
|
+
if (item.ProgressBar)
|
|
72546
|
+
{
|
|
72547
|
+
var subItem=item.ProgressBar;
|
|
72548
|
+
if (subItem.BGColor) dest.ProgressBar.BGColor=subItem.BGColor;
|
|
72549
|
+
if (subItem.BarColor) dest.ProgressBar.BarColor=subItem.BarColor;
|
|
72550
|
+
if (subItem.TextColor) dest.ProgressBar.TextColor=subItem.TextColor;
|
|
72551
|
+
if (subItem.Font) dest.ProgressBar.Font=subItem.Font;
|
|
72552
|
+
if (subItem.Disable)
|
|
72553
|
+
{
|
|
72554
|
+
if (subItem.Disable.BGColor) dest.ProgressBar.Disable.BGColor=subItem.Disable.BGColor;
|
|
72555
|
+
if (subItem.Disable.BarColor) dest.ProgressBar.Disable.BarColor=subItem.Disable.BarColor;
|
|
72556
|
+
if (subItem.Disable.TextColor) dest.ProgressBar.Disable.TextColor=subItem.Disable.TextColor;
|
|
72557
|
+
}
|
|
72558
|
+
|
|
72559
|
+
CopyMarginConfig(dest.ProgressBar.Margin, subItem.Margin);
|
|
72560
|
+
CopyMarginConfig(dest.ProgressBar.BarMargin, subItem.BarMargin);
|
|
72561
|
+
CopyMarginConfig(dest.ProgressBar.TextMargin, subItem.TextMargin);
|
|
72562
|
+
}
|
|
72563
|
+
|
|
72564
|
+
if (item.Buttom)
|
|
72565
|
+
{
|
|
72566
|
+
var subItem=item.Buttom;
|
|
72567
|
+
if (subItem.BGColor) dest.Buttom.BGColor=subItem.BGColor;
|
|
72568
|
+
if (subItem.TextColor) dest.Buttom.TextColor=subItem.TextColor;
|
|
72569
|
+
if (subItem.BorderColor) dest.Buttom.BorderColor=subItem.BorderColor;
|
|
72570
|
+
if (subItem.Font) dest.Buttom.Font=subItem.Font;
|
|
72571
|
+
|
|
72572
|
+
if (subItem.Disable)
|
|
72573
|
+
{
|
|
72574
|
+
if (subItem.Disable.BGColor) dest.Buttom.Disable.BGColor=subItem.Disable.BGColor;
|
|
72575
|
+
if (subItem.Disable.TextColor) dest.Buttom.Disable.TextColor=subItem.Disable.TextColor;
|
|
72576
|
+
}
|
|
72577
|
+
|
|
72578
|
+
if (subItem.MouseOn)
|
|
72579
|
+
{
|
|
72580
|
+
if (subItem.MouseOn.BGColor) dest.Buttom.MouseOn.BGColor=subItem.MouseOn.BGColor;
|
|
72581
|
+
if (subItem.MouseOn.TextColor) dest.Buttom.MouseOn.TextColor=subItem.MouseOn.TextColor;
|
|
72582
|
+
}
|
|
72583
|
+
|
|
72584
|
+
CopyMarginConfig(dest.Buttom.Margin, subItem.Margin);
|
|
72585
|
+
CopyMarginConfig(dest.Buttom.TextMargin, subItem.TextMargin);
|
|
72586
|
+
}
|
|
72413
72587
|
|
|
72414
72588
|
}
|
|
72415
72589
|
|
|
@@ -123830,8 +124004,29 @@ function GetBlackStyle()
|
|
|
123830
124004
|
CheckBox:
|
|
123831
124005
|
{
|
|
123832
124006
|
Family:"iconfont", Size:15,
|
|
123833
|
-
Checked:{ Color:"rgb(
|
|
123834
|
-
Unchecked:{ Color:"rgb(
|
|
124007
|
+
Checked:{ Color:"rgb(69,147,238)", Symbol:"\ue6b3", DisableColor:"rgb(120,120,120)", MouseOnColor:"rgb(69,147,238)" },
|
|
124008
|
+
Unchecked:{ Color:"rgb(210,210,210)", Symbol:"\ue6b4", DisableColor:"rgb(120,120,120)", MouseOnColor:"rgb(69,147,238)" },
|
|
124009
|
+
},
|
|
124010
|
+
|
|
124011
|
+
Link:
|
|
124012
|
+
{
|
|
124013
|
+
Font:`${12*GetDevicePixelRatio()}px 微软雅黑`,
|
|
124014
|
+
TextColor:"rgb(0,144,255)",
|
|
124015
|
+
|
|
124016
|
+
Disable:{ TextColor:"rgb(211,211,211)" },
|
|
124017
|
+
MouseOn:{ TextColor:"rgb(0,144,255)" },
|
|
124018
|
+
},
|
|
124019
|
+
|
|
124020
|
+
ProgressBar:
|
|
124021
|
+
{
|
|
124022
|
+
BGColor:"rgb(20,24,28)",
|
|
124023
|
+
BarColor:"rgb(47,124,197)",
|
|
124024
|
+
Margin:{ Left:2, Right:2, Bottom:2, Top:2 },
|
|
124025
|
+
BarMargin:{ Left:2, Right:2, Bottom:2, Top:2 },
|
|
124026
|
+
TextColor:"rgb(230,230,230)",
|
|
124027
|
+
Font:`${12*GetDevicePixelRatio()}px 微软雅黑`,
|
|
124028
|
+
TextMargin:{ Left:40, Right:2, Bottom:2, Top:2},
|
|
124029
|
+
Disable:{ BGColor:"rgb(61,61,61)", BarColor:"rgb(131,131,131)", TextColor:"rgb(159,161,159)"}
|
|
123835
124030
|
}
|
|
123836
124031
|
},
|
|
123837
124032
|
|
|
@@ -125872,7 +126067,8 @@ function JSReportChartContainer(uielement)
|
|
|
125872
126067
|
this.JSPopMenu; //内置菜单
|
|
125873
126068
|
this.IsShowRightMenu=true;
|
|
125874
126069
|
|
|
125875
|
-
|
|
126070
|
+
//MouseOnStatus:{ RowIndex:行, ColumnIndex:列}
|
|
126071
|
+
this.LastMouseStatus={ MoveStatus:null, TooltipStatus:null, MouseOnStatus:null };
|
|
125876
126072
|
|
|
125877
126073
|
this.ChartDestory=function() //销毁
|
|
125878
126074
|
{
|
|
@@ -126111,6 +126307,7 @@ function JSReportChartContainer(uielement)
|
|
|
126111
126307
|
this.Canvas.clearRect(0,0,this.UIElement.width,this.UIElement.height);
|
|
126112
126308
|
var pixelTatio = GetDevicePixelRatio(); //获取设备的分辨率
|
|
126113
126309
|
this.Canvas.lineWidth=pixelTatio; //手机端需要根据分辨率比调整线段宽度
|
|
126310
|
+
this.LastMouseStatus.MouseOnStatus=null;
|
|
126114
126311
|
|
|
126115
126312
|
if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash)
|
|
126116
126313
|
{
|
|
@@ -126127,14 +126324,14 @@ function JSReportChartContainer(uielement)
|
|
|
126127
126324
|
{
|
|
126128
126325
|
var item=this.ChartPaint[i];
|
|
126129
126326
|
if (item.IsDrawFirst)
|
|
126130
|
-
item.Draw();
|
|
126327
|
+
item.Draw(this.LastMouseStatus);
|
|
126131
126328
|
}
|
|
126132
126329
|
|
|
126133
126330
|
for(var i=0; i<this.ChartPaint.length; ++i)
|
|
126134
126331
|
{
|
|
126135
126332
|
var item=this.ChartPaint[i];
|
|
126136
126333
|
if (!item.IsDrawFirst)
|
|
126137
|
-
item.Draw();
|
|
126334
|
+
item.Draw(this.LastMouseStatus);
|
|
126138
126335
|
}
|
|
126139
126336
|
|
|
126140
126337
|
if (this.GlobalOption.FlashBGCount>0)
|
|
@@ -126272,6 +126469,50 @@ function JSReportChartContainer(uielement)
|
|
|
126272
126469
|
this.RequestMemberListData();
|
|
126273
126470
|
}
|
|
126274
126471
|
|
|
126472
|
+
//更新数据
|
|
126473
|
+
this.UpdateFullData=function(data)
|
|
126474
|
+
{
|
|
126475
|
+
var arySymbol=[];
|
|
126476
|
+
if (IFrameSplitOperator.IsNonEmptyArray(data.data))
|
|
126477
|
+
{
|
|
126478
|
+
//0=证券代码 1=股票名称
|
|
126479
|
+
for(var i=0;i<data.data.length;++i)
|
|
126480
|
+
{
|
|
126481
|
+
var item=data.data[i];
|
|
126482
|
+
var symbol=item[0];
|
|
126483
|
+
var stock=null;
|
|
126484
|
+
if (this.MapStockData.has(symbol))
|
|
126485
|
+
{
|
|
126486
|
+
stock=this.MapStockData.get(symbol);
|
|
126487
|
+
}
|
|
126488
|
+
else
|
|
126489
|
+
{
|
|
126490
|
+
stock=new HQReportItem();
|
|
126491
|
+
stock.OriginalSymbol=symbol;
|
|
126492
|
+
this.MapStockData.set(symbol, stock);
|
|
126493
|
+
}
|
|
126494
|
+
|
|
126495
|
+
stock.Symbol=this.GetSymbolNoSuffix(symbol);
|
|
126496
|
+
stock.Name=item[1];
|
|
126497
|
+
this.ReadStockJsonData(stock, item);
|
|
126498
|
+
|
|
126499
|
+
arySymbol.push(symbol);
|
|
126500
|
+
}
|
|
126501
|
+
}
|
|
126502
|
+
|
|
126503
|
+
//设置显示数据
|
|
126504
|
+
if (IFrameSplitOperator.IsNonEmptyArray(arySymbol))
|
|
126505
|
+
{
|
|
126506
|
+
for(var i=0;i<arySymbol.length;++i)
|
|
126507
|
+
{
|
|
126508
|
+
this.Data.Data.push(arySymbol[i]);
|
|
126509
|
+
this.SourceData.Data.push(arySymbol[i]);
|
|
126510
|
+
}
|
|
126511
|
+
}
|
|
126512
|
+
|
|
126513
|
+
this.Draw();
|
|
126514
|
+
}
|
|
126515
|
+
|
|
126275
126516
|
//设置全部的数据
|
|
126276
126517
|
this.SetFullData=function(data)
|
|
126277
126518
|
{
|
|
@@ -126281,6 +126522,9 @@ function JSReportChartContainer(uielement)
|
|
|
126281
126522
|
this.ResetSortStatus();
|
|
126282
126523
|
this.ResetReportSelectStatus();
|
|
126283
126524
|
|
|
126525
|
+
this.UpdateFullData(data);
|
|
126526
|
+
|
|
126527
|
+
/*
|
|
126284
126528
|
//缓存所有数据
|
|
126285
126529
|
var arySymbol=[];
|
|
126286
126530
|
if (IFrameSplitOperator.IsNonEmptyArray(data.data))
|
|
@@ -126321,6 +126565,7 @@ function JSReportChartContainer(uielement)
|
|
|
126321
126565
|
}
|
|
126322
126566
|
|
|
126323
126567
|
this.Draw();
|
|
126568
|
+
*/
|
|
126324
126569
|
}
|
|
126325
126570
|
|
|
126326
126571
|
this.RequestMemberListData=function()
|
|
@@ -127165,6 +127410,7 @@ function JSReportChartContainer(uielement)
|
|
|
127165
127410
|
var x = (e.clientX-this.UIElement.getBoundingClientRect().left)*pixelTatio;
|
|
127166
127411
|
var y = (e.clientY-this.UIElement.getBoundingClientRect().top)*pixelTatio;
|
|
127167
127412
|
|
|
127413
|
+
var oldMouseOnStatus=this.LastMouseStatus.MouseOnStatus;
|
|
127168
127414
|
this.LastMouseStatus.OnMouseMove=null;
|
|
127169
127415
|
|
|
127170
127416
|
var bDrawTooltip=false;
|
|
@@ -127176,6 +127422,7 @@ function JSReportChartContainer(uielement)
|
|
|
127176
127422
|
if (this.DragColumnWidth) return;
|
|
127177
127423
|
|
|
127178
127424
|
var tabChart=this.GetTabChart();
|
|
127425
|
+
var bDrawTab=false;
|
|
127179
127426
|
if (tabChart)
|
|
127180
127427
|
{
|
|
127181
127428
|
var tabData=tabChart.PtInTab(x,y);
|
|
@@ -127185,9 +127432,18 @@ function JSReportChartContainer(uielement)
|
|
|
127185
127432
|
if (tabChart.MoveOnTabIndex!=index)
|
|
127186
127433
|
{
|
|
127187
127434
|
tabChart.MoveOnTabIndex=index;
|
|
127188
|
-
|
|
127435
|
+
bDrawTab=true;
|
|
127189
127436
|
}
|
|
127190
127437
|
}
|
|
127438
|
+
else
|
|
127439
|
+
{
|
|
127440
|
+
if (tabChart.MoveOnTabIndex>=0)
|
|
127441
|
+
{
|
|
127442
|
+
tabChart.MoveOnTabIndex=-1;
|
|
127443
|
+
bDrawTab=true;
|
|
127444
|
+
}
|
|
127445
|
+
|
|
127446
|
+
}
|
|
127191
127447
|
}
|
|
127192
127448
|
|
|
127193
127449
|
this.LastMouseStatus.OnMouseMove={ X:x, Y:y };
|
|
@@ -127205,12 +127461,28 @@ function JSReportChartContainer(uielement)
|
|
|
127205
127461
|
}
|
|
127206
127462
|
else
|
|
127207
127463
|
{
|
|
127208
|
-
var
|
|
127209
|
-
|
|
127464
|
+
var buttonData=report.GetButtonData(x,y);
|
|
127465
|
+
var mouseOnStatus=null;
|
|
127466
|
+
if (buttonData)
|
|
127210
127467
|
{
|
|
127211
127468
|
mouseStatus={ Cursor:"pointer", Name:"Botton"};
|
|
127469
|
+
if (buttonData.Type==1 || buttonData.Type==0 || buttonData.Type==2)
|
|
127470
|
+
{
|
|
127471
|
+
mouseOnStatus={ Index:buttonData.Index, ColumnIndex:buttonData.ColumnIndex };
|
|
127472
|
+
}
|
|
127212
127473
|
}
|
|
127213
127474
|
|
|
127475
|
+
//console.log("[UIOnMouseMove] ", oldMouseOnStatus, mouseOnStatus)
|
|
127476
|
+
if ((!oldMouseOnStatus && mouseOnStatus) || (oldMouseOnStatus && !mouseOnStatus))
|
|
127477
|
+
{
|
|
127478
|
+
bDraw=true;
|
|
127479
|
+
}
|
|
127480
|
+
else if (oldMouseOnStatus && mouseOnStatus)
|
|
127481
|
+
{
|
|
127482
|
+
if (oldMouseOnStatus.Index!=mouseOnStatus.Index || oldMouseOnStatus.ColumnIndex!=mouseOnStatus.ColumnIndex)
|
|
127483
|
+
bDraw=true;
|
|
127484
|
+
}
|
|
127485
|
+
|
|
127214
127486
|
var tooltipData=report.GetTooltipData(x,y); //单元格提示信息
|
|
127215
127487
|
if (tooltipData)
|
|
127216
127488
|
{
|
|
@@ -127244,7 +127516,7 @@ function JSReportChartContainer(uielement)
|
|
|
127244
127516
|
|
|
127245
127517
|
if (mouseStatus) this.UIElement.style.cursor=mouseStatus.Cursor;
|
|
127246
127518
|
|
|
127247
|
-
if (bDraw) this.Draw();
|
|
127519
|
+
if (bDraw || bDrawTab) this.Draw();
|
|
127248
127520
|
else if (bDrawTooltip) this.DrawTooltip(this.LastMouseStatus.TooltipStatus);
|
|
127249
127521
|
}
|
|
127250
127522
|
|
|
@@ -129094,6 +129366,7 @@ var REPORT_COLUMN_ID=
|
|
|
129094
129366
|
CUSTOM_CHECKBOX_ID:104, //自定义checkbox
|
|
129095
129367
|
CUSTOM_BUTTON_ID:105, //自定义按钮
|
|
129096
129368
|
CUSTOM_PROGRESS_ID:106, //进度条
|
|
129369
|
+
CUSTOM_LINK_ID:107, //链接
|
|
129097
129370
|
}
|
|
129098
129371
|
|
|
129099
129372
|
var MAP_COLUMN_FIELD=new Map([
|
|
@@ -129264,6 +129537,9 @@ function ChartReport()
|
|
|
129264
129537
|
}
|
|
129265
129538
|
|
|
129266
129539
|
this.CheckBoxConfig=CloneData(g_JSChartResource.Report.CheckBox);
|
|
129540
|
+
this.LinkConfig=CloneData(g_JSChartResource.Report.Link);
|
|
129541
|
+
this.ProgressBarConfig=CloneData(g_JSChartResource.Report.ProgressBar);
|
|
129542
|
+
this.ButtonConfig=CloneData(g_JSChartResource.Report.Button);
|
|
129267
129543
|
|
|
129268
129544
|
//股票代码+股票名称
|
|
129269
129545
|
this.ItemSymbolFontConfig={Size:g_JSChartResource.Report.Item.SymbolFont.Size, Name:g_JSChartResource.Report.Item.SymbolFont.Name};
|
|
@@ -129307,6 +129583,8 @@ function ChartReport()
|
|
|
129307
129583
|
//{ Rect:rtItem, Type: 0=checkedbox, 1=button, 2=link , Stock, Index:index, Column:column }
|
|
129308
129584
|
this.ButtonRect=[];
|
|
129309
129585
|
|
|
129586
|
+
this.LastMouseStatus;
|
|
129587
|
+
|
|
129310
129588
|
this.ReloadResource=function(resource)
|
|
129311
129589
|
{
|
|
129312
129590
|
this.DevicePixelRatio=GetDevicePixelRatio()
|
|
@@ -129397,6 +129675,10 @@ function ChartReport()
|
|
|
129397
129675
|
|
|
129398
129676
|
if (this.Tab) this.Tab.ReloadResource(resource);
|
|
129399
129677
|
if (this.VScrollbar) this.VScrollbar.ReloadResource(resource);
|
|
129678
|
+
|
|
129679
|
+
this.CheckBoxConfig=CloneData(g_JSChartResource.Report.CheckBox);
|
|
129680
|
+
this.LinkConfig=CloneData(g_JSChartResource.Report.Link);
|
|
129681
|
+
this.ProgressBarConfig=CloneData(g_JSChartResource.Report.ProgressBar);
|
|
129400
129682
|
}
|
|
129401
129683
|
|
|
129402
129684
|
this.SetColumn=function(aryColumn)
|
|
@@ -129468,7 +129750,7 @@ function ChartReport()
|
|
|
129468
129750
|
if (IFrameSplitOperator.IsNumber(item.DataIndex)) colItem.DataIndex=item.DataIndex; //数据在扩展数据索引列
|
|
129469
129751
|
if (IFrameSplitOperator.IsNumber(item.BlockIndex)) colItem.BlockIndex=item.BlockIndex;
|
|
129470
129752
|
if (item.CheckBox) colItem.CheckBox=CloneData(item.CheckBox);
|
|
129471
|
-
else colItem.CheckBox=
|
|
129753
|
+
else colItem.CheckBox=this.CheckBoxConfig;
|
|
129472
129754
|
}
|
|
129473
129755
|
else if (item.Type==REPORT_COLUMN_ID.CUSTOM_BUTTON_ID)
|
|
129474
129756
|
{
|
|
@@ -129476,6 +129758,7 @@ function ChartReport()
|
|
|
129476
129758
|
if (IFrameSplitOperator.IsNumber(item.DataIndex)) colItem.DataIndex=item.DataIndex; //数据在扩展数据索引列
|
|
129477
129759
|
if (IFrameSplitOperator.IsNumber(item.BlockIndex)) colItem.BlockIndex=item.BlockIndex;
|
|
129478
129760
|
if (item.Button) colItem.Button=CloneData(item.Button);
|
|
129761
|
+
else colItem.Button=this.ButtonConfig;
|
|
129479
129762
|
}
|
|
129480
129763
|
else if (item.Type==REPORT_COLUMN_ID.CUSTOM_PROGRESS_ID)
|
|
129481
129764
|
{
|
|
@@ -129483,6 +129766,15 @@ function ChartReport()
|
|
|
129483
129766
|
if (IFrameSplitOperator.IsNumber(item.DataIndex)) colItem.DataIndex=item.DataIndex; //数据在扩展数据索引列
|
|
129484
129767
|
if (IFrameSplitOperator.IsNumber(item.BlockIndex)) colItem.BlockIndex=item.BlockIndex;
|
|
129485
129768
|
if (item.ProgressBar) colItem.ProgressBar=CloneData(item.ProgressBar);
|
|
129769
|
+
else colItem.ProgressBar=this.ProgressBarConfig;
|
|
129770
|
+
}
|
|
129771
|
+
else if (item.Type==REPORT_COLUMN_ID.CUSTOM_LINK_ID)
|
|
129772
|
+
{
|
|
129773
|
+
if (!IFrameSplitOperator.IsNumber(item.DataIndex) && !IFrameSplitOperator.IsNumber(item.BlockIndex)) continue;
|
|
129774
|
+
if (IFrameSplitOperator.IsNumber(item.DataIndex)) colItem.DataIndex=item.DataIndex; //数据在扩展数据索引列
|
|
129775
|
+
if (IFrameSplitOperator.IsNumber(item.BlockIndex)) colItem.BlockIndex=item.BlockIndex;
|
|
129776
|
+
if (item.Link) colItem.Link=CloneData(item.Link);
|
|
129777
|
+
else colItem.Link=this.LinkConfig;
|
|
129486
129778
|
}
|
|
129487
129779
|
else if (item.Type==REPORT_COLUMN_ID.CUSTOM_ICON_ID)
|
|
129488
129780
|
{
|
|
@@ -129602,7 +129894,8 @@ function ChartReport()
|
|
|
129602
129894
|
{ Type:REPORT_COLUMN_ID.CUSTOM_CHECKBOX_ID, Title:"", TextAlign:"center", FixedWidth:20*GetDevicePixelRatio() },
|
|
129603
129895
|
|
|
129604
129896
|
{ Type:REPORT_COLUMN_ID.CUSTOM_BUTTON_ID, Title:"", TextAlign:"center", FixedWidth:50*GetDevicePixelRatio() },
|
|
129605
|
-
{ Type:REPORT_COLUMN_ID.CUSTOM_PROGRESS_ID, Title:"进度条", TextAlign:"center", FixedWidth:100*GetDevicePixelRatio() }
|
|
129897
|
+
{ Type:REPORT_COLUMN_ID.CUSTOM_PROGRESS_ID, Title:"进度条", TextAlign:"center", FixedWidth:100*GetDevicePixelRatio() },
|
|
129898
|
+
{ Type:REPORT_COLUMN_ID.CUSTOM_LINK_ID, Title:"链接地址", TextAlign:"center", MaxText:"擎擎擎擎擎" }
|
|
129606
129899
|
];
|
|
129607
129900
|
|
|
129608
129901
|
for(var i=0;i<DEFAULT_COLUMN.length;++i)
|
|
@@ -129623,12 +129916,13 @@ function ChartReport()
|
|
|
129623
129916
|
this.Canvas.clip();
|
|
129624
129917
|
}
|
|
129625
129918
|
|
|
129626
|
-
this.Draw=function()
|
|
129919
|
+
this.Draw=function(lastMouseStatus)
|
|
129627
129920
|
{
|
|
129628
129921
|
this.ShowSymbol=[];
|
|
129629
129922
|
this.TooltipRect=[];
|
|
129630
129923
|
this.ButtonRect=[];
|
|
129631
129924
|
this.DevicePixelRatio=GetDevicePixelRatio()
|
|
129925
|
+
this.LastMouseStatus=lastMouseStatus;
|
|
129632
129926
|
|
|
129633
129927
|
if (this.GlobalOption) this.GlobalOption.FlashBGCount=0;
|
|
129634
129928
|
|
|
@@ -129660,6 +129954,7 @@ function ChartReport()
|
|
|
129660
129954
|
this.VScrollbar.DrawScrollbar(this.RectClient.Left,this.RectClient.Top+this.HeaderHeight, this.RectClient.Right, bottom-this.BottomToolbarHeight-4);
|
|
129661
129955
|
}
|
|
129662
129956
|
|
|
129957
|
+
this.LastMouseStatus=null;
|
|
129663
129958
|
this.SizeChange=false;
|
|
129664
129959
|
}
|
|
129665
129960
|
|
|
@@ -130299,7 +130594,7 @@ function ChartReport()
|
|
|
130299
130594
|
for(var i=0;i<this.FixedColumn && i<this.Column.length;++i)
|
|
130300
130595
|
{
|
|
130301
130596
|
var item=this.Column[i];
|
|
130302
|
-
this.DrawItem(dataIndex, data, item, left, top, rowType);
|
|
130597
|
+
this.DrawItem(dataIndex, data, item, left, top, rowType, i);
|
|
130303
130598
|
left+=item.Width;
|
|
130304
130599
|
|
|
130305
130600
|
if (left>=chartRight) break;
|
|
@@ -130308,20 +130603,24 @@ function ChartReport()
|
|
|
130308
130603
|
for(var i=this.FixedColumn+this.Data.XOffset;i<this.Column.length;++i)
|
|
130309
130604
|
{
|
|
130310
130605
|
var item=this.Column[i];
|
|
130311
|
-
this.DrawItem(dataIndex, data, item, left, top, rowType);
|
|
130606
|
+
this.DrawItem(dataIndex, data, item, left, top, rowType, i);
|
|
130312
130607
|
left+=item.Width;
|
|
130313
130608
|
|
|
130314
130609
|
if (left>=chartRight) break;
|
|
130315
130610
|
}
|
|
130316
130611
|
}
|
|
130317
130612
|
|
|
130318
|
-
this.DrawItem=function(index, data, column, left, top, rowType)
|
|
130613
|
+
this.DrawItem=function(index, data, column, left, top, rowType, columnIndex)
|
|
130319
130614
|
{
|
|
130320
130615
|
var itemWidth=column.Width;
|
|
130321
130616
|
var x=left+this.ItemMergin.Left;
|
|
130322
130617
|
var textWidth=column.Width-this.ItemMergin.Left-this.ItemMergin.Right;
|
|
130323
130618
|
var stock=data.Stock;
|
|
130324
|
-
var drawInfo=
|
|
130619
|
+
var drawInfo=
|
|
130620
|
+
{
|
|
130621
|
+
Text:null, TextColor:column.TextColor , TextAlign:column.TextAlign, Tooltip:null,
|
|
130622
|
+
Index:index, ColumnIndex:columnIndex
|
|
130623
|
+
};
|
|
130325
130624
|
var rtItem={ Left:left, Top:top, Width:column.Width, Height:this.RowHeight };
|
|
130326
130625
|
rtItem.Right=rtItem.Left+rtItem.Width;
|
|
130327
130626
|
rtItem.Bottom=rtItem.Top+rtItem.Height;
|
|
@@ -130584,6 +130883,10 @@ function ChartReport()
|
|
|
130584
130883
|
|
|
130585
130884
|
this.GetCustomProgressBarDrawInfo(data, column, drawInfo);
|
|
130586
130885
|
}
|
|
130886
|
+
else if (column.Type==REPORT_COLUMN_ID.CUSTOM_LINK_ID)
|
|
130887
|
+
{
|
|
130888
|
+
this.GetCustomLinkDrawInfo(data, column, drawInfo);
|
|
130889
|
+
}
|
|
130587
130890
|
|
|
130588
130891
|
|
|
130589
130892
|
//拖拽行颜色
|
|
@@ -130610,6 +130913,10 @@ function ChartReport()
|
|
|
130610
130913
|
{
|
|
130611
130914
|
this.DrawProgressBar(drawInfo, left, top, itemWidth);
|
|
130612
130915
|
}
|
|
130916
|
+
else if (column.Type==REPORT_COLUMN_ID.CUSTOM_LINK_ID)
|
|
130917
|
+
{
|
|
130918
|
+
this.DrawLinkText(drawInfo, x, top, textWidth);
|
|
130919
|
+
}
|
|
130613
130920
|
else
|
|
130614
130921
|
{
|
|
130615
130922
|
if (data.FlashBG && data.FlashBG.Data && column.ID!=undefined)
|
|
@@ -130643,7 +130950,7 @@ function ChartReport()
|
|
|
130643
130950
|
|
|
130644
130951
|
if (drawInfo.Botton)
|
|
130645
130952
|
{
|
|
130646
|
-
var buttonData={ Stock:stock, Index:index, Column:column, Rect:drawInfo.Botton.Rect, Type:drawInfo.Botton.Type, Data:drawInfo.Data };
|
|
130953
|
+
var buttonData={ Stock:stock, Index:index, ColumnIndex:columnIndex, Column:column, Rect:drawInfo.Botton.Rect, Type:drawInfo.Botton.Type, Data:drawInfo.Data };
|
|
130647
130954
|
this.ButtonRect.push(buttonData);
|
|
130648
130955
|
}
|
|
130649
130956
|
}
|
|
@@ -130941,6 +131248,20 @@ function ChartReport()
|
|
|
130941
131248
|
if (barData.BGColor) drawInfo.BGColor=barData.BGColor;
|
|
130942
131249
|
}
|
|
130943
131250
|
|
|
131251
|
+
this.GetCustomLinkDrawInfo=function(data, column, drawInfo)
|
|
131252
|
+
{
|
|
131253
|
+
var linkData=this.GetExtendData(data, column);
|
|
131254
|
+
if (!linkData) return;
|
|
131255
|
+
|
|
131256
|
+
drawInfo.Text=linkData.Title;
|
|
131257
|
+
drawInfo.Link=column.Link;
|
|
131258
|
+
drawInfo.Enable=true;
|
|
131259
|
+
drawInfo.Data=linkData;
|
|
131260
|
+
drawInfo.MaxText=column.MaxText;
|
|
131261
|
+
if (IFrameSplitOperator.IsBool(linkData.Enable)) drawInfo.Enable=linkData.Enable;
|
|
131262
|
+
if (linkData.TextColor) drawInfo.TextColor=linkData.TextColor;
|
|
131263
|
+
}
|
|
131264
|
+
|
|
130944
131265
|
this.FormaTimeDrawInfo=function(column, stock, drawInfo, data)
|
|
130945
131266
|
{
|
|
130946
131267
|
if (!IFrameSplitOperator.IsNumber(stock.Time)) return;
|
|
@@ -131210,35 +131531,57 @@ function ChartReport()
|
|
|
131210
131531
|
if (!IFrameSplitOperator.IsBool(drawInfo.Checked)) return;
|
|
131211
131532
|
if (!drawInfo.CheckBox) return;
|
|
131212
131533
|
|
|
131213
|
-
|
|
131534
|
+
var config=drawInfo.CheckBox;
|
|
131535
|
+
drawInfo.Font=`${config.Size*this.DevicePixelRatio}px ${config.Family}`;
|
|
131214
131536
|
var textAlign=drawInfo.TextAlign;
|
|
131215
131537
|
var size=drawInfo.CheckBox.Size*this.DevicePixelRatio;
|
|
131216
131538
|
var x=left+drawInfo.CheckBox.Margin.Left;
|
|
131217
131539
|
var y=top+this.RowHeight-drawInfo.CheckBox.Margin.Bottom;
|
|
131540
|
+
|
|
131218
131541
|
if (textAlign=='center') x=left+width/2-size/2;
|
|
131219
|
-
else if (textAlign=='right') x=left+width-
|
|
131542
|
+
else if (textAlign=='right') x=left+width-config.Margin.Right;
|
|
131543
|
+
|
|
131544
|
+
var rtBox={ Left:x, Bottom:y, Width:size, Height:size };
|
|
131545
|
+
rtBox.Right=rtBox.Left+rtBox.Width;
|
|
131546
|
+
rtBox.Top=rtBox.Bottom-rtBox.Height;
|
|
131547
|
+
|
|
131548
|
+
//鼠标在上面
|
|
131549
|
+
var bMouseOn=false;
|
|
131550
|
+
if (drawInfo.Enable && this.LastMouseStatus && this.LastMouseStatus.OnMouseMove)
|
|
131551
|
+
{
|
|
131552
|
+
var xMouse=this.LastMouseStatus.OnMouseMove.X;
|
|
131553
|
+
var yMouse=this.LastMouseStatus.OnMouseMove.Y;
|
|
131554
|
+
if (xMouse>rtBox.Left && xMouse<rtBox.Right && yMouse>rtBox.Top && yMouse<rtBox.Bottom)
|
|
131555
|
+
{
|
|
131556
|
+
bMouseOn=true;
|
|
131557
|
+
this.LastMouseStatus.MouseOnStatus={ Index:drawInfo.Index, ColumnIndex:drawInfo.ColumnIndex, Type:0 };
|
|
131558
|
+
}
|
|
131559
|
+
}
|
|
131220
131560
|
|
|
131221
131561
|
this.Canvas.font=drawInfo.Font;
|
|
131222
131562
|
this.Canvas.textBaseline="bottom";
|
|
131223
131563
|
this.Canvas.textAlign="left";
|
|
131224
131564
|
if (drawInfo.Checked===true)
|
|
131225
131565
|
{
|
|
131226
|
-
|
|
131227
|
-
|
|
131228
|
-
|
|
131566
|
+
var textColor=config.Checked.Color;
|
|
131567
|
+
if (drawInfo.Enable===false) textColor=config.Checked.DisableColor;
|
|
131568
|
+
else if (bMouseOn) textColor=config.Checked.MouseOnColor;
|
|
131569
|
+
|
|
131570
|
+
this.Canvas.fillStyle=textColor;
|
|
131571
|
+
this.Canvas.fillText(config.Checked.Symbol,x,y);
|
|
131229
131572
|
}
|
|
131230
131573
|
else if (drawInfo.Checked===false)
|
|
131231
131574
|
{
|
|
131232
|
-
|
|
131233
|
-
|
|
131234
|
-
|
|
131575
|
+
var textColor=config.Unchecked.Color;
|
|
131576
|
+
if (drawInfo.Enable===false) textColor=config.Unchecked.DisableColor;
|
|
131577
|
+
else if (bMouseOn) textColor=config.Unchecked.MouseOnColor;
|
|
131578
|
+
|
|
131579
|
+
this.Canvas.fillStyle=textColor;
|
|
131580
|
+
this.Canvas.fillText(config.Unchecked.Symbol,x,y);
|
|
131235
131581
|
}
|
|
131236
131582
|
|
|
131237
131583
|
if (drawInfo.Enable)
|
|
131238
131584
|
{
|
|
131239
|
-
var rtBox={ Left:x, Bottom:y, Width:size, Height:size };
|
|
131240
|
-
rtBox.Right=rtBox.Left+rtBox.Width;
|
|
131241
|
-
rtBox.Top=rtBox.Bottom-rtBox.Height;
|
|
131242
131585
|
drawInfo.Botton={ Rect:rtBox, Type:0 };
|
|
131243
131586
|
}
|
|
131244
131587
|
}
|
|
@@ -131247,6 +131590,7 @@ function ChartReport()
|
|
|
131247
131590
|
{
|
|
131248
131591
|
if (!drawInfo.Button) return;
|
|
131249
131592
|
|
|
131593
|
+
var config=drawInfo.Button;
|
|
131250
131594
|
var rtBG=
|
|
131251
131595
|
{
|
|
131252
131596
|
Left:left+drawInfo.Button.Margin.Left, Top:top+drawInfo.Button.Margin.Top,
|
|
@@ -131256,11 +131600,26 @@ function ChartReport()
|
|
|
131256
131600
|
rtBG.Right=rtBG.Left+rtBG.Width;
|
|
131257
131601
|
rtBG.Bottom=rtBG.Top+rtBG.Height;
|
|
131258
131602
|
|
|
131259
|
-
var bgColor=
|
|
131603
|
+
var bgColor=config.BGColor, textColor=config.TextColor;
|
|
131260
131604
|
if (drawInfo.Enable===false)
|
|
131261
131605
|
{
|
|
131262
|
-
bgColor=
|
|
131263
|
-
textColor=
|
|
131606
|
+
bgColor=config.Disable.BGColor;
|
|
131607
|
+
textColor=config.Disable.TextColor;
|
|
131608
|
+
}
|
|
131609
|
+
else
|
|
131610
|
+
{
|
|
131611
|
+
if (this.LastMouseStatus && this.LastMouseStatus.OnMouseMove && config.MouseOn)
|
|
131612
|
+
{
|
|
131613
|
+
var x=this.LastMouseStatus.OnMouseMove.X;
|
|
131614
|
+
var y=this.LastMouseStatus.OnMouseMove.Y;
|
|
131615
|
+
if (x>rtBG.Left && x<rtBG.Right && y>rtBG.Top && y<rtBG.Bottom)
|
|
131616
|
+
{
|
|
131617
|
+
bgColor=config.MouseOn.BGColor;
|
|
131618
|
+
textColor=config.MouseOn.TextColor;
|
|
131619
|
+
|
|
131620
|
+
this.LastMouseStatus.MouseOnStatus={ Index:drawInfo.Index, ColumnIndex:drawInfo.ColumnIndex, Type:1 };
|
|
131621
|
+
}
|
|
131622
|
+
}
|
|
131264
131623
|
}
|
|
131265
131624
|
|
|
131266
131625
|
this.Canvas.fillStyle=bgColor;
|
|
@@ -131344,6 +131703,81 @@ function ChartReport()
|
|
|
131344
131703
|
}
|
|
131345
131704
|
}
|
|
131346
131705
|
|
|
131706
|
+
this.DrawLinkText=function(drawInfo, left, top, width)
|
|
131707
|
+
{
|
|
131708
|
+
if (!drawInfo.Link || !drawInfo.Text) return;
|
|
131709
|
+
|
|
131710
|
+
var config=drawInfo.Link;
|
|
131711
|
+
var text=drawInfo.Text;
|
|
131712
|
+
var textAlign=drawInfo.TextAlign;
|
|
131713
|
+
var font=config.Font;
|
|
131714
|
+
var color=config.TextColor;
|
|
131715
|
+
|
|
131716
|
+
|
|
131717
|
+
|
|
131718
|
+
this.Canvas.font=font;
|
|
131719
|
+
var textWidth=this.Canvas.measureText(text).width;
|
|
131720
|
+
var textHeight=this.Canvas.measureText("擎").width;
|
|
131721
|
+
var x=left;
|
|
131722
|
+
if (width>=textWidth)
|
|
131723
|
+
{
|
|
131724
|
+
if (textAlign=='center') x=left+(width-textWidth)/2;
|
|
131725
|
+
else if (textAlign=='right') x=left+width-textWidth;
|
|
131726
|
+
}
|
|
131727
|
+
else
|
|
131728
|
+
{
|
|
131729
|
+
text=this.TextEllipsis(text, width, drawInfo.MaxText);
|
|
131730
|
+
textWidth=this.Canvas.measureText(text).width;
|
|
131731
|
+
|
|
131732
|
+
//数据截断提示信息
|
|
131733
|
+
drawInfo.Tooltip=
|
|
131734
|
+
{
|
|
131735
|
+
Type:2,
|
|
131736
|
+
Data:{ AryText:[ {Text:drawInfo.Text} ] }
|
|
131737
|
+
}
|
|
131738
|
+
}
|
|
131739
|
+
|
|
131740
|
+
var rtText={Left:x, Bottom:top+this.RowHeight-this.ItemMergin.Bottom, Height:textHeight, Width:textWidth };
|
|
131741
|
+
rtText.Right=rtText.Left+rtText.Width;
|
|
131742
|
+
rtText.Top=rtText.Bottom-rtText.Height;
|
|
131743
|
+
|
|
131744
|
+
var drawLine=false; //下划线
|
|
131745
|
+
if (drawInfo.Enable===false)
|
|
131746
|
+
{
|
|
131747
|
+
color=config.Disable.TextColor;
|
|
131748
|
+
}
|
|
131749
|
+
else if (this.LastMouseStatus && this.LastMouseStatus.OnMouseMove && config.MouseOn)
|
|
131750
|
+
{
|
|
131751
|
+
var x=this.LastMouseStatus.OnMouseMove.X;
|
|
131752
|
+
var y=this.LastMouseStatus.OnMouseMove.Y;
|
|
131753
|
+
if (x>rtText.Left && x<rtText.Right && y>rtText.Top && y<rtText.Bottom)
|
|
131754
|
+
{
|
|
131755
|
+
color=config.MouseOn.TextColor;
|
|
131756
|
+
drawLine=true;
|
|
131757
|
+
this.LastMouseStatus.MouseOnStatus={ Index:drawInfo.Index, ColumnIndex:drawInfo.ColumnIndex, Type:2 };
|
|
131758
|
+
}
|
|
131759
|
+
}
|
|
131760
|
+
|
|
131761
|
+
this.Canvas.textBaseline="bottom";
|
|
131762
|
+
this.Canvas.textAlign="left";
|
|
131763
|
+
this.Canvas.fillStyle=color;
|
|
131764
|
+
this.Canvas.fillText(text,rtText.Left, rtText.Bottom);
|
|
131765
|
+
|
|
131766
|
+
if (drawLine)
|
|
131767
|
+
{
|
|
131768
|
+
this.Canvas.strokeStyle=color;
|
|
131769
|
+
this.Canvas.beginPath();
|
|
131770
|
+
this.Canvas.moveTo(rtText.Left,rtText.Bottom);
|
|
131771
|
+
this.Canvas.lineTo(rtText.Right,rtText.Bottom);
|
|
131772
|
+
this.Canvas.stroke();
|
|
131773
|
+
}
|
|
131774
|
+
|
|
131775
|
+
if (drawInfo.Enable)
|
|
131776
|
+
{
|
|
131777
|
+
drawInfo.Botton={ Rect:rtText, Type:2 };
|
|
131778
|
+
}
|
|
131779
|
+
}
|
|
131780
|
+
|
|
131347
131781
|
//字体由外面设置
|
|
131348
131782
|
this.TextEllipsis=function(text, maxWidth, maxText)
|
|
131349
131783
|
{
|
|
@@ -132056,6 +132490,14 @@ function ChartReport()
|
|
|
132056
132490
|
status.Redraw=true;
|
|
132057
132491
|
return true;
|
|
132058
132492
|
}
|
|
132493
|
+
else if (buttonData.Type===2) //link
|
|
132494
|
+
{
|
|
132495
|
+
var sendData={ Column:buttonData.Column, Index:buttonData.Index, Stock:buttonData.Stock, Data:buttonData.Data };
|
|
132496
|
+
this.SendClickEvent(JSCHART_EVENT_ID.ON_CLICK_REPORT_LINK, sendData)
|
|
132497
|
+
|
|
132498
|
+
status.Redraw=true;
|
|
132499
|
+
return true;
|
|
132500
|
+
}
|
|
132059
132501
|
|
|
132060
132502
|
return false;
|
|
132061
132503
|
}
|
|
@@ -132310,7 +132752,7 @@ function ChartReport()
|
|
|
132310
132752
|
|
|
132311
132753
|
if (x>=rt.Left && x<=rt.Right && y>=rt.Top && y<=rt.Bottom)
|
|
132312
132754
|
{
|
|
132313
|
-
return { Rect:item.Rect, Stock:item.Stock, Column:item.Column, Index:item.Index, Type:item.Type, Data:item.Data };
|
|
132755
|
+
return { Rect:item.Rect, Stock:item.Stock, Column:item.Column, Index:item.Index, Type:item.Type, Data:item.Data, ColumnIndex:item.ColumnIndex };
|
|
132314
132756
|
}
|
|
132315
132757
|
}
|
|
132316
132758
|
}
|
|
@@ -134743,26 +135185,36 @@ function JSScrollBarChart(divElement)
|
|
|
134743
135185
|
{
|
|
134744
135186
|
this.DivElement=divElement;
|
|
134745
135187
|
this.JSChartContainer; //表格控件
|
|
135188
|
+
this.ResizeListener;
|
|
134746
135189
|
|
|
134747
|
-
|
|
134748
|
-
|
|
134749
|
-
|
|
134750
|
-
|
|
134751
|
-
|
|
134752
|
-
|
|
134753
|
-
|
|
134754
|
-
|
|
134755
|
-
|
|
134756
|
-
|
|
134757
|
-
|
|
135190
|
+
//h5 canvas
|
|
135191
|
+
this.CanvasElement=document.createElement("canvas");
|
|
135192
|
+
this.CanvasElement.className='jsscrollbar-drawing';
|
|
135193
|
+
this.CanvasElement.id=Guid();
|
|
135194
|
+
this.CanvasElement.setAttribute("tabindex",0);
|
|
135195
|
+
if (this.CanvasElement.style) this.CanvasElement.style.outline='none';
|
|
135196
|
+
if(divElement.hasChildNodes())
|
|
135197
|
+
{
|
|
135198
|
+
JSConsole.Chart.Log("[JSScrollBarChart::JSScrollBarChart] divElement hasChildNodes", divElement.childNodes);
|
|
135199
|
+
}
|
|
135200
|
+
divElement.appendChild(this.CanvasElement);
|
|
134758
135201
|
|
|
134759
135202
|
|
|
134760
135203
|
this.OnSize=function()
|
|
134761
135204
|
{
|
|
134762
135205
|
//画布大小通过div获取
|
|
134763
|
-
var height=
|
|
135206
|
+
var height=this.DivElement.offsetHeight;
|
|
135207
|
+
var width=this.DivElement.offsetWidth;
|
|
135208
|
+
if (this.DivElement.style.height && this.DivElement.style.width)
|
|
135209
|
+
{
|
|
135210
|
+
if (this.DivElement.style.height.includes("px"))
|
|
135211
|
+
height=parseInt(this.DivElement.style.height.replace("px",""));
|
|
135212
|
+
if (this.DivElement.style.width.includes("px"))
|
|
135213
|
+
width=parseInt(this.DivElement.style.width.replace("px",""));
|
|
135214
|
+
}
|
|
135215
|
+
|
|
134764
135216
|
this.CanvasElement.height=height;
|
|
134765
|
-
this.CanvasElement.width=
|
|
135217
|
+
this.CanvasElement.width=width;
|
|
134766
135218
|
this.CanvasElement.style.width=this.CanvasElement.width+'px';
|
|
134767
135219
|
this.CanvasElement.style.height=this.CanvasElement.height+'px';
|
|
134768
135220
|
|
|
@@ -134784,12 +135236,14 @@ function JSScrollBarChart(divElement)
|
|
|
134784
135236
|
|
|
134785
135237
|
if (!chart) return false;
|
|
134786
135238
|
|
|
135239
|
+
this.JSChartContainer=chart;
|
|
135240
|
+
this.DivElement.JSChart=this; //div中保存一份
|
|
135241
|
+
|
|
135242
|
+
if (option.EnableResize==true) this.CreateResizeListener();
|
|
135243
|
+
|
|
134787
135244
|
if (option.OnCreatedCallback) option.OnCreatedCallback(chart);
|
|
134788
135245
|
|
|
134789
135246
|
chart.Draw();
|
|
134790
|
-
|
|
134791
|
-
this.JSChartContainer=chart;
|
|
134792
|
-
this.DivElement.JSChart=this; //div中保存一份
|
|
134793
135247
|
}
|
|
134794
135248
|
|
|
134795
135249
|
this.CreateJSScrollBarChartContainer=function(option)
|
|
@@ -134834,6 +135288,18 @@ function JSScrollBarChart(divElement)
|
|
|
134834
135288
|
if (IFrameSplitOperator.IsBool(item.AutoRight)) chart.AutoMargin.Right=item.AutoRight;
|
|
134835
135289
|
}
|
|
134836
135290
|
|
|
135291
|
+
this.CreateResizeListener=function()
|
|
135292
|
+
{
|
|
135293
|
+
this.ResizeListener = new ResizeObserver((entries)=>{ this.OnDivResize(entries); });
|
|
135294
|
+
this.ResizeListener.observe(this.DivElement);
|
|
135295
|
+
}
|
|
135296
|
+
|
|
135297
|
+
this.OnDivResize=function(entries)
|
|
135298
|
+
{
|
|
135299
|
+
JSConsole.Chart.Log("[JSScrollBarChart::OnDivResize] entries=", entries);
|
|
135300
|
+
this.OnSize( );
|
|
135301
|
+
}
|
|
135302
|
+
|
|
134837
135303
|
/////////////////////////////////////////////////////////////////////////////
|
|
134838
135304
|
//对外接口
|
|
134839
135305
|
|
|
@@ -134979,6 +135445,11 @@ function JSScrollBarChartContainer(uielement)
|
|
|
134979
135445
|
this.IsDestroy=true;
|
|
134980
135446
|
}
|
|
134981
135447
|
|
|
135448
|
+
this.GetHQChart=function()
|
|
135449
|
+
{
|
|
135450
|
+
return this.HQChart;
|
|
135451
|
+
}
|
|
135452
|
+
|
|
134982
135453
|
//设置事件回调
|
|
134983
135454
|
//{event:事件id, callback:回调函数}
|
|
134984
135455
|
this.AddEventCallback=function(object)
|
|
@@ -135057,6 +135528,36 @@ function JSScrollBarChartContainer(uielement)
|
|
|
135057
135528
|
//this.UIElement.ontouchend=(e)=> {this.OnTouchEnd(e); }
|
|
135058
135529
|
}
|
|
135059
135530
|
|
|
135531
|
+
//创建一个图形
|
|
135532
|
+
this.CreateChartPaint=function(name)
|
|
135533
|
+
{
|
|
135534
|
+
var chart=g_ChartPaintFactory.Create(name);
|
|
135535
|
+
if (!chart) return null;
|
|
135536
|
+
|
|
135537
|
+
chart.ChartFrame=this.Frame;
|
|
135538
|
+
chart.ChartBorder=this.Frame.ChartBorder;
|
|
135539
|
+
chart.Canvas=this.Canvas;
|
|
135540
|
+
chart.Data=this.Frame.Data;
|
|
135541
|
+
chart.GetEventCallback=(id)=> { return this.GetEventCallback(id); }
|
|
135542
|
+
chart.GetHQChartCallback=()=>{ return this.GetHQChart(); }
|
|
135543
|
+
|
|
135544
|
+
return chart;
|
|
135545
|
+
}
|
|
135546
|
+
|
|
135547
|
+
this.GetChartPaintByClassName=function(name)
|
|
135548
|
+
{
|
|
135549
|
+
for(var i=0; i<this.ChartPaint.length; ++i)
|
|
135550
|
+
{
|
|
135551
|
+
var item=this.ChartPaint[i];
|
|
135552
|
+
if (item.ClassName==name)
|
|
135553
|
+
{
|
|
135554
|
+
return { Chart:item, Index:i };
|
|
135555
|
+
}
|
|
135556
|
+
}
|
|
135557
|
+
|
|
135558
|
+
return null;
|
|
135559
|
+
}
|
|
135560
|
+
|
|
135060
135561
|
this.Draw=function()
|
|
135061
135562
|
{
|
|
135062
135563
|
if (this.UIElement.width<=0 || this.UIElement.height<=0) return;
|
|
@@ -136145,7 +136646,7 @@ function ScrollBarBGChart()
|
|
|
136145
136646
|
|
|
136146
136647
|
|
|
136147
136648
|
|
|
136148
|
-
var HQCHART_VERSION="1.1.
|
|
136649
|
+
var HQCHART_VERSION="1.1.13587";
|
|
136149
136650
|
|
|
136150
136651
|
function PrintHQChartVersion()
|
|
136151
136652
|
{
|