Closed ThomUK closed 1 year ago
I would think this is an issue with plotthedots and I am wondering if this might be related:
https://github.com/nhs-r-community/NHSRplotthedots/blob/main/R/ptd_spc.R#L126:L127
Even if you feed ptd_spc()
integers, they will get converted to doubles.
You're right that plotthedots could handle this better if integer types were passed in. I'll raise an issue there before this is closed.
This package also knows the intended unit explicitly from the measure_config, so it may be worth handling specifically here too.
The "wide" format of the incoming data might be problematic if mixing integer and doubles and then letting plotthedots implicitly apply the right y axis (although they're both numeric, so there may be a way around that).
Investigated at length some time ago. There is no simple way to ensure the y axis gets at least two integer labels, as well as expands to cover the control limits appropriately. Closing as wontfix for now. Happy to accept PRs if anyone can find a way of handling the y axis scaling issues.
Currently, some measures with integer units render a y axis similar to this: