Null value in chart data prevents bar chart from displaying
If a null mean or median value is present in the data passed to the JavaScript plotting routines then none of the series is shown.
Comments (7)
-
reporter -
Does that skew the stats or set everything to zero?
-
reporter It doesn't affect the data displayed in the charts at all, so what the user sees is not affected. As it stands you are faced with a blank plot until you click on the legend of the offending
null
-containing series. At that point the offending series is hidden and the rest of the series are displayed. -
Good stuff.
-
reporter - changed status to resolved
Added JavaScript code to check for
null
values in plot data before carrying out anyparseFloat
operations on them. Fixes issue#504→ <<cset 4ba82ad9452c>>
-
Merged in issue504nullDataBreaksAveragePlot (pull request #91)
Added JavaScript code to check for
null
values in plot data before carrying out anyparseFloat
operations on them. Fixes issue#504→ <<cset e4068ac46720>>
-
- Log in to comment
There's actually a check for
null
values in lines 217 and 218 of the routine. These checks need to be made earlier in the routine, and over-write any null values with a zero.This can be fixed by adding a check for null mean or median values and replacing them with a zero in the
updateAverageChart
function contained in thechartUpdateData.js
file. An additional line of code is required in four places, of the form:or
as appropriate.