Hi Team,
I’m a Premium licensed user.
We have customized the format(left text alignment) and assigned to slice rows.
We are in need to apply slice rows with customized format for both views(flat/compact).
Please refer the following JSFiddle for further clarification.
https://jsfiddle.net/a159oktp/
Hello, Ravi,
Thank you for writing to us.
We have modified the JSFiddle example so that the left text alignment is applied for both views(flat/compact):
We changed this:
{
"name": "",
...
"textAlign": "right"
}
to this:
{
"name": "",
...
"textAlign": "left"
}
Please let us know if this works for your case.
We are looking forward to hearing from you.
Best Regards,
Vera
Hi Vera,
We are in need of two types of formats as follows:
We have tried already as you mentioned, it's not worked as expected.
Please refer the following JSFiddle for further clarification.
https://jsfiddle.net/qme45yr7/11/
Note: In JSFiddle, we use dimensionDefaultFormat as Dimension format and assigned in slice rows.
Can you let us know any other way to get customized dimension format for both views(flat/compact) of slice rows?
Regards,
Ravi
Hello, Ravi,
Thank you for your reply and for providing more details.
It helped us a lot to understand your case better.
We would like to point out that formatting can be applied only to measures.
In your case, the specified format is not applied because Column is defined in rows, not in measures and this is why the output for flat and compact/classic forms is different: in compact/classic form by default fields specified in rows are aligned left, whereas in the flat form they are aligned to the right.
For this reason, as a workaround, we kindly suggest specifying the fields you would like to apply the dimensionDefaultFormat
to in measures as well, for example:
measures: [
{
"uniqueName": "Column",
"aggregation": "sum",
"grandTotalCaption": "Column",
"active": false,
"format": "dimensionDefaultFormat"
}
]
By setting the active
property to false, the Column won't be displayed in measures, but the format will be applied, hence, the desired output will be achieved.
Here is a JSFiddle example for illustration.
Please let us know if this approach works for you.
Best Regards,
Vera