Adding value Line chart

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
ranyeng
Posts: 13
Joined: Fri May 22, 2009 6:53 am

Adding value Line chart

Post by ranyeng » Mon May 25, 2009 12:55 pm

the following is my simple line chart:

final String type1 = "India";
final String type2 = "China";
final String type3 = "Japan";
final String type4 = "London";

// create the dataset...
final DefaultCategoryDataset dataset = new DefaultCategoryDataset();

dataset.addValue(15.0, series1, type1);
dataset.addValue(4.0, series1, type2);
dataset.addValue(3.0, series1, type3);
dataset.addValue(5.0, series1, type4);

private JFreeChart createChart(final CategoryDataset dataset) {

final JFreeChart chart = ChartFactory.createLineChart(
"Line Chart Demo 5", // chart title
"Type", // domain axis label
"Value", // range axis label
dataset, // data
PlotOrientation.VERTICAL, // orientation
true, // include legend
true, // tooltips
false // urls
);

When the line chart is created, the values on the plotted point is not shown. How I can show the values on the plotted points.

Thanks & Regards,
Ranjan Yengkhom

Locked