Home Forums Chart Support How to remove data labels from Graph?

How to remove data labels from Graph?

Viewing 5 posts - 1 through 5 (of 5 total)
  • #11283

    Can anyone please tell how to remove data labels from graphs??

    #11284

    @arjunsonik,

    You can remove axis labels by setting valueFormatString to a white-space character. In case you are looking for something else a pictorial representation will help us to understand your requirements better & help you fulfill.
    Formatting X Axis Labels


    Sanjoy

    #11286

    I am using Doughnut chart, and i am not able to remove the data legends.
    I used the same you specified but it did not work.

    #11287

    Arjun,

    Here is an example for pie/doughnut charts without indexLabels. If your requirement is not to show legends, you can set showInLegend to false (defaults to false),if you have set it to true. Please check out the code-snippet below.

     data: [
        {
          type: "pie",
          showInLegend: true,
          toolTipContent: "{legendText}",
          dataPoints: [
            {  y: 36, legendText: "apple" },
            {  y: 17, legendText: "mango" },
            {  y: 16, legendText: "orange" },
            {  y: 9, legendText: "butter fruit" },
            {  y: 8, legnedText: "grapes" },
            {  y: 7, legendText: "melons" },
            {  y: 7, legendText: "pineapple"}
    
          ]
        }
      ]

    pie chart with no index labels

    If this doesn’t fulfill your requirement, pictorial representation would help us to understand and help you out.


    Vishwas R
    Team CanvasJS

    #11288

    Thank You
    I removed the second parameter giving the legend text, which was my requirement.

    Thanks @sanjoy and @vishwasR

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

You must be logged in to reply to this topic.