Reputation: 339
I have a ECharts
line chart where, based on some condition, the series can or can't have the markline
. The problem is that, if the actual maximum yaxis value is less then a markline y value, not all the markline will be shown.
I tried to set manually the min/max of my yaxis but nothing changes.
This is how the axis conditions are defined in the option:
axis:[
{
scale: true
}],
xAxis: [{
type: "time"
}],
yAxis: [{
type: "value",
axisLabel: {
formatter: "{value} ° C"
},
scale: true
}]
and this is how I set the min/max yaxis values:
termoLineCharts[index].yAxis.min = minYvalue - 15;
termoLineCharts[index].yAxis.max = maxYValue + 15;
Upvotes: 0
Views: 10577
Reputation: 339
This is the solution: the yaxis
option is an array, so in order to set the min and max value I had to do this
optionLineCharts[index].yAxis[0].min = minYvalue;
optionLineCharts[index].yAxis[0].max = maxYValue;
Upvotes: 2