Search code examples
androidaxis-labelsmpandroidchart

MPandroidchart Double YAxis with different scales


I want that my chart has two YAxis with different scales like the image . How I can change the scale for each axis?

enter image description here


Solution

  • Version 2.0.0-beta was released over the weekend with a CombinedChart, which allows plotting Line-, Bar-, Scatter- and CandleData in one chart. So the feature is finally available.

    One note about what I found during my upgrade, you can't simply addDataSet() for each one, you have to generate the individual DataSet types (Bar, Line, Scatter, etc) and then use SetData() for the appropriate type, to trigger rendering.

    Here is the example code.