title: How to wrap legend items in highcharts?
body: <p>I have a big problem using highcharts, because I have been trying for hours  to wrap legend items if they very long.</p>
  
  <p>I have tried to set legend and legend item width, but my text still get out from a legend. Only thing that I found is to change <code>highcharts.src.js</code> but I think that's not a way to solve this problem.</p>
  
  <p>Here my code: </p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
    var chart;
    $(document).ready(function() {
      chart = new Highcharts.Chart({
        chart: {
          renderTo: 'graph_container',
          defaultSeriesType: 'line',
          zoomType: 'y',
          marginRight: 130,
          marginBottom: $ {
            marginBottom
          }
        },
        title: {
          x: -10,
          text: null
        },
        xAxis: {
          title: {
            text: '&lt;fmt:message key="html.time" bundle="${msg}"/&gt;',
            align: 'high'
          },
          categories: [$ {
            years
          }]
        },
        yAxis: {
          title: {
            text: '&lt;fmt:message key="html.value" bundle="${msg}"/&gt;',
            align: 'high'
          },
          plotLines: [{
            value: 0,
            width: 1,
            color: '#808080'
          }]
        },
        tooltip: {
          style: {
            fontSize: '9pt',
            width: '400px', //,
            wrap: 'hard'
          },
          formatter: function() {
            return '&lt;b&gt;' + this.series.name + '&lt;br&gt;' +
              +this.x + ': ' + this.y + '&lt;/b&gt;';
          }
        },
        legend: {
          layout: 'vertical',
          width: 600,
          floating: true,
          align: 'center',
          verticalAlign: 'bottom',
          borderWidth: 1,
          itemWidth: '500px'
  
        },
        credits: {
          enabled: false
        },
        exporting: {
          enabled: false
        },
        series: [ &lt;
          c: forEach items = "${graphValues}"
          var = "value"
          varStatus = "counter" &gt;
          &lt;
          c: if test = "${counter.count != 1}" &gt; , &lt; /c:if&gt; {
            name: '${value.name}',
            data: $ {
              value.jsonData
            }
          } &lt;
          /c:forEach&gt;
        ]
      });
  
  
    });
  &lt;/script&gt;
  </code></pre>