Need a special offer?Find out if your project fits.
+

How to customize row and column headers in Pivot table?

Answered
Vignesh K asked on October 9, 2023

Hi Team,
This is Vignesh K from ViewzenLabs Pvt. Ltd. We are evaluating the Flexmonster pivot table for our product.
Is there any way to customize the headers of rows and columns.? ( Highlighted part of the attached image)
PFA for reference.
 
Regards,
Vignesh K

Attachments:
Pivot Reference.png

10 answers

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster October 10, 2023

Hello,

Thank you for reaching out to us and providing the screenshot.

Could you please provide more details on how you would like to customize the headers? Are you looking for a way to change the colors, captions, or something else? It would greatly help us.

Looking forward to hearing from you.

Kind regards,
Nadia

Public
Vignesh K October 12, 2023

Yes.
We want to customize the CSS styles(font-size, font-family, font-color, background-color,text-decoration,text-style) and captions (display Label) of rows/columns header

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster October 12, 2023

Hello,

Thank you for the response. 

It is possible to customize the CSS styles of headers using the following selectors:

#fm-pivot-view .fm-grid-layout .fm-filters .fm-header,
.fm-cols-filter div {
  background-color: #daf2e5 !important;
  color: green !important;
}

To customize the captions, you can use Mapping. It allows to define how fields contained in the data source are treated and presented within the component.
You can set the caption property for the fields to show the alternative name. For example:

dataSource: {
...,
   mapping: {
    "Color": {
       caption: "My Color"
     },
     "Country": {
       caption: "Custom Label",
      },
// other fields
}
}

You are welcome to check the following JSFiddle for reference: https://jsfiddle.net/flexmonster/hwq4v3a0/ 

Please let us know if it works for you. Looking forward to hearing from you.

Kind regards,
Nadia

Public
Vignesh K October 13, 2023

Yeah. This works fine.
However, we want to dynamically customize the CSS properties of headers.
Can you tell us how could we achieve this?
(We also tried using the CustomizeCell function, but we were not able to access the row and column headers there)

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster October 16, 2023

Hello,

Thank you for the response.

Currently, the customizeCell function cannot modify the appearance of headers. We recommend predefining the necessary customizations using the CSS rules.

Feel free to contact us if other questions arise.

Kind regards,
Nadia

Public
Vignesh K October 16, 2023

Is there any plan for this feature to be provided..?
Or is there any subscription model that we can purchase and request this feature?
 

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster October 17, 2023

Hello,

Thank you for the response.

We would appreciate it if you could provide us with more details regarding your use case with dynamic header customization. Could you please give us specific examples of when and how you would like to customize the CSS properties of headers? This information would help us better understand your use case.
Kindly note that Flexmonster does not offer subscription-based licenses for feature requests.

Looking forward to hearing from you.

Kind regards,
Nadia

Public
Vignesh K October 18, 2023

We are planning to use flexmonster for the pivot table and provide customization options to end users which include the headers, color, font size, and so on.
Hence we can't use static CSS styles/classes to customize headers and require a dynamic option to customize the headers.

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster October 18, 2023

Hello,

Thank you for providing us with the details. It helped us to understand your use case better.

At the moment, Flexmonster does not provide a feature for changing the CSS styles in the run time. We would like to inform you that there are no plans to add this feature in the nearest releases. Our team will consider adding it in the future. For now, we recommend sticking to predefining the CSS rules.

You are welcome to contact us in case other questions arise.

Kind regards,
Nadia

Public
Vignesh K October 19, 2023

Sure.
 

Please login or Register to Submit Answer