1
votes

I have slider in one view and Bar chart using core plot in its sub view(view 2). At first the bar chart shows graph for default data in viewDidLoad method(it has initial values for slider).

When the slider changes the graph should reflect the bar chart accordingly.But i could not reflect the changes in slider in the graph.Is there any way to get my thing done.I can change the label in other view(view 2) when ever slider changes by some IBAction for this slider change.

1
What are you trying to change on the graph with the slider? - Eric Skroch
@Eric Graph draws the chart of slider data.For instance Chart shows some default data of the given three sliders.When i change the slider graph should redraw the chart based on the current slider value.Tats it.The whole chart must be in accordance with these slider values. - Kalaivani

1 Answers

1
votes

Connect an IBAction to each slider that fires when the slider moves. Inside the action method, call -reloadData on the plot. The plot will automatically query the datasource for new data. Your datasource should read the sliders and return their current values as the plot data.