[FIX] web: stacked bar is properly displayed
Stacked bar does not support the stacked option in the y axes. This option was introduced in the stacked line generalization and was set to False if the user is in the bar mode. closes odoo/odoo#97410 Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
This commit is contained in:
@@ -439,7 +439,7 @@ export class GraphRenderer extends Component {
|
||||
suggestedMax: 0,
|
||||
suggestedMin: 0,
|
||||
},
|
||||
stacked: mode === "line" && stacked,
|
||||
stacked: mode === "line" && stacked ? stacked : undefined,
|
||||
};
|
||||
return { xAxes: [xAxe], yAxes: [yAxe] };
|
||||
}
|
||||
|
||||
@@ -916,9 +916,9 @@ QUnit.module("Views", (hooks) => {
|
||||
"graph should be a classic line chart."
|
||||
);
|
||||
assert.strictEqual(
|
||||
getScaleY(graph).every((y) => y.stacked),
|
||||
false,
|
||||
"The y axes should have stacked property set to false"
|
||||
getScaleY(graph).every((y) => y.stacked == undefined),
|
||||
true,
|
||||
"The y axes should have stacked property set to undefined"
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user