Recently revisited this issue:
Using a value of `2147483648` in the chartData array produces a blank vertical line (a grey vertical line whilst the chart is actually being drawn that changes to black)
This is great for my data as I'm able to show missing values from the graph. Gaps are extremely important for understanding blood glucose levels and how they're changing.
Whilst the chartData draws a chart that ranges from the minimum to the maximum value in the chartData array, this large number doesn't seem to impact the scaling and seems to be ignored when calculating the minimum/maximum scale
Please don't fix this, unless you're planning to support a "don't draw this value" in the array (like false, NaN, null)
This is back to what I need to correctly display by blood glucose values.
Tested 2024-08-25 on an old Time and a Time 2022
"chartData": [ 160, 140, 120, 100, 2147483648, 100, 120, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100 ]
Chris Pitchford
Hi all,
Background:
I wrote an app some time ago to pull data from nightscout for Diabetes blood glucose monitoring.
I'm using a sparkling to draw a graph of blood sugar levels over the last 3 hours.
ChartData and negative numbers
The blood glucose levels aren't always available. Sometimes there are gaps in the data.
I previously included negative numbers in my chartData to show gaps:
It seemed that there was a feature of the sparkline. negative numbers were rendered as a full height grey bar, without a white pixel at the top:
Here's an example of how this missing data was rendered (note no white pixel in column 5)
I released an update to the app a few days ago, and although the data feed has not changed, the way the graph is rendered has changed:
Now, negative numbers are represented as a white pixel:
This makes the graph harder to understand, I can't tell if my blood sugar level is low or if there is a missing entry on the graph.
What would help
Restoring negative numbers being rendered as grey bars (without the white pixel at the top)
It would be awesome if there was a chordate entry I could add that asked the LaMetic to avoid drawing a column:
So that it might be shown as :
2 people like this idea