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
package/package.json
CHANGED
|
@@ -39,7 +39,8 @@ function JSDialogDrawTool()
|
|
|
39
39
|
{ Title: '标价线', ClassName: 'hqchart_drawtool icon-price_line', Type:0, Data:{ ID:"标价线" } },
|
|
40
40
|
{ Title: '垂直线', ClassName: 'hqchart_drawtool icon-vertical_line', Type:0, Data:{ ID:"垂直线" } },
|
|
41
41
|
{ Title: '十字线', ClassName: 'hqchart_drawtool icon-tubiao_shizixian', Type:0, Data:{ ID:"十字线" } },
|
|
42
|
-
{ Title: '箭头', ClassName: 'hqchart_drawtool icon-
|
|
42
|
+
{ Title: '箭头', ClassName: 'hqchart_drawtool icon-bottom-arrow-solid', Type:0, Data:{ ID:"箭头" } },
|
|
43
|
+
{ Title: '大箭头', ClassName: 'hqchart_drawtool icon-big_arrow', Type:0, Data:{ ID:"ArrowMarker" } },
|
|
43
44
|
{ Title: '趋势线', ClassName: 'hqchart_drawtool icon-draw_trendline', Type:0, Data:{ ID:"趋势线" } },
|
|
44
45
|
{ Title: '水平线', ClassName: 'hqchart_drawtool icon-draw_hline', Type:0, Data:{ ID:"水平线" } },
|
|
45
46
|
{ Title: '水平射线', ClassName: 'hqchart_drawtool icon-tubiao_shuipingshexian', Type:0, Data:{ ID:"水平射线" } },
|
package/src/jscommon/umychart.js
CHANGED
|
@@ -2601,6 +2601,7 @@ var JSCHART_EVENT_ID=
|
|
|
2601
2601
|
ON_DRAW_REPORT_ROW_BG:140, //报价列表整行背景
|
|
2602
2602
|
ON_CLICK_REPORT_CHECKBOX:141, //报价列表checkbox
|
|
2603
2603
|
ON_CLICK_REPORT_BUTTON:142, //报价列表按钮
|
|
2604
|
+
ON_CLICK_REPORT_LINK:143, //报价列表 链接
|
|
2604
2605
|
|
|
2605
2606
|
|
|
2606
2607
|
ON_CHANGE_INDEX:150, //切换指标
|
|
@@ -56410,7 +56411,8 @@ IChartDrawPicture.ArrayDrawPricture=
|
|
|
56410
56411
|
{ Name:"PriceRange", ClassName:"ChartPriceRange", Create:function() { return new ChartPriceRange(); }},
|
|
56411
56412
|
{ Name:"DateRange", ClassName:"ChartDateRange", Create:function() { return new ChartDateRange(); }},
|
|
56412
56413
|
{ Name:"InfoLine", ClassName:"ChartInfoLine", Create:function() { return new ChartInfoLine(); }},
|
|
56413
|
-
{ Name:"TrendAngle", ClassName:"ChartTrendAngle", Create:function() { return new ChartTrendAngle(); }}
|
|
56414
|
+
{ Name:"TrendAngle", ClassName:"ChartTrendAngle", Create:function() { return new ChartTrendAngle(); }},
|
|
56415
|
+
{ Name:"ArrowMarker", ClassName:"ChartArrowMarker", Create:function() { return new ChartArrowMarker(); } },
|
|
56414
56416
|
];
|
|
56415
56417
|
|
|
56416
56418
|
IChartDrawPicture.MapIonFont=new Map(
|
|
@@ -56935,6 +56937,90 @@ function ChartDrawArrowLine()
|
|
|
56935
56937
|
}
|
|
56936
56938
|
}
|
|
56937
56939
|
|
|
56940
|
+
function ChartArrowMarker()
|
|
56941
|
+
{
|
|
56942
|
+
this.newMethod=IChartDrawPicture; //派生
|
|
56943
|
+
this.newMethod();
|
|
56944
|
+
delete this.newMethod;
|
|
56945
|
+
|
|
56946
|
+
this.ClassName='ChartArrowMarker';
|
|
56947
|
+
this.IsPointIn=this.IsPointIn_XYValue_Line;
|
|
56948
|
+
|
|
56949
|
+
this.InsideAngle=25;
|
|
56950
|
+
this.InsideWidth=70;
|
|
56951
|
+
|
|
56952
|
+
this.OutAngle=35;
|
|
56953
|
+
this.OutWidth=100;
|
|
56954
|
+
|
|
56955
|
+
this.GetXYCoordinate=this.GetXYCoordinate_default;
|
|
56956
|
+
this.OnlyMoveXIndex=true;
|
|
56957
|
+
this.IsSupportMagnet=true;
|
|
56958
|
+
|
|
56959
|
+
this.CalculatePoint=function(angle, ptStart, ptEnd, lineWidth)
|
|
56960
|
+
{
|
|
56961
|
+
var theta=angle; //三角斜边一直线夹角
|
|
56962
|
+
var headlen=lineWidth; //三角斜边长度
|
|
56963
|
+
|
|
56964
|
+
var angle = Math.atan2(ptStart.Y - ptEnd.Y, ptStart.X - ptEnd.X) * 180 / Math.PI,
|
|
56965
|
+
angle1 = (angle + theta) * Math.PI / 180,
|
|
56966
|
+
angle2 = (angle - theta) * Math.PI / 180,
|
|
56967
|
+
topX = headlen * Math.cos(angle1),
|
|
56968
|
+
topY = headlen * Math.sin(angle1),
|
|
56969
|
+
botX = headlen * Math.cos(angle2),
|
|
56970
|
+
botY = headlen * Math.sin(angle2);
|
|
56971
|
+
|
|
56972
|
+
return { Top:{X:topX+ptEnd.X, Y:topY+ptEnd.Y}, Bottom:{X:botX+ptEnd.X, Y:botY+ptEnd.Y} };
|
|
56973
|
+
}
|
|
56974
|
+
|
|
56975
|
+
this.Draw=function()
|
|
56976
|
+
{
|
|
56977
|
+
this.LinePoint=[];
|
|
56978
|
+
if (this.IsFrameMinSize()) return;
|
|
56979
|
+
if (!this.IsShow) return;
|
|
56980
|
+
|
|
56981
|
+
var drawPoint=this.CalculateDrawPoint( {IsCheckX:true, IsCheckY:true} );
|
|
56982
|
+
if (!drawPoint) return;
|
|
56983
|
+
if (drawPoint.length!=2) return;
|
|
56984
|
+
|
|
56985
|
+
this.ClipFrame();
|
|
56986
|
+
|
|
56987
|
+
var ptStart=drawPoint[0];
|
|
56988
|
+
var ptEnd=drawPoint[1];
|
|
56989
|
+
|
|
56990
|
+
//计算箭头 的两条边线坐标
|
|
56991
|
+
var outArrow=this.CalculatePoint(this.OutAngle, ptStart, ptEnd, this.OutWidth);
|
|
56992
|
+
var insideArrow=this.CalculatePoint(this.InsideAngle, ptStart, ptEnd, this.InsideWidth);
|
|
56993
|
+
|
|
56994
|
+
this.Canvas.beginPath();
|
|
56995
|
+
this.Canvas.moveTo(ptStart.X,ptStart.Y);
|
|
56996
|
+
this.Canvas.lineTo(insideArrow.Top.X,insideArrow.Top.Y);
|
|
56997
|
+
this.Canvas.lineTo(outArrow.Top.X,outArrow.Top.Y);
|
|
56998
|
+
this.Canvas.lineTo(ptEnd.X,ptEnd.Y);
|
|
56999
|
+
this.Canvas.lineTo(outArrow.Bottom.X,outArrow.Bottom.Y);
|
|
57000
|
+
this.Canvas.lineTo(insideArrow.Bottom.X,insideArrow.Bottom.Y);
|
|
57001
|
+
this.Canvas.lineTo(ptStart.X,ptStart.Y);
|
|
57002
|
+
this.Canvas.closePath();
|
|
57003
|
+
|
|
57004
|
+
this.Canvas.fillStyle=this.LineColor;
|
|
57005
|
+
this.Canvas.fill();
|
|
57006
|
+
|
|
57007
|
+
/*
|
|
57008
|
+
if (this.IsSelected)
|
|
57009
|
+
{
|
|
57010
|
+
this.Canvas.strokeStyle='rgba(255,0,0,0.5)';
|
|
57011
|
+
this.Canvas.lineWidth=20 * GetDevicePixelRatio();
|
|
57012
|
+
this.Canvas.stroke();
|
|
57013
|
+
}
|
|
57014
|
+
*/
|
|
57015
|
+
|
|
57016
|
+
var line={Start:ptStart, End:ptEnd};
|
|
57017
|
+
this.LinePoint.push(line);
|
|
57018
|
+
|
|
57019
|
+
this.DrawPoint([ptStart,ptEnd]); //画点
|
|
57020
|
+
this.Canvas.restore();
|
|
57021
|
+
}
|
|
57022
|
+
}
|
|
57023
|
+
|
|
56938
57024
|
//画图工具-射线
|
|
56939
57025
|
function ChartDrawPictureHaflLine()
|
|
56940
57026
|
{
|
|
@@ -67439,10 +67525,46 @@ function JSChartResource()
|
|
|
67439
67525
|
CheckBox:
|
|
67440
67526
|
{
|
|
67441
67527
|
Family:"iconfont", Size:15,
|
|
67442
|
-
Checked:{ Color:"rgb(
|
|
67443
|
-
Unchecked:{ Color:"rgb(
|
|
67528
|
+
Checked:{ Color:"rgb(69,147,238)", Symbol:"\ue6b3", DisableColor:"rgb(230,230,230)", MouseOnColor:"rgb(69,147,238)" },
|
|
67529
|
+
Unchecked:{ Color:"rgb(120,120,120)", Symbol:"\ue6b4", DisableColor:"rgb(230,230,230)", MouseOnColor:"rgb(69,147,238)" },
|
|
67444
67530
|
|
|
67445
67531
|
Margin:{ Left:5, Right:5, Bottom:2, Top:4 },
|
|
67532
|
+
},
|
|
67533
|
+
|
|
67534
|
+
Link:
|
|
67535
|
+
{
|
|
67536
|
+
Font:`${12*GetDevicePixelRatio()}px 微软雅黑`,
|
|
67537
|
+
TextColor:"rgb(30,144,255)",
|
|
67538
|
+
|
|
67539
|
+
Disable:{ TextColor:"rgb(211,211,211)" },
|
|
67540
|
+
MouseOn:{ TextColor:"rgb(30,144,255)" },
|
|
67541
|
+
},
|
|
67542
|
+
|
|
67543
|
+
ProgressBar:
|
|
67544
|
+
{
|
|
67545
|
+
BGColor:"rgb(229,231,238)",
|
|
67546
|
+
BarColor:"rgb(26,125,255)",
|
|
67547
|
+
Margin:{ Left:2, Right:2, Bottom:2, Top:2 },
|
|
67548
|
+
BarMargin:{ Left:2, Right:2, Bottom:2, Top:2 },
|
|
67549
|
+
TextColor:"rgb(0,0,0)",
|
|
67550
|
+
Font:`${12*GetDevicePixelRatio()}px 微软雅黑`,
|
|
67551
|
+
TextMargin:{ Left:40, Right:2, Bottom:2, Top:2},
|
|
67552
|
+
Disable:{ BGColor:"rgb(229,231,238)", BarColor:"rgb(131,131,131)", TextColor:"rgb(159,161,159)"}
|
|
67553
|
+
},
|
|
67554
|
+
|
|
67555
|
+
Button:
|
|
67556
|
+
{
|
|
67557
|
+
BGColor:"rgb(61,134,180)",
|
|
67558
|
+
TextColor:"rgb(255,255,255)",
|
|
67559
|
+
BorderColor:"rgb(200,200,200)",
|
|
67560
|
+
|
|
67561
|
+
Disable:{ BGColor:"rgb(105,105,105)", TextColor:"rgb(169,169,169)"},
|
|
67562
|
+
MouseOn:{ BGColor:"rgb(57,125,169)", TextColor:"rgb(230,230,230)" },
|
|
67563
|
+
|
|
67564
|
+
Margin:{ Left:5, Right:5, Bottom:2, Top:2 },
|
|
67565
|
+
TextMargin:{ Bottom:2 },
|
|
67566
|
+
|
|
67567
|
+
Font:`${12*GetDevicePixelRatio()}px 微软雅黑`
|
|
67446
67568
|
}
|
|
67447
67569
|
},
|
|
67448
67570
|
|
|
@@ -68485,6 +68607,58 @@ function JSChartResource()
|
|
|
68485
68607
|
|
|
68486
68608
|
CopyMarginConfig(dest.CheckBox.Margin, subItem.Margin);
|
|
68487
68609
|
}
|
|
68610
|
+
|
|
68611
|
+
if (item.Link)
|
|
68612
|
+
{
|
|
68613
|
+
var subItem=item.Link;
|
|
68614
|
+
if (subItem.Font) dest.Link.Font=subItem.Font;
|
|
68615
|
+
if (subItem.TextColor) dest.Link.TextColor=subItem.TextColor;
|
|
68616
|
+
if (subItem.Disable && subItem.Disable.TextColor) dest.Link.Disable.TextColor=subItem.Disable.TextColor;
|
|
68617
|
+
if (subItem.MouseOn && subItem.MouseOn.TextColor) dest.Link.MouseOn.TextColor=subItem.MouseOn.TextColor;
|
|
68618
|
+
}
|
|
68619
|
+
|
|
68620
|
+
if (item.ProgressBar)
|
|
68621
|
+
{
|
|
68622
|
+
var subItem=item.ProgressBar;
|
|
68623
|
+
if (subItem.BGColor) dest.ProgressBar.BGColor=subItem.BGColor;
|
|
68624
|
+
if (subItem.BarColor) dest.ProgressBar.BarColor=subItem.BarColor;
|
|
68625
|
+
if (subItem.TextColor) dest.ProgressBar.TextColor=subItem.TextColor;
|
|
68626
|
+
if (subItem.Font) dest.ProgressBar.Font=subItem.Font;
|
|
68627
|
+
if (subItem.Disable)
|
|
68628
|
+
{
|
|
68629
|
+
if (subItem.Disable.BGColor) dest.ProgressBar.Disable.BGColor=subItem.Disable.BGColor;
|
|
68630
|
+
if (subItem.Disable.BarColor) dest.ProgressBar.Disable.BarColor=subItem.Disable.BarColor;
|
|
68631
|
+
if (subItem.Disable.TextColor) dest.ProgressBar.Disable.TextColor=subItem.Disable.TextColor;
|
|
68632
|
+
}
|
|
68633
|
+
|
|
68634
|
+
CopyMarginConfig(dest.ProgressBar.Margin, subItem.Margin);
|
|
68635
|
+
CopyMarginConfig(dest.ProgressBar.BarMargin, subItem.BarMargin);
|
|
68636
|
+
CopyMarginConfig(dest.ProgressBar.TextMargin, subItem.TextMargin);
|
|
68637
|
+
}
|
|
68638
|
+
|
|
68639
|
+
if (item.Buttom)
|
|
68640
|
+
{
|
|
68641
|
+
var subItem=item.Buttom;
|
|
68642
|
+
if (subItem.BGColor) dest.Buttom.BGColor=subItem.BGColor;
|
|
68643
|
+
if (subItem.TextColor) dest.Buttom.TextColor=subItem.TextColor;
|
|
68644
|
+
if (subItem.BorderColor) dest.Buttom.BorderColor=subItem.BorderColor;
|
|
68645
|
+
if (subItem.Font) dest.Buttom.Font=subItem.Font;
|
|
68646
|
+
|
|
68647
|
+
if (subItem.Disable)
|
|
68648
|
+
{
|
|
68649
|
+
if (subItem.Disable.BGColor) dest.Buttom.Disable.BGColor=subItem.Disable.BGColor;
|
|
68650
|
+
if (subItem.Disable.TextColor) dest.Buttom.Disable.TextColor=subItem.Disable.TextColor;
|
|
68651
|
+
}
|
|
68652
|
+
|
|
68653
|
+
if (subItem.MouseOn)
|
|
68654
|
+
{
|
|
68655
|
+
if (subItem.MouseOn.BGColor) dest.Buttom.MouseOn.BGColor=subItem.MouseOn.BGColor;
|
|
68656
|
+
if (subItem.MouseOn.TextColor) dest.Buttom.MouseOn.TextColor=subItem.MouseOn.TextColor;
|
|
68657
|
+
}
|
|
68658
|
+
|
|
68659
|
+
CopyMarginConfig(dest.Buttom.Margin, subItem.Margin);
|
|
68660
|
+
CopyMarginConfig(dest.Buttom.TextMargin, subItem.TextMargin);
|
|
68661
|
+
}
|
|
68488
68662
|
|
|
68489
68663
|
}
|
|
68490
68664
|
|