rcpch / digital-growth-charts-react-component-library

A typescript React library for displaying RCPCH Digital Growth Charts from API data
https://growth.rcpch.ac.uk
MIT License
7 stars 9 forks source link

Measurement points smaller since v7.0.0 #94

Open dmc-cambric opened 1 month ago

dmc-cambric commented 1 month ago

Hi Team,

I've noticed that since upgrading to the latest major version of the charting component the measurement points now appear smaller. I can see there have been a good few other styling changes also, but the measurement points in particular seem rather small, which we think might impact readability.

Would it be possible to increase the default size of these measurement points or otherwise make it customisable in MeasurementStyle?

Ideally would like to do this while still being able to use the predefined themes.

Any advice you have would be much appreciated!

Current instance is using v7.0.4

Chart rendered in v6.1.15: image

Chart rendered in v7.0.4: image

eatyourpeas commented 1 month ago

Very possibly the default may have changed. The points dynamically size when bunched together, but there is a default setting in the styles.

If you are interested in submitting a PR we would be glad to look at it. Or if not I can apply a patch next week?

Thank you again @dmc-cambric - loving all the observations and suggestions you make.

dmc-cambric commented 1 month ago

Thanks man, its a great piece of kit!

mbarton commented 1 month ago

Thanks again for the reports @dmc-cambric, keep them coming! Can I just check the names and NHS numbers in your screenshots are for test data not real people?

GitHub issues on this repo are publically visible

dmc-cambric commented 1 month ago

Yeah, this is all test data @mbarton

Just an FYI @eatyourpeas I won't be able to investigate so appreciate anything you find out!

dmc-cambric commented 1 month ago

Hi Team,

We had a Scottish Morse User Group demonstrating the introduction of the mid-parental + bone age features to our software and the existing users weren't keen on the smaller dots, likely to affect usability.

With the latest fix the measurement points still seem really small, even when spaced out. I think both the minimum size and maximum size might need to be increased for this to be readable, ideally so the points are the same size as in v6.1.15.

The only change in the codebase I could see from the v7 release was to isCrowded.ts - Line 23-25, could be the cause?

Some additional examples:

v7.0.7: image

v6.1.4 image

eatyourpeas commented 1 month ago

Sorry about that @dmc-cambric - there was a definite change in size in storybook when i tried it, but i did not test in the client before releasing.

The isCrowded function determines if the points are close together and makes them smaller if so. The reason for this is, particularly in the neonatal period, babies are sometimes weighed every day and if the points are too big it looks quite ugly. The function sets a default size, which it then reduces if the neighbour is too close.

I am not sure if the bone age 'x's are covered by this function though. I think I left bone ages out of this because you only ever do a bone age once a year, so there should be no really danger of crowding. If it is just the bone age plots that users are unhappy with I can increase the size of those and release a further patch?

dmc-cambric commented 4 weeks ago

The bone age measurements seem fine size-wise, the main concern is the size of the measurement points themselves which still seem smaller than v6. Good to know about the neonatal reasoning btw, makes sense! Although I still think they're very hard to read when they're this small.

We've gathered some feedback regarding this directly from a health board that has clinicians testing the tool, will send you their insights via. email.

I think there might be an additional problem with the scaling, (see above screenshot for v7.0.7 in my last comment), It seems that if any two measurement points are close together it shrinks them and every other measurement point on the chart, even the ones that are very spaced out. (see the leftmost section of the chart for the close-together points).