Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IMP] charts: allow to invert columns/rows #5480

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

anhe-odoo
Copy link
Contributor

Task Description

This task add the possibility for the user to invert the columns and rows of a chart dataset.

Related Task

  • Task: 3693182

@robodoo
Copy link
Collaborator

robodoo commented Jan 14, 2025

Pull request status dashboard

@anhe-odoo anhe-odoo force-pushed the master-chart-add_invert_axes-anhe branch from 73cd6de to fee0aea Compare January 15, 2025 13:27
Task Description

This task add the possibility for the user to invert the columns
 and rows of a chart dataset.

Related Task

Task: 3693182
@anhe-odoo anhe-odoo force-pushed the master-chart-add_invert_axes-anhe branch from fee0aea to 94ec3fb Compare January 15, 2025 14:05
Copy link
Contributor

@hokolomopo hokolomopo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👋

@@ -13,6 +13,15 @@
onSelectionConfirmed="() => this.onDataSeriesConfirmed()"
hasSingleRange="true"
/>
<Section class="'pt-0'">
<Checkbox
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't it be a button rather than a checkbox ? The option definition.switchAxes does nothing at all except give the state of this checkbox if I'm not mistaken. Either this sould be a steteless button that transposes everyhing, either there should be no logic in the panel, and the option definition.switchAxes should have an effect when creating the datastes/runtime.

Here we could 1) activate the checkbox to transpose every column into a row 2) remove all the dataset 3) add the original column datasets. Now we have columns datasets with the option switchAxes enabled, and the checkbox dataSetsHaveTitleLabel with the wrong label

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A button won't be enough as we need some state (and visual indication) to know if we want to treat the data as row or as column. Maybe we can make something to switch the dataset when hitting "confirm" in case the "switch axes" checkbox is checked

Copy link
Contributor

@hokolomopo hokolomopo Jan 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The thing is, we don't treat the data as row when the checkbox is checked. Nothing change in the way we handle the ranges given. AFter clicking the button, we can still add column datasets and mix them with the row dataset. Or delete the rows datasets. Or add rows datasets manually without clicking on the checkobx beforehand. So it's really not a stateful thing ATM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants