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

Added Tooltip border color and width support #917

Closed
wants to merge 45 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
a64bdf3
ci: improve codecov configuration
vincenzopalazzo Jan 16, 2022
3bae7d1
Add SOURCES.md
imaNNeo Jan 22, 2022
d276a81
Improve calculateGroupAndBarsPosition and drawBars deep test
imaNNeo Jan 13, 2022
2b91ea5
Add showTestCoverage function in Makefile
imaNNeo Jan 27, 2022
2ecbae7
Ignore base classes from test coverage
imaNNeo Jan 27, 2022
1f62d2d
Write unit test for drawGrid() of axisChartPainter in line_chart_pain…
imaNNeo Jan 27, 2022
e216369
Write unit test for drawBackground() of axisChartPainter in line_char…
imaNNeo Jan 27, 2022
696cc6c
Write unit test for drawRangeAnnotation() of axisChartPainter in line…
imaNNeo Jan 27, 2022
2c83454
Ignore axis_chart_data and axis_chart from test coverage (because the…
imaNNeo Jan 27, 2022
98dd64d
Ignore bar, line, pie, radar, scatter data classes from test coverage
imaNNeo Jan 27, 2022
b839ebb
Implement unit test for chart renderers
imaNNeo Jan 27, 2022
7ff1f68
Write unit test for canvas_wrapper in canvas_wrapper_test.dart
imaNNeo Jan 27, 2022
dcdf6e3
Write unit test for calculateRotationOffset
imaNNeo Jan 27, 2022
a84c94e
Improve renderers unit test
imaNNeo Jan 27, 2022
65b6d1b
write some lerp unit tests
imaNNeo Jan 27, 2022
ca2540a
Write bar_chart_extensions unit tests
imaNNeo Jan 27, 2022
4d270fb
Fix PieChart changing sections issue (we have disabled semantics for …
imaNNeo Jan 28, 2022
4c91920
Fix LineChart width smaller width or height lower than 40, #869, #857.
imaNNeo Jan 28, 2022
332e1f1
Allow to show titles when axis diff is zero, #842, #879
imaNNeo Jan 29, 2022
e4567d3
Update SOURCES.md
imaNNeo Jan 29, 2022
d98202d
Correct main.dart function
imaNNeo Jan 29, 2022
a0825af
Improve iteration over axis values logic (it solves some minor proble…
imaNNeo Jan 29, 2022
db42e76
Update SOURCES.md
imaNNeo Jan 31, 2022
668b4d2
Update SOURCES.md
imaNNeo Jan 31, 2022
4917dc4
Make sample app compatible with Flutter 2.10
imaNNeo Feb 4, 2022
26c3f23
Update README.md
imaNNeo Feb 5, 2022
10867bf
Remove branch before fetching in checkoutToPR makefile command
imaNNeo Feb 9, 2022
20b417f
Fix makefile `checkoutToPR` problem
imaNNeo Feb 10, 2022
f395487
Implement `clipData` feature in scatter chart. (#898)
prajwal27 Feb 11, 2022
16100e9
Fix lineChart clipData issue with border, #898 (#901)
imaNNeo Feb 11, 2022
52b0faa
Add custom distance function and order spots in LineTouchResponse
joeldomke Feb 10, 2022
445c032
Add documentation and make small fix
joeldomke Feb 11, 2022
19091b9
Fix getBestInitialIntervalValue() problem with values above or below …
imaNNeo Feb 11, 2022
21df887
Bump version to 0.45.0
imaNNeo Feb 11, 2022
7d1f83d
Update mockito, and build_runner dependencies.
imaNNeo Feb 11, 2022
f50800c
Add .pubignore file to ignore tests, repo_files, example and other th…
imaNNeo Feb 11, 2022
566277f
Remove .pubignore :/
imaNNeo Feb 11, 2022
f049571
Add `vector_math` in dev_dependencies to solve the `dependency` error…
imaNNeo Feb 11, 2022
e3ea89f
Revert publish action to 1.3.1
imaNNeo Feb 12, 2022
eab937b
Update CHANGELOG.md
imaNNeo Feb 12, 2022
42f89ea
Update README.md
imaNNeo Feb 16, 2022
a3e2e39
Set interval 1 for line_chart_sample2 grid lines
imaNNeo Feb 18, 2022
cc3462a
Set interval 1 for line_chart_sample5 bottom titles
imaNNeo Feb 18, 2022
94e186c
Fix `FlSpot.nullSpot` at the first of list bug, #912.
imaNNeo Feb 23, 2022
f566516
Added Tooltip border color and width support
fpplm Feb 23, 2022
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
7 changes: 7 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
comment:
require_changes: true
# Ignore all the file inside the example and
# end eventually also the autogenerate file
ignore:
- '**/example/'
- '**/*.g.dart'
16 changes: 15 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
## newVersion
* **BUGFIX** Fix `FlSpot.nullSpot` at the first of list bug, #912.
* **FEATURE** Add `tooltipBorderColor` and `tooltipBorderWidth` property in the [LineTouchTooltipData], [BarTouchTooltipData], [ScatterTouchTooltipData], #692.

## 0.45.0
* **BUGFIX** Fix `clipData` implementation in ScatterChart and LineChart, #897.
* **BUGFIX** Fix PieChart changing sections issue (we have disabled semantics for pieChart badgeWidgets), #861.
* **BUGFIX** Fix LineChart width smaller width or height lower than 40, #869, #857.
* **BUGFIX** Allow to show title when axis diff is zero, #842, #879.
* **IMPROVEMENT** Improve iteration over axis values logic (it solves some minor problems on showing titles when min, max values are below than 1.0).
* **IMPROVEMENT** Add `baselineX` and `baselineY` property in our axis-based charts, It fixes a problem about `interval` which mentioned in #893 (check [this sample](https://github.com/imaNNeoFighT/fl_chart/blob/master/repo_files/documentations/line_chart.md#gist---baselinex-baseliney-sample-source-code).
* **IMPROVEMENT** Added `distanceCalculator` to `LineTouchData` which is used to calculate the distance between spots and touch events, #716, #261, #892
* **BREAKING** `LineTouchResponse` response now contains a list of `TouchLineBarSpot` instead of `LineBarSpot`. They are ordered based on their distance to the touch event and also contain that distance.

## 0.41.0
* **BUGFIX** Fix getNearestTouchedSpot. Previously it returned the first occurrence of a spot within the threshold, and not the nearest, #641, #645.
* **FEATURE** Add `textAlign` property in the [SideTitles](https://github.com/imaNNeoFighT/fl_chart/blob/master/repo_files/documentations/base_chart.md#sidetitles), #784.
Expand Down Expand Up @@ -371,4 +385,4 @@ LineTouchData(
* restricted to access private classes of the library


## 0.0.1 - Released on (2019 June 4)
## 0.0.1 - Released on (2019 June 4)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this line is changed?

7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ runTests:
flutter test

checkoutToPR:
git fetch origin pull/$(id)/head:pr-$(id); \
git fetch origin pull/$(id)/head:pr-$(id) --force; \
git checkout pr-$(id)

# Tells you in which version this commit has landed
Expand All @@ -28,3 +28,8 @@ sure:
# To create generated files (for example mock files in unit_tests)
codeGen:
flutter pub run build_runner build --delete-conflicting-outputs

showTestCoverage:
@flutter test --coverage
@genhtml coverage/lcov.info -o coverage/html
@google-chrome coverage/html/index.html
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
💥 A library to draw fantastic charts in Flutter 💥

💥 FL Chart is a highly customizable Flutter chart library that supports Line Chart, Bar Chart, Pie Chart, Scatter Chart, and Radar Chart. 💥

[![pub package](https://img.shields.io/pub/v/fl_chart.svg)](https://pub.dartlang.org/packages/fl_chart)
[![codecov](https://codecov.io/gh/imaNNeoFighT/fl_chart/branch/master/graph/badge.svg?token=XBhsIZBbZG)](https://codecov.io/gh/imaNNeoFighT/fl_chart)
<a href="https://github.com/Solido/awesome-flutter#charts"><img src="https://img.shields.io/badge/awesome-flutter-blue.svg?longCache=true" alt="Awesome Flutter"></a>
[![APK](https://img.shields.io/badge/APK-Demo-brightgreen.svg)](https://github.com/imaNNeoFighT/fl_chart/raw/master/repo_files/fl_chart_samples_0.3.0.apk)
<a href="https://pub.dev/packages/fl_chart"><img alt="GitHub Repo stars" src="https://img.shields.io/github/stars/imaNNeoFighT/fl_chart"></a>
<a href="https://github.com/imaNNeoFighT/fl_chart/graphs/contributors"><img alt="GitHub contributors" src="https://img.shields.io/github/contributors/imaNNeoFighT/fl_chart"></a>
<a href="https://github.com/imaNNeoFighT/fl_chart/issues?q=is%3Aissue+is%3Aclosed"><img src="https://img.shields.io/github/issues-closed-raw/imaNNeoFighT/fl_chart" alt="GitHub closed issues"></a>
<span class="badge-buymeacoffee">
<a href="https://www.buymeacoffee.com/fl_chart" title="Donate to this project using Buy Me A Coffee"><img src="https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg" alt="Buy Me A Coffee donate button" /></a>
</span>
Expand Down Expand Up @@ -42,7 +43,7 @@ Thank you all!

```yml
dependencies:
fl_chart: ^0.41.0
fl_chart: ^0.45.0
```


Expand Down
74 changes: 74 additions & 0 deletions SOURCES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
### Sources to learn more about the fl_chart:

All sources are sorted by date.

Did you find any new article or source? please contribute to have them all here.

#### Blog post:
<!--- 2021-11-18 --->
* [Flutter4Fun UI Challenge 7](https://flutter4fun.com/ui-challenge-7/)

<!--- 2020-01-03 --->
* [Stock charts](https://dev.to/kamilpowalowski/stock-charts-with-flchart-library-1gd2)

#### Video:

<!--- 2021-12-04 --->
* [Portfolio Dashboard Flutter UI Desktop & Web](https://www.youtube.com/watch?v=H9vXUine7Zo)

<!--- 2021-07-28 --->
* [Responsive Admin Dashboard or Panel using Flutter - Flutter Web UI - Part 1](https://www.youtube.com/watch?v=MRiZpwdy1CM)

<!--- 2021-07-27 --->
* [Admin Panel Dashboard - Flutter Responsive UI Design](https://www.youtube.com/watch?v=n7O3pXfENPU)

<!--- 2021-07-13 --->
* [How to build Flutter UI - 3 Steps](https://www.youtube.com/watch?v=I0NBtFS_ibc)

<!--- 2021-06-28 --->
* [Flutter Web - Dashboard Website Template (Responsive)](https://www.youtube.com/watch?v=3SMdJE_dSxU)

<!--- 2021-04-26 --->
* [How to create charts in Flutter](https://www.youtube.com/watch?v=JBJ6o4blgPA)

<!--- 2021-01-11 --->
* [Flutter Charts 📊📈](https://www.youtube.com/watch?v=ibkcwCv9Lyw)

<!--- 2020-10-27 --->
* [Flutter Library for Customizable](https://www.youtube.com/watch?v=1pjAItIDNz8)

<!--- 2020-10-26 --->
* [Pie Chart - FLChart](https://www.youtube.com/watch?v=rZx_isqXrhg&t=77s)

<!--- 2020-10-20 --->
* [Flutter Tutorial - Bar Chart](https://www.youtube.com/watch?v=7wUmzYOPQ8w)

<!--- 2020-09-15 --->
* [wallet-app-ui-piechart](https://www.youtube.com/watch?v=M4w-dighmMU)

<!--- 2020-08-15 --->
* [Flutter UI Tutorial - Fitness App](https://www.youtube.com/watch?v=hTg4DDl8Ixo)

<!--- 2020-08-09 --->
* [Gradient Chart](https://www.youtube.com/watch?v=OR2DMRnEXkA)

<!--- 2020-08-08 --->
* [Flutter charts tutorial for beginners](https://www.youtube.com/watch?v=nCmihMrWS38)

<!--- 2020-08-09 --->
* [The easy way with fl-Chart](https://www.youtube.com/watch?v=R_vpnW5QZEw)

<!--- 2020-06-24 --->
* [Get the data form COVID-19 API](https://www.youtube.com/watch?v=QXMWzbdGDkA)

<!--- 2020-06-01 --->
* [Flutter COVID-19 Dashboard UI](https://www.youtube.com/watch?v=krU-ASLb8lM)

<!--- 2020-05-08 --->
* [Flutter UI](https://www.youtube.com/watch?v=axWBN1aotQk)

<!--- 2020-04-24 --->
* [Flutter](https://www.youtube.com/watch?v=rwHFslLo6ho)

<!--- 2019-09-04 --->
* [Setup Pie Charts](https://www.youtube.com/watch?v=zRZiJdbp3_E)
5 changes: 4 additions & 1 deletion analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,7 @@ analyzer:
exclude:
- "**.mocks.dart"
errors:
prefer_initializing_formals: ignore
prefer_initializing_formals: ignore
# allow self-reference to deprecated members (we do this because otherwise we have
# to annotate every member in every test, assert, etc, when we deprecate something)
deprecated_member_use_from_same_package: ignore
2 changes: 1 addition & 1 deletion example/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
additional functionality it is fine to subclass or reimplement
FlutterApplication and put your custom class here. -->
<application
android:name="io.flutter.app.FlutterApplication"
android:name="${applicationName}"
android:label="FL Chart"
android:icon="@mipmap/ic_launcher">
<activity
Expand Down
4 changes: 2 additions & 2 deletions example/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
buildscript {
ext.kotlin_version = '1.3.50'
ext.kotlin_version = '1.6.10'
repositories {
google()
jcenter()
}

dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
classpath 'com.android.tools.build:gradle:4.0.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
Expand Down
2 changes: 1 addition & 1 deletion example/android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.6.1-all.zip
4 changes: 4 additions & 0 deletions example/lib/line_chart/samples/line_chart_sample2.dart
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ class _LineChartSample2State extends State<LineChartSample2> {
gridData: FlGridData(
show: true,
drawVerticalLine: true,
horizontalInterval: 1,
verticalInterval: 1,
getDrawingHorizontalLine: (value) {
return FlLine(
color: const Color(0xff37434d),
Expand Down Expand Up @@ -166,6 +168,8 @@ class _LineChartSample2State extends State<LineChartSample2> {
gridData: FlGridData(
show: true,
drawHorizontalLine: true,
verticalInterval: 1,
horizontalInterval: 1,
getDrawingVerticalLine: (value) {
return FlLine(
color: const Color(0xff37434d),
Expand Down
1 change: 1 addition & 0 deletions example/lib/line_chart/samples/line_chart_sample5.dart
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ class LineChartSample5 extends StatelessWidget {
showTitles: false,
),
bottomTitles: SideTitles(
interval: 1,
showTitles: true,
getTitles: (val) {
switch (val.toInt()) {
Expand Down
Loading