I created a graph with connection to the database as follows:
String s = jTSensor.getText();
String query="select date, dew_point from records where idSensor like '"+s+"'";
JDBCCategoryDataset dataset = new JDBCCategoryDataset (
CriaConexao.getConexao(),query);
JFreeChart chart = ChartFactory.createLineChart(
"Records", "Date", "Dew Point", dataset,
PlotOrientation.VERTICAL, false, true, true);
BarRenderer renderer = null;
CategoryPlot plot= null;
renderer=new BarRenderer();
ChartFrame frame = new ChartFrame("Records", chart);
frame.setVisible(true);
frame.setSize(400,650);
But only gives a line to show. I wish it was possible to seek other data to the database and show the results with other lines, but I'm not succeeding. Someone can help me please.
Greetings