Incorrect histogram data in charts

Issue #830 resolved
David Platten created an issue

As reported on the Google Group here: https://groups.google.com/forum/#!topic/openrem/FsQLyh32hxk

In some situations the histogram data associated with a data point can be incorrect.

Setting “Case-insensitive categories” in the “Config → Chart options” appears to be a work-around for the time being.

Comments (28)

  1. David Platten reporter

    I think this problem is being caused by a difference in sorting order between two lists in my charting Python code.

    The Python charting code needs to be re-written so that a single object is returned from each chart type routine that has a sensible structure and makes this type of issue go away. The JavaScript will also have to be re-written.

    The dilemma: do we fix this for the current charting, or do we address it at the same time as replacing Highcharts with something else?

    @Ed McDonagh what do you think?

  2. David Platten reporter

    I think that fixing the existing charts would be the best approach for now. I’ll try to set up a development environment with the current develop branch in Windows…

  3. Ed McDonagh

    Hi @David Platten - do you think you might have any time soon to knock some of these chart related issue off?

    Thanks, Ed

  4. David Platten reporter

    Passing the JavaScript a JSON copy of the Pandas DataFrame. Need to re-write the JavaScript to deal with this. Started, but needs further work. Wondering if I should replace HighCharts at this point as one of the alternatives may accept the new data as-is. References issue #830

    → <<cset 4cd9911e4c2f>>

  5. David Platten reporter

    Simple Altair-based chart working for mean or median DLP per requested procedure name. No histograms at the moment, and the chart formatting isn't great. However, the chart creation and display works. References issue #830 and issue #477

    → <<cset 4c5102ae9fb6>>

  6. David Platten reporter

    Added some test code that makes the browser JavaScript calculate the mean or median values (not implemented for the combined plot of mean and median). This may cause memory or performance issues I think, due to the potentially very large object size passed to the browser. References issue #830 and issue #477

    → <<cset 5cca47bd06c9>>

  7. David Platten reporter

    Removed HighCharts-related JavaScript. Added tooltip, legend title, y-axis title. I've tried to make the chart fit the DIV, but cannot work out how to do that at the moment. References issue #830 and issue #477

    → <<cset c8f2992c8e03>>

  8. David Platten reporter

    Added stacked bar chart in place of pie chart for frequency of requested procedure names. Produces a bar per x-ray system (an improvement on the pie chart). References issue #830 and issue #477

    → <<cset b362805a40c6>>

  9. David Platten reporter

    Switched average plots so that the categories are stacked vertically (one column, lots of rows). This avoids an issue where the width gets too large. References issue #830 and issue #477

    → <<cset f1cf683996ad>>

  10. David Platten reporter

    Refactored Altair chart code into separate functions per chart type. Added all CT histograms. All CT charts now using Altair. Workload chart doesn't have per-hour data at the moment. References issue #477 and #830

    → <<cset 2e9307e994b9>>

  11. Log in to comment