"Invalid Cast Exception" ...all of a sudden
See original GitHub issueImplementing a donutChart in my android application and I’m getting an invalid Cast exception error all of a sudden after it worked fine before. What could be the issue? Screen shot attached.
Error is occurring on:
chart = new DonutChart(){Entries = chartSeries };
chart series is Entry array:
chartSeries = new Microcharts.Entry[] { new Microcharts.Entry (A) { Label = "100-75", ValueLabel = MakeAPercentage(A, total), Color = SKColor.Parse("#00D83E") }, new Microcharts.Entry(B) { Label = "75-50", ValueLabel = MakeAPercentage(B, total), Color = SKColor.Parse("#64BCFF") }, new Microcharts.Entry(C) { Label = "50-25", ValueLabel = MakeAPercentage(C,total), Color = SKColor.Parse("#FFD64A") }, new Microcharts.Entry(D) { Label = "25-0", ValueLabel = MakeAPercentage(D,total), Color = SKColor.Parse("#D30D1B") }
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (1 by maintainers)
@aloisdeniel Thanks for responding After much sweat and equal amounts of caffeine, I discovered the error was actually from the xaml code and NOT the Microcharts element. Happy to say its working fine now. screenshot:
Thanks again and awesome work with the package!
@gunjanddave If you’re still having a problem, please create a new issue with as much information as you can provide. Thanks!