Hi,
Having a color mapping problem... I put my code up on github (
https://gist.github.com/2141479). This is my first attempt at doing so, so if there's a problem viewing it, please let me know and I'll just put the code in the thread.
I read the documentation and tried to read through threads in the group but couldn't find something that was a straightforward answer.
I started with learning Mike's Bar Chart tutorial and I've been working on my own to build an example that draws bar charts into HTML pages with multiple other HTML layout constructs.
I'm trying to assign different colors to different bars and I think i'm, both, misunderstanding and misusing the color scale categories.
I have an array of values that I pass into the chart drawing function...
var data1 = [4, 8, 15, 16, 23, 42];
function drawBars(barValues, selectString) {....
I then try to map the colors to the values in the data set "barValues"...
var colorScale = d3.scale.category20c()
Later, when I go to apply the fill color, they're all a light orange, which appears to lock onto the quantity of the "barValues" array, which is "6", rather than assigning one color to each bar.
Can someone please take a look and tell me what I'm doing wrong?
Thanks,
Frank