Order charts by frequency

Issue #248 resolved
Ed McDonagh created an issue

I would find ordering bar charts of mean/median dose metrics by frequency useful, and more useful than alphabetically or by value.

If it is trivial to have options (with frequency as the default), then that would be even better.

Comments (48)

  1. David Platten

    Can now sort alphabetically or by y-value. Sorting by frequency may require some tinkering with the data, as I think the sorting values need to be properties of the chart data, and the frequency is part of the text in a tooltip. http://jsfiddle.net/9phfzewj/36/

  2. David Platten

    Added ability to sort two of the charts by various criteria (mean DLP per acquisition and mean DAP per acquisition). @edmcdonagh, are you able to try this out to see what you think? I think you'll be able to just copy the two updated html and js files and it'll work. References issue #248.

    → <<cset 04a01a24fd26>>

  3. Ed McDonagh reporter

    My production is still on 0.6.0, which won't have all the brilliant changes for unique unit names etc, so it wouldn't be a simple swap. I'll have to do a test install.

  4. David Platten

    Simplified sorting routines: removed need for a separate routine to sort two series by the second one (as is the case for the combined DLP and CTDI plot). References issue #248.

    → <<cset 1969c26f1a6d>>

  5. David Platten

    OK. The frequency sorting isn't broken - it does work. However, the "n=xxx" value displayed in the tooltip isn't updated after the sorting. This needs to be updated. [could the tooltip text be pre-calculated and stored as a property of each data point?].

  6. David Platten

    Did I say they were working? Silly me. The plots were a bit glitchy. I've reworked the sorting method, and now the CT plot of DLP per acquisition works as expected. Need to alter code for other plots too. References issue #248.

    → <<cset e0a211ceaf34>>

  7. David Platten

    New sorting method applied to DLP+CTDI mean and median plot. Will check that these all work OK on a real database copy before changing method for radiographic plots. References issue #248.

    → <<cset d1b6a1709d44>>

  8. David Platten

    New sorting method applied to DLP+CTDI mean and median plot. Will check that these all work OK on a real database copy before changing method for radiographic plots. References issue #248.

    → <<cset d214efb25b21>>

  9. David Platten

    Further changes to chart sorting so that n=xxx works on the drill-down sub-title. Also fixes the links from the drill-down bars to the data. References issue #248.

    → <<cset 7a491f4dacb4>>

  10. David Platten

    Added two user profile fields to enable default chart sorting to be set. All CT charts now take advantage of this. There are now two new items on the chart options: Default chart sorting and Default sorting direction. It may be better if these options are moved to their own view, as they are not routinely needed by the user. References issue #248.

    → <<cset f28ab0a03d2f>>

  11. David Platten

    Added new view to let the user update chart options. This is linked from the User options menu. The options include being able to change the default data sorting on the charts. References issue #248.

    OpenREMuserOptions.jpg

    OpenREMchartOptions.jpg

    → <<cset 36b7c3c563c5>>

  12. David Platten

    This is now working. The user can choose the default chart sorting via the new Chart options under the User options menu. The user can also change the chart sorting interactively using the controls under the chart.

  13. David Platten

    Removed Average to use field from CTChartOptionsForm and DXChartOptionsForm so that it only appears once on the Chart options page, on the GeneralChartOptionsDisplayForm form. References issue #248.

    → <<cset c1dfdd9d7927>>

  14. David Platten

    Setting yAxis[0].isDirty to true fixes the post-sorting glitches on the yAxis that I was seeing on the charts when there are a large number of items (50+) being plotted. Setting this flag forces the redraw event to redraw the yAxis properly. References issue #248.

    → <<cset 01606e749e32>>

  15. Log in to comment