Simplification of chart data processing

Issue #351 resolved
David Platten created an issue

The JavaScript for chart series calculation / series population is very similar for the plots of average dose per study / acquisition protocol / request. It should be possible to reduce the code by writing a function that does the calculations. It may also be possible to simplify the code in views.py too.

Comments (30)

  1. David Platten reporter

    The JavaScript has now been simplified for the CT and radiographic plots. It doesn't look so straight-forward for views.py, but I'll take another look at it.

  2. David Platten reporter

    Updated series labels of average plots so that (mean) or (median) is added to the series labels when plotting both mean and median values. It's so good to be able to update the code in one place and know that all the charts of this type will be up-to-date with the change (thanks, issue #351). References issue #332 and issue #351.

    → <<cset 38b9ffa6aebf>>

  3. David Platten reporter

    The chart JavaScript has been greatly simplified by using a single function to update each type of chart. Updating the code of one of these functions enables all charts of that type to be updated.

  4. David Platten reporter

    Updated series labels of average plots so that (mean) or (median) is added to the series labels when plotting both mean and median values. It's so good to be able to update the code in one place and know that all the charts of this type will be up-to-date with the change (thanks, issue #351). References issue #332 and issue #351.

    → <<cset 38b9ffa6aebf>>

  5. David Platten reporter

    Finishing touches to moving all chart calculations to functions. Every chart of a given type now uses the same function to calculate the required data, whether radiographic or CT. Will help if the routines need changing, or if new charts need to be added. Fixes issue #351.

    → <<cset b6696f8cdaf0>>

  6. David Platten reporter

    Created single JavaScript function to create charts of average vs category. Will be able to use this single function for all charts of this type, meaning that lots of JavaScript files can be removed. To begin with, I've replaced the CTDI and DLP per acquisition protocol with the function. The rest to follow. References issue #351

    → <<cset c6ca92a013ff>>

  7. David Platten reporter

    Replaced all radiographic chart JavaScript files of average vs category with the new function. Amended CT use of the function to include new parameter. References issue #351

    → <<cset 0708eac57670>>

  8. Log in to comment