title: How to display database values in JFreeChart linechart
body: <p>I have a question about a <code>JFreeChart</code> issue. I want to display a chart with a line from the values out of my database. This is the code I have now:</p>
  
  <pre><code>public void drawachart(){
      try{
          String sql= "select status,date from luggage";
          JDBCCategoryDataset dataset = new JDBCCategoryDataset(
              "jdbc:mysql://localhost/corendon", "com.mysql.jdbc.Driver", "root", "root");
          dataset.executeQuery(sql);
          JFreeChart chart = ChartFactory.createLineChart("chart","date", "status",
              dataset,PlotOrientation.VERTICAL,false,true,true);
          BarRenderer bar= null;
          bar = new BarRenderer();
          CategoryPlot plot =null;
          ChartFrame frame = new ChartFrame("shart", chart);
          frame.setVisible(true);
          frame.setSize(500, 500);
      }
      catch(Exception e){
          e.printStackTrace();
      }
  }
  </code></pre>
  
  <p>After executing the code, it gives me a chart with no lines in it. Only a x and y axis. What should I do to get a line in the chart.</p>