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>[
          Trendline(
            onRenderDetailsUpdate: (TrendlineRenderParams args) {
              print('Slope value: ' + args.slope![0].toString());
              print('r-squared value: ' + args.rSquaredValue.toString());
              print('Intercept value (x): ' + args.intercept.toString());
            }
          )
        ]
      )
    ]
  );
}

Implementation

final ChartTrendlineRenderCallback? onRenderDetailsUpdate;