pixelToPoint method

PointInfo pixelToPoint(
  1. Offset position
)

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 FunnelSeriesController seriesController;
SfFunnelChart(
   onChartTouchInteractionDown: (ChartTouchInteractionArgs args) {
    PointInfo<double> chartPoint = seriesController.pixelToPoint(args.position);
    Offset value = seriesController.pointToPixel(chartPoint);
  },
    series: FunnelSeries<ChartSampleData, String>(
        dataSource: funnelData,
        onRendererCreated: (FunnelSeriesController funnelSeriesController) {
          seriesController = FunnelSeriesController;
        }
    )
);

Implementation

PointInfo<dynamic> pixelToPoint(Offset position) {
  return pyramidFunnelPixelToPoint(position, seriesRenderer);
}