Hi,
SAS VIYA LTS 2023.03
The legend (situated below the graph) for a pie chart created with SAS Visual Analytics has changed from displaying the text to "Category". When I click the mouse on "Category" the legend is displayed in a box overlapping on the pie chart.
The correct legend text was initially displayed but after reopen the report the legend has been replaced.
Does anyone had the same issue and what was the solution to fix it?
Thank you,
smm662002
@smm662002 - You're on the right track. What you're experiencing is normal Visual Analytics behavior when there is not enough room for the Pie Chart object to display all of the information you are trying to display (the Legend in this case, but this also applies to things like data labels as well).
When the Pie Chart object gets too small, Visual Analytics will sacrifice the legend in favor of displaying the Pie Chart itself as large as it can. The only way to see the legend in full is to make the Pie Chart object bigger, like maximizing in your example or increasing the height and width of the object. This happens automatically and at this time there is no way for the end user to control the behavior. Meaning - an end user currently cannot set an option to never truncate the Legend, for example.
As for why it starts out showing the legend when you first create it but then shows the truncated legend on subsequent openings, I'm not sure I have an explanation for that. The only thing I can think of is that something changed that took away screen space for that pie chart.
Can you provide a screen capture of this issue?
I suspect there is something else going on with the report.
1. Is the pie within a container?
2. Have you tried changing the location of the legend to see if that makes a difference.
3. Does the issue happen in both view mode and edit mode?
4. Can you replicate this on a new report with just the pie chart.
If none of that helps, make a copy of the report and start removing things in the report until you notice a change in the pie legend. Then you will know what is causing it.
Hi Keith,
Thank you for your answer.
Please find attached the pie chart issue and answers to your observations:
1. It is not in a container
2. I have changed the location but no difference.
3. It happens both in edit and view mode
4. Not replicated in a new report
First time when the pie chart was created the legend was arranged by vertical (categories arranged one on top of the other). If the pie chart object is "maximized" the categories used in the legend are one after the other in one line (hence I think the issue is linked to the length of the text used in the legend).
Thank you for your help.
Regards,
smm662002
If deleting and re-adding the pie chart fixes the issue then I suspect something with the report XML got messed up. If you would like for Tech Support to analyze your report XML, please open a Case with SAS Technical Support.
@smm662002 - You're on the right track. What you're experiencing is normal Visual Analytics behavior when there is not enough room for the Pie Chart object to display all of the information you are trying to display (the Legend in this case, but this also applies to things like data labels as well).
When the Pie Chart object gets too small, Visual Analytics will sacrifice the legend in favor of displaying the Pie Chart itself as large as it can. The only way to see the legend in full is to make the Pie Chart object bigger, like maximizing in your example or increasing the height and width of the object. This happens automatically and at this time there is no way for the end user to control the behavior. Meaning - an end user currently cannot set an option to never truncate the Legend, for example.
As for why it starts out showing the legend when you first create it but then shows the truncated legend on subsequent openings, I'm not sure I have an explanation for that. The only thing I can think of is that something changed that took away screen space for that pie chart.
Hi,
Thank you so much for the explanation. I will recreate it and hopefully the legend won't be truncated in the future.
Should we hope for a future option allowing user to explicitly decline the truncation?
Regards,
smm662002
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.
Find more tutorials on the SAS Users YouTube channel.