robbiewain / theopenbudget

d3.js budget data visualization
theopenbudget.org
20 stars 13 forks source link

Question: How are the pie-wedge colours decided? #5

Open emdeex opened 8 years ago

emdeex commented 8 years ago

Hi Guys,

I've got this code working OK now with a new datasource.. but all my 'pie' is the same colour 'rgb(0,68,27)'.

I've got different 'Portfolios' names, which I thought should do the color coding.

Any help appreciated

hot-toddy commented 8 years ago

Did you ever work this out? I'm in the same boat

hot-toddy commented 8 years ago

Aha, the colours are set in main.js according to how much the values changed from the previous year (or maybe the next year, I haven't looked that closely yet). I'm guessing you did the same as me and put the same values in for all years, which results in everything being grey. I'm a total js noob, but if I can work out some alternate code to colour things according to their absolute size then I'll let you know.

boboyang commented 7 years ago

Hi, As hot-toddy said, the colours are set in main.js according to how much the values changed from the previous year. however, it also has something to do with the Gruntfile.js. Not sure about what kind of dataset are you trying. In my case, after modified the year set in the Gruntfile.js, the problem was solved.