Example of first item that is needed:
I’m wanting to use the speedometer chart with data values that could be set by applying some logic on the JSON side to existing data that would come from a Sharepoint list. Can you help with this logic?
For example, we would get the following values from a Sharepoint list:
minValue: 60
target lower range: 70
target higher range: 80
value: 75
datasets: [
data: [70, 80, 90], // the 90 is calc’d based on distance from 70-80, so +10 in this case
value: 75, // if this was 58 from Sharepoint it would need to set to 60)
minValue: 60,
backgroundColor: [‘#DD554B’, ‘#999’, ‘#40B694’],
borderWidth: 1,
We have two values that need to be calculated:
1) The 3rd value in the array (in this case "90" shown above) which would be a value that is set based on the first two values. It’s a value that balances the speedometer visually like this with equal red, gray, and green sections.
2) the ‘value’ IF lower than the ‘minValue’ should set itself to the ‘minValue’ so speedometer stays in screen view at the base horizontal 0%
Posted On: August 14, 2024 19:24 UTC
Category: Full Stack Development
Skills:JSON, Microsoft SharePoint
Powered by WPeMatico