*在当月画一条垂直线。这里是示例代码 * https://codepen.io/anon/pen/PgELdM * 这就是我想要实现的 * https://ibb.co/XjVn4WC
console.log("thank you");
*在当月画一条垂直线。这里是示例代码 * https://codepen.io/anon/pen/PgELdM * 这就是我想要实现的 * https://ibb.co/XjVn4WC
console.log("thank you");
您可以使用轴指南在图表下方绘制单条线。例如
var range = dateAxis.axisRanges.create();
range.date = new Date("2016-03-14");
range.grid.stroke = am4core.color("red");
range.grid.strokeWidth = 2;
range.grid.strokeOpacity = 1;
演示:
https://codepen.io/team/amcharts/pen/bb11ebefe894ad526d4bd959fccccf08
如果您需要在各种系列的顶部画一条线,您可以做一条全高线( y1
, y2
at 0
,不确定如何获得图表顶部的值...说它只需要number
s 意义像素,但也许它可以与am4core.percent(100)
?) 一起使用,因为x
您必须将日期转换为图表上的坐标(dateAxis
可能会有相应的方法),然后将其放在chart.plotContainer
.