Hi guys,

I have the following array which looks something like this:

Code:
[  {
    "year": 2016,
    "weeks": [
      {
        "week": 12,
        "hours": 10,
        "availableHours": 50
      },
      {
        "week": 13,
        "hours": 7,
        "availableHours:": 43
      }
    ]
  },
  {
    "year": 2017,
    "weeks": [
      {
        "week": 2,
        "hours": 10,
        "availableHours": 33
      },
      {
        "week": 3,
        "hours": 5,
        "availableHours": 28
      }
    ]
  }
]
I create it in my controller from serveral server responses.
And now I want to display it in a area chart / burn down chart.

At the end I want something like this:

BurnDownChart.PNG

This was just hard coded data for the chart.

So multiple problems here.

1) How do I bind the array (do I have to encode it to JSON?) to the chart? With any kind of store?

2)I want the "availableHours" on the x-axis and the week of the year on the y-axis "reversed" as you can see in the example but without the negative numbers, of course.


Thanks in advance,
Phil