B4J Question xChartLite crash

Peter Meares

Member
Licensed User
Longtime User
I was starting to use xChartLite. Brilliant library, thanks Klaus.:)
I invoked an error from the library on line 1748. Not sure you would want put a catch in place.
Entirely my own fault but after some debugging I found that the xCustomview I copied across was for a BAR chart, and I was filling it with line data.
It correctly flagged "Bar width = too small !!! Drawing of Bar chart skipped" and then failed on line 1748 when it was trying to use bitmapcreator with empty arrays.
Easily fixed by changing the view to a "LINE" chart.
 

peacemaker

Expert
Licensed User
Longtime User
Why posted as B4J library ? It's to QUESTION forum.
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
Well, looking a bit deeper into the problem, it does not need that much code in the xChartLite and xChartMini libraries.
I have added a check in the different chart specific routines to see if they are compatible with the selected chart type.
If the chart type is not compatible a Log is written like this:

1699957365314.png


I have also moved the ChartType property on top in Property list in the Designer.
 
Upvote 0
Top