Open
Description
If I create the following component:
import {XYPlot, VerticalRectSeries, XAxis} from 'react-vis'
storiesOf('VerticalRectSeries', module)
.add('broken draw coordinates', () => {
const data = [
{x0: 0, x: 0.25, y0: 0, y: 10},
{x0: 0.25, x: 0.5, y0: 0, y: 114},
{x0: 0.5, x: 0.75, y0: 0, y: 26},
{x0: 0.75, x: 1, y0: 0, y: 0}
]
return (
<XYPlot xType="ordinal" width={300} height={300} xDistance={100}>
<XAxis />
<VerticalRectSeries data={data} opacity={0.5} />
</XYPlot>
)
})
I get:
As you can see the first two recangles are rendered out of place: the first begins where the second one should, while the second one is twice the width it should be.
I thought the zero values were perhaps throwing it - but it actually doesn't matter what value you give x0
for the first datapoint - it always renders the same way.