Open mvolkmann opened 2 years ago
I bumped into this too. In my case, it was related to the LineChartStyle and specifically when the baseline and the topline were the same, the CALayer error occurs. In my case, I had the following as part of the chartStyle...
baseline : .minimumWithMaximum(of: smallestValue),
topLine : .maximum(of: largestvalue),
To work around the problem, I just ensure that "largestvalue" and "smallestValue" are not ever the same (If the are, I just added one to largestvalue)
When all my data points have the same value, I get an error from
LineChart
. Changing one of the values to zero makes the error go away. I wonder if this happens because it cannot calculate the y-axis range to use. I'd like to try setting the minimum value of the y-axis to zero to see if that makes the error go away. How can I do that?Here is the error I get: