我正在使用 LightningChartJS 创建图表。单击图例框中的系列描述时,系列消失但轴保持不变。是否可以将轴与系列一起隐藏?
我的轴和系列如下:-
const axis1 = chart.getDefaultAxisY()
.setStrokeStyle(axisYStrokeStyles[0])
.setOverlayStyle(axisYStylesHighlight[0])
.setNibOverlayStyle(axisYStylesHighlight[0])
.setTickStyle(visibleTick => visibleTick
.setLabelFillStyle(axisLabelStyle)
.setGridStrokeStyle(emptyLine)
)
const axis2 = chart.addAxisY(false)
.setTitle('No of units produced')
.setStrokeStyle(axisYStrokeStyles[1])
.setOverlayStyle(axisYStylesHighlight[1])
.setNibOverlayStyle(axisYStylesHighlight[1])
.setTickStyle(visibleTick => visibleTick
.setLabelFillStyle(axisLabelStyle)
.setGridStrokeStyle(emptyLine)
)
const splineSeries1 = chart.addSplineSeries({
xAxis: axisX,
yAxis: axisY1
})
const splineSeries2 = chart.addSplineSeries({
xAxis: axisX,
yAxis: axisY2
})