Home forums Using CanvasJS Pie Chart not showing all labels?

Tagged: ,

This topic contains 1 reply, has 2 voices, and was last updated by  Sunil Urs 1 week, 4 days ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #12699

    Emily T

    Hi there — I have a pie chart with the labels inside the slices, and for some reason one of the labels is not showing.

    Pie Chart

    At first, the light blue slice and the purple slice both were blank, and I assumed this was because the label was too big/the slice was too small. However, after increasing the chart size, now the purple one with 1 entry is showing but the light blue one with 1 entry is not, even though they are the exact same size.

    The code:

                type: "POST",
                url: "[url.php]",
                dataType: "JSON",
                cache: false,
                data: piedata, 
                success: function(data) {
                    var chart = new CanvasJS.Chart("chartcontainer", {
                        title: {
                            text: pieheader
                        exportEnabled: true,
                        height: 500,
                        width: 900,
                        legend: {
                            verticalAlign: "center",
                            horizontalAlign: "left",
                            fontSize: 15,
                            fontFamily: "arial"
                        data: [
                                type: "pie",
                                percentFormatString: "#0",
                                toolTipContent: "{legendText}",
                                showInLegend: true,
                                indexLabelPlacement: "inside",
                                indexLabelFontColor: "#ffffff",
                                indexLabelFontSize: 15,
                                indexLabelMaxWidth: 53,
                                indexLabel: "{y} (#percent%)",
                                dataPoints: data

    Any ideas on why one isn’t showing up and the other one is? I’d really like to not have to make the chart even larger, since it does appear that the label should show up at that size…

    • This topic was modified 1 week, 5 days ago by  Emily T.

    Sunil Urs


    Thanks for reporting. We’ll look into the issue and get back at the earliest.

    Sunil Urs

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.