Open SubashManian opened 4 years ago
try return a another value for domainFn
Hi!
We ran into the same issue, our return value for the domain function was the same as the return value for the measure function.
If we have two parts of the pie that have the same value, their domain is no longer unique. So this makes sense.
Changing the return value for the domain function to the index (second parameter, '_' in the example) was enough to fix this issue for us.
Notice that this is actually not a bug in charts_flutter, but just a misuse of the library.
we are passing same Linear sales value with different color. but it not showing the both the values with different color. in this below code. i send the value of
new LinearSales(10,Colors.blue), new LinearSales(10,Colors.yellow), but it shows only the blue color in pie chart another color(yellow) is missing.
static List<charts.Series<dynamic, int>> _createSampleData(List data) {
print(data);
var chartList = [
new LinearSales(50,Colors.red),
new LinearSales(35,Colors.green),
new LinearSales(10,Colors.blue),
new LinearSales(10,Colors.yellow),
new LinearSales(25,Colors.grey),
];
}