Reputation: 1826
I'm trying to create a stacked graph using core plot.i have followed this tutorial.I have a UISlider on sliding i'm updating my graph.The issue i'm facing is my top value for y-axis is touching top border(As in the screen shot). As per my requirement in need to round off the highest value to next 10th value so that my graph doesn't touch the borders.
On changing my slider value the x and y axis should also get refresh,i'm doing it by regenerating plot but it takes a lot of memory.
Any idea how can i achieve these requirement ?
Upvotes: 0
Views: 67
Reputation: 27381
Don't recreate the whole graph every time the values change. Call -reloadData
on the graph to refresh the plot data and set the xRange
and yRange
of the plot space to change the scale of the axes.
Upvotes: 1