I have this bar where the x axis represents time and each bar represents an hour, the y axis represents an integer, how can I align the bars in such a way that they span across each hour and how can I create this tooltip where it shows the list of individuals associated in that hour and the tooltip size is bigger than the container which has the sfcartesianchart?
It would be really helpful if you can provide the flutter code.
Thanks,
Waiting for you response.
Then can we use flutter overlay to create this, if yes then how can we determine the position of each column? Please help.
Can we get the absolute width of the columns?
|
SfCartesianChart(
series: <ColumnSeries<ChartData, int>>[
ColumnSeries<ChartData, int>(
// Other required properties
onCreateRenderer: (ChartSeries<ChartData, int> series) {
return _CustomColumnSeriesRenderer(
series as ColumnSeries<ChartData, int>);
}),
],
)
class _CustomColumnSeriesRenderer extends ColumnSeriesRenderer {
_CustomColumnSeriesRenderer(this.series);
final ColumnSeries<ChartData, int> series;
@override
ChartSegment createSegment() {
return _ColumnCustomPainter(series);
}
}
class _ColumnCustomPainter extends ColumnSegment {
_ColumnCustomPainter(this.series);
// Get the width by accessing series.width
final ColumnSeries<ChartData, int> series;
@override
// Get the column segment top, bottom, left, and right
RRect get segmentRect => super.segmentRect;
} |
Thank you for the help. :)