indexLabelWrap: Boolean

indexLabelWrap specifies whether to wrap or clip indexLabel once its width crosses indexLabelMaxWidth.

Default: true
Options: true, false
Note
  • Supported in all Chart Types.
var  chart =  new  CanvasJS.Chart("container",
{
 .
 .
 data:[{
    type : "pie",
    indexLabelMaxWidth: 20,
    indexLabelWrap: true // change to false 
  },
 ]
 .
 . 
});
chart.render();


Try Editing The Code

  Also See:    


If you have any questions, please feel free to ask in our forums.Ask Question

2 Comments

  1. amutha says:

    can i show label under y value ? Here 34kg under mango is right.. But the ‘mango’ will be change ‘pineapple’ means it is displaying wrong.

    • Anjali says:

      amutha,

      Purpose of indexLabelMaxWidth is to limit the maximum width of a label and not to insert a line break. In order to get the requested behaviour you’ll need line break characters which are not supported yet.

If you have any questions, please feel free to ask in our forums. Ask Question