pixelToPoint method
Converts logical pixel value to the data point value.
The pixelToPoint method takes logical pixel value as input and returns a chart data point.
late PyramidSeriesController pyramidSeriesController;
SfPyramidChart(
onChartTouchInteractionDown: (ChartTouchInteractionArgs args) {
ChartPoint<double> chartPoint = seriesController.pixelToPoint(args.position);
Offset value = seriesController.pointToPixel(chartPoint);
},
series: PyramidSeries<ChartSampleData, String>(
onRendererCreated: (PyramidSeriesController seriesController) {
pyramidSeriesController = seriesController;
}
),
);
Implementation
PointInfo<dynamic> pixelToPoint(Offset position) {
return pyramidFunnelPixelToPoint(position, seriesRenderer);
}