Sergey Shustikov
Sergey Shustikov

Reputation: 15831

How to automatically scale graph to fit it on Y axis?

I have almost finished Line graph, and I want to fit screen it on Y axis. MIN\MAX Peak values should touch top and bottom corner of the graph. How to do this?

Upvotes: 0

Views: 501

Answers (1)

woodii
woodii

Reputation: 793

Find minimum and maximum in your DataSet and use

chart.getAxisLeft().setAxisMinimum(0f);
chart.getAxisLeft().setAxisMaximum(100f);

to set the boundaries accordingly.

Upvotes: 1

Related Questions