-
-
Notifications
You must be signed in to change notification settings - Fork 309
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][16.0] mis_builder: allow definition of style expression on subkpi level #623
base: 16.0
Are you sure you want to change the base?
Conversation
Hi @sbidoul, |
f41e35b
to
429706a
Compare
I've add a small fix: when a style expression was defined, it was only used to set style of cell but not style of number (it was ignoring rounding,prefix, etc.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR has the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also add a style on the mis.report.kpi
, for completeness and symmetry with the styling of the kpi?
Or, before doing that can you explain why you chose to do a style expression instead of a style m2o. The latter seems easier to use. |
I suppose that you meant
The style seems 'easier' to use but in my case, it wasn't enough: I want to be able to change my style depending on multiple conditions. Nonetheless, I'll add it for completeness |
Yes. A style on |
It is already implemented on mis-builder/mis_builder/models/mis_report.py Line 106 in bc5b7d1
But indeed, adding it on The main issue is the way it is injected: the style is set at the row level and not the cell level! |
I'm setting this as draft, as I think a more profound refactoring is needed to do this correctly. See #647 |
Description
Solves issue: #614
The goal is to be able to define a style on a cell. Therefore, this PR allows to define a style on a subkpi:
On my row, I will have my cell with
KPI_1
in red and my cell withKPI_2
without any style.Remark
There are now 3 ways to define a style:
Style
on a KPIStyle expression
on a KPIStyle expression
in expressions of a KPIThe sytle defined in [3] has priority over [2] which has priority over [1].