Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvement/document #2

Merged
merged 7 commits into from
Jun 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions repo_files/documentations/bar_chart.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ FlChartWidget(
### BarChartData
|PropName |Description |default value|
|:---------------|:---------------|:-------|
|barGroups| list of [BarChartGroupData ](#BarChartGroupData) to showing the bar lines together, you can provide one item per group to show normal bar chart|[]|
|alignment| a [BarChartAlignment](#BarChartAlignment) that determines alignment of the barGroups, inspired from [Flutter MainAxisAlignment](https://docs.flutter.io/flutter/rendering/MainAxisAlignment-class.html)| BarChartAlignment.spaceBetween|
|barGroups| list of [BarChartGroupData ](#BarChartGroupData) to show the bar lines together, you can provide one item per group to show normal bar chart|[]|
|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.spaceBetween|
|titlesData| check the [FlTitlesData](base_chart.md#FlTitlesData)|FlTitlesData()|


### BarChartGroupData
|PropName |Description |default value|
|:---------------|:---------------|:-------|
|x| x position of the group on horizontal axis|null|
|barRods| list of [BarChartRodData](#BarChartRodData) that they are a bar line| []
|barsSpace| space between barRods of the group|2|
|barRods| list of [BarChartRodData](#BarChartRodData) that are a bar line| []
|barsSpace| the space between barRods of the group|2|


### BarChartAlignment
Expand All @@ -37,17 +37,17 @@ enum values {`start`, `end`, `center`, `spaceEvenly`, `spaceAround`, `spaceBetwe
|PropName|Description|default value|
|:-------|:----------|:------------|
|y|endY position of the bar on vertical axis (height of the bar)|null|
|color|color of the bar rod|Colors.blueAccent|
|color|colors the bar rod|Colors.blueAccent|
|width|stroke width of the bar rod|8|
|isRound|determines that the bar lines is round or qubic |true|
|backDrawRodData|if provided, draw a rod on behind, check the [BackgroundBarChartRodData](#BackgroundBarChartRodData)|null|
|backDrawRodData|if provided, draws a rod in the background of the line bar, check the [BackgroundBarChartRodData](#BackgroundBarChartRodData)|null|


### BackgroundBarChartRodData
|PropName|Description|default value|
|:-------|:----------|:------------|
|y|same as [BarChartRodData](#BarChartRodData)'s y|8|
|show|determines show or hide this section|false|
|show|determines to show or hide this section|false|
|color|same as [BarChartRodData](#BarChartRodData)'s color|Colors.blueGrey|

### some samples
Expand Down
44 changes: 22 additions & 22 deletions repo_files/documentations/base_chart.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,25 @@
### FlBorderData
|PropName |Description |default value|
|:---------------|:---------------|:-------|
|show| determines show and hide the border |true|
|border| [Border](https://api.flutter.dev/flutter/painting/Border-class.html) details that determines which borders should draw with what color| Border.all(color: Colors.black, width: 1.0, style: BorderStyle.solid)|
|show| determines to show or hide the border |true|
|border| [Border](https://api.flutter.dev/flutter/painting/Border-class.html) details that determines which border should be drawn with which color| Border.all(color: Colors.black, width: 1.0, style: BorderStyle.solid)|



### FlTitlesData
|PropName |Description |default value|
|:---------------|:---------------|:-------|
|show| determines show and hide the titles Around the chart|true|
|showHorizontalTitles| determines show the horizontal (below) titles | true|
|getHorizontalTitles| a function to retrive the title with given value on the related axis|defaultGetTitle|
|show| determines to show or hide the titles Around the chart|true|
|showHorizontalTitles| determines to show or hide the horizontal (below) titles | true|
|getHorizontalTitles| a function to retrieve the title with given value on the related axis|defaultGetTitle|
|horizontalTitlesReservedHeight| a reserved space to show horizontal titles|22|
|horizontalTitlesTextStyle| [TextStyle](https://api.flutter.dev/flutter/painting/TextStyle-class.html) to determine style of showing horizontal texts |TextStyle(color: Colors.black, fontSize: 11)|
|horizontalTitleMargin| margin of showing horizontal titles | 6|
|showVerticalTitles| determines show the vertical (left) titles | true|
|getVerticalTitles| a function to retrive the title with given value on the related axis | defaultGetTitle|
|horizontalTitlesTextStyle| [TextStyle](https://api.flutter.dev/flutter/painting/TextStyle-class.html) to determine the style of horizontal texts |TextStyle(color: Colors.black, fontSize: 11)|
|horizontalTitleMargin| margin of horizontal titles | 6|
|showVerticalTitles| determines to show or hide the vertical (left) titles | true|
|getVerticalTitles| a function to retrieve the title with given value on the related axis | defaultGetTitle|
|verticalTitlesReservedWidth| a reserved space to show vertical titles|40|
|verticalTitlesTextStyle| [TextStyle](https://api.flutter.dev/flutter/painting/TextStyle-class.html) to determine style of showing vertical texts |TextStyle(color: Colors.black, fontSize: 11)|
|verticalTitleMargin| margin of showing vertical titles | 6|
|verticalTitlesTextStyle| [TextStyle](https://api.flutter.dev/flutter/painting/TextStyle-class.html) to determine the style of vertical texts |TextStyle(color: Colors.black, fontSize: 11)|
|verticalTitleMargin| margin of vertical titles | 6|



Expand All @@ -34,22 +34,22 @@
### FlGridData
|PropName|Description|default value|
|:-------|:----------|:------------|
|show|determines show or hide the background grid data|true|
|drawHorizontalGrid|determines show or hide the horizontal grid lines|false|
|horizontalInterval|interval space of showing grid|1.0|
|horizontalGridColor|color of horizontal grid lines|Colors.grey|
|show|determines to show or hide the background grid data|true|
|drawHorizontalGrid|determines to show or hide the horizontal grid lines|false|
|horizontalInterval|interval space of grid|1.0|
|horizontalGridColor|colors the horizontal grid lines|Colors.grey|
|horizontalGridLineWidth|stroke width of horizontal grid lines |0.5|
|checkToShowHorizontalGrid|a function to check show or hide the horizontal grid by given related axis value |showAllGrids|
|drawVerticalGrid|determines show or hide the vertical grid lines|false|
|verticalInterval|interval space of showing grid|1.0|
|verticalGridColor|color of vertical grid lines|Colors.grey|
|checkToShowHorizontalGrid|a function to check whether to show or hide the horizontal grid by givingv the related axis value |showAllGrids|
|drawVerticalGrid|determines to show or hide the vertical grid lines|false|
|verticalInterval|interval space of grid|1.0|
|verticalGridColor|colors the vertical grid lines|Colors.grey|
|verticalGridLineWidth|stroke width of vertical grid lines |0.5|
|checkToShowVerticalGrid|a function to check show or hide the vertical grid by given related axis value |showAllGrids|
|checkToShowVerticalGrid|a function to determine whether to show or hide the vertical grid by giving the related axis value |showAllGrids|



### FlSpot
|PropName|Description|default value|
|:-------|:----------|:------------|
|x|represent x on the coordinate system (x starts from left)|null|
|y|represent y on the coordinate system (y starts from bottom)|null|
|x|represents x on the coordinate system (x starts from left)|null|
|y|represents y on the coordinate system (y starts from bottom)|null|
40 changes: 20 additions & 20 deletions repo_files/documentations/line_chart.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,48 +16,48 @@ FlChartWidget(
### LineChartData
|PropName |Description |default value|
|:---------------|:---------------|:-------|
|lineBarsData| list of [LineChartBarData ](#LineChartBarData ) to showing the lines chart, they will stack and draw on top of each other|[]|
|lineBarsData| list of [LineChartBarData ](#LineChartBarData ) to show the chart's lines, they stack and be drawn on top of each other|[]|
|titlesData| check the [FlTitlesData](base_chart.md#FlTitlesData)| FlTitlesData()|
|gridData| check the [FlGridData](base_chart.md#FlGridData)|FlGridData()|
|borderData| check the [FlBorderData](base_chart.md#FlBorderData)|FlBorderData()|
|minX| minimum x of showing x axis, if null, value will read from input lineBars |null|
|maxX| maximum x of showing x axis, if null, value will read from input lineBars | null|
|minY| minimum y of showing y axis, if null, value will read from input lineBars | null|
|maxY| maximum y of showing y axis, if null, value will read from input lineBars | null|
|minX| gets minimum x of x axis, if null, value will read from the input lineBars |null|
|maxX| gets maximum x of x axis, if null, value will read from the input lineBars | null|
|minY| gets minimum y of y axis, if null, value will read from the input lineBars | null|
|maxY| gets maximum y of y axis, if null, value will read from the input lineBars | null|


### LineChartBarData
|PropName |Description |default value|
|:---------------|:---------------|:-------|
|show| determines show and hide the bar line|true|
|spots| list of [FlSpot](base_chart.md#FlSpot) x and y coordinates that the line go through it| []
|colors| color of the line, if multiple colors provided gradient will apply|[Colors.redAccent]|
|colorStops| stop positions of the gradient color, [Read More](https://api.flutter.dev/flutter/dart-ui/Gradient/Gradient.linear.html)|null|
|barWidth| stroke width of the line bar|2.0|
|isCurved| curve the line corners on the spots position| false|
|curveSmoothness| smoothness radius of the curve corners (works if isCurved is true) | 0.35|
|isStrokeCapRound| determines if start and end of the bar line is Qubic or Round | false|
|show| determines to show or hide the bar line|true|
|spots| list of [FlSpot](base_chart.md#FlSpot)'s x and y coordinates that the line go through it| []
|colors| colors the line, if multiple colors provided it will be gradient|[Colors.redAccent]|
|colorStops| gets the stop positions of the gradient color, [Read More](https://api.flutter.dev/flutter/dart-ui/Gradient/Gradient.linear.html)|null|
|barWidth| gets the stroke width of the line bar|2.0|
|isCurved| curves the corners of the line on the spot's positions| false|
|curveSmoothness| smoothness radius of the curve corners (works when isCurved is true) | 0.35|
|isStrokeCapRound| determines whether start and end of the bar line is Qubic or Round | false|
|belowBarData| check the [BelowBarData](#BelowBarData) |BelowBarData()|
|dotData| check the [FlDotData](#FlDotData) | FlDotData()|


### BelowBarData
|PropName|Description|default value|
|:-------|:----------|:------------|
|show|determines show or hide the below bar|true|
|colors|color of the belo bar area, if multiple colors provided gradient will apply|[Colors.blueGrey]|
|show|determines to show or hide the below bar|true|
|colors|colors the below bar area, if multiple colors provided it will be gradient|[Colors.blueGrey]|
|gradientFrom|determines start of the gradient, each number should be between 0 and 1, [Read More](https://api.flutter.dev/flutter/dart-ui/Gradient/Gradient.linear.html)|Offset(0, 0)|
|gradientTo|determines end of the gradient, each number should be between 0 and 1, [Read More](https://api.flutter.dev/flutter/dart-ui/Gradient/Gradient.linear.html)|Offset(1, 0)|
|gradientColorStops|stop positions of the gradient color, [Read More](https://api.flutter.dev/flutter/dart-ui/Gradient/Gradient.linear.html)|null|
|gradientColorStops|gets the stop positions of the gradient color, [Read More](https://api.flutter.dev/flutter/dart-ui/Gradient/Gradient.linear.html)|null|


### FlDotData
|PropName|Description|default value|
|:-------|:----------|:------------|
|show|determines show or hide the dots|true|
|dotColor|color of showing dot|Colors.blue|
|show|determines to show or hide the dots|true|
|dotColor|colors the showing dot|Colors.blue|
|dotSize|size of showing dot|4.0|
|checkToShowDot|a function to check show or not show the dot on the given spot|showAllDots|
|checkToShowDot|a function to determine whether to show or hide the dot on the given spot|showAllDots|

### some samples
----
Expand All @@ -78,4 +78,4 @@ FlChartWidget(


##### Sample 5 ([Source Code](/example/lib/line_chart/samples/line_chart_sample5.dart))
<img src="https://github.com/imaNNeoFighT/fl_chart/raw/master/repo_files/images/line_chart/line_chart_sample_5.png" width="300" >
<img src="https://github.com/imaNNeoFighT/fl_chart/raw/master/repo_files/images/line_chart/line_chart_sample_5.png" width="300" >
20 changes: 10 additions & 10 deletions repo_files/documentations/pie_chart.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,24 @@ FlChartWidget(
### PieChartData
|PropName |Description |default value|
|:---------------|:---------------|:-------|
|sections| list of [PieChartSectionData ](#PieChartSectionData) that will show on the pie chart|[]|
|centerSpaceRadius| free space on the middle of PieChart| 80|
|centerSpaceColor| color of the free space on the middle of PieChart|Colors.transparent|
|sectionsSpace| space between of sections (margin of them)|2|
|startDegreeOffset| degree offset of drawing sections around the pie chart, should be between 0 and 360|0|
|borderData| show a border around the chart, check the [FlBorderData](base_chart.md#FlBorderData)|FlBorderData()|
|sections| list of [PieChartSectionData ](#PieChartSectionData) that is shown on the pie chart|[]|
|centerSpaceRadius| free space in the middle of the PieChart| 80|
|centerSpaceColor| colors the free space in the middle of the PieChart|Colors.transparent|
|sectionsSpace| space between the sections (margin of them)|2|
|startDegreeOffset| degree offset of the sections around the pie chart, should be between 0 and 360|0|
|borderData| shows a border around the chart, check the [FlBorderData](base_chart.md#FlBorderData)|FlBorderData()|


### PieChartSectionData
|PropName |Description |default value|
|:---------------|:---------------|:-------|
|value| value is the weight of each section, for example if all values is 25, and we have 4 section, then the sum is 100 and each section takes 1/4 of whole circle (360/4) degree|10|
|color| color of the drawing section| Colors.red
|value| value is the weight of each section, for example if all values is 25, and we have 4 section, then the sum is 100 and each section takes 1/4 of the whole circle (360/4) degree|10|
|color| colors the section| Colors.red
|radius| the width radius of each section|40|
|showTitle| determines to show or hide the titles on each section|true|
|titleStyle| TextStyle of showing titles| TextStyle(color: Colors.white, fontSize: 16, fontWeight: FontWeight.bold)|
|titleStyle| TextStyle of the titles| TextStyle(color: Colors.white, fontSize: 16, fontWeight: FontWeight.bold)|
|title| title of the section| "1"|
|titlePositionPercentageOffset|the place of showing title on the section, this field should be between 0 and 1|0.5|
|titlePositionPercentageOffset|the place of the title in the section, this field should be between 0 and 1|0.5|


### some samples
Expand Down