@@ -12,13 +12,43 @@ class InteractiveChart extends StatefulWidget {
1212 final List <CandleData > candles;
1313 final ChartStyle style;
1414
15+ /// How the date/time label at the bottom are displayed.
16+ ///
17+ /// If null, it defaults to use yyyy-mm format if more than 20 data points
18+ /// are visible in the current chart window, otherwise it uses mm-dd format.
1519 final TimeLabelGetter ? timeLabel;
20+
21+ /// How the price labels on the right are displayed.
22+ ///
23+ /// If null, it defaults to show 2 digits after the decimal point.
1624 final PriceLabelGetter ? priceLabel;
25+
26+ /// How the overlay info are displayed, when user touches the chart.
27+ ///
28+ /// If null, it defaults to display `date` , `open` , `high` , `low` , `close`
29+ /// and `volume` fields when user selects a data point in the chart.
30+ ///
31+ /// To customize it, pass in a function that returns a Map<String,String>:
32+ /// ```dart
33+ /// return {
34+ /// "Date": "Customized date string goes here",
35+ /// "Open": candle.open?.toStringAsFixed(2) ?? "-",
36+ /// "Close": candle.close?.toStringAsFixed(2) ?? "-",
37+ /// };
38+ /// ```
1739 final OverlayInfoGetter ? overlayInfo;
1840
1941 const InteractiveChart ({
2042 Key ? key,
43+
44+ /// The full list of [CandleData] to be used for this chart.
45+ ///
46+ /// It needs to have at least 3 data points. If data is sufficiently large,
47+ /// the chart will default to display the most recent 90 data points when
48+ /// first opened, and allow user to freely zoom and pan however they like.
2149 required this .candles,
50+
51+ /// If non-null, the style to use for this chart.
2252 ChartStyle ? style,
2353 this .timeLabel,
2454 this .priceLabel,
0 commit comments