Unable to display bar chart with one data point
VerticalBarSeries displays nothing when there is only a single item to plot. For example, data={[ { x: 1532647158000, y: 5 } ]}. Please see: https://codesandbox.io/s/509j7w48j4. I believe this was previously reported in #484 but it was closed. d3 handles a single data point by dividing the x-axis into thirds and plotting a single bar in the middle third, which seems reasonable to me.
I made a quick workaround: https://codesandbox.io/s/9jjlk2jw4o in case it's useful as a starting point.
I've tried to reproduce this issue and it only seems like it appears when xType is set to time? Is this the specific case you are trying to address? If you set xType="ordinal" i believe that youll get your desired functionality.
Thanks, that works too. Yes, I'm working specifically with a time scale. But as you point out, with a vertical bar series I don't have to use a time scale.
I would argue that even further, it maybe doesn't make sense to used a vertical bar series (and not a vertical rect series) as vertical distance is encoding time, but bar series uses it in a categorical way. Unless you have strenuous objection I'm going to close this.