Order charts by frequency
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)
-
-
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/
-
reporter Is it easier to just overlay the frequency as text on or above the bar?
-
Yep, that would be much easier...
-
Sorting by frequency: http://jsfiddle.net/9phfzewj/41/
Should be straightforward to make this work with the real plots. Famous last words.
-
reporter Awesome
-
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>>
-
Updated the demo so that it works when there's two series plotted: http://jsfiddle.net/9phfzewj/44/
-
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.
-
Updated sorting in DX chart - wasn't working properly, now is. References issue
#248.→ <<cset 9d2ca2d3e659>>
-
Updated sorting in CT chart - wasn't working properly, now is. References issue
#248.→ <<cset e63169bfece9>>
-
Improved sorting of chart series. Made some JavaScript generally applicable rather than chart-name specific. References issue
#248.→ <<cset 863ba2127576>>
-
Put JavaScript chart series sorting routines in their own file. Added sorting to the DLP per mean study chart. References issue
#248.→ <<cset a561c6e48c38>>
-
Cosmetic changes: removed some commented-out bits and auto-indented using PyCharm. References issue
#248.→ <<cset ac29d38960ae>>
-
Added sorting options to all single-series CT charts. References issue
#248.→ <<cset 6443d736dd24>>
-
Auto-formatted files using PyCharm. No functional changes. References issue
#248.→ <<cset 6984c2b8abee>>
-
Added sorting options to all dual-series CT charts. Also tidied up some of the JavaScript (sorry Ed). References issue
#248.→ <<cset bb0d535af36c>>
-
Made sorting work for CT plot of mean or median DLP and CTDI. References issue
#248.→ <<cset 2de3abe29018>>
-
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>>
-
Category names were missing in three of the chart JavaScript files, causing problems with sorting. Fixed now. References issue
#248.→ <<cset 1e945c76a432>>
-
Frequency sorting is broken when two or more series are on the plots.
-
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?].
-
Fixed filtering by frequency: moved tooltip text into the data series of the plot. References issue
#248.→ <<cset dac9974f21fd>>
-
All CT charts now sorting correctly. References issue
#248.→ <<cset 5d813f0a29d2>>
-
Added a decimal place to the displayed DLP and CTDI. References issue
#248.→ <<cset 99947ed07b24>>
-
Added sorting to all the radiographic plots. References issue
#248.→ <<cset f00d7886883b>>
-
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>>
-
New sorting method applied to all CT plots except for the DLP+CTDI mean and median plot. References issue
#248.→ <<cset 705bbe0f3758>>
-
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>>
-
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>>
-
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>>
-
Updated sorting on all CT charts. Needs some more testing. References issue
#248.→ <<cset eb22bb75b0b9>>
-
Added 'Sorting options' title to the sorting options below each CT chart. References issue
#248.[note that plot data is fake]
→ <<cset 8e2996b6a1a3>>
-
Added new sorting method to radiographic charts. Needs further testing. References issue
#248.→ <<cset a35e911181fb>>
-
Cleaning up the code formatting. References issue
#248.→ <<cset ce0cfd3b628f>>
-
Series were in wrong order for CTDI sorting to work on the 4-series plot. Fixed now. References issue
#248.→ <<cset 777639f8143e>>
-
Fixed bug in two-series rebuild JavaScript function. References issue
#248.→ <<cset 633b2452fe12>>
-
Fixed bug in four-series rebuild JavaScript function. References issue
#248.→ <<cset 6ee64a165224>>
-
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
andDefault 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>>
-
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.→ <<cset 36b7c3c563c5>>
-
Added user-defined default sorting to the radiographic plots. References issue
#248.→ <<cset 6785e6492067>>
-
- changed status to resolved
This is now working. The user can choose the default chart sorting via the new
Chart options
under theUser options
menu. The user can also change the chart sorting interactively using the controls under the chart. -
@edmcdonagh, I've implemented my latest updates here: http://djp-openremdemo.rhcloud.com/openrem/
-
Removed
Average to use
field fromCTChartOptionsForm
andDXChartOptionsForm
so that it only appears once on theChart options
page, on theGeneralChartOptionsDisplayForm
form. References issue#248.→ <<cset c1dfdd9d7927>>
-
Updated to reflect changes in
CTChartOptionsForm
andDXChartOptionsForm
in previous commit. References issue#248.→ <<cset bc23080aff6b>>
-
Added new style to change cursor to a hand or pointer when hovering over chart sorting links. References issue
#248.→ <<cset 088f1d6377e1>>
-
Setting
yAxis[0].isDirty
totrue
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 theredraw
event to redraw the yAxis properly. References issue#248.→ <<cset 01606e749e32>>
-
reporter - changed milestone to 0.7.0
- Log in to comment
Made a start with this: http://jsfiddle.net/3bDMe/53/ It only sorts by ascending or descending y-value at the moment. Should be possible to change this to sort on another value.