cancel
Showing results for 
Search instead for 
Did you mean: 

Wrap DataLabel text in vizFrame Charts

former_member356284
Participant
0 Kudos
620

Hello Experts,

I am trying to wrap the dataLabel texts in vizFrame charts so that it can adjust itself automatically based on the device used.

Please give me some inputs on it.

Best Regards,

Aakanksha

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member196805
Contributor
0 Kudos

Sorry for the late reply.

dataLabel property comes with a property which accepts custom callback function

plotArea:{dataLabel:{renderer: 
  function(e){
    /*Your line wrapping logic here*/
  }
}}

e variable here returns the dataLabels' information so your wrapping logic will be executed on every data labels one by one.

former_member666755
Discoverer
0 Kudos

Logic Would be like below?

let label = categoryAxis.renderer.labels.template; label.wrap = true; label.maxWidth = 120;