[Bug] yAxis.max /min generates additional gridlines that cannot be hidden #19929
Labels
bug
en
This issue is in English
pending
We are not sure about whether this is a bug/new feature.
waiting-for: author
Version
5.5.0
Link to Minimal Reproduction
https://jsfiddle.net/j5yospvx/
Steps to Reproduce
const xData = ['2020-01-01','2020-01-02','2020-01-03','2020-01-04','2020-01-05']; const priceList = [21, 13, 14, 24, 17]; const lastData = priceList [priceList .length - 1]; const minPrice = Math.min(...priceList ) const maxPrice = Math.max(...priceList ) const maxAxis = Math.max(2 * lastData - minPrice, maxPrice); const minAxis = Math.min(minPrice, 2 * lastData - maxPrice); const option = { grid: { x: 80, y: 60, x2: 60, y2: 60 }, legend: { selectedMode: false }, xAxis: { boundaryGap: [0.5, 0.5], axisLine: { show: false }, axisTick: { show: false }, type: 'category', data: xData , show: true, axisLabel: { inside: false, fontSize: 14, padding: [20, 20, 20, 20], align: 'center', interval: xData.length - 2, showMinLabel: true, showMaxLabel: true, } }, yAxis: { boundaryGap: [0.5, 0.5], type: 'value', show: true, max: maxAxis, min: minAxis, minInterval: Math.abs(minAxis-maxAxis) / 5, splitLine: { show: true, lineStyle: { type: "dashed" } }, axisLabel: { formatter: function (value, index) { return value.toFixed(2) + "%" }, fontSize: 14, showMinLabel: false, showMaxLabel: false } }, series: [ { silent: true, data: priceList, showSymbol: false, type: 'line', smooth: true }, { data: priceList, showSymbol: false, type: 'line', smooth: true, lineStyle: { width: 0, color: '#326EEB', } } ], animation: false };
Current Behavior
I set the yAxis.max and min properties, resulting in two extra grid lines in the chart that I don't need, but can't hide
Expected Behavior
I wish I could manually control the grid lines generated by min and max
Environment
Any additional comments?
No response
The text was updated successfully, but these errors were encountered: