Datafable / rolling-blackout-belgium

Rolling blackout plan in Belgium
http://datafable.github.io/rolling-blackout-belgium/viz/
Other
18 stars 12 forks source link

I want an array with the data to show in the table #26

Closed peterdesmet closed 9 years ago

peterdesmet commented 9 years ago

See this line

Instead of named fields, I'd rather have an array, for two reasons:

  1. I can loop over the elements of the array and create: <tr> + data + </tr>.
  2. I can do an if function to replace 0 with - which reads easier in the table.
  3. I can do an if function to add % if the value is not 0.

Can you add the code to do so?

Note: I have already changed a big part of the rest of that function. Will commit soon.

peterdesmet commented 9 years ago

I'd also like to wrap the whole call for district data in a separate function. It is cleaner than having it in the drawMap I think.