Using react-vis 1.11.7, when I render a VerticalBarSeries on a time-based x-axis and the data only has one datapoint I get the error Received NaN for thexattribute. If this is expected, cast the value to a string.
When the data has more than one datapoint everything works alright.
Example:
const chart = props => {
const timestamp = new Date('May 23 2017').getTime();
const ONE_DAY = 86400000;
const data = [
{x: timestamp, y: 1}, // when there is only one datapoint the chart errors
// {x: timestamp + ONE_DAY, y: 1}, // when this is uncommented the chart renders normally
];
return (
<XYPlot
height={300}
width={350}
xType="time"
>
<XAxis />
<YAxis />
<VerticalBarSeries
data={data}
/>
</XYPlot>
);
};
Having same problem.
Most helpful comment
Having same problem.