onRenderDetailsUpdate property

ChartTrendlineRenderCallback? onRenderDetailsUpdate
final

Callback which gets called while rendering the trendline.

Widget build(BuildContext context) {
  return SfCartesianChart(
    series: <CartesianSeries<ChartData,String>>[
      LineSeries<ChartData,String>(
        trendlines: <TrendLine>[
          onRenderDetailsUpdate: (TrendlineRenderParams args) {
            print('Slope value: ' + args.slope[0]);
            print('r-squared value: ' + args.rSquaredValue);
            print('Intercept value (x): ' + args.intercept);
          }
        ]
      )
    ]
  );
}

Implementation

final ChartTrendlineRenderCallback? onRenderDetailsUpdate;