- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-23-2023 10:50 AM
Could anyone help me on how can I configure the labels from the pie chart in order for them not to colapse / shrink / hide? Only if I set the size of the report to occupy the wholle screen then I can see all labels at the same time.
Allthough there's plenty space I can't figure out how to show data appropiately, any advice?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-23-2023 12:09 PM
HI @Julian12 ,
Hope you are doing great.
In order to ensure all labels are visible, even when the report size is not occupying the entire screen, I recommend the following solution:
Adjust the chart size: You can modify the size of the chart to provide enough space for the labels to be displayed properly. By expanding the chart dimensions, you will allow more room for the labels to appear without being truncated or hidden.
Enable word wrap: Enabling word wrap for the labels will ensure that the text wraps within the available space, rather than being cut off or truncated.
example of how you can configure the labels in ServiceNow to achieve the desired outcome:
// Assuming you have a chart object called 'pieChart'
// Set the chart size
pieChart.setSize(width, height);
// Enable word wrap for labels
pieChart.options.plotOptions.pie.dataLabels.style.width = 'auto';
pieChart.options.plotOptions.pie.dataLabels.style.whiteSpace = 'normal';
// Update the chart
pieChart.redraw();
For more reference, Take a look at this ServiceNow doc page, it holds all the Reporting properties. The length of the items in the legend can be changed.
Regards,
Riya Verma
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-23-2023 12:09 PM
HI @Julian12 ,
Hope you are doing great.
In order to ensure all labels are visible, even when the report size is not occupying the entire screen, I recommend the following solution:
Adjust the chart size: You can modify the size of the chart to provide enough space for the labels to be displayed properly. By expanding the chart dimensions, you will allow more room for the labels to appear without being truncated or hidden.
Enable word wrap: Enabling word wrap for the labels will ensure that the text wraps within the available space, rather than being cut off or truncated.
example of how you can configure the labels in ServiceNow to achieve the desired outcome:
// Assuming you have a chart object called 'pieChart'
// Set the chart size
pieChart.setSize(width, height);
// Enable word wrap for labels
pieChart.options.plotOptions.pie.dataLabels.style.width = 'auto';
pieChart.options.plotOptions.pie.dataLabels.style.whiteSpace = 'normal';
// Update the chart
pieChart.redraw();
For more reference, Take a look at this ServiceNow doc page, it holds all the Reporting properties. The length of the items in the legend can be changed.
Regards,
Riya Verma