We're a community of 1077K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,076,166 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Percentage of Bar chart

I have done the following codes to create a bar chart with the data from DB, and save it as an JPEG file.

I wanted to add percentage value anywhere in the table,

 JDBCCategoryDataset dataset = new JDBCCategoryDataset("", "oracle.jdbc.OracleDriver",
                           "", "");
    String query = "SELECT std,id from table";
    dataset.executeQuery(query);
    JFreeChart chart =ChartFactory.createBarChart3D("Test", "Id", "Score",dataset,
    PlotOrientation.HORIZONTAL, true, true, true);
    ChartUtilities.saveChartAsJPEG(new File(""),chart,1280, 1024);

Please advise.

2
Contributors
1
Reply
4 Days
Discussion Span
3 Months Ago
Last Updated
9
Views
sofien.fkih
Light Poster
31 posts since Jul 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

Click Here

The StandardPieSectionLabelGenerator can do that for you. Check link and documentation.

nandosss
Newbie Poster
16 posts since Feb 2012
Reputation Points: 10
Solved Threads: 1
Skill Endorsements: 0

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page rendered in 0.0571 seconds using 2.7MB