Skip to content

Commit 1d53ff9

Browse files
docs: Refine documentation for clarity and consistency (#2038)
- Improved grammar and clarity in CONTRIBUTING.md, README.md, and various documentation files. - Standardized phrasing for properties in chart data classes across documentation. - Enhanced descriptions for touch handling and tooltip functionalities in scatter, pie, and radar charts. - Corrected minor typographical errors and formatting issues throughout the documentation.
1 parent c83aa90 commit 1d53ff9

13 files changed

Lines changed: 165 additions & 165 deletions

CONTRIBUTING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Contributing
22
Hello, we are glad to have a contributor like you here.
33

4-
Don't forget that `open-source` makes no sense without contributors. No matter how big your changes are, it helps us a lot even it is a line of change.
4+
Don't forget that `open-source` makes no sense without contributors. No matter how big your changes are, it helps us a lot, even if it is just a line of change.
55

66
This file is intended to be a guide for those who are interested in contributing to the FL Chart.
77

8-
#### Below are the people who have contributed to the FL Chart. We hope we have your picture here soon.
8+
#### Below are the people who have contributed to FL Chart. We hope to have your picture here soon.
99
[![](https://opencollective.com/fl_chart/contributors.svg?width=890&button=false)](https://github.com/imaNNeo/fl_chart/graphs/contributors)
1010

1111
## Let's get Started
@@ -50,7 +50,7 @@ It makes draw functions testable.
5050
(made with [draw.io](https://drive.google.com/file/d/1bj-2TqTRUh80dRKJk10drPNeA3fp3EA8/view))
5151

5252
## Keep your branch updated
53-
If your branch falls behind the `main` branch, you can update it using the "Update branch" button on GitHub or by merging `main` into your branch.
53+
If your branch falls behind the `main` branch, you can update it using the "Update branch" button on GitHub or by merging `main` into your branch.
5454

5555
We use **Squash and Merge**, which combines all your PR commits into a single, clean commit in the `main` branch.
5656

@@ -83,7 +83,7 @@ We should write unit tests for our written code. If you are not familiar with un
8383
Our code coverage is calculated by [Codecov](https://app.codecov.io/gh/imaNNeo/fl_chart) (Our coverage is [![codecov](https://codecov.io/gh/imaNNeo/fl_chart/branch/main/graph/badge.svg?token=XBhsIZBbZG)](https://codecov.io/gh/imaNNeo/fl_chart)
8484
at the moment)
8585

86-
When you push something in your PR (after approving your PR by one of us), you see a coverage report which describes how much coverage is increased or decreased by your code (You can check the details to see which part of your code made the change).
86+
When you push something in your PR (after your PR is approved by one of us), you will see a coverage report that describes how much coverage is increased or decreased by your code (You can check the details to see which part of your code made the change).
8787

8888
Please make sure that your code is **not decreasing** the coverage.
8989

repo_files/documentations/bar_chart.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ When you change the chart's state, it animates to the new state internally (usin
1717
### BarChartData
1818
|PropName |Description |default value|
1919
|:---------------|:---------------|:-------|
20-
|barGroups| list of [BarChartGroupData ](#BarChartGroupData) to show the bar lines together, you can provide one item per group to show normal bar chart|[]|
20+
|barGroups| list of [BarChartGroupData](#BarChartGroupData) to show the bar lines together, you can provide one item per group to show a normal bar chart|[]|
2121
|groupsSpace| space between groups, it applies only when the [alignment](#BarChartAlignment) is `BarChartAlignment.start`, `BarChartAlignment.center` or `BarChartAlignment.end`|16|
2222
|alignment| a [BarChartAlignment](#BarChartAlignment) that determines the alignment of the barGroups, inspired by [Flutter MainAxisAlignment](https://docs.flutter.io/flutter/rendering/MainAxisAlignment-class.html)| BarChartAlignment.spaceEvenly|
2323
|titlesData| check the [FlTitlesData](base_chart.md#FlTitlesData)|FlTitlesData()|
@@ -31,16 +31,16 @@ When you change the chart's state, it animates to the new state internally (usin
3131
|minY| gets minimum y of y axis, if null, value will be read from the input barGroups (But it is more performant if you provide them) | null|
3232
|baselineY| defines the baseline of y-axis | 0|
3333
|extraLinesData| allows extra horizontal lines to be drawn on the chart. Vertical lines are ignored when used with BarChartData, please see [#1149](https://github.com/imaNNeo/fl_chart/issues/1149), check [ExtraLinesData](base_chart.md#ExtraLinesData)|ExtraLinesData()|
34-
|rotationQuarterTurns|Rotates the chart 90 degrees (clockwise) in every quarter turns. This feature works like the [RotatedBox](https://api.flutter.dev/flutter/widgets/RotatedBox-class.html) widget. You can have horizontal BarChart by changing this value to |0|
34+
|rotationQuarterTurns|Rotates the chart 90 degrees (clockwise) in every quarter turn. This feature works like the [RotatedBox](https://api.flutter.dev/flutter/widgets/RotatedBox-class.html) widget. You can have a horizontal BarChart by changing this value|0|
3535
|errorIndicatorData|Holds data for representing an error indicator (you see the error indicators if you provide the `toYErrorRange` in the [BarChartRodData](#BarChartRodData))|[ErrorIndicatorData()](base_chart.md#FlErrorIndicatorData)|
3636

3737
### BarChartGroupData
3838
|PropName |Description |default value|
3939
|:---------------|:---------------|:-------|
4040
|x| x position of the group on horizontal axis|null|
41-
|barRods| list of [BarChartRodData](#BarChartRodData) that are a bar line| []
41+
|barRods| list of [BarChartRodData](#BarChartRodData) that are bar lines| []
4242
|barsSpace| the space between barRods of the group|2|
43-
|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 | []|
43+
|showingTooltipIndicators| indices of barRods to show the tooltip on top of them. The point is that you need to disable touches to show these tooltips manually | []|
4444

4545

4646
### BarChartAlignment
@@ -56,10 +56,10 @@ enum values {`start`, `end`, `center`, `spaceEvenly`, `spaceAround`, `spaceBetwe
5656
|gradient| You can use any [Gradient](https://api.flutter.dev/flutter/dart-ui/Gradient-class.html) here. such as [LinearGradient](https://api.flutter.dev/flutter/painting/LinearGradient-class.html) or [RadialGradient](https://api.flutter.dev/flutter/painting/RadialGradient-class.html)|null|
5757
|width|stroke width of the rod bar|8|
5858
|borderRadius|Determines the edge rounding of the bar corners, see [BorderRadius](https://api.flutter.dev/flutter/painting/BorderRadius-class.html). When `null`, it defaults to completely round bars. |null|
59-
|borderDashArray|Determines wether the border stroke is dashed. It is a circular array of dash offsets and lengths. For example, the array `[5, 10]` would result in dashes 5 pixels long followed by blank spaces 10 pixels long. The array `[5, 10, 5]` would result in a 5 pixel dash, a 10 pixel gap, a 5 pixel dash, a 5 pixel gap, a 10 pixel dash, etc.|null|
60-
|borderSide|Determines the border stroke around of the bar, see [BorderSide](https://api.flutter.dev/flutter/painting/BorderSide-class.html). When `null`, it defaults to draw no stroke. |null|
59+
|borderDashArray|Determines whether the border stroke is dashed. It is a circular array of dash offsets and lengths. For example, the array `[5, 10]` would result in dashes 5 pixels long followed by blank spaces 10 pixels long. The array `[5, 10, 5]` would result in a 5 pixel dash, a 10 pixel gap, a 5 pixel dash, a 5 pixel gap, a 10 pixel dash, etc.|null|
60+
|borderSide|Determines the border stroke around the bar, see [BorderSide](https://api.flutter.dev/flutter/painting/BorderSide-class.html). When `null`, it defaults to drawing no stroke. |null|
6161
|backDrawRodData|if provided, draws a rod in the background of the line bar, check the [BackgroundBarChartRodData](#BackgroundBarChartRodData)|null|
62-
|rodStackItem|if you want to have stacked bar chart, provide a list of [BarChartRodStackItem](#BarChartRodStackItem), it will draw over your rod.|[]|
62+
|rodStackItem|if you want to have a stacked bar chart, provide a list of [BarChartRodStackItem](#BarChartRodStackItem), it will draw over your rod.|[]|
6363
|toYErrorRange|If you want to show an error range on the rod, provide [FlErrorRange](base_chart.md#FlErrorRange)|null|
6464
|label|a [BarChartRodLabel](#BarChartRodLabel) to show a text label on the rod|null|
6565

@@ -68,7 +68,7 @@ enum values {`start`, `end`, `center`, `spaceEvenly`, `spaceAround`, `spaceBetwe
6868
|:-------|:----------|:------------|
6969
|fromY|same as [BarChartRodData](#BarChartRodData)'s fromY|0|
7070
|toY|same as [BarChartRodData](#BarChartRodData)'s y|8|
71-
|show|determines to show or hide this section|false|
71+
|show|determines whether to show or hide this section|false|
7272
|color|same as [BarChartRodData](#BarChartRodData)'s colors|[Colors.blueGrey]|
7373
|gradient|same as [BarChartRodData](#BarChartRodData)'s gradient|null|
7474

@@ -97,14 +97,14 @@ Extends [FlLabel](base_chart.md#FlLabel).
9797
### BarTouchData ([read about touch handling](handle_touches.md))
9898
|PropName|Description|default value|
9999
|:-------|:----------|:------------|
100-
|enabled|determines to enable or disable touch behaviors|true|
100+
|enabled|determines whether to enable or disable touch behaviors|true|
101101
|mouseCursorResolver|you can change the mouse cursor based on the provided [FlTouchEvent](https://github.com/imaNNeo/fl_chart/blob/main/repo_files/documentations/base_chart.md#fltouchevent) and [BarTouchResponse](#BarTouchResponse)|MouseCursor.defer|
102-
|touchTooltipData|a [BarTouchTooltipData](#BarTouchTooltipData), that determines how show the tooltip on top of touched spots (appearance of the showing tooltip bubble)|BarTouchTooltipData()|
102+
|touchTooltipData|a [BarTouchTooltipData](#BarTouchTooltipData), that determines how to show the tooltip on top of touched spots (appearance of the showing tooltip bubble)|BarTouchTooltipData()|
103103
|touchExtraThreshold|an [EdgeInsets](https://api.flutter.dev/flutter/painting/EdgeInsets-class.html) class to hold a bounding threshold of touch accuracy|EdgeInsets.all(4)|
104-
|allowTouchBarBackDraw| if sets true, touch works on backdraw bar line| false |
105-
|handleBuiltInTouches| set this true if you want the built in touch handling (show a tooltip bubble and an indicator on touched spots) | true|
104+
|allowTouchBarBackDraw| if set to true, touch works on backdraw bar line| false |
105+
|handleBuiltInTouches| set this to true if you want the built-in touch handling (show a tooltip bubble and an indicator on touched spots) | true|
106106
|touchCallback| listen to this callback to retrieve touch/pointer events and responses, it gives you a [FlTouchEvent](https://github.com/imaNNeo/fl_chart/blob/main/repo_files/documentations/base_chart.md#fltouchevent) and [BarTouchResponse](#BarTouchResponse)| null|
107-
|longPressDuration| allows to customize the duration of the longPress gesture. If null, the duration of the longPressGesture is [kLongPressTimeout](https://api.flutter.dev/flutter/gestures/kLongPressTimeout-constant.html)| null|
107+
|longPressDuration| allows you to customize the duration of the longPress gesture. If null, the duration of the longPressGesture is [kLongPressTimeout](https://api.flutter.dev/flutter/gestures/kLongPressTimeout-constant.html)| null|
108108

109109
### BarTouchTooltipData
110110
|PropName|Description|default value|
@@ -113,10 +113,10 @@ Extends [FlLabel](base_chart.md#FlLabel).
113113
|tooltipBorderRadius|background corner radius of the tooltip bubble|BorderRadius.circular(4)|
114114
|tooltipPadding|padding of the tooltip|EdgeInsets.symmetric(horizontal: 16, vertical: 8)|
115115
|tooltipMargin|margin between the tooltip and the touched spot|16|
116-
|tooltipHorizontalAlignment|horizontal alginment of tooltip relative to the bar|FLHorizontalAlignment.center|
116+
|tooltipHorizontalAlignment|horizontal alignment of tooltip relative to the bar|FLHorizontalAlignment.center|
117117
|tooltipHorizontalOffset|horizontal offset of tooltip|0|
118118
|maxContentWidth|maximum width of the tooltip (if a text row is wider than this, then the text breaks to a new line|120|
119-
|getTooltipItems|a callback that retrieve [BarTooltipItem](#BarTooltipItem) by the given [BarChartGroupData](#BarChartGroupData), groupIndex, [BarChartRodData](#BarChartRodData) and rodIndex |defaultBarTooltipItem|
119+
|getTooltipItems|a callback that retrieves [BarTooltipItem](#BarTooltipItem) by the given [BarChartGroupData](#BarChartGroupData), groupIndex, [BarChartRodData](#BarChartRodData) and rodIndex |defaultBarTooltipItem|
120120
|fitInsideHorizontally| forces tooltip to horizontally shift inside the chart's bounding box| false|
121121
|fitInsideVertically| forces tooltip to vertically shift inside the chart's bounding box| false|
122122
|direction| Controls showing tooltip on top or bottom, default is auto.| auto|
@@ -142,11 +142,11 @@ Extends [FlLabel](base_chart.md#FlLabel).
142142
### BarTouchedSpot
143143
|PropName|Description|default value|
144144
|:-------|:----------|:------------|
145-
|touchedBarGroup|the [BarChartGroupData](#BarChartGroupData) that user touched its rod's spot| null |
145+
|touchedBarGroup|the [BarChartGroupData](#BarChartGroupData) that the user touched its rod's spot| null |
146146
|touchedBarGroupIndex| index of touched barGroup| null|
147-
|touchedRodData|the [BarChartRodData](#BarChartRodData) that user touched its spot|null|
147+
|touchedRodData|the [BarChartRodData](#BarChartRodData) that the user touched its spot|null|
148148
|touchedRodDataIndex| index of touchedRod | null|
149-
|touchedStackItem| [BarChartRodStackItem](#BarChartRodStackItem) is the touched stack (if you have stacked bar chart) |null|
149+
|touchedStackItem| [BarChartRodStackItem](#BarChartRodStackItem) is the touched stack (if you have a stacked bar chart) |null|
150150
|touchedStackItemIndex| index of barChartRodStackItem, -1 if nothing found | -1|
151151

152152

0 commit comments

Comments
 (0)