user1737538
user1737538

Reputation: 509

MPAndroidChart: bottom x-axis and multiple y-axes

I have two questions about this awesome Android chart library:

1) I cannot find a way to put the x-axis at the bottom of the chart: is it possible?

2) is it possible to plot data against two (or more) y-axes on the same chart?

Thank you in advance

Upvotes: 22

Views: 13383

Answers (2)

neaGaze
neaGaze

Reputation: 1461

A bit has changed in the library. Now you will need to do as follows:

XAxis xAxis = chart.getXAxis();
xAxis.setPosition(XAxis.XAxisPosition.BOTTOM);

This will set the x-axis label at the bottom

Upvotes: 54

Philipp Jahoda
Philipp Jahoda

Reputation: 51431

It is possible to put the XLabels to the bottom.

Call:

XLabels xl = chart.getXLabels();
xl.setPosition(XLabelPosition.BOTTOM);

Different y-axes descriptions (YLabels, with different data) are currently not supported.

Upvotes: 8

Related Questions