Null value in chart data prevents bar chart from displaying

Issue #504 resolved
David Platten created an issue

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)

  1. David Platten reporter

    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 the chartUpdateData.js file. An additional line of code is required in four places, of the form:

    if (summary_data[i][j].mean == null) summary_data[i][j].mean = 0;
    

    or

    if (summary_data[i][j].median == null) summary_data[i][j].median = 0;
    

    as appropriate.

  2. David Platten 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.

  3. Log in to comment