Hi,
is there a possibility to get the max value of a y-axis? Hard to explain why i want that, but i’ll try. I have a line diagramm with open user connections over time (x-axis: time, y-axis: connections). To have a smooth y-axis scale, i only set ticks{min:0, suggestedMax: 3}. Now there ist a second line for total possible connections (default: 80). I have set that data on another y-axis and i want its ticks with the percentage of the highest possible tick of the first y-axis.
for example:
dataset_1(user connections) = [0,1,2,1,1] -> max value is 2 but ticks of y-axis go from 0 to 3
total possible connections : 80
->dataset_2(percentage) = 3/80*100 = 3.75 ->[3.75,3.75,3.75,3.75,3.75] -> max value set to 3.75
Thats why i need the 3 of dataset_1 as max
Greetings
@Ofenlord you can get this info for numerical scales (linear and logarithmic):
Hello, regarding with this issue. Is it possible to get the max and min for y-axis? Can I do like this?
yAxis: {
ticks: {
suggestedMin: min – 1,
suggestedMax: max + 1,
}
}
You can use
afterDataLimits
callback to modify the min/max: https://codepen.io/kurkle/pen/qBZxvYZ