Search code examples
iosios-charts

How to disable the cross and other touch events in ios-charts?


i have a Line Chart view in my iOS app.

@IBOutlet weak var lineChartView: LineChartView!

the zooming and touching is enabled. I do not let the user do anything in the chart, even selecting is not allowed.

I tried:

self.lineChartView.pinchZoomEnabled = false
self.lineChartView.dragEnabled = false
self.lineChartView.dragDecelerationEnabled = false

but without any luck. I can still touch the graph and see the cross. I even can pinch to zoom the graph.

How can i turn this behaviour off?+


Solution

  • Doh! in storyboard I can disable "User Interaction Enabled".

    that do the trick.