admin管理员组文章数量:1289879
How to make the radar have stripped and the dot like that ive try to make it like that instead of this
here is the radar chart code :
Column(
children: [
SizedBox(height: 20),
Text("Radar Chart", style: TextStyle(fontSize: 20, fontWeight: FontWeight.bold)),
SizedBox(height: 20),
Container(
height: 300,
child: RadarChart(
RadarChartData(
radarBackgroundColor: Colors.transparent,
borderData: FlBorderData(show: false),
tickCount: 4,
ticksTextStyle: TextStyle(color: Colors.grey, fontSize: 10),
tickBorderData: BorderSide(color: Colors.grey, width: 1),
gridBorderData: BorderSide(color: Colors.grey.withOpacity(0.5), width: 1),
radarShape: RadarShape.polygon,
titlePositionPercentageOffset: 0.15,
getTitle: (index, angle) {
const titles = ["Operation", "Reporting", "Compliance", "Strategic"];
return RadarChartTitle(
text: titles[index],
angle: angle,
);
},
dataSets: [
RadarDataSet(
fillColor: Colors.lightBlue.withOpacity(0.4),
borderColor: Colors.lightBlue,
borderWidth: 2,
entryRadius: 5,
dataEntries: [
RadarEntry(value: 5),
RadarEntry(value: 3),
RadarEntry(value: 4),
RadarEntry(value: 1),
],
),
],
radarTouchData: RadarTouchData(enabled: false),
),
),
),
],
),
for the _buildLabel
Widget _buildLabel(String text, Color color, String value) {
return Row(
children: [
Container(
padding: EdgeInsets.symmetric(horizontal: 8, vertical: 4),
decoration: BoxDecoration(
color: color,
borderRadius: BorderRadius.circular(8),
),
child: Row(
children: [
CircleAvatar(radius: 10, backgroundColor: Colors.white, child: Text(value, style: TextStyle(fontSize: 10, fontWeight: FontWeight.bold))),
SizedBox(width: 5),
Text(text, style: TextStyle(color: Colors.white, fontSize: 12)),
],
),
),
SizedBox(width: 10),
],
);
}
I'm using fl_chart: ^0.68.0
and flutter_radar_chart: ^0.2.1
本文标签: How to add stripped radar chart in flutter and add dot at the peak of the datapointStack Overflow
版权声明:本文标题:How to add stripped radar chart in flutter and add dot at the peak of the datapoint? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741445731a2379187.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论