Skip to content

Commit

Permalink
Supporting double and float data
Browse files Browse the repository at this point in the history
  • Loading branch information
danpanaite committed Feb 20, 2022
1 parent 9fa1df1 commit e7a66b9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ class _MyHomePageState extends State<MyHomePage> {
const ticks = [7, 14, 21, 28, 35];
var features = ["AA", "BB", "CC", "DD", "EE", "FF", "GG", "HH"];
var data = [
[10, 20, 28, 5, 16, 15, 17, 6],
[15, 1, 4, 14, 23, 10, 6, 19]
[10.0, 20, 28, 5, 16, 15, 17, 6],
[14.5, 1, 4, 14, 23, 10, 6, 19]
];

features = features.sublist(0, numberOfFeatures.floor());
Expand Down
8 changes: 4 additions & 4 deletions lib/flutter_radar_chart.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const defaultGraphColors = [
class RadarChart extends StatefulWidget {
final List<int> ticks;
final List<String> features;
final List<List<int>> data;
final List<List<num>> data;
final bool reverseAxis;
final TextStyle ticksTextStyle;
final TextStyle featuresTextStyle;
Expand All @@ -42,7 +42,7 @@ class RadarChart extends StatefulWidget {
factory RadarChart.light({
required List<int> ticks,
required List<String> features,
required List<List<int>> data,
required List<List<num>> data,
bool reverseAxis = false,
bool useSides = false,
}) {
Expand All @@ -57,7 +57,7 @@ class RadarChart extends StatefulWidget {
factory RadarChart.dark({
required List<int> ticks,
required List<String> features,
required List<List<int>> data,
required List<List<num>> data,
bool reverseAxis = false,
bool useSides = false,
}) {
Expand Down Expand Up @@ -138,7 +138,7 @@ class _RadarChartState extends State<RadarChart>
class RadarChartPainter extends CustomPainter {
final List<int> ticks;
final List<String> features;
final List<List<int>> data;
final List<List<num>> data;
final bool reverseAxis;
final TextStyle ticksTextStyle;
final TextStyle featuresTextStyle;
Expand Down

0 comments on commit e7a66b9

Please sign in to comment.