title: How to combine two polar charts?
body: <p>I founded a very interesting <a href="https://www.boraji.com/how-to-combine-line-chart-and-bar-chart-in-jfreechart" rel="nofollow noreferrer">code</a> that allows to combine two differents charts.</p>
  <p>I would like to do the same with two polar charts to permit multiple scale, but there is no renderer as line and shape or bar. Is there nevertheless a way to do that ?</p>
  <p>The aim is to plot to series with big dynamic difference like distance &amp; site of laser shoots for each azimuth, something like that:</p>
  <p><a href="https://i.stack.imgur.com/7OBgf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7OBgf.png" alt="enter image description here" /></a></p>
  <p><a href="https://www.boraji.com/how-to-combine-line-chart-and-bar-chart-in-jfreechart" rel="nofollow noreferrer"><em>CombineBarAndLineChartExample</em>:</a></p>
  <pre><code>package com.boraji.tutorial.jfreechart;
  
  import javax.swing.JFrame;
  import javax.swing.SwingUtilities;
  
  import org.jfree.chart.ChartPanel;
  import org.jfree.chart.JFreeChart;
  import org.jfree.chart.axis.CategoryAxis;
  import org.jfree.chart.axis.NumberAxis;
  import org.jfree.chart.plot.CategoryPlot;
  import org.jfree.chart.renderer.category.BarRenderer;
  import org.jfree.chart.renderer.category.CategoryItemRenderer;
  import org.jfree.chart.renderer.category.LineAndShapeRenderer;
  import org.jfree.data.category.DefaultCategoryDataset;
  
  /**
   * @author imssbora
   *
   */
  public class CombineBarAndLineChartExample extends JFrame {
  
     private static final long serialVersionUID = 1L;
  
     public CombineBarAndLineChartExample(String title) {
        super(title);
  
        // Create Category plot
        CategoryPlot plot = new CategoryPlot();
  
        // Add the first dataset and render as bar
        CategoryItemRenderer lineRenderer = new LineAndShapeRenderer();
        plot.setDataset(0, createDataset());
        plot.setRenderer(0, lineRenderer);
  
        // Add the second dataset and render as lines
        CategoryItemRenderer baRenderer = new BarRenderer();
        plot.setDataset(1, createDataset());
        plot.setRenderer(1, baRenderer);
  
        // Set Axis
        plot.setDomainAxis(new CategoryAxis(&quot;Time&quot;));
        plot.setRangeAxis(new NumberAxis(&quot;Value&quot;));
  
        JFreeChart chart = new JFreeChart(plot);
        chart.setTitle(&quot;Combined Bar And Line Chart | BORAJI.COM&quot;);
  
        ChartPanel panel = new ChartPanel(chart);
        setContentPane(panel);
     }
  
     private DefaultCategoryDataset createDataset() {
  
        // First Series
        String series1 = &quot;Vistor&quot;;
        DefaultCategoryDataset dataset = new DefaultCategoryDataset();
        dataset.addValue(200, series1, &quot;2016-12-19&quot;);
        dataset.addValue(150, series1, &quot;2016-12-20&quot;);
        dataset.addValue(100, series1, &quot;2016-12-21&quot;);
        dataset.addValue(210, series1, &quot;2016-12-22&quot;);
        dataset.addValue(240, series1, &quot;2016-12-23&quot;);
        dataset.addValue(195, series1, &quot;2016-12-24&quot;);
        dataset.addValue(245, series1, &quot;2016-12-25&quot;);
  
        // Second Series
        String series2 = &quot;Unique Visitor&quot;;
        dataset.addValue(150, series2, &quot;2016-12-19&quot;);
        dataset.addValue(130, series2, &quot;2016-12-20&quot;);
        dataset.addValue(95, series2, &quot;2016-12-21&quot;);
        dataset.addValue(195, series2, &quot;2016-12-22&quot;);
        dataset.addValue(200, series2, &quot;2016-12-23&quot;);
        dataset.addValue(180, series2, &quot;2016-12-24&quot;);
        dataset.addValue(230, series2, &quot;2016-12-25&quot;);
  
        return dataset;
     }
  
     public static void main(String[] args) {
        SwingUtilities.invokeLater(() -&gt; {
           CombineBarAndLineChartExample example = new CombineBarAndLineChartExample(
                 &quot;Line Chart and Bar chart Example&quot;);
           example.setSize(800, 400);
           example.setLocationRelativeTo(null);
           example.setVisible(true);
        });
     }
  }
  </code></pre>