jkasperbl opened a new issue #16626:
URL: https://github.com/apache/echarts/issues/16626
### What problem does this feature solve?
I'm not sure if this feature already exists or not -- I've tried searching
in the documentation but it's possible I'm not using the correct terms.
Consider for example a pie chart listing the number of visits to a website for
each country. Typically, you'd see most of the traffic from a small number of
countries and then a bunch with very small numbers. What I'd like to do is
combine the small values, perhaps which fall below a defined percentage value
into an "Other" wedge.
Similarly, displaying this date in a line chart currently results in the
countries with tiny amounts of traffic essentially overlapping with the x-axis.
It would be nice to have the ability to group those outliers into an "Other"
line or hide them based on that same threshold (both options could be useful).
If there is functionality that can handle this already, I would greatly
appreciate being pointed in the correct direction.
### What does the proposed API look like?
This is just a dummy example, but notice the `outlierGrouping` property as a
potential configuration option.
```
const countries = [
{ country: 'United States': visitors: 1000 },
{ country: 'Canada': visitors: 750 }
...
{ country: 'Monaco': visitors: 3 }
];
pieChartData = {
dataset: [
{
source: countries
}
],
series: [
{
type: 'pie',
name: 'Traffic'
label: {
show: true
},
dimensions: [
{
type: 'ordinal',
name: 'country'
},
{
type: 'int',
name: 'traffic'
}
],
outlierGrouping: {
threshold: '10%',
name: 'Other'
}
}
],
tooltip: {
trigger: 'item'
},
grid: {
left: 20,
right: 20,
top: 20,
bottom: 20
}
};
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]