amcharts5
amcharts5 copied to clipboard
Grouper's `groupProperties` for am-charts v5
Question
What's the equivalent for groupProperties
used by slice grouper in am-charts v4 for v5?
The documentation doesn't seem to be mention it and it's undefined in the grouper's object. I've tried using adapter but without any luck. Is there someway to adjust the other's slice's properties?
Thank you for your time
Environment (if applicable)
- amCharts: v.5.1.14
- Edge: v.101.0.1210.47
- React: v.16.14.0,
There's currently no equivalent. We might implement it in the future.
If that's the case. Is there a way to change the other's slice color? I am setting the chart's colors using something similar to:
chart.get("colors")
.set("colors", () => ...)
which is coloring the slices correctly when not using grouping, but the grouping slice is not obeying the theme's colors
Well, the "Other" slice will take the next color from colors
after the last slice.
Another option would be to use an adapter:
series.slices.template.adapters.add("fill", function(color, target) {
return target.dataItem == grouper.getPrivate("groupDataItem") ? am5.color(0x00ff00) : color;
});
https://codepen.io/team/amcharts/pen/wvyqVGx?editors=0010
Thanks!