133
Views
7
Comments
Pie Chart - Showing Data Label

Good day everyone, 

I have some enquiries on how to implement data labels in a Pie Chart. How can I apply the following code to show the values? 

// Taken from https://www.outsystems.com/forums/discussion/58749/outsystems-charts-pie-chart-wont-show-values-at-slices/

plotOptions: {
    series: {
        dataLabels: {
            enabled: true, // enable DataLabels
            format: '{point.name}: {y}', // format to replicatte Traditional Web labels
        }
    }

Lastly, if I were to implement a customized pie chart using the Highcharts library, how can I make it clickable?  E.g. https://www.outsystems.com/forums/discussion/76676/how-to-show-percentage-with-count-inside-pie-chart-and-show-text-outside-pie-char/

I have attached oml file to kick start.

Charts.oml
2021-11-12 04-59-31
Manikandan Sambasivam

To implement data labels in a pie chart using the given code in OutSystems, you need to modify the chart's Highcharts configuration through JavaScript. Additionally, to make the pie chart clickable, you need to add event handlers to the chart configuration. 

UserImage.jpg
Drexxor

Thanks. Do you have any example to modify the chart?

2024-05-14 06-49-08
Karnika-EONE

Hi @Drexxor

I have Attached the Oml,pls check.

https://personal-h3dyi7cz.outsystemscloud.com/Charts/PieCharts?_ts=638524964399454917

For clickable u have Ondatapointclick event in pie chart.you can use this

Hope this will be helpful,

Thanks.

Charts (1).oml
UserImage.jpg
Drexxor

Seems like a straightforward way to show the number but how can i modify the chart with javascript?

2024-05-14 06-49-08
Karnika-EONE

Hi @Drexxor


You can import Highcharts in our application.

Link:https://personal-h3dyi7cz.outsystemscloud.com/Charts/PieCharts?_ts=638525061995533425

I have attached the oml.

Hope it will be helpful

Thanks

Regards,

Karnika.

Charts (1).oml
2024-07-12 05-57-50
Gourav Shrivastava
Champion

Hello @Drexxor ,

I hope this will be helpful for you.

Please check OML I have made all the changes you need. 

Thanks 

Regards Gourav Shrivastava

Charts001.oml
2024-05-14 06-49-08
Karnika-EONE

Hi @Drexxor 

Did You get the solution?


Thanks

Karnika.K

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.