render() {
var tabl = this.state.data;
return (
<div>
<Table responsive striped bordered condensed hover>
<thead>
<tr>
<th>#</th>
<th>Name</th>
<th>Quantity</th>
</tr>
</thead>
<tbody>
{
tabl.map( function(item,index)
{
return(
<tr key={index}>
<th>{1+index}</th>
<th>{item.name}</th>
<th>{item.number}</th>
</tr>
)
}
)
}
</tbody>
</Table>
.style("fill", function (d) { return colors(d[0].number) })
.attr("width", xScale.rangeBand()-2 )
.attr("height", function (d) { return yScale(d[0].number) })
.attr("x", function (d, i) { return xScale(i) })//Так и оставить?
.attr("y", height)
Error: Invalid value for attribute height="NaN"
Error: Invalid value for attribute y="NaN"
dataType: 'json',
data: {
format: 'json'
},