Skip to content

Commit

Permalink
Now SideTitles.interval is working correctly in bottomTitles in the B…
Browse files Browse the repository at this point in the history
…arChart, #648
  • Loading branch information
imaNNeo committed Apr 30, 2021
1 parent 3f00f13 commit d7ef7e2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## newVersion
* **BUGFIX** Fixed bug of lerping FlSpot.nullSpot, #487.
* **BUGFIX** Fixed showing tooltip problem when animating chart, #647.
* **IMPROVEMENT** Now [SideTitles](https://github.com/imaNNeoFighT/fl_chart/blob/master/repo_files/documentations/base_chart.md#SideTitles).`interval` is working correctly in bottomTitles in the BarChart, #648.
* **BREAKING** You should provide `spotsIndices` instead of `showingSpots` in [ShowingTooltipIndicators](https://github.com/imaNNeoFighT/fl_chart/blob/master/repo_files/documentations/line_chart.md#showingtooltipindicators).

## 0.35.0
Expand Down
4 changes: 3 additions & 1 deletion lib/src/chart/bar_chart/bar_chart_painter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,9 @@ class BarChartPainter extends AxisChartPainter<BarChartData> {
// Bottom titles
final bottomTitles = targetData.titlesData.bottomTitles;
if (bottomTitles.showTitles) {
for (var index = 0; index < groupBarsPosition.length; index++) {
final interval = bottomTitles.interval?.toInt() ?? 1;

for (var index = 0; index < groupBarsPosition.length; index += interval) {
final groupBarPos = groupBarsPosition[index];

final xValue = data.barGroups[index].x.toDouble();
Expand Down

0 comments on commit d7ef7e2

Please sign in to comment.