title: JFreeChart background color setting is not respected
body: <p>In JFreeChart I used to generate the chart with <em>CategoryDataset</em> and with <em>createLineChart</em>. This looked like this:</p>
  
  <p><a href="https://i.stack.imgur.com/Qvjwf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Qvjwf.png" alt="enter image description here"></a></p>
  
  <p>Due to some axis changes I had to switch to <em>XYLineAndShapeRenderer</em>, and now the chart looks like this:
  <a href="https://i.stack.imgur.com/Dp1nb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Dp1nb.png" alt="enter image description here"></a></p>
  
  <p>Please notice the gray area around the chart. I want to change it to transparent or at least white just like it was on the old one above.</p>
  
  <p>I tried doing it by:</p>
  
  <pre><code>chart.getPlot().setBackgroundPaint(Color.WHITE);
  </code></pre>
  
  <p>But it does not work.</p>
  
  <p>How can I change that background to white, and change the plot's background to gray (just like it was on the old one?)</p>
  
  <p>Thanks!</p>
  
  <h1>UPDATE</h1>
  
  <p>I can update the plot's background, but not the ChartPanel's.</p>
  
  <p>Here is the diagram which has these options:</p>
  
  <pre><code>lineChart.getPlot().setBackgroundPaint(Color.red);
  chartPanel.setBackground(Color.yellow);
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/GhHS4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GhHS4.png" alt="enter image description here"></a></p>
  
  <p>Here I would like to have the yellow as the background of the chartPanel.</p>