Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

chart.js label word wrap

scales: {         
      xAxes: [
        {
          ticks: {
            callback: function(label, index, labels) {
              if (/s/.test(label)) {
                return label.split(" ");
              }else{
                return label;
              }              
            }
          }
        }
      ]
    }
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #label #word #wrap
ADD COMMENT
Topic
Name
3+8 =