Question

Text wrap/text truncation for chart labels

Hi,

Our product is facing an issue with our charts functionality.

The bar charts appear as desired when the vertical axis labels are short. However, once the labels become too long, it starts to push the bar charts to the right, causing it to be smaller than desired.

I would like to know if there is a method to text wrap the vertical axis labels.

For our pie charts, they shrink once the items in the legend exceed a certain number and I would like to know if there is a way to force the legend box to be a fixed height and width such that if there are too many items, the user will need to scroll down.

This is an example of the charts I'm getting. I'm wondering if I can get the bar chart to truncate the labels with "..." earlier, maybe after 10 characters.

As for the pie chart legend, I'm wondering if I can get the legend to only list 5 before making the user scroll.

Untitled.png

**Moderation Team has archived post**

This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.

Correct Answer
November 13, 2015 - 6:08am

Hi

I was looking for online help for this and found this article : http://pdn.pega.com/node/21656

Under the "Adding data to the chart" section the below portion seems relevant here.

"'A small gear icon gear.png appears to the left of the each drop zone. Click the icon to display the Data Settings form. Here you can specify formatting and other options that are specific to the column in the drop zone "

Find below screenshot.

format options.png

You need to specify a suitable format for styling ( and wrapping ) of the text

Comments

Keep up to date on this post and subscribe to comments

Pega
November 13, 2015 - 4:39am

Hi

Which  PRPC version you are on ?

November 13, 2015 - 4:45am
Response to Santanu

Hi Santanu,

Our product is on version 7.1.8.

Pega
November 13, 2015 - 6:08am
Response to TianweiZ

Hi

I was looking for online help for this and found this article : http://pdn.pega.com/node/21656

Under the "Adding data to the chart" section the below portion seems relevant here.

"'A small gear icon gear.png appears to the left of the each drop zone. Click the icon to display the Data Settings form. Here you can specify formatting and other options that are specific to the column in the drop zone "

Find below screenshot.

format options.png

You need to specify a suitable format for styling ( and wrapping ) of the text

November 14, 2015 - 6:21am
Response to Santanu

Hi Santanu,

Thank you for your advice. From what I see, the values which can be entered here are all Controls, so the solution for such a problem would be to create a custom Control to customize when the text titles will be truncated?

Pega
November 16, 2015 - 3:42am
Response to TianweiZ

Hi

Yes , you are right ! You need to write a custom control to do this as per your requirement.

November 14, 2015 - 6:20am

Hi Santanu,

Thank you for your advice. From what I see, the values which can be entered here are all Controls, so the solution for such a problem would be to create a custom Control to customize when the text titles will be truncated?