This is a great tool!! Thank you so much for the hard work.
I am creating a dashboard in Flutter web app with multiple fl_chart widgets. I don't have a lot of real estate to spare. Currently I have four LineCharts and I'm trying to fit in a horizontal BarChart.
So, each bar contains a label that indicates what the data point is. The problem is that the bar is most often not long enough to contain the label. This causes a right overflow error. Is there any way to have the labels overlay the bars themselves and display without an overflow?
I have attached a screenshot of my BarChart. I like how it looks except for the overflow and I would like the values (not the labels) to be right justified.
I have provided the code below. I am just using static data to flesh this out.
DashboardScreen Widget
UsageChartLanguagePair Widget
LanguagePair Model Data
DashboardScreen Widget:
import 'package:project/widgets/usage_chart_language_pair.dart';
import 'package:project/models/language_pair_model.dart';
class DashboardPage extends StatefulWidget
{
const DashboardPage({ Key? key, required this.title }) : super(key: key);
final String title;
@override
State<DashboardPage> createState() => _DashboardPageState();
}
class _DashboardPageState extends State<DashboardPage> with AutomaticKeepAliveClientMixin<DashboardPage>
{
// All the other widgets
// fl_chart: Horizontal BarChart for Language Pairs
Row
(
children: const
[
Text( 'Language Pairs', style: TextStyle ( color: Colors.white, fontSize: 24.0 ), ),
Spacer(),
],
),
const SizedBox( height: kDefaultPadding, ),
...languagePairs.map
(
(e) => UsageCharLanguagePairs
(
percent: e.percent,
percentHighest: e.percentHighest,
languagePair: e.languagePair,
),
),
...
}
This is a great tool!! Thank you so much for the hard work.
I am creating a dashboard in Flutter web app with multiple fl_chart widgets. I don't have a lot of real estate to spare. Currently I have four LineCharts and I'm trying to fit in a horizontal BarChart.
So, each bar contains a label that indicates what the data point is. The problem is that the bar is most often not long enough to contain the label. This causes a right overflow error. Is there any way to have the labels overlay the bars themselves and display without an overflow?
I have attached a screenshot of my BarChart. I like how it looks except for the overflow and I would like the values (not the labels) to be right justified.
I have provided the code below. I am just using static data to flesh this out.
DashboardScreen Widget:
UsageChartLanguagePair Widget
LanguagePair Model Data:
Thanks!
Steve