title: JFree chart set axis to percentage
body: <p>I want my Axis in my <a href="http://www.jfree.org/jfreechart/" rel="nofollow" title="JFreeChart">JFree charts</a> to become % instead of normal numbers does anyone know how I can modify my code so this happens.</p>
  
  <p>It should be said that my table is already in procentage but the graph it self is not!</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>This is what ive tried so far yet still no changes:</p>
  
  <pre><code>CategoryPlot plot = (CategoryPlot) chart.getPlot();
      NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis();
      DecimalFormat pctFormat = new DecimalFormat("#.0%");
      rangeAxis.setNumberFormatOverride(pctFormat); 
      rangeAxis.setRange(0.0, 100.0);
  
      chart.getXYPlot().setRangeAxis(rangeAxis);
      title = periode;
      chartPanel.setChart(chart);
      setTableModel(true,true);
  </code></pre>
  
  <p><strong>UPDATE2</strong></p>
  
  <p>To set the intervals to 10 you need the following code:</p>
  
  <pre><code>NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis();
          rangeAxis.setRange(0.0, 100.0);
          rangeAxis.setTickUnit(new NumberTickUnit(10));
          rangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
          rangeAxis.setAutoRangeIncludesZero(true);
  </code></pre>