Below you can see the pseudo code
Pseudo-code
Code: Select all
DefaultCategoryDataset dataset = new DefaultCategoryDataset();
for all data( ){
dataset.setValue(yIntegrValue,category , xValue);
}
JFreeChart chart = ChartFactory.createLineChart(
"profile",
"date",
"values",
dataset,
PlotOrientation.VERTICAL,
true, true, false);
CategoryPlot plot = chart.getCategoryPlot();
CategoryAxis domainAxis = plot.getDomainAxis();
domainAxis.setCategoryLabelPositions(CategoryLabelPositions.DOWN_90);
ChartUtilities.saveChartAsJPEG(new File("F:\\chart.jpg"), chart, 1500, 800);