Get Free Trial

Column Header Caption customization

Re-Open
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.

11 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 May 6, 2021

@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 May 6, 2021

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 May 6, 2021

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 May 7, 2021

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

Public
Sengupta June 9, 2021

@Milena Pechura
Could you please kindly confirm that the solution will be a patch for 2.8 and not just in the new release 2.9

Public
Illia Yatsyshyn Illia Yatsyshyn Flexmonster June 9, 2021

Hello,
 
It seems we answered a similar question on another forum thread.
Please see our answer by the following link: https://www.flexmonster.com/question/custom-data-source/.
 
Kind regards,
Illia

Public
Sengupta June 14, 2021

@Milena Pechura, @Illia Yatsyshyn
Any luck with the issue?
“(none)” suffix is getting added to the column name

Public
Milena Pechura Milena Pechura Flexmonster June 15, 2021

Hello, Sengupta,
 
We are pleased to inform you that the issue with the none aggregation appearing in the measure caption was fixed.
This is available in the 2.9.1 version of Flexmonster: https://www.flexmonster.com/release-notes/.
 
You are welcome to update the component.
Here is our updating to the latest version guide for assistance: https://www.flexmonster.com/doc/updating-to-the-latest-version/.
 
Please contact us in case any questions arise.
 
Best regards,
Milena

Public
Milena Pechura Milena Pechura Flexmonster June 23, 2021

Hi, Sengupta,
 
Hope you are doing well!
 
Our team is wondering whether the recent fix helped.
Please let us know if everything works fine.
 
We are looking forward to hearing from you.
 
Kind regards,
Milena

Public
Sengupta July 8, 2021

@Milena Pechura
Test passed
Many thanks for fixing the issue

Please login or Register to Submit Answer