Despite the COVID-19 outbreak, our team continues operating at full speed. We are always here to support and answer all your questions.

Feel free to reach out by filling this quick form.

Fill the form
Get Free Trial

Column Header Caption customization

Answered
Sumukh asked on October 8, 2019

Hi,
1. I need to change the title of the column headers of all fields in the value section.
Ex: Total Sum of Revenue or Total Max of Date
I need to remove the “Total” or if possible keep just the field name Revenue or Date.
Is it possible to customize it?
 
2. Also need to know the functionality of Calculate Individual Value Checkbox inside Calculated Values Section.

5 answers

Public
Vera Didenko Vera Didenko Flexmonster October 9, 2019

Hello, Sumukh,
 
Thank you for your questions.

Please see our answers below.
 
1) About column header customization:
1.1) Flexmonster provides an option to hide aggregation labels like “Total Sum of”, “Sum of”, etc. in the column/row titles.
This can be done by setting the showAggregationLabels parameter to false (see: https://www.flexmonster.com/api/options-object/ ), for example:

options: {
showAggregationLabels: false
}

Here is a JSFiddle example for illustration: https://jsfiddle.net/flexmonster/Lsp1hcz4/
 
 
1.2) If you wish to customize the column labels, you can specify the desired ones via localization (please see: https://www.flexmonster.com/doc/localizing-component/ ), for example:

global: {
localization: {
aggregations: {
sum: {
caption: "My Sum",
totalCaption: "{0} - My Sum",
grandTotalCaption: "{0} - My Sum Total"
},
count: {
caption: "My Count",
totalCaption: "{0} - My Count",
grandTotalCaption: "{0} - My Count Total"
}
}
}
}

Here is a link to Flexmonster’s localization files for reference: https://github.com/flexmonster/pivot-localizations/blob/master/en.json
By specifying the localization changes in the global property (see: https://www.flexmonster.com/doc/global-object/ ), these changes will be common for all reports.
 
We have prepared a JSFiddle example for illustration: https://jsfiddle.net/flexmonster/rpxse4v1/
 
2) About “Calculate Individual Values”:
The individual property allows the formula to be calculated using raw values.

For example, the formula sum('Price') * sum('Amount') will be calculated differently, depending on whether the calculate individual values option is selected:
2.1) If calculate individual values is selected, it will be calculated like this: 174 * 36 + 225 * 44
2.2) If calculate individual values is not selected, it will be calculated like this: (174 + 225) * (36 + 44)
You can check this out in the following example: https://jsfiddle.net/flexmonster/7mtwxqow/.
 
Please let us know if this helps.
 
You are welcome to contact us in case of further questions.
 
Best Regards, 
Vera

Public
Sengupta 3 days ago

@Vera Didenko
Hi
We are using Custom Data Source
We need a mix of “Total <agg> …” & fixed heading within a report.
This was working in V2.8.27 (see attached screenshot) by setting the “aggregations“: [“none”] & “availableAggregations“: [“none”]
But it doesn’t work in latest version e.g. V2.8.32 (see attached screenshot)
In V2.8.32, a “(none)” suffix is getting added to the column name

Please help

Attachments:
V2.8.27.PNG
V2.8.32.PNG

Public
Sengupta 3 days ago

In /fields endpoint the description are as follows:

...
{
"uniqueName": "T - WGHT (%)",
"type": "number",
"caption": "T - W/IF (%)",
"dimensionCaption": "Calc Values",
"dimensionUniqueName": "CALC_VALUES",
"aggregations": [
"none"
],
"availableAggregations": [
"none"
]
},
...
{
"uniqueName": "T - Dur.",
"type": "number",
"caption": "T - W/IF (Dur.)",
"dimensionCaption": "Calc Values",
"dimensionUniqueName": "CALC_VALUES",
"aggregations": [
"none"
],
"availableAggregations": [
"none"
]
},
...
{
"uniqueName": "T - Val. (abs)",
"type": "number",
"caption": "T - W/IF (Base Val)",
"dimensionCaption": "Calc Values",
"dimensionUniqueName": "CALC_VALUES",
"aggregations": [
"none"
],
"availableAggregations": [
"none"
]
},
...
Public
Sengupta 3 days ago

In report, the measures are defined as

...
"measures": [
...
{
"availableAggregations": [
"none"
],
"caption": "T - W/IF (%)",
"format": "NUMBER_3DP",
"uniqueName": "T - WGHT (%)"
},
...
{
"availableAggregations": [
"none"
],
"caption": "T - W/IF (Dur.)",
"format": "NUMBER_3DP",
"uniqueName": "T - Dur."
},
...
{
"availableAggregations": [
"none"
],
"caption": "T - W/IF (Base Val)",
"format": "NUMBER_3DP",
"uniqueName": "T - Val. (abs)"
},
...
]
...
Public
Milena Pechura Milena Pechura Flexmonster 2 days ago

Hello, Sengupta,
 
Thank you for reporting the issue and providing a detailed explanation.
Our team will take a look at it and return to you with a fix ETA 14th of June.
 
As a temporary workaround, we would like to suggest using the customizeCell API call. 
We have prepared an example for illustration: https://jsfiddle.net/flexmonster/0pf9s7xk/. On lines 32-40, we removed “(none)” from the caption by changing the text of the cell. Please note that the commented code is just an alternative option for changing the text. 
Also, we would like to draw your attention to lines 24-26 and 84, which are important for the correct work of the sample.
 
Hope it helped!
Feel free to reach out to us if any additional questions arise.
 
Kind regards,
Milena

Please login or Register to Submit Answer