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

How can we style labels on column graph that match a certain set of strings?

Re-Open
Michael T asked on May 24, 2021

for example, want to outline a given subset of the column labels. Is there a way to pass in an array and have the labels styled (e.g. css label applied) for the labels matching strings in the array?

11 answers

Public
Vera Didenko Vera Didenko Flexmonster May 25, 2021

Hello, Michael,
 
Thank you for reaching out to us.
 
We kindly suggest using the afterchartdraw event to apply the CSS style to the required column labels.
Please see the following JSFiddle example demonstrating the described approach: https://jsfiddle.net/flexmonster/nx0h3m27/.
For more details about the afterchartdraw event, please see the following guide.

Please let us know if this helps.
 
Kind regards,
Vera

Public
Michael T May 27, 2021

Thank you. this is good, but the style changes do not show up when exporting the chart to image... How can we have them show when exporting to image?

Public
Michael T May 31, 2021

Hello, Just following up...
It seems like some styling (like the border and color) on a text tag isn't preserved when exporting to image or printing, while other attributes (like bold) is preserved. Any idea why? Is it possible to make the missing style attributes render for export to image or print?
Thank you

Public
Vera Didenko Vera Didenko Flexmonster May 31, 2021

Hello, Michael,
 
Thank you for your response.
 
Our team is currently working on your question.
We will return to you with a response as soon as possible.
 
Kind regards,
Vera

Public
Vera Didenko Vera Didenko Flexmonster June 1, 2021

Hello, Michael,
 
Thank you for giving us some time.
 
Indeed, only certain styles are taken into account during chart export.
We have added your request to our customers' wishlist, and we will notify you in case of any changes.
 
Meanwhile, as a solution, our team could include the text fill property making it possible to highlight the column labels with color.
 
Please let us know if this would work for you.
Looking forward to your response.
 
Kind regards,
Vera

Public
Michael T June 1, 2021

having the text "fill" property enabled would be great, thank you.
 
Mike

Public
Milena Pechura Milena Pechura Flexmonster June 2, 2021

Hi, Michael,
 
Thank you for confirming that the suggested solution would work for you.
 
Our team will include the text fill property in the Flexmonster component.
We will notify you as soon as the version with this feature is ready to download.
 
Do not hesitate to contact us in case any other questions arise.
 
Best regards,
Milena

Public
Vera Didenko Vera Didenko Flexmonster June 14, 2021

Hello, Michael,
 
We are happy to inform you that now the text fill property is considered during chart export (see example).
This is available in the latest version of Flexmonster (v2.9.1).
 
You are welcome to update the component. Here is our updating to the latest version tutorial for guidance.
 
Please let us know if the update works fine for you.
 
Kind regards,
Vera

Public
Vera Didenko Vera Didenko Flexmonster June 22, 2021

Hello, Michael,
 
How are you?
 
Have you had a chance to test out our latest update with the text fill property?
 
We would be happy to hear your feedback.
 
Kind regards,
Vera

Public
Vera Didenko Vera Didenko Flexmonster June 30, 2021

Hello, Michael,
 
Hope all is well!
 
We are wondering if highlighting the chart column labels with color in the export works fine for you after the recent update.
 
Please let us know if the update works fine for you.
 
Kind regards,
Vera

Public
Michael T July 11, 2021

Hello. Thank you. It does work.
 

Please login or Register to Submit Answer