Kalaivani
Kalaivani

Reputation: 424

Changes in Slider has to reflect in Core plot Graph

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.

Upvotes: 1

Views: 545

Answers (1)

Eric Skroch
Eric Skroch

Reputation: 27381

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.

Upvotes: 1

Related Questions