This is the sample data:
var data = [
{row: 0, col: 0, value: [{x: 1, y: 19}, {x: 2, y: 20}]},
{row: 0, col: 1, value: [{x: 1, y: 24}, {x: 2, y: 27}]},
{row: 1, col: 1, value: [{x: 1, y: 31}, {x: 2, y: 26}]},
{row: 1, col: 2, value: [{x: 1, y: 29}, {x: 2, y: 19}]},
]
I cannot figure out a way of defining x-domain.
var x1 = d3.scale.ordinal()
.domain(data.map(function(d) { return d.value.x; }))
.rangeRoundBands([0, chartW], 0.1);
This bit gives error:
.domain(data.map(function(d) { return d.value.x; }))
How can I iterate through the inner array of values object ??
Thanks in advance !