Focus on piechart
flowirtz opened this issue · comments
Focus on piechart so that integration test can be done with it
Roadmap
- Create piechart
- design data endpoint
- integrate data endpoint (decided to not do data - rather supply data directly!)
- test piechart
- deploy piechart to customer
- integrate piechart
- document process
Plotly expects the data as follows:
values: [19, 26, 55],
labels: ['Residential', 'Non-Residential', 'Utility'],
Endpoint design
Based on that it would make sense to design the endpoint as such that it delivers the following JSON:
{
"values": [],
"labels": []
}
Whereas values
is an array of numbers and labels
is an array of strings, both being of the same size and the sum over all values
being 100.
Example
{
"values": [
25,
25,
25,
25
],
"labels": [
"Label1",
"Label2",
"Label3",
"Label4"
]
}
@jprberlin please implement as such and get back to us - thanks! 😊
I would prefer a more JSON Style approach.. @rhlff Any thoughts on this?