react-d3-components
react-d3-components copied to clipboard
I want to pass xscale value to Bar Chart, how to achieve that!
I want to pass xscale value to Bar Chart, how to achieve that! I am trying to create stacked Bar Chart My X-scale values are date and I want to escape few value to be shown.
I am passing data as below data : [ { label: 'Test', values: [{x: new Date(2019, 2, 5,9,10), y: 1 }, {x: new Date(2019, 2, 5,9,20), y: 5}, {x: new Date(2019, 2, 5,9,30), y: 1}] }, { label: 'Test1', values: [{x: new Date(2019, 2, 5,9,10), y: 6}, {x: new Date(2019, 2, 5,9,20), y: 4}, {x: new Date(2019, 2, 5,9,30), y: 2}] } ] and getting error "TypeError: xScale.rangeBand is not a function" My xscale is xScale: d3.time.scale().domain([new Date(2019,2,5,9,0), new Date(2019,2,5,14,0)]).range([0, 400 - 70]),