imaNNeo / fl_chart

FL Chart is a highly customizable Flutter chart library that supports Line Chart, Bar Chart, Pie Chart, Scatter Chart, and Radar Chart.
https://flchart.dev
MIT License
6.86k stars 1.78k forks source link

StepLineChart won't draw a single point line segment or area fill, but will show the point dot #1599

Open IanMcCarthy opened 8 months ago

IanMcCarthy commented 8 months ago

I know a StepLineChart is a specific type of line chart, and for ordinary line charts I understand why you can't draw a single point line segment (because it has to come from or go to the next point).

But for the StepLineChart, the line is self referencing and of a fixed width.

Seems like it should be doable.

I only ask, because I actually have a requirement for such a chart, and I think it would be easier than trying to stack a bar chart over the other traces on my existing (StepLineChart) chart.

IanMcCarthy commented 8 months ago

Sorry, didn't make this clear in original post, but I'm looking at this when the underlying data contains FlSpot.nullSpot.

The width of each line segment can still be determined from the number of points (as a whole) in the dataset, but a single valid value (nullSpot either side) doesn't draw the horizontal line portion, or the under line fill, although you can display the spot in the centre of the (not drawn) line.

imaNNeo commented 7 months ago

Hi there, can you please provide a reproducible code and maybe a screenshot from the issue that you're talking about? Thanks!