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
|
@@ -6570,6 +6570,7 @@ var JSCHART_EVENT_ID=
|
|
|
6570
6570
|
ON_DRAW_REPORT_ROW_BG:140, //报价列表整行背景
|
|
6571
6571
|
ON_CLICK_REPORT_CHECKBOX:141, //报价列表checkbox
|
|
6572
6572
|
ON_CLICK_REPORT_BUTTON:142, //报价列表按钮
|
|
6573
|
+
ON_CLICK_REPORT_LINK:143, //报价列表 链接
|
|
6573
6574
|
|
|
6574
6575
|
|
|
6575
6576
|
ON_CHANGE_INDEX:150, //切换指标
|
|
@@ -60379,7 +60380,8 @@ IChartDrawPicture.ArrayDrawPricture=
|
|
|
60379
60380
|
{ Name:"PriceRange", ClassName:"ChartPriceRange", Create:function() { return new ChartPriceRange(); }},
|
|
60380
60381
|
{ Name:"DateRange", ClassName:"ChartDateRange", Create:function() { return new ChartDateRange(); }},
|
|
60381
60382
|
{ Name:"InfoLine", ClassName:"ChartInfoLine", Create:function() { return new ChartInfoLine(); }},
|
|
60382
|
-
{ Name:"TrendAngle", ClassName:"ChartTrendAngle", Create:function() { return new ChartTrendAngle(); }}
|
|
60383
|
+
{ Name:"TrendAngle", ClassName:"ChartTrendAngle", Create:function() { return new ChartTrendAngle(); }},
|
|
60384
|
+
{ Name:"ArrowMarker", ClassName:"ChartArrowMarker", Create:function() { return new ChartArrowMarker(); } },
|
|
60383
60385
|
];
|
|
60384
60386
|
|
|
60385
60387
|
IChartDrawPicture.MapIonFont=new Map(
|
|
@@ -60904,6 +60906,90 @@ function ChartDrawArrowLine()
|
|
|
60904
60906
|
}
|
|
60905
60907
|
}
|
|
60906
60908
|
|
|
60909
|
+
function ChartArrowMarker()
|
|
60910
|
+
{
|
|
60911
|
+
this.newMethod=IChartDrawPicture; //派生
|
|
60912
|
+
this.newMethod();
|
|
60913
|
+
delete this.newMethod;
|
|
60914
|
+
|
|
60915
|
+
this.ClassName='ChartArrowMarker';
|
|
60916
|
+
this.IsPointIn=this.IsPointIn_XYValue_Line;
|
|
60917
|
+
|
|
60918
|
+
this.InsideAngle=25;
|
|
60919
|
+
this.InsideWidth=70;
|
|
60920
|
+
|
|
60921
|
+
this.OutAngle=35;
|
|
60922
|
+
this.OutWidth=100;
|
|
60923
|
+
|
|
60924
|
+
this.GetXYCoordinate=this.GetXYCoordinate_default;
|
|
60925
|
+
this.OnlyMoveXIndex=true;
|
|
60926
|
+
this.IsSupportMagnet=true;
|
|
60927
|
+
|
|
60928
|
+
this.CalculatePoint=function(angle, ptStart, ptEnd, lineWidth)
|
|
60929
|
+
{
|
|
60930
|
+
var theta=angle; //三角斜边一直线夹角
|
|
60931
|
+
var headlen=lineWidth; //三角斜边长度
|
|
60932
|
+
|
|
60933
|
+
var angle = Math.atan2(ptStart.Y - ptEnd.Y, ptStart.X - ptEnd.X) * 180 / Math.PI,
|
|
60934
|
+
angle1 = (angle + theta) * Math.PI / 180,
|
|
60935
|
+
angle2 = (angle - theta) * Math.PI / 180,
|
|
60936
|
+
topX = headlen * Math.cos(angle1),
|
|
60937
|
+
topY = headlen * Math.sin(angle1),
|
|
60938
|
+
botX = headlen * Math.cos(angle2),
|
|
60939
|
+
botY = headlen * Math.sin(angle2);
|
|
60940
|
+
|
|
60941
|
+
return { Top:{X:topX+ptEnd.X, Y:topY+ptEnd.Y}, Bottom:{X:botX+ptEnd.X, Y:botY+ptEnd.Y} };
|
|
60942
|
+
}
|
|
60943
|
+
|
|
60944
|
+
this.Draw=function()
|
|
60945
|
+
{
|
|
60946
|
+
this.LinePoint=[];
|
|
60947
|
+
if (this.IsFrameMinSize()) return;
|
|
60948
|
+
if (!this.IsShow) return;
|
|
60949
|
+
|
|
60950
|
+
var drawPoint=this.CalculateDrawPoint( {IsCheckX:true, IsCheckY:true} );
|
|
60951
|
+
if (!drawPoint) return;
|
|
60952
|
+
if (drawPoint.length!=2) return;
|
|
60953
|
+
|
|
60954
|
+
this.ClipFrame();
|
|
60955
|
+
|
|
60956
|
+
var ptStart=drawPoint[0];
|
|
60957
|
+
var ptEnd=drawPoint[1];
|
|
60958
|
+
|
|
60959
|
+
//计算箭头 的两条边线坐标
|
|
60960
|
+
var outArrow=this.CalculatePoint(this.OutAngle, ptStart, ptEnd, this.OutWidth);
|
|
60961
|
+
var insideArrow=this.CalculatePoint(this.InsideAngle, ptStart, ptEnd, this.InsideWidth);
|
|
60962
|
+
|
|
60963
|
+
this.Canvas.beginPath();
|
|
60964
|
+
this.Canvas.moveTo(ptStart.X,ptStart.Y);
|
|
60965
|
+
this.Canvas.lineTo(insideArrow.Top.X,insideArrow.Top.Y);
|
|
60966
|
+
this.Canvas.lineTo(outArrow.Top.X,outArrow.Top.Y);
|
|
60967
|
+
this.Canvas.lineTo(ptEnd.X,ptEnd.Y);
|
|
60968
|
+
this.Canvas.lineTo(outArrow.Bottom.X,outArrow.Bottom.Y);
|
|
60969
|
+
this.Canvas.lineTo(insideArrow.Bottom.X,insideArrow.Bottom.Y);
|
|
60970
|
+
this.Canvas.lineTo(ptStart.X,ptStart.Y);
|
|
60971
|
+
this.Canvas.closePath();
|
|
60972
|
+
|
|
60973
|
+
this.Canvas.fillStyle=this.LineColor;
|
|
60974
|
+
this.Canvas.fill();
|
|
60975
|
+
|
|
60976
|
+
/*
|
|
60977
|
+
if (this.IsSelected)
|
|
60978
|
+
{
|
|
60979
|
+
this.Canvas.strokeStyle='rgba(255,0,0,0.5)';
|
|
60980
|
+
this.Canvas.lineWidth=20 * GetDevicePixelRatio();
|
|
60981
|
+
this.Canvas.stroke();
|
|
60982
|
+
}
|
|
60983
|
+
*/
|
|
60984
|
+
|
|
60985
|
+
var line={Start:ptStart, End:ptEnd};
|
|
60986
|
+
this.LinePoint.push(line);
|
|
60987
|
+
|
|
60988
|
+
this.DrawPoint([ptStart,ptEnd]); //画点
|
|
60989
|
+
this.Canvas.restore();
|
|
60990
|
+
}
|
|
60991
|
+
}
|
|
60992
|
+
|
|
60907
60993
|
//画图工具-射线
|
|
60908
60994
|
function ChartDrawPictureHaflLine()
|
|
60909
60995
|
{
|
|
@@ -71408,10 +71494,46 @@ function JSChartResource()
|
|
|
71408
71494
|
CheckBox:
|
|
71409
71495
|
{
|
|
71410
71496
|
Family:"iconfont", Size:15,
|
|
71411
|
-
Checked:{ Color:"rgb(
|
|
71412
|
-
Unchecked:{ Color:"rgb(
|
|
71497
|
+
Checked:{ Color:"rgb(69,147,238)", Symbol:"\ue6b3", DisableColor:"rgb(230,230,230)", MouseOnColor:"rgb(69,147,238)" },
|
|
71498
|
+
Unchecked:{ Color:"rgb(120,120,120)", Symbol:"\ue6b4", DisableColor:"rgb(230,230,230)", MouseOnColor:"rgb(69,147,238)" },
|
|
71413
71499
|
|
|
71414
71500
|
Margin:{ Left:5, Right:5, Bottom:2, Top:4 },
|
|
71501
|
+
},
|
|
71502
|
+
|
|
71503
|
+
Link:
|
|
71504
|
+
{
|
|
71505
|
+
Font:`${12*GetDevicePixelRatio()}px 微软雅黑`,
|
|
71506
|
+
TextColor:"rgb(30,144,255)",
|
|
71507
|
+
|
|
71508
|
+
Disable:{ TextColor:"rgb(211,211,211)" },
|
|
71509
|
+
MouseOn:{ TextColor:"rgb(30,144,255)" },
|
|
71510
|
+
},
|
|
71511
|
+
|
|
71512
|
+
ProgressBar:
|
|
71513
|
+
{
|
|
71514
|
+
BGColor:"rgb(229,231,238)",
|
|
71515
|
+
BarColor:"rgb(26,125,255)",
|
|
71516
|
+
Margin:{ Left:2, Right:2, Bottom:2, Top:2 },
|
|
71517
|
+
BarMargin:{ Left:2, Right:2, Bottom:2, Top:2 },
|
|
71518
|
+
TextColor:"rgb(0,0,0)",
|
|
71519
|
+
Font:`${12*GetDevicePixelRatio()}px 微软雅黑`,
|
|
71520
|
+
TextMargin:{ Left:40, Right:2, Bottom:2, Top:2},
|
|
71521
|
+
Disable:{ BGColor:"rgb(229,231,238)", BarColor:"rgb(131,131,131)", TextColor:"rgb(159,161,159)"}
|
|
71522
|
+
},
|
|
71523
|
+
|
|
71524
|
+
Button:
|
|
71525
|
+
{
|
|
71526
|
+
BGColor:"rgb(61,134,180)",
|
|
71527
|
+
TextColor:"rgb(255,255,255)",
|
|
71528
|
+
BorderColor:"rgb(200,200,200)",
|
|
71529
|
+
|
|
71530
|
+
Disable:{ BGColor:"rgb(105,105,105)", TextColor:"rgb(169,169,169)"},
|
|
71531
|
+
MouseOn:{ BGColor:"rgb(57,125,169)", TextColor:"rgb(230,230,230)" },
|
|
71532
|
+
|
|
71533
|
+
Margin:{ Left:5, Right:5, Bottom:2, Top:2 },
|
|
71534
|
+
TextMargin:{ Bottom:2 },
|
|
71535
|
+
|
|
71536
|
+
Font:`${12*GetDevicePixelRatio()}px 微软雅黑`
|
|
71415
71537
|
}
|
|
71416
71538
|
},
|
|
71417
71539
|
|
|
@@ -72454,6 +72576,58 @@ function JSChartResource()
|
|
|
72454
72576
|
|
|
72455
72577
|
CopyMarginConfig(dest.CheckBox.Margin, subItem.Margin);
|
|
72456
72578
|
}
|
|
72579
|
+
|
|
72580
|
+
if (item.Link)
|
|
72581
|
+
{
|
|
72582
|
+
var subItem=item.Link;
|
|
72583
|
+
if (subItem.Font) dest.Link.Font=subItem.Font;
|
|
72584
|
+
if (subItem.TextColor) dest.Link.TextColor=subItem.TextColor;
|
|
72585
|
+
if (subItem.Disable && subItem.Disable.TextColor) dest.Link.Disable.TextColor=subItem.Disable.TextColor;
|
|
72586
|
+
if (subItem.MouseOn && subItem.MouseOn.TextColor) dest.Link.MouseOn.TextColor=subItem.MouseOn.TextColor;
|
|
72587
|
+
}
|
|
72588
|
+
|
|
72589
|
+
if (item.ProgressBar)
|
|
72590
|
+
{
|
|
72591
|
+
var subItem=item.ProgressBar;
|
|
72592
|
+
if (subItem.BGColor) dest.ProgressBar.BGColor=subItem.BGColor;
|
|
72593
|
+
if (subItem.BarColor) dest.ProgressBar.BarColor=subItem.BarColor;
|
|
72594
|
+
if (subItem.TextColor) dest.ProgressBar.TextColor=subItem.TextColor;
|
|
72595
|
+
if (subItem.Font) dest.ProgressBar.Font=subItem.Font;
|
|
72596
|
+
if (subItem.Disable)
|
|
72597
|
+
{
|
|
72598
|
+
if (subItem.Disable.BGColor) dest.ProgressBar.Disable.BGColor=subItem.Disable.BGColor;
|
|
72599
|
+
if (subItem.Disable.BarColor) dest.ProgressBar.Disable.BarColor=subItem.Disable.BarColor;
|
|
72600
|
+
if (subItem.Disable.TextColor) dest.ProgressBar.Disable.TextColor=subItem.Disable.TextColor;
|
|
72601
|
+
}
|
|
72602
|
+
|
|
72603
|
+
CopyMarginConfig(dest.ProgressBar.Margin, subItem.Margin);
|
|
72604
|
+
CopyMarginConfig(dest.ProgressBar.BarMargin, subItem.BarMargin);
|
|
72605
|
+
CopyMarginConfig(dest.ProgressBar.TextMargin, subItem.TextMargin);
|
|
72606
|
+
}
|
|
72607
|
+
|
|
72608
|
+
if (item.Buttom)
|
|
72609
|
+
{
|
|
72610
|
+
var subItem=item.Buttom;
|
|
72611
|
+
if (subItem.BGColor) dest.Buttom.BGColor=subItem.BGColor;
|
|
72612
|
+
if (subItem.TextColor) dest.Buttom.TextColor=subItem.TextColor;
|
|
72613
|
+
if (subItem.BorderColor) dest.Buttom.BorderColor=subItem.BorderColor;
|
|
72614
|
+
if (subItem.Font) dest.Buttom.Font=subItem.Font;
|
|
72615
|
+
|
|
72616
|
+
if (subItem.Disable)
|
|
72617
|
+
{
|
|
72618
|
+
if (subItem.Disable.BGColor) dest.Buttom.Disable.BGColor=subItem.Disable.BGColor;
|
|
72619
|
+
if (subItem.Disable.TextColor) dest.Buttom.Disable.TextColor=subItem.Disable.TextColor;
|
|
72620
|
+
}
|
|
72621
|
+
|
|
72622
|
+
if (subItem.MouseOn)
|
|
72623
|
+
{
|
|
72624
|
+
if (subItem.MouseOn.BGColor) dest.Buttom.MouseOn.BGColor=subItem.MouseOn.BGColor;
|
|
72625
|
+
if (subItem.MouseOn.TextColor) dest.Buttom.MouseOn.TextColor=subItem.MouseOn.TextColor;
|
|
72626
|
+
}
|
|
72627
|
+
|
|
72628
|
+
CopyMarginConfig(dest.Buttom.Margin, subItem.Margin);
|
|
72629
|
+
CopyMarginConfig(dest.Buttom.TextMargin, subItem.TextMargin);
|
|
72630
|
+
}
|
|
72457
72631
|
|
|
72458
72632
|
}
|
|
72459
72633
|
|
|
@@ -123874,8 +124048,29 @@ function GetBlackStyle()
|
|
|
123874
124048
|
CheckBox:
|
|
123875
124049
|
{
|
|
123876
124050
|
Family:"iconfont", Size:15,
|
|
123877
|
-
Checked:{ Color:"rgb(
|
|
123878
|
-
Unchecked:{ Color:"rgb(
|
|
124051
|
+
Checked:{ Color:"rgb(69,147,238)", Symbol:"\ue6b3", DisableColor:"rgb(120,120,120)", MouseOnColor:"rgb(69,147,238)" },
|
|
124052
|
+
Unchecked:{ Color:"rgb(210,210,210)", Symbol:"\ue6b4", DisableColor:"rgb(120,120,120)", MouseOnColor:"rgb(69,147,238)" },
|
|
124053
|
+
},
|
|
124054
|
+
|
|
124055
|
+
Link:
|
|
124056
|
+
{
|
|
124057
|
+
Font:`${12*GetDevicePixelRatio()}px 微软雅黑`,
|
|
124058
|
+
TextColor:"rgb(0,144,255)",
|
|
124059
|
+
|
|
124060
|
+
Disable:{ TextColor:"rgb(211,211,211)" },
|
|
124061
|
+
MouseOn:{ TextColor:"rgb(0,144,255)" },
|
|
124062
|
+
},
|
|
124063
|
+
|
|
124064
|
+
ProgressBar:
|
|
124065
|
+
{
|
|
124066
|
+
BGColor:"rgb(20,24,28)",
|
|
124067
|
+
BarColor:"rgb(47,124,197)",
|
|
124068
|
+
Margin:{ Left:2, Right:2, Bottom:2, Top:2 },
|
|
124069
|
+
BarMargin:{ Left:2, Right:2, Bottom:2, Top:2 },
|
|
124070
|
+
TextColor:"rgb(230,230,230)",
|
|
124071
|
+
Font:`${12*GetDevicePixelRatio()}px 微软雅黑`,
|
|
124072
|
+
TextMargin:{ Left:40, Right:2, Bottom:2, Top:2},
|
|
124073
|
+
Disable:{ BGColor:"rgb(61,61,61)", BarColor:"rgb(131,131,131)", TextColor:"rgb(159,161,159)"}
|
|
123879
124074
|
}
|
|
123880
124075
|
},
|
|
123881
124076
|
|
|
@@ -125916,7 +126111,8 @@ function JSReportChartContainer(uielement)
|
|
|
125916
126111
|
this.JSPopMenu; //内置菜单
|
|
125917
126112
|
this.IsShowRightMenu=true;
|
|
125918
126113
|
|
|
125919
|
-
|
|
126114
|
+
//MouseOnStatus:{ RowIndex:行, ColumnIndex:列}
|
|
126115
|
+
this.LastMouseStatus={ MoveStatus:null, TooltipStatus:null, MouseOnStatus:null };
|
|
125920
126116
|
|
|
125921
126117
|
this.ChartDestory=function() //销毁
|
|
125922
126118
|
{
|
|
@@ -126155,6 +126351,7 @@ function JSReportChartContainer(uielement)
|
|
|
126155
126351
|
this.Canvas.clearRect(0,0,this.UIElement.width,this.UIElement.height);
|
|
126156
126352
|
var pixelTatio = GetDevicePixelRatio(); //获取设备的分辨率
|
|
126157
126353
|
this.Canvas.lineWidth=pixelTatio; //手机端需要根据分辨率比调整线段宽度
|
|
126354
|
+
this.LastMouseStatus.MouseOnStatus=null;
|
|
126158
126355
|
|
|
126159
126356
|
if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash)
|
|
126160
126357
|
{
|
|
@@ -126171,14 +126368,14 @@ function JSReportChartContainer(uielement)
|
|
|
126171
126368
|
{
|
|
126172
126369
|
var item=this.ChartPaint[i];
|
|
126173
126370
|
if (item.IsDrawFirst)
|
|
126174
|
-
item.Draw();
|
|
126371
|
+
item.Draw(this.LastMouseStatus);
|
|
126175
126372
|
}
|
|
126176
126373
|
|
|
126177
126374
|
for(var i=0; i<this.ChartPaint.length; ++i)
|
|
126178
126375
|
{
|
|
126179
126376
|
var item=this.ChartPaint[i];
|
|
126180
126377
|
if (!item.IsDrawFirst)
|
|
126181
|
-
item.Draw();
|
|
126378
|
+
item.Draw(this.LastMouseStatus);
|
|
126182
126379
|
}
|
|
126183
126380
|
|
|
126184
126381
|
if (this.GlobalOption.FlashBGCount>0)
|
|
@@ -126316,6 +126513,50 @@ function JSReportChartContainer(uielement)
|
|
|
126316
126513
|
this.RequestMemberListData();
|
|
126317
126514
|
}
|
|
126318
126515
|
|
|
126516
|
+
//更新数据
|
|
126517
|
+
this.UpdateFullData=function(data)
|
|
126518
|
+
{
|
|
126519
|
+
var arySymbol=[];
|
|
126520
|
+
if (IFrameSplitOperator.IsNonEmptyArray(data.data))
|
|
126521
|
+
{
|
|
126522
|
+
//0=证券代码 1=股票名称
|
|
126523
|
+
for(var i=0;i<data.data.length;++i)
|
|
126524
|
+
{
|
|
126525
|
+
var item=data.data[i];
|
|
126526
|
+
var symbol=item[0];
|
|
126527
|
+
var stock=null;
|
|
126528
|
+
if (this.MapStockData.has(symbol))
|
|
126529
|
+
{
|
|
126530
|
+
stock=this.MapStockData.get(symbol);
|
|
126531
|
+
}
|
|
126532
|
+
else
|
|
126533
|
+
{
|
|
126534
|
+
stock=new HQReportItem();
|
|
126535
|
+
stock.OriginalSymbol=symbol;
|
|
126536
|
+
this.MapStockData.set(symbol, stock);
|
|
126537
|
+
}
|
|
126538
|
+
|
|
126539
|
+
stock.Symbol=this.GetSymbolNoSuffix(symbol);
|
|
126540
|
+
stock.Name=item[1];
|
|
126541
|
+
this.ReadStockJsonData(stock, item);
|
|
126542
|
+
|
|
126543
|
+
arySymbol.push(symbol);
|
|
126544
|
+
}
|
|
126545
|
+
}
|
|
126546
|
+
|
|
126547
|
+
//设置显示数据
|
|
126548
|
+
if (IFrameSplitOperator.IsNonEmptyArray(arySymbol))
|
|
126549
|
+
{
|
|
126550
|
+
for(var i=0;i<arySymbol.length;++i)
|
|
126551
|
+
{
|
|
126552
|
+
this.Data.Data.push(arySymbol[i]);
|
|
126553
|
+
this.SourceData.Data.push(arySymbol[i]);
|
|
126554
|
+
}
|
|
126555
|
+
}
|
|
126556
|
+
|
|
126557
|
+
this.Draw();
|
|
126558
|
+
}
|
|
126559
|
+
|
|
126319
126560
|
//设置全部的数据
|
|
126320
126561
|
this.SetFullData=function(data)
|
|
126321
126562
|
{
|
|
@@ -126325,6 +126566,9 @@ function JSReportChartContainer(uielement)
|
|
|
126325
126566
|
this.ResetSortStatus();
|
|
126326
126567
|
this.ResetReportSelectStatus();
|
|
126327
126568
|
|
|
126569
|
+
this.UpdateFullData(data);
|
|
126570
|
+
|
|
126571
|
+
/*
|
|
126328
126572
|
//缓存所有数据
|
|
126329
126573
|
var arySymbol=[];
|
|
126330
126574
|
if (IFrameSplitOperator.IsNonEmptyArray(data.data))
|
|
@@ -126365,6 +126609,7 @@ function JSReportChartContainer(uielement)
|
|
|
126365
126609
|
}
|
|
126366
126610
|
|
|
126367
126611
|
this.Draw();
|
|
126612
|
+
*/
|
|
126368
126613
|
}
|
|
126369
126614
|
|
|
126370
126615
|
this.RequestMemberListData=function()
|
|
@@ -127209,6 +127454,7 @@ function JSReportChartContainer(uielement)
|
|
|
127209
127454
|
var x = (e.clientX-this.UIElement.getBoundingClientRect().left)*pixelTatio;
|
|
127210
127455
|
var y = (e.clientY-this.UIElement.getBoundingClientRect().top)*pixelTatio;
|
|
127211
127456
|
|
|
127457
|
+
var oldMouseOnStatus=this.LastMouseStatus.MouseOnStatus;
|
|
127212
127458
|
this.LastMouseStatus.OnMouseMove=null;
|
|
127213
127459
|
|
|
127214
127460
|
var bDrawTooltip=false;
|
|
@@ -127220,6 +127466,7 @@ function JSReportChartContainer(uielement)
|
|
|
127220
127466
|
if (this.DragColumnWidth) return;
|
|
127221
127467
|
|
|
127222
127468
|
var tabChart=this.GetTabChart();
|
|
127469
|
+
var bDrawTab=false;
|
|
127223
127470
|
if (tabChart)
|
|
127224
127471
|
{
|
|
127225
127472
|
var tabData=tabChart.PtInTab(x,y);
|
|
@@ -127229,9 +127476,18 @@ function JSReportChartContainer(uielement)
|
|
|
127229
127476
|
if (tabChart.MoveOnTabIndex!=index)
|
|
127230
127477
|
{
|
|
127231
127478
|
tabChart.MoveOnTabIndex=index;
|
|
127232
|
-
|
|
127479
|
+
bDrawTab=true;
|
|
127233
127480
|
}
|
|
127234
127481
|
}
|
|
127482
|
+
else
|
|
127483
|
+
{
|
|
127484
|
+
if (tabChart.MoveOnTabIndex>=0)
|
|
127485
|
+
{
|
|
127486
|
+
tabChart.MoveOnTabIndex=-1;
|
|
127487
|
+
bDrawTab=true;
|
|
127488
|
+
}
|
|
127489
|
+
|
|
127490
|
+
}
|
|
127235
127491
|
}
|
|
127236
127492
|
|
|
127237
127493
|
this.LastMouseStatus.OnMouseMove={ X:x, Y:y };
|
|
@@ -127249,12 +127505,28 @@ function JSReportChartContainer(uielement)
|
|
|
127249
127505
|
}
|
|
127250
127506
|
else
|
|
127251
127507
|
{
|
|
127252
|
-
var
|
|
127253
|
-
|
|
127508
|
+
var buttonData=report.GetButtonData(x,y);
|
|
127509
|
+
var mouseOnStatus=null;
|
|
127510
|
+
if (buttonData)
|
|
127254
127511
|
{
|
|
127255
127512
|
mouseStatus={ Cursor:"pointer", Name:"Botton"};
|
|
127513
|
+
if (buttonData.Type==1 || buttonData.Type==0 || buttonData.Type==2)
|
|
127514
|
+
{
|
|
127515
|
+
mouseOnStatus={ Index:buttonData.Index, ColumnIndex:buttonData.ColumnIndex };
|
|
127516
|
+
}
|
|
127256
127517
|
}
|
|
127257
127518
|
|
|
127519
|
+
//console.log("[UIOnMouseMove] ", oldMouseOnStatus, mouseOnStatus)
|
|
127520
|
+
if ((!oldMouseOnStatus && mouseOnStatus) || (oldMouseOnStatus && !mouseOnStatus))
|
|
127521
|
+
{
|
|
127522
|
+
bDraw=true;
|
|
127523
|
+
}
|
|
127524
|
+
else if (oldMouseOnStatus && mouseOnStatus)
|
|
127525
|
+
{
|
|
127526
|
+
if (oldMouseOnStatus.Index!=mouseOnStatus.Index || oldMouseOnStatus.ColumnIndex!=mouseOnStatus.ColumnIndex)
|
|
127527
|
+
bDraw=true;
|
|
127528
|
+
}
|
|
127529
|
+
|
|
127258
127530
|
var tooltipData=report.GetTooltipData(x,y); //单元格提示信息
|
|
127259
127531
|
if (tooltipData)
|
|
127260
127532
|
{
|
|
@@ -127288,7 +127560,7 @@ function JSReportChartContainer(uielement)
|
|
|
127288
127560
|
|
|
127289
127561
|
if (mouseStatus) this.UIElement.style.cursor=mouseStatus.Cursor;
|
|
127290
127562
|
|
|
127291
|
-
if (bDraw) this.Draw();
|
|
127563
|
+
if (bDraw || bDrawTab) this.Draw();
|
|
127292
127564
|
else if (bDrawTooltip) this.DrawTooltip(this.LastMouseStatus.TooltipStatus);
|
|
127293
127565
|
}
|
|
127294
127566
|
|
|
@@ -129138,6 +129410,7 @@ var REPORT_COLUMN_ID=
|
|
|
129138
129410
|
CUSTOM_CHECKBOX_ID:104, //自定义checkbox
|
|
129139
129411
|
CUSTOM_BUTTON_ID:105, //自定义按钮
|
|
129140
129412
|
CUSTOM_PROGRESS_ID:106, //进度条
|
|
129413
|
+
CUSTOM_LINK_ID:107, //链接
|
|
129141
129414
|
}
|
|
129142
129415
|
|
|
129143
129416
|
var MAP_COLUMN_FIELD=new Map([
|
|
@@ -129308,6 +129581,9 @@ function ChartReport()
|
|
|
129308
129581
|
}
|
|
129309
129582
|
|
|
129310
129583
|
this.CheckBoxConfig=CloneData(g_JSChartResource.Report.CheckBox);
|
|
129584
|
+
this.LinkConfig=CloneData(g_JSChartResource.Report.Link);
|
|
129585
|
+
this.ProgressBarConfig=CloneData(g_JSChartResource.Report.ProgressBar);
|
|
129586
|
+
this.ButtonConfig=CloneData(g_JSChartResource.Report.Button);
|
|
129311
129587
|
|
|
129312
129588
|
//股票代码+股票名称
|
|
129313
129589
|
this.ItemSymbolFontConfig={Size:g_JSChartResource.Report.Item.SymbolFont.Size, Name:g_JSChartResource.Report.Item.SymbolFont.Name};
|
|
@@ -129351,6 +129627,8 @@ function ChartReport()
|
|
|
129351
129627
|
//{ Rect:rtItem, Type: 0=checkedbox, 1=button, 2=link , Stock, Index:index, Column:column }
|
|
129352
129628
|
this.ButtonRect=[];
|
|
129353
129629
|
|
|
129630
|
+
this.LastMouseStatus;
|
|
129631
|
+
|
|
129354
129632
|
this.ReloadResource=function(resource)
|
|
129355
129633
|
{
|
|
129356
129634
|
this.DevicePixelRatio=GetDevicePixelRatio()
|
|
@@ -129441,6 +129719,10 @@ function ChartReport()
|
|
|
129441
129719
|
|
|
129442
129720
|
if (this.Tab) this.Tab.ReloadResource(resource);
|
|
129443
129721
|
if (this.VScrollbar) this.VScrollbar.ReloadResource(resource);
|
|
129722
|
+
|
|
129723
|
+
this.CheckBoxConfig=CloneData(g_JSChartResource.Report.CheckBox);
|
|
129724
|
+
this.LinkConfig=CloneData(g_JSChartResource.Report.Link);
|
|
129725
|
+
this.ProgressBarConfig=CloneData(g_JSChartResource.Report.ProgressBar);
|
|
129444
129726
|
}
|
|
129445
129727
|
|
|
129446
129728
|
this.SetColumn=function(aryColumn)
|
|
@@ -129512,7 +129794,7 @@ function ChartReport()
|
|
|
129512
129794
|
if (IFrameSplitOperator.IsNumber(item.DataIndex)) colItem.DataIndex=item.DataIndex; //数据在扩展数据索引列
|
|
129513
129795
|
if (IFrameSplitOperator.IsNumber(item.BlockIndex)) colItem.BlockIndex=item.BlockIndex;
|
|
129514
129796
|
if (item.CheckBox) colItem.CheckBox=CloneData(item.CheckBox);
|
|
129515
|
-
else colItem.CheckBox=
|
|
129797
|
+
else colItem.CheckBox=this.CheckBoxConfig;
|
|
129516
129798
|
}
|
|
129517
129799
|
else if (item.Type==REPORT_COLUMN_ID.CUSTOM_BUTTON_ID)
|
|
129518
129800
|
{
|
|
@@ -129520,6 +129802,7 @@ function ChartReport()
|
|
|
129520
129802
|
if (IFrameSplitOperator.IsNumber(item.DataIndex)) colItem.DataIndex=item.DataIndex; //数据在扩展数据索引列
|
|
129521
129803
|
if (IFrameSplitOperator.IsNumber(item.BlockIndex)) colItem.BlockIndex=item.BlockIndex;
|
|
129522
129804
|
if (item.Button) colItem.Button=CloneData(item.Button);
|
|
129805
|
+
else colItem.Button=this.ButtonConfig;
|
|
129523
129806
|
}
|
|
129524
129807
|
else if (item.Type==REPORT_COLUMN_ID.CUSTOM_PROGRESS_ID)
|
|
129525
129808
|
{
|
|
@@ -129527,6 +129810,15 @@ function ChartReport()
|
|
|
129527
129810
|
if (IFrameSplitOperator.IsNumber(item.DataIndex)) colItem.DataIndex=item.DataIndex; //数据在扩展数据索引列
|
|
129528
129811
|
if (IFrameSplitOperator.IsNumber(item.BlockIndex)) colItem.BlockIndex=item.BlockIndex;
|
|
129529
129812
|
if (item.ProgressBar) colItem.ProgressBar=CloneData(item.ProgressBar);
|
|
129813
|
+
else colItem.ProgressBar=this.ProgressBarConfig;
|
|
129814
|
+
}
|
|
129815
|
+
else if (item.Type==REPORT_COLUMN_ID.CUSTOM_LINK_ID)
|
|
129816
|
+
{
|
|
129817
|
+
if (!IFrameSplitOperator.IsNumber(item.DataIndex) && !IFrameSplitOperator.IsNumber(item.BlockIndex)) continue;
|
|
129818
|
+
if (IFrameSplitOperator.IsNumber(item.DataIndex)) colItem.DataIndex=item.DataIndex; //数据在扩展数据索引列
|
|
129819
|
+
if (IFrameSplitOperator.IsNumber(item.BlockIndex)) colItem.BlockIndex=item.BlockIndex;
|
|
129820
|
+
if (item.Link) colItem.Link=CloneData(item.Link);
|
|
129821
|
+
else colItem.Link=this.LinkConfig;
|
|
129530
129822
|
}
|
|
129531
129823
|
else if (item.Type==REPORT_COLUMN_ID.CUSTOM_ICON_ID)
|
|
129532
129824
|
{
|
|
@@ -129646,7 +129938,8 @@ function ChartReport()
|
|
|
129646
129938
|
{ Type:REPORT_COLUMN_ID.CUSTOM_CHECKBOX_ID, Title:"", TextAlign:"center", FixedWidth:20*GetDevicePixelRatio() },
|
|
129647
129939
|
|
|
129648
129940
|
{ Type:REPORT_COLUMN_ID.CUSTOM_BUTTON_ID, Title:"", TextAlign:"center", FixedWidth:50*GetDevicePixelRatio() },
|
|
129649
|
-
{ Type:REPORT_COLUMN_ID.CUSTOM_PROGRESS_ID, Title:"进度条", TextAlign:"center", FixedWidth:100*GetDevicePixelRatio() }
|
|
129941
|
+
{ Type:REPORT_COLUMN_ID.CUSTOM_PROGRESS_ID, Title:"进度条", TextAlign:"center", FixedWidth:100*GetDevicePixelRatio() },
|
|
129942
|
+
{ Type:REPORT_COLUMN_ID.CUSTOM_LINK_ID, Title:"链接地址", TextAlign:"center", MaxText:"擎擎擎擎擎" }
|
|
129650
129943
|
];
|
|
129651
129944
|
|
|
129652
129945
|
for(var i=0;i<DEFAULT_COLUMN.length;++i)
|
|
@@ -129667,12 +129960,13 @@ function ChartReport()
|
|
|
129667
129960
|
this.Canvas.clip();
|
|
129668
129961
|
}
|
|
129669
129962
|
|
|
129670
|
-
this.Draw=function()
|
|
129963
|
+
this.Draw=function(lastMouseStatus)
|
|
129671
129964
|
{
|
|
129672
129965
|
this.ShowSymbol=[];
|
|
129673
129966
|
this.TooltipRect=[];
|
|
129674
129967
|
this.ButtonRect=[];
|
|
129675
129968
|
this.DevicePixelRatio=GetDevicePixelRatio()
|
|
129969
|
+
this.LastMouseStatus=lastMouseStatus;
|
|
129676
129970
|
|
|
129677
129971
|
if (this.GlobalOption) this.GlobalOption.FlashBGCount=0;
|
|
129678
129972
|
|
|
@@ -129704,6 +129998,7 @@ function ChartReport()
|
|
|
129704
129998
|
this.VScrollbar.DrawScrollbar(this.RectClient.Left,this.RectClient.Top+this.HeaderHeight, this.RectClient.Right, bottom-this.BottomToolbarHeight-4);
|
|
129705
129999
|
}
|
|
129706
130000
|
|
|
130001
|
+
this.LastMouseStatus=null;
|
|
129707
130002
|
this.SizeChange=false;
|
|
129708
130003
|
}
|
|
129709
130004
|
|
|
@@ -130343,7 +130638,7 @@ function ChartReport()
|
|
|
130343
130638
|
for(var i=0;i<this.FixedColumn && i<this.Column.length;++i)
|
|
130344
130639
|
{
|
|
130345
130640
|
var item=this.Column[i];
|
|
130346
|
-
this.DrawItem(dataIndex, data, item, left, top, rowType);
|
|
130641
|
+
this.DrawItem(dataIndex, data, item, left, top, rowType, i);
|
|
130347
130642
|
left+=item.Width;
|
|
130348
130643
|
|
|
130349
130644
|
if (left>=chartRight) break;
|
|
@@ -130352,20 +130647,24 @@ function ChartReport()
|
|
|
130352
130647
|
for(var i=this.FixedColumn+this.Data.XOffset;i<this.Column.length;++i)
|
|
130353
130648
|
{
|
|
130354
130649
|
var item=this.Column[i];
|
|
130355
|
-
this.DrawItem(dataIndex, data, item, left, top, rowType);
|
|
130650
|
+
this.DrawItem(dataIndex, data, item, left, top, rowType, i);
|
|
130356
130651
|
left+=item.Width;
|
|
130357
130652
|
|
|
130358
130653
|
if (left>=chartRight) break;
|
|
130359
130654
|
}
|
|
130360
130655
|
}
|
|
130361
130656
|
|
|
130362
|
-
this.DrawItem=function(index, data, column, left, top, rowType)
|
|
130657
|
+
this.DrawItem=function(index, data, column, left, top, rowType, columnIndex)
|
|
130363
130658
|
{
|
|
130364
130659
|
var itemWidth=column.Width;
|
|
130365
130660
|
var x=left+this.ItemMergin.Left;
|
|
130366
130661
|
var textWidth=column.Width-this.ItemMergin.Left-this.ItemMergin.Right;
|
|
130367
130662
|
var stock=data.Stock;
|
|
130368
|
-
var drawInfo=
|
|
130663
|
+
var drawInfo=
|
|
130664
|
+
{
|
|
130665
|
+
Text:null, TextColor:column.TextColor , TextAlign:column.TextAlign, Tooltip:null,
|
|
130666
|
+
Index:index, ColumnIndex:columnIndex
|
|
130667
|
+
};
|
|
130369
130668
|
var rtItem={ Left:left, Top:top, Width:column.Width, Height:this.RowHeight };
|
|
130370
130669
|
rtItem.Right=rtItem.Left+rtItem.Width;
|
|
130371
130670
|
rtItem.Bottom=rtItem.Top+rtItem.Height;
|
|
@@ -130628,6 +130927,10 @@ function ChartReport()
|
|
|
130628
130927
|
|
|
130629
130928
|
this.GetCustomProgressBarDrawInfo(data, column, drawInfo);
|
|
130630
130929
|
}
|
|
130930
|
+
else if (column.Type==REPORT_COLUMN_ID.CUSTOM_LINK_ID)
|
|
130931
|
+
{
|
|
130932
|
+
this.GetCustomLinkDrawInfo(data, column, drawInfo);
|
|
130933
|
+
}
|
|
130631
130934
|
|
|
130632
130935
|
|
|
130633
130936
|
//拖拽行颜色
|
|
@@ -130654,6 +130957,10 @@ function ChartReport()
|
|
|
130654
130957
|
{
|
|
130655
130958
|
this.DrawProgressBar(drawInfo, left, top, itemWidth);
|
|
130656
130959
|
}
|
|
130960
|
+
else if (column.Type==REPORT_COLUMN_ID.CUSTOM_LINK_ID)
|
|
130961
|
+
{
|
|
130962
|
+
this.DrawLinkText(drawInfo, x, top, textWidth);
|
|
130963
|
+
}
|
|
130657
130964
|
else
|
|
130658
130965
|
{
|
|
130659
130966
|
if (data.FlashBG && data.FlashBG.Data && column.ID!=undefined)
|
|
@@ -130687,7 +130994,7 @@ function ChartReport()
|
|
|
130687
130994
|
|
|
130688
130995
|
if (drawInfo.Botton)
|
|
130689
130996
|
{
|
|
130690
|
-
var buttonData={ Stock:stock, Index:index, Column:column, Rect:drawInfo.Botton.Rect, Type:drawInfo.Botton.Type, Data:drawInfo.Data };
|
|
130997
|
+
var buttonData={ Stock:stock, Index:index, ColumnIndex:columnIndex, Column:column, Rect:drawInfo.Botton.Rect, Type:drawInfo.Botton.Type, Data:drawInfo.Data };
|
|
130691
130998
|
this.ButtonRect.push(buttonData);
|
|
130692
130999
|
}
|
|
130693
131000
|
}
|
|
@@ -130985,6 +131292,20 @@ function ChartReport()
|
|
|
130985
131292
|
if (barData.BGColor) drawInfo.BGColor=barData.BGColor;
|
|
130986
131293
|
}
|
|
130987
131294
|
|
|
131295
|
+
this.GetCustomLinkDrawInfo=function(data, column, drawInfo)
|
|
131296
|
+
{
|
|
131297
|
+
var linkData=this.GetExtendData(data, column);
|
|
131298
|
+
if (!linkData) return;
|
|
131299
|
+
|
|
131300
|
+
drawInfo.Text=linkData.Title;
|
|
131301
|
+
drawInfo.Link=column.Link;
|
|
131302
|
+
drawInfo.Enable=true;
|
|
131303
|
+
drawInfo.Data=linkData;
|
|
131304
|
+
drawInfo.MaxText=column.MaxText;
|
|
131305
|
+
if (IFrameSplitOperator.IsBool(linkData.Enable)) drawInfo.Enable=linkData.Enable;
|
|
131306
|
+
if (linkData.TextColor) drawInfo.TextColor=linkData.TextColor;
|
|
131307
|
+
}
|
|
131308
|
+
|
|
130988
131309
|
this.FormaTimeDrawInfo=function(column, stock, drawInfo, data)
|
|
130989
131310
|
{
|
|
130990
131311
|
if (!IFrameSplitOperator.IsNumber(stock.Time)) return;
|
|
@@ -131254,35 +131575,57 @@ function ChartReport()
|
|
|
131254
131575
|
if (!IFrameSplitOperator.IsBool(drawInfo.Checked)) return;
|
|
131255
131576
|
if (!drawInfo.CheckBox) return;
|
|
131256
131577
|
|
|
131257
|
-
|
|
131578
|
+
var config=drawInfo.CheckBox;
|
|
131579
|
+
drawInfo.Font=`${config.Size*this.DevicePixelRatio}px ${config.Family}`;
|
|
131258
131580
|
var textAlign=drawInfo.TextAlign;
|
|
131259
131581
|
var size=drawInfo.CheckBox.Size*this.DevicePixelRatio;
|
|
131260
131582
|
var x=left+drawInfo.CheckBox.Margin.Left;
|
|
131261
131583
|
var y=top+this.RowHeight-drawInfo.CheckBox.Margin.Bottom;
|
|
131584
|
+
|
|
131262
131585
|
if (textAlign=='center') x=left+width/2-size/2;
|
|
131263
|
-
else if (textAlign=='right') x=left+width-
|
|
131586
|
+
else if (textAlign=='right') x=left+width-config.Margin.Right;
|
|
131587
|
+
|
|
131588
|
+
var rtBox={ Left:x, Bottom:y, Width:size, Height:size };
|
|
131589
|
+
rtBox.Right=rtBox.Left+rtBox.Width;
|
|
131590
|
+
rtBox.Top=rtBox.Bottom-rtBox.Height;
|
|
131591
|
+
|
|
131592
|
+
//鼠标在上面
|
|
131593
|
+
var bMouseOn=false;
|
|
131594
|
+
if (drawInfo.Enable && this.LastMouseStatus && this.LastMouseStatus.OnMouseMove)
|
|
131595
|
+
{
|
|
131596
|
+
var xMouse=this.LastMouseStatus.OnMouseMove.X;
|
|
131597
|
+
var yMouse=this.LastMouseStatus.OnMouseMove.Y;
|
|
131598
|
+
if (xMouse>rtBox.Left && xMouse<rtBox.Right && yMouse>rtBox.Top && yMouse<rtBox.Bottom)
|
|
131599
|
+
{
|
|
131600
|
+
bMouseOn=true;
|
|
131601
|
+
this.LastMouseStatus.MouseOnStatus={ Index:drawInfo.Index, ColumnIndex:drawInfo.ColumnIndex, Type:0 };
|
|
131602
|
+
}
|
|
131603
|
+
}
|
|
131264
131604
|
|
|
131265
131605
|
this.Canvas.font=drawInfo.Font;
|
|
131266
131606
|
this.Canvas.textBaseline="bottom";
|
|
131267
131607
|
this.Canvas.textAlign="left";
|
|
131268
131608
|
if (drawInfo.Checked===true)
|
|
131269
131609
|
{
|
|
131270
|
-
|
|
131271
|
-
|
|
131272
|
-
|
|
131610
|
+
var textColor=config.Checked.Color;
|
|
131611
|
+
if (drawInfo.Enable===false) textColor=config.Checked.DisableColor;
|
|
131612
|
+
else if (bMouseOn) textColor=config.Checked.MouseOnColor;
|
|
131613
|
+
|
|
131614
|
+
this.Canvas.fillStyle=textColor;
|
|
131615
|
+
this.Canvas.fillText(config.Checked.Symbol,x,y);
|
|
131273
131616
|
}
|
|
131274
131617
|
else if (drawInfo.Checked===false)
|
|
131275
131618
|
{
|
|
131276
|
-
|
|
131277
|
-
|
|
131278
|
-
|
|
131619
|
+
var textColor=config.Unchecked.Color;
|
|
131620
|
+
if (drawInfo.Enable===false) textColor=config.Unchecked.DisableColor;
|
|
131621
|
+
else if (bMouseOn) textColor=config.Unchecked.MouseOnColor;
|
|
131622
|
+
|
|
131623
|
+
this.Canvas.fillStyle=textColor;
|
|
131624
|
+
this.Canvas.fillText(config.Unchecked.Symbol,x,y);
|
|
131279
131625
|
}
|
|
131280
131626
|
|
|
131281
131627
|
if (drawInfo.Enable)
|
|
131282
131628
|
{
|
|
131283
|
-
var rtBox={ Left:x, Bottom:y, Width:size, Height:size };
|
|
131284
|
-
rtBox.Right=rtBox.Left+rtBox.Width;
|
|
131285
|
-
rtBox.Top=rtBox.Bottom-rtBox.Height;
|
|
131286
131629
|
drawInfo.Botton={ Rect:rtBox, Type:0 };
|
|
131287
131630
|
}
|
|
131288
131631
|
}
|
|
@@ -131291,6 +131634,7 @@ function ChartReport()
|
|
|
131291
131634
|
{
|
|
131292
131635
|
if (!drawInfo.Button) return;
|
|
131293
131636
|
|
|
131637
|
+
var config=drawInfo.Button;
|
|
131294
131638
|
var rtBG=
|
|
131295
131639
|
{
|
|
131296
131640
|
Left:left+drawInfo.Button.Margin.Left, Top:top+drawInfo.Button.Margin.Top,
|
|
@@ -131300,11 +131644,26 @@ function ChartReport()
|
|
|
131300
131644
|
rtBG.Right=rtBG.Left+rtBG.Width;
|
|
131301
131645
|
rtBG.Bottom=rtBG.Top+rtBG.Height;
|
|
131302
131646
|
|
|
131303
|
-
var bgColor=
|
|
131647
|
+
var bgColor=config.BGColor, textColor=config.TextColor;
|
|
131304
131648
|
if (drawInfo.Enable===false)
|
|
131305
131649
|
{
|
|
131306
|
-
bgColor=
|
|
131307
|
-
textColor=
|
|
131650
|
+
bgColor=config.Disable.BGColor;
|
|
131651
|
+
textColor=config.Disable.TextColor;
|
|
131652
|
+
}
|
|
131653
|
+
else
|
|
131654
|
+
{
|
|
131655
|
+
if (this.LastMouseStatus && this.LastMouseStatus.OnMouseMove && config.MouseOn)
|
|
131656
|
+
{
|
|
131657
|
+
var x=this.LastMouseStatus.OnMouseMove.X;
|
|
131658
|
+
var y=this.LastMouseStatus.OnMouseMove.Y;
|
|
131659
|
+
if (x>rtBG.Left && x<rtBG.Right && y>rtBG.Top && y<rtBG.Bottom)
|
|
131660
|
+
{
|
|
131661
|
+
bgColor=config.MouseOn.BGColor;
|
|
131662
|
+
textColor=config.MouseOn.TextColor;
|
|
131663
|
+
|
|
131664
|
+
this.LastMouseStatus.MouseOnStatus={ Index:drawInfo.Index, ColumnIndex:drawInfo.ColumnIndex, Type:1 };
|
|
131665
|
+
}
|
|
131666
|
+
}
|
|
131308
131667
|
}
|
|
131309
131668
|
|
|
131310
131669
|
this.Canvas.fillStyle=bgColor;
|
|
@@ -131388,6 +131747,81 @@ function ChartReport()
|
|
|
131388
131747
|
}
|
|
131389
131748
|
}
|
|
131390
131749
|
|
|
131750
|
+
this.DrawLinkText=function(drawInfo, left, top, width)
|
|
131751
|
+
{
|
|
131752
|
+
if (!drawInfo.Link || !drawInfo.Text) return;
|
|
131753
|
+
|
|
131754
|
+
var config=drawInfo.Link;
|
|
131755
|
+
var text=drawInfo.Text;
|
|
131756
|
+
var textAlign=drawInfo.TextAlign;
|
|
131757
|
+
var font=config.Font;
|
|
131758
|
+
var color=config.TextColor;
|
|
131759
|
+
|
|
131760
|
+
|
|
131761
|
+
|
|
131762
|
+
this.Canvas.font=font;
|
|
131763
|
+
var textWidth=this.Canvas.measureText(text).width;
|
|
131764
|
+
var textHeight=this.Canvas.measureText("擎").width;
|
|
131765
|
+
var x=left;
|
|
131766
|
+
if (width>=textWidth)
|
|
131767
|
+
{
|
|
131768
|
+
if (textAlign=='center') x=left+(width-textWidth)/2;
|
|
131769
|
+
else if (textAlign=='right') x=left+width-textWidth;
|
|
131770
|
+
}
|
|
131771
|
+
else
|
|
131772
|
+
{
|
|
131773
|
+
text=this.TextEllipsis(text, width, drawInfo.MaxText);
|
|
131774
|
+
textWidth=this.Canvas.measureText(text).width;
|
|
131775
|
+
|
|
131776
|
+
//数据截断提示信息
|
|
131777
|
+
drawInfo.Tooltip=
|
|
131778
|
+
{
|
|
131779
|
+
Type:2,
|
|
131780
|
+
Data:{ AryText:[ {Text:drawInfo.Text} ] }
|
|
131781
|
+
}
|
|
131782
|
+
}
|
|
131783
|
+
|
|
131784
|
+
var rtText={Left:x, Bottom:top+this.RowHeight-this.ItemMergin.Bottom, Height:textHeight, Width:textWidth };
|
|
131785
|
+
rtText.Right=rtText.Left+rtText.Width;
|
|
131786
|
+
rtText.Top=rtText.Bottom-rtText.Height;
|
|
131787
|
+
|
|
131788
|
+
var drawLine=false; //下划线
|
|
131789
|
+
if (drawInfo.Enable===false)
|
|
131790
|
+
{
|
|
131791
|
+
color=config.Disable.TextColor;
|
|
131792
|
+
}
|
|
131793
|
+
else if (this.LastMouseStatus && this.LastMouseStatus.OnMouseMove && config.MouseOn)
|
|
131794
|
+
{
|
|
131795
|
+
var x=this.LastMouseStatus.OnMouseMove.X;
|
|
131796
|
+
var y=this.LastMouseStatus.OnMouseMove.Y;
|
|
131797
|
+
if (x>rtText.Left && x<rtText.Right && y>rtText.Top && y<rtText.Bottom)
|
|
131798
|
+
{
|
|
131799
|
+
color=config.MouseOn.TextColor;
|
|
131800
|
+
drawLine=true;
|
|
131801
|
+
this.LastMouseStatus.MouseOnStatus={ Index:drawInfo.Index, ColumnIndex:drawInfo.ColumnIndex, Type:2 };
|
|
131802
|
+
}
|
|
131803
|
+
}
|
|
131804
|
+
|
|
131805
|
+
this.Canvas.textBaseline="bottom";
|
|
131806
|
+
this.Canvas.textAlign="left";
|
|
131807
|
+
this.Canvas.fillStyle=color;
|
|
131808
|
+
this.Canvas.fillText(text,rtText.Left, rtText.Bottom);
|
|
131809
|
+
|
|
131810
|
+
if (drawLine)
|
|
131811
|
+
{
|
|
131812
|
+
this.Canvas.strokeStyle=color;
|
|
131813
|
+
this.Canvas.beginPath();
|
|
131814
|
+
this.Canvas.moveTo(rtText.Left,rtText.Bottom);
|
|
131815
|
+
this.Canvas.lineTo(rtText.Right,rtText.Bottom);
|
|
131816
|
+
this.Canvas.stroke();
|
|
131817
|
+
}
|
|
131818
|
+
|
|
131819
|
+
if (drawInfo.Enable)
|
|
131820
|
+
{
|
|
131821
|
+
drawInfo.Botton={ Rect:rtText, Type:2 };
|
|
131822
|
+
}
|
|
131823
|
+
}
|
|
131824
|
+
|
|
131391
131825
|
//字体由外面设置
|
|
131392
131826
|
this.TextEllipsis=function(text, maxWidth, maxText)
|
|
131393
131827
|
{
|
|
@@ -132100,6 +132534,14 @@ function ChartReport()
|
|
|
132100
132534
|
status.Redraw=true;
|
|
132101
132535
|
return true;
|
|
132102
132536
|
}
|
|
132537
|
+
else if (buttonData.Type===2) //link
|
|
132538
|
+
{
|
|
132539
|
+
var sendData={ Column:buttonData.Column, Index:buttonData.Index, Stock:buttonData.Stock, Data:buttonData.Data };
|
|
132540
|
+
this.SendClickEvent(JSCHART_EVENT_ID.ON_CLICK_REPORT_LINK, sendData)
|
|
132541
|
+
|
|
132542
|
+
status.Redraw=true;
|
|
132543
|
+
return true;
|
|
132544
|
+
}
|
|
132103
132545
|
|
|
132104
132546
|
return false;
|
|
132105
132547
|
}
|
|
@@ -132354,7 +132796,7 @@ function ChartReport()
|
|
|
132354
132796
|
|
|
132355
132797
|
if (x>=rt.Left && x<=rt.Right && y>=rt.Top && y<=rt.Bottom)
|
|
132356
132798
|
{
|
|
132357
|
-
return { Rect:item.Rect, Stock:item.Stock, Column:item.Column, Index:item.Index, Type:item.Type, Data:item.Data };
|
|
132799
|
+
return { Rect:item.Rect, Stock:item.Stock, Column:item.Column, Index:item.Index, Type:item.Type, Data:item.Data, ColumnIndex:item.ColumnIndex };
|
|
132358
132800
|
}
|
|
132359
132801
|
}
|
|
132360
132802
|
}
|
|
@@ -137193,26 +137635,36 @@ function JSScrollBarChart(divElement)
|
|
|
137193
137635
|
{
|
|
137194
137636
|
this.DivElement=divElement;
|
|
137195
137637
|
this.JSChartContainer; //表格控件
|
|
137638
|
+
this.ResizeListener;
|
|
137196
137639
|
|
|
137197
|
-
|
|
137198
|
-
|
|
137199
|
-
|
|
137200
|
-
|
|
137201
|
-
|
|
137202
|
-
|
|
137203
|
-
|
|
137204
|
-
|
|
137205
|
-
|
|
137206
|
-
|
|
137207
|
-
|
|
137640
|
+
//h5 canvas
|
|
137641
|
+
this.CanvasElement=document.createElement("canvas");
|
|
137642
|
+
this.CanvasElement.className='jsscrollbar-drawing';
|
|
137643
|
+
this.CanvasElement.id=Guid();
|
|
137644
|
+
this.CanvasElement.setAttribute("tabindex",0);
|
|
137645
|
+
if (this.CanvasElement.style) this.CanvasElement.style.outline='none';
|
|
137646
|
+
if(divElement.hasChildNodes())
|
|
137647
|
+
{
|
|
137648
|
+
JSConsole.Chart.Log("[JSScrollBarChart::JSScrollBarChart] divElement hasChildNodes", divElement.childNodes);
|
|
137649
|
+
}
|
|
137650
|
+
divElement.appendChild(this.CanvasElement);
|
|
137208
137651
|
|
|
137209
137652
|
|
|
137210
137653
|
this.OnSize=function()
|
|
137211
137654
|
{
|
|
137212
137655
|
//画布大小通过div获取
|
|
137213
|
-
var height=
|
|
137656
|
+
var height=this.DivElement.offsetHeight;
|
|
137657
|
+
var width=this.DivElement.offsetWidth;
|
|
137658
|
+
if (this.DivElement.style.height && this.DivElement.style.width)
|
|
137659
|
+
{
|
|
137660
|
+
if (this.DivElement.style.height.includes("px"))
|
|
137661
|
+
height=parseInt(this.DivElement.style.height.replace("px",""));
|
|
137662
|
+
if (this.DivElement.style.width.includes("px"))
|
|
137663
|
+
width=parseInt(this.DivElement.style.width.replace("px",""));
|
|
137664
|
+
}
|
|
137665
|
+
|
|
137214
137666
|
this.CanvasElement.height=height;
|
|
137215
|
-
this.CanvasElement.width=
|
|
137667
|
+
this.CanvasElement.width=width;
|
|
137216
137668
|
this.CanvasElement.style.width=this.CanvasElement.width+'px';
|
|
137217
137669
|
this.CanvasElement.style.height=this.CanvasElement.height+'px';
|
|
137218
137670
|
|
|
@@ -137234,12 +137686,14 @@ function JSScrollBarChart(divElement)
|
|
|
137234
137686
|
|
|
137235
137687
|
if (!chart) return false;
|
|
137236
137688
|
|
|
137689
|
+
this.JSChartContainer=chart;
|
|
137690
|
+
this.DivElement.JSChart=this; //div中保存一份
|
|
137691
|
+
|
|
137692
|
+
if (option.EnableResize==true) this.CreateResizeListener();
|
|
137693
|
+
|
|
137237
137694
|
if (option.OnCreatedCallback) option.OnCreatedCallback(chart);
|
|
137238
137695
|
|
|
137239
137696
|
chart.Draw();
|
|
137240
|
-
|
|
137241
|
-
this.JSChartContainer=chart;
|
|
137242
|
-
this.DivElement.JSChart=this; //div中保存一份
|
|
137243
137697
|
}
|
|
137244
137698
|
|
|
137245
137699
|
this.CreateJSScrollBarChartContainer=function(option)
|
|
@@ -137284,6 +137738,18 @@ function JSScrollBarChart(divElement)
|
|
|
137284
137738
|
if (IFrameSplitOperator.IsBool(item.AutoRight)) chart.AutoMargin.Right=item.AutoRight;
|
|
137285
137739
|
}
|
|
137286
137740
|
|
|
137741
|
+
this.CreateResizeListener=function()
|
|
137742
|
+
{
|
|
137743
|
+
this.ResizeListener = new ResizeObserver((entries)=>{ this.OnDivResize(entries); });
|
|
137744
|
+
this.ResizeListener.observe(this.DivElement);
|
|
137745
|
+
}
|
|
137746
|
+
|
|
137747
|
+
this.OnDivResize=function(entries)
|
|
137748
|
+
{
|
|
137749
|
+
JSConsole.Chart.Log("[JSScrollBarChart::OnDivResize] entries=", entries);
|
|
137750
|
+
this.OnSize( );
|
|
137751
|
+
}
|
|
137752
|
+
|
|
137287
137753
|
/////////////////////////////////////////////////////////////////////////////
|
|
137288
137754
|
//对外接口
|
|
137289
137755
|
|
|
@@ -137429,6 +137895,11 @@ function JSScrollBarChartContainer(uielement)
|
|
|
137429
137895
|
this.IsDestroy=true;
|
|
137430
137896
|
}
|
|
137431
137897
|
|
|
137898
|
+
this.GetHQChart=function()
|
|
137899
|
+
{
|
|
137900
|
+
return this.HQChart;
|
|
137901
|
+
}
|
|
137902
|
+
|
|
137432
137903
|
//设置事件回调
|
|
137433
137904
|
//{event:事件id, callback:回调函数}
|
|
137434
137905
|
this.AddEventCallback=function(object)
|
|
@@ -137507,6 +137978,36 @@ function JSScrollBarChartContainer(uielement)
|
|
|
137507
137978
|
//this.UIElement.ontouchend=(e)=> {this.OnTouchEnd(e); }
|
|
137508
137979
|
}
|
|
137509
137980
|
|
|
137981
|
+
//创建一个图形
|
|
137982
|
+
this.CreateChartPaint=function(name)
|
|
137983
|
+
{
|
|
137984
|
+
var chart=g_ChartPaintFactory.Create(name);
|
|
137985
|
+
if (!chart) return null;
|
|
137986
|
+
|
|
137987
|
+
chart.ChartFrame=this.Frame;
|
|
137988
|
+
chart.ChartBorder=this.Frame.ChartBorder;
|
|
137989
|
+
chart.Canvas=this.Canvas;
|
|
137990
|
+
chart.Data=this.Frame.Data;
|
|
137991
|
+
chart.GetEventCallback=(id)=> { return this.GetEventCallback(id); }
|
|
137992
|
+
chart.GetHQChartCallback=()=>{ return this.GetHQChart(); }
|
|
137993
|
+
|
|
137994
|
+
return chart;
|
|
137995
|
+
}
|
|
137996
|
+
|
|
137997
|
+
this.GetChartPaintByClassName=function(name)
|
|
137998
|
+
{
|
|
137999
|
+
for(var i=0; i<this.ChartPaint.length; ++i)
|
|
138000
|
+
{
|
|
138001
|
+
var item=this.ChartPaint[i];
|
|
138002
|
+
if (item.ClassName==name)
|
|
138003
|
+
{
|
|
138004
|
+
return { Chart:item, Index:i };
|
|
138005
|
+
}
|
|
138006
|
+
}
|
|
138007
|
+
|
|
138008
|
+
return null;
|
|
138009
|
+
}
|
|
138010
|
+
|
|
137510
138011
|
this.Draw=function()
|
|
137511
138012
|
{
|
|
137512
138013
|
if (this.UIElement.width<=0 || this.UIElement.height<=0) return;
|
|
@@ -139010,7 +139511,8 @@ function JSDialogDrawTool()
|
|
|
139010
139511
|
{ Title: '标价线', ClassName: 'hqchart_drawtool icon-price_line', Type:0, Data:{ ID:"标价线" } },
|
|
139011
139512
|
{ Title: '垂直线', ClassName: 'hqchart_drawtool icon-vertical_line', Type:0, Data:{ ID:"垂直线" } },
|
|
139012
139513
|
{ Title: '十字线', ClassName: 'hqchart_drawtool icon-tubiao_shizixian', Type:0, Data:{ ID:"十字线" } },
|
|
139013
|
-
{ Title: '箭头', ClassName: 'hqchart_drawtool icon-
|
|
139514
|
+
{ Title: '箭头', ClassName: 'hqchart_drawtool icon-bottom-arrow-solid', Type:0, Data:{ ID:"箭头" } },
|
|
139515
|
+
{ Title: '大箭头', ClassName: 'hqchart_drawtool icon-big_arrow', Type:0, Data:{ ID:"ArrowMarker" } },
|
|
139014
139516
|
{ Title: '趋势线', ClassName: 'hqchart_drawtool icon-draw_trendline', Type:0, Data:{ ID:"趋势线" } },
|
|
139015
139517
|
{ Title: '水平线', ClassName: 'hqchart_drawtool icon-draw_hline', Type:0, Data:{ ID:"水平线" } },
|
|
139016
139518
|
{ Title: '水平射线', ClassName: 'hqchart_drawtool icon-tubiao_shuipingshexian', Type:0, Data:{ ID:"水平射线" } },
|
|
@@ -140101,7 +140603,7 @@ function HQChartScriptWorker()
|
|
|
140101
140603
|
|
|
140102
140604
|
|
|
140103
140605
|
|
|
140104
|
-
var HQCHART_VERSION="1.1.
|
|
140606
|
+
var HQCHART_VERSION="1.1.13587";
|
|
140105
140607
|
|
|
140106
140608
|
function PrintHQChartVersion()
|
|
140107
140609
|
{
|