mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[XY axis] Fixes bug on bar charts preventing unstacked mode (#90602)
This commit is contained in:
parent
e3f672926e
commit
847d57b3e1
1 changed files with 1 additions and 7 deletions
|
@ -98,10 +98,6 @@ const shouldEnableHistogramMode = (
|
|||
);
|
||||
});
|
||||
|
||||
if (bars.length === 1) {
|
||||
return true;
|
||||
}
|
||||
|
||||
const groupIds = [
|
||||
...bars.reduce<Set<string>>((acc, { valueAxis: groupId, mode }) => {
|
||||
acc.add(groupId);
|
||||
|
@ -113,11 +109,9 @@ const shouldEnableHistogramMode = (
|
|||
return false;
|
||||
}
|
||||
|
||||
const test = bars.every(({ valueAxis: groupId, mode }) => {
|
||||
return bars.every(({ valueAxis: groupId, mode }) => {
|
||||
const yAxisScale = yAxes.find(({ groupId: axisGroupId }) => axisGroupId === groupId)?.scale;
|
||||
|
||||
return mode === 'stacked' || yAxisScale?.mode === 'percentage';
|
||||
});
|
||||
|
||||
return test;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue