You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,11 @@
1
1
# Contributing
2
2
Hello, we are glad to have a contributor like you here.
3
3
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.
5
5
6
6
This file is intended to be a guide for those who are interested in contributing to the FL Chart.
7
7
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.
@@ -50,7 +50,7 @@ It makes draw functions testable.
50
50
(made with [draw.io](https://drive.google.com/file/d/1bj-2TqTRUh80dRKJk10drPNeA3fp3EA8/view))
51
51
52
52
## 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.
54
54
55
55
We use **Squash and Merge**, which combines all your PR commits into a single, clean commit in the `main` branch.
56
56
@@ -83,7 +83,7 @@ We should write unit tests for our written code. If you are not familiar with un
83
83
Our code coverage is calculated by [Codecov](https://app.codecov.io/gh/imaNNeo/fl_chart) (Our coverage is [](https://codecov.io/gh/imaNNeo/fl_chart)
84
84
at the moment)
85
85
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).
87
87
88
88
Please make sure that your code is **not decreasing** the coverage.
Copy file name to clipboardExpand all lines: repo_files/documentations/bar_chart.md
+18-18Lines changed: 18 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ When you change the chart's state, it animates to the new state internally (usin
17
17
### BarChartData
18
18
|PropName |Description |default value|
19
19
|:---------------|:---------------|:-------|
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|[]|
21
21
|groupsSpace| space between groups, it applies only when the [alignment](#BarChartAlignment) is `BarChartAlignment.start`, `BarChartAlignment.center` or `BarChartAlignment.end`|16|
22
22
|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|
23
23
|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
31
31
|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|
32
32
|baselineY| defines the baseline of y-axis | 0|
33
33
|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|
35
35
|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)|
36
36
37
37
### BarChartGroupData
38
38
|PropName |Description |default value|
39
39
|:---------------|:---------------|:-------|
40
40
|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| []
42
42
|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 |[]|
|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|
57
57
|width|stroke width of the rod bar|8|
58
58
|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|
61
61
|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.|[]|
63
63
|toYErrorRange|If you want to show an error range on the rod, provide [FlErrorRange](base_chart.md#FlErrorRange)|null|
64
64
|label|a [BarChartRodLabel](#BarChartRodLabel) to show a text label on the rod|null|
### BarTouchData ([read about touch handling](handle_touches.md))
98
98
|PropName|Description|default value|
99
99
|:-------|:----------|:------------|
100
-
|enabled|determines to enable or disable touch behaviors|true|
100
+
|enabled|determines whether to enable or disable touch behaviors|true|
101
101
|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()|
103
103
|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 builtin 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|
106
106
|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|
|tooltipBorderRadius|background corner radius of the tooltip bubble|BorderRadius.circular(4)|
114
114
|tooltipPadding|padding of the tooltip|EdgeInsets.symmetric(horizontal: 16, vertical: 8)|
115
115
|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|
117
117
|tooltipHorizontalOffset|horizontal offset of tooltip|0|
118
118
|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|
120
120
|fitInsideHorizontally| forces tooltip to horizontally shift inside the chart's bounding box| false|
121
121
|fitInsideVertically| forces tooltip to vertically shift inside the chart's bounding box| false|
122
122
|direction| Controls showing tooltip on top or bottom, default is auto.| auto|
0 commit comments