Questions tagged [fl-chart]

fl-chart is a powerful Flutter chart library, currently supporting Line Chart, Bar Chart and Pie Chart.

FL Chart is a library to draw charts in Flutter.

It's used to create Line Charts, Bar Charts, Pie Charts, Scatter Charts and many more.

Here you can find examples on GitHub.

95 questions
1
vote
1 answer

Using fl_chart how can we add a now line?

Having this chart, how can I add the red line (now)? This is what I have so far: LineChartData( maxY: maxY + 10 * _onePercentRange, minY: minY - 10 * _onePercentRange, titlesData: FlTitlesData( bottomTitles: SideTitles( showTitles:…
Erick Lanford Xenes
  • 1,467
  • 2
  • 20
  • 34
1
vote
0 answers

How to add a secondary axis in fl_chart?

I am strongly considering migrating the charts that I built in charts_flutter to fl_chart to support null safety, however I can't find in the documentation if it is possible to handle a secondary axis within a chart, which is possible in…
David L
  • 1,134
  • 7
  • 35
1
vote
0 answers

Flutter fl_chart: Is there a way to insert a slider or manage the tap from outside the graph?

Is there a way to insert a slider or manage the tap from outside the graph? Something like this: Or is there a way to make the LineTouchData always visible (even before tapping on the graph)?
antocone89
  • 11
  • 1
1
vote
0 answers

Confused about how to work around fl graphs and provider

I'm trying to create an app where there is a button, and when a user clicks on that button, that day's timestamp is recorded and is uploaded in firestore. And then I fetch the data from there and update a fl chart widget. This is how I get the data…
1
vote
2 answers

#fl_chart Unable to customize tooltip label

I am currently using fl_chart package. https://pub.dev/packages/fl_chart Overview: I am plotting two line graphs simultaneously to represent two distinct trends(ex: Income vs expense). Assume that the information involved in this are of type…
Ahmad Haziq
  • 91
  • 1
  • 9
1
vote
1 answer

Is there any way to give gradient color to normal color property in flutter?

I am using Bar Chart of fl_chart plugin. I want to give gradient color to bar graph. Below is the line where I want give color. BarChartRodData(y: 12, color: Color(0xFF639ed1),width: 12) But it is not possible to set gradient color to the ##color##…
1
vote
2 answers

How to reverse Line chart with fl_chart with Flutter

I tried to sort list order by mileage(Km). It was successful. Of cause chart is same direction. (20 -> 7 -> 13) But I would like to reverse line chart.(13 -> 7 -> 20) order by date. So I wrote following code. LineChartBarData( spots:…
tajihiro
  • 2,293
  • 7
  • 39
  • 60
1
vote
1 answer

Unable to fill spots array in fl_charts

I am working with fl_charts in flutter and can't seem to fill in the spots array with continuous data. My data is continuously coming from Firebase's Realtime Database and I tried to set the state of an array equal to elements of type FlSpot as seen…
frlzjosh
  • 410
  • 5
  • 17
0
votes
0 answers

Troubleshooting Fl_chart Package: Incorrect Line Chart Data with YYYYMM Format

I am attempting to create a line chart representing the monthly sales data for a given year using the Fl_chart package. One issue I'm encountering is that when I provide the x-axis data in the format [202209, 202210, 202301] (in yyyymm format), the…
Ajith
  • 343
  • 2
  • 23
0
votes
0 answers

drag the points of the curve to change the shape of the curve in flutter

I'm building a flutter application that includes line charts, and it would be good to have the user be able to drag and drop points to have it update. Would such a thing be possible? And if so is there any example of such a thing being…
0
votes
0 answers

How to disable the initial connection line to the last point in flutter web?

In Flutter Web, I have written the following code to draw a chart, which is used from the fl_chart: ^0.62.0 package. : LineChart( LineChartData( lineTouchData: touchSpotChart(), …
MhmdRza
  • 1
  • 1
0
votes
0 answers

How to drag and drop two existing points to form a new line in Flutter chart?

I have a line chart with existing points, now I want user can connect 2 points to draw a line. Example like in image expected output I'm using syncfusion library. With it, I've manage to draw a new line by tapping on 2 points separately. Example…
0
votes
0 answers

Flutter. Axis values in a realtime fl_chart

Flutter with fl_chart: How can I dynamically set up the values shown in X and Y axis for a chart which is refreshed in realtime? (I have tried to use AxisTitles and bottomTitleWidgets. No luck) Details: My flutter application shows a fl_chart which…
dummyhead
  • 81
  • 2
  • 9
0
votes
0 answers

How to add tooltip in fl chart flutter

I am using fl chart but I want when user hover on the chart a tooltip should be displayed where value of that bar should be displayed. How can I do this? Here is my code barTouchData: BarTouchData( touchTooltipData:…
0
votes
0 answers

Using fl_chart. Combining 3 charts in 1

In my app i am reading some values from a local Json and displaying them in 3 different charts. I would like instead having only one chart and displaying on it everything. How i structure my code at this moment i do not see how i could accomplish…
Carlos Costa
  • 123
  • 3
  • 11