Comments (8)
I tried iphone 14 simulator
from fl_chart.
I couldn't reproduce it.
Can you please share a reproducible code? (a main.dart file content)
from fl_chart.
your have to add centerSpaceRadius
and increase PieChart size
I changed your sample, here is example
import 'package:fl_chart_app/presentation/resources/app_resources.dart';
import 'package:fl_chart_app/presentation/widgets/indicator.dart';
import 'package:fl_chart/fl_chart.dart';
import 'package:flutter/material.dart';
class PieChartSample1 extends StatefulWidget {
const PieChartSample1({super.key});
@override
State<StatefulWidget> createState() => PieChartSample1State();
}
class PieChartSample1State extends State {
int touchedIndex = -1;
@override
Widget build(BuildContext context) {
return SizedBox(
height: 300,
width: 300,
child: PieChart(
PieChartData(
pieTouchData: PieTouchData(
touchCallback: (FlTouchEvent event, pieTouchResponse) {
setState(() {
if (!event.isInterestedForInteractions ||
pieTouchResponse == null ||
pieTouchResponse.touchedSection == null) {
touchedIndex = -1;
return;
}
touchedIndex = pieTouchResponse
.touchedSection!.touchedSectionIndex;
});
},
),
borderData: FlBorderData(
show: false,
),
sectionsSpace: 0,
centerSpaceRadius: 80,
sections: showingSections(),
),
),
);
}
List<PieChartSectionData> showingSections() {
return [
PieChartSectionData(
color: AppColors.contentColorBlue,
value: 100,
title: '',
radius: 80,
titlePositionPercentageOffset: 0.55,
borderSide: BorderSide(
color: AppColors.contentColorWhite.withOpacity(0)),
)
];
}
}
from fl_chart.
from fl_chart.
I think problem in PieChartPainter
if (sectionDegree == 360) {
_sectionPaint
..color = section.color
..strokeWidth = section.radius
..style = PaintingStyle.stroke;
canvasWrapper.drawCircle(
center,
centerRadius + section.radius / 2,
_sectionPaint,
);
from fl_chart.
Got it!
from fl_chart.
Merged into master
from fl_chart.
Landed in 0.66.0
from fl_chart.
Related Issues (20)
- Draw a order around each sector HOT 1
- Exception: indicatorsData and touchedSpotOffsets size should be same. need help pls. HOT 2
- Ability to set different colors for parts of the line from a line chart HOT 1
- What is best way for make slider change y axis with fl_chart HOT 1
- Side titles are not placed the same way when values are translated
- How to customize LineTooltipItem
- NullSpot's isNull broken when using copyWith HOT 1
- Discrepancy in documentation
- Specify GraphArea height for barChart
- [Feature Request] Ability to replace LineTouchTooltipData widget HOT 5
- Programmatically display the tooltip for a given X value HOT 2
- I need to get offset extraLines of BarChart when touch it HOT 1
- How can I set the bottom title with the date and interval by time? HOT 2
- PieChart centerSpace disapearing HOT 3
- I can't find how to disable linechart's default animation. HOT 2
- Is the interval of SideTitles invalid for BarChart?
- Line Chart tooltip on only certain lines HOT 6
- Thorny LineChart HOT 5
- Is there a provision to change size of FlSpot? HOT 1
- TouchedSpotIndicator duplicates when updating chart
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fl_chart.