LineChartView (danielgindi/charts) line disappears when zoom in

96 Views Asked by At

I have a macOS 13+ project in Swift where I've imported https://github.com/danielgindi/Charts to display temperatures over a day, by using a LineChartView.

Since I have a lot of values for a single day, and all single value is really important, I need to zoom over the X axe disabling zoom on Y axe.

Text

The problem is that the line disappears when I zoom-in. If I set y-zoom to true the line remains on screen, but If I set it to false, when zooming it disappears.

Text

Text

Here chart view configuration

        self.lineChartView.gridBackgroundColor = .white
        self.lineChartView.borderLineWidth = 2
        self.lineChartView.borderColor = .systemGray
        self.lineChartView.chartDescription.text = ""
        self.lineChartView.gridBackgroundColor = .clear
        self.lineChartView.backgroundColor = .clear
        self.lineChartView.pinchZoomEnabled = false
        self.lineChartView.doubleTapToZoomEnabled = false
        self.lineChartView.delegate = self
        self.lineChartView.scaleYEnabled = false
        self.lineChartView.scaleXEnabled = true
        self.lineChartView.extraBottomOffset = 10

I have had this problem for over a month. Asked on github no reply to my bug report. Today I've updated to the v5.0.0 (released three days ago) but still have the same problem.

Ideas ? Thanks in advance.

0

There are 0 best solutions below