In my Flutter app I have some 0 values in my radar chart, the problem is that values aren't placed in the center of the chart. Is there a way to do it? This is a sample code using fl_chart ^0.65.0:
RadarChart(
RadarChartData(
dataSets: [
RadarDataSet(
dataEntries: [
RadarEntry(value: 0),
RadarEntry(value: 1),
RadarEntry(value: 2),
],
),
],
),
)
UPDATE The only solution find out is to update package to that version: fl_chart: ^0.70.2, in which has been added the parameter isMinValueAtCenter to RadarChartData
In my Flutter app I have some 0 values in my radar chart, the problem is that values aren't placed in the center of the chart. Is there a way to do it? This is a sample code using fl_chart ^0.65.0:
RadarChart(
RadarChartData(
dataSets: [
RadarDataSet(
dataEntries: [
RadarEntry(value: 0),
RadarEntry(value: 1),
RadarEntry(value: 2),
],
),
],
),
)
UPDATE The only solution find out is to update package to that version: fl_chart: ^0.70.2, in which has been added the parameter isMinValueAtCenter to RadarChartData
Share Improve this question edited yesterday Paolo Luchini asked 2 days ago Paolo LuchiniPaolo Luchini 1112 silver badges8 bronze badges1 Answer
Reset to default 0Try setting minimum tickCount
and manually define the getTitle
of RadarChartData, also I would suggest to give entryRadius
value as 0 which will help values to stay aligned.
for your give code you are having currently 3 values so set the tickCount value as 3 and try giving getTitle as empty string which removes label if it is unnecessary as shown in code. Hope this helps
RadarChart(
RadarChartData(
tickCount: 3,
getTitle: (index, angle) => '',
dataSets: [
RadarDataSet(
borderColor: Colors.blue,
entryRadius: 0,
dataEntries: [
RadarEntry(value: 0),
RadarEntry(value: 1),
RadarEntry(value: 2),
],
),
],
),
);