Popular a chart with Angular 1.x

0

Good night guys,

I have a problem that I can not resolve. I need to populate any graph using data returned from an API.

I'm using c3chart (if anyone knows).

I have the following data structure:

{
 cidade: 'Rio de Janeiro',
 data: [
  {mes: 01, valorMedio: '19.221'},
  {mes: 02, valorMedio: '18.221'},
  {mes: 03, valorMedio: '19.221'},
  .....
 ]
}

As you can see, I have objects like this that have the name of the city and an array containing information of all the months of the year with the average temperature of it.

When the information contains multiple rows only, I can give an ng-repeat and popular graph, but this data contains an array inside and I can not populate any graph with this structure, someone knows an efficient way to do this with Angular 1.x?

    
asked by anonymous 25.07.2018 / 03:34

0 answers