Skip to content

Commit

Permalink
Improve the showingTooltipIndicators documentation to mention that yo…
Browse files Browse the repository at this point in the history
…u have to disable the default touch behavior, #1613
  • Loading branch information
imaNNeo committed May 1, 2024
1 parent ef72300 commit 8c5848d
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 3 deletions.
3 changes: 3 additions & 0 deletions lib/src/chart/bar_chart/bar_chart_data.dart
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,9 @@ class BarChartGroupData with EquatableMixin {
/// you can show some tooltipIndicators (a popup with an information)
/// on top of each [BarChartRodData] using [showingTooltipIndicators],
/// just put indices you want to show it on top of them.
///
/// An important point is that you have to disable the default touch behaviour
/// to show the tooltip manually, see [BarTouchData.handleBuiltInTouches].
final List<int> showingTooltipIndicators;

/// width of the group (sum of all [BarChartRodData]'s width and spaces)
Expand Down
3 changes: 3 additions & 0 deletions lib/src/chart/line_chart/line_chart_data.dart
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ class LineChartData extends AxisChartData with EquatableMixin {
/// You can show some tooltipIndicators (a popup with an information)
/// on top of each [LineChartBarData.spots] using [showingTooltipIndicators],
/// just put line indicator number and spots indices you want to show it on top of them.
///
/// An important point is that you have to disable the default touch behaviour
/// to show the tooltip manually, see [LineTouchData.handleBuiltInTouches].
final List<ShowingTooltipIndicators> showingTooltipIndicators;

/// Lerps a [BaseChartData] based on [t] value, check [Tween.lerp].
Expand Down
8 changes: 8 additions & 0 deletions lib/src/chart/scatter_chart/scatter_chart_data.dart
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,15 @@ class ScatterChartData extends AxisChartData with EquatableMixin {
);
final List<ScatterSpot> scatterSpots;
final ScatterTouchData scatterTouchData;

/// you can show some tooltipIndicators (a popup with an information)
/// on top of each [ScatterSpot] using [showingTooltipIndicators],
/// just put indices you want to show it on top of them.
///
/// An important point is that you have to disable the default touch behaviour
/// to show the tooltip manually, see [ScatterTouchData.handleBuiltInTouches].
final List<int> showingTooltipIndicators;

final ScatterLabelSettings scatterLabelSettings;

/// Lerps a [ScatterChartData] based on [t] value, check [Tween.lerp].
Expand Down
2 changes: 1 addition & 1 deletion repo_files/documentations/bar_chart.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ When you change the chart's state, it animates to the new state internally (usin
|x| x position of the group on horizontal axis|null|
|barRods| list of [BarChartRodData](#BarChartRodData) that are a bar line| []
|barsSpace| the space between barRods of the group|2|
|showingTooltipIndicators| indexes of barRods to show the tooltip on top of them | []|
|showingTooltipIndicators| indexes of barRods to show the tooltip on top of them, The point is that you need to disable touches to show these tooltips manually | []|


### BarChartAlignment
Expand Down
2 changes: 1 addition & 1 deletion repo_files/documentations/line_chart.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ When you change the chart's state, it animates to the new state internally (usin
|extraLinesData| [ExtraLinesData](base_chart.md#ExtraLinesData) object to hold drawing details of extra horizontal and vertical lines. Check [ExtraLinesData](base_chart.md#ExtraLinesData)|ExtraLinesData()|
|lineTouchData| [LineTouchData](#linetouchdata-read-about-touch-handling) holds the touch interactivity details| LineTouchData()|
|rangeAnnotations| show range annotations behind the chart, check [RangeAnnotations](base_chart.md#RangeAnnotations) | RangeAnnotations()|
|showingTooltipIndicators| show the tooltip based on provided list of [LineBarSpot](#LineBarSpot)| [] |
|showingTooltipIndicators| show the tooltip based on provided list of [LineBarSpot](#LineBarSpot), The point is that you need to disable touches to show these tooltips manually| [] |
|gridData| check the [FlGridData](base_chart.md#FlGridData)|FlGridData()|
|borderData| check the [FlBorderData](base_chart.md#FlBorderData)|FlBorderData()|
|minX| gets minimum x of x axis, if null, value will read from the input lineBars |null|
Expand Down
2 changes: 1 addition & 1 deletion repo_files/documentations/scatter_chart.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ When you change the chart's state, it animates to the new state internally (usin
|titlesData| check the [FlTitlesData](base_chart.md#FlTitlesData)| FlTitlesData()|
|axisTitleData| check the [FlAxisTitleData](base_chart.md#FlAxisTitleData)| FlAxisTitleData()|
|scatterTouchData| [ScatterTouchData](#scattertouchdata-read-about-touch-handling) holds the touch interactivity details| ScatterTouchData()|
|showingTooltipIndicators| indices of showing tooltip|[]|
|showingTooltipIndicators| indices of showing tooltip, The point is that you need to disable touches to show these tooltips manually|[]|



Expand Down

0 comments on commit 8c5848d

Please sign in to comment.