Aggregation Based Line Chart - Y axis is inverted

Hi,

I am running Kibana 7.16.1. I currently have an Aggregation-based Line Chart that works as intended:

Now I have created a copy by clicking on "Clone", and simply changed the field of the Split Series to split by a different field in my dataset. Currently there's only 1 unique field so only one line displayed. The problem however is that the Y-axis is inverted!

This is very unexpected since I cloned the original panel, thus all panel settings should be identical. Do you have any feeling for what might be happening? How can I tell Kibana to invert the Y axis?

Thanks!

This is super weird. No we don't :thinking:
Can you share with me with screenshots the configuration of the chart? Also if you create it from scratch do you see the axis inverted or correct?

Sure thing! Here come some screenshots of the Split Series and the Y-axis configuration, let me know if I missed something.

Screenshot from 2022-12-23 12-43-25

Screenshot from 2022-12-23 12-43-59

I also notice that the problem is fixed is I remove the "Scale to data bounds" option. My goal is still to have a range of "data range +- 1000" with the correct Y axis orientation.

Yes I actually started creating the chart from scratch, then when I noticed it had the Y axis inverted I tried making a clone of the one that was fine.

Thanx, except from the split series what else do you have in the chart? If I can understand correctly is a date histogram on the x -axis and the metric? What aggregation are you using?

Also what type is the field that you are using as a metric? This could also help because I can't replicate it tbh.

Finally, can you try to create this in Lens? Does the problem exist there?

Yes exactly, date histogram on x-axis and one metric (Sum of violations).

The field I'm using "violations" is just an integer.

I can't replicate it in Lens because it doesn't allow me to choose a range for the Y axis being "Data bounds +- margin". If I choose "Full range" I get the same behavior as with the Aggregation Based Line Chart.

If I add a new datapoint that makes the line no longer be horizontal (either it goes up or down) then the Y axis gets the correct orientation.

So perhaps it's just a silly edge case? :slight_smile:

Yes very possible. I will share it with the team, they might have more insights for this case. Thanx for reporting this!

@tinrik could you check what does it happen if you reduce the bounds? to 100, 10, 1
Do all 4 data points have the same value?

@markov00 Same behavior, just different range in the Y axis (but still inverted). Yes, all 4 data points have the same value. As soon as one of them is different then the Y axis works as expected.

It gets even funnier if you set the type to "Area" instead of "Line", then the area is drawn from the line up :slight_smile:

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.