openHPI / m.e.i.n.e.l

Modern, Extensible and Interactive Number Exploration Library (or short: m.e.i.n.e.l)

Home Page:https://openhpi.github.io/m.e.i.n.e.l/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Focus on piechart

flowirtz opened this issue · comments

commented

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
commented

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?

commented

working so far, on hold till responsive
see #15

commented

@Langleu will make it responsive.