title: Change format legend Jfreechart
body: <p>I'd like to know if it's possible to put the legend that appears on the chart on the x axis in vertical position. First time I am using JFreeChart and I don't know whether it's possible or not.</p>
  
  <p><img src="https://i.stack.imgur.com/Dfral.jpg" alt="Chart">
  This is my actual code</p>
  
  <pre><code>dataset.setValue(VecDias.get(i).GetNpers(),VecDias.get(i).GetHour(),dia_semana);
  JFreeChart chart = ChartFactory.createBarChart3D("Estadistica     persones/hora", "Hores","Persones",
  dataset, PlotOrientation.VERTICAL, true,true, false);
  chart.setBackgroundPaint(Color.white);
  chart.getTitle().setPaint(Color.black); 
  CategoryPlot p = chart.getCategoryPlot(); 
  p.setRangeGridlinePaint(Color.red); 
  LegendTitle legend = chart.getLegend();
  legend.setPosition(RectangleEdge.RIGHT);
  ChartPanel chartPanel = new ChartPanel(chart);
  panel.add(chartPanel);
  </code></pre>