aspose file tools
The moose likes Other Open Source Projects and the fly likes Display Bar Values in JFreeChart Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Reply Bookmark "Display Bar Values in JFreeChart" Watch "Display Bar Values in JFreeChart" New topic
Author

Display Bar Values in JFreeChart

Steve Dyke
Ranch Hand

Joined: Nov 16, 2004
Posts: 1254
I have a bar chart I created using the ChartFactory for bar chart method. I don't see any parameter to turn on the bar value labels. Can someone help with this?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35241
    
    7
Not all possible parameters can be passed in via those convenience methods. The general approach would be something like:

CategoryItemrenderer render = ((CategoryPlot) myChart.getPlot()).getRenderer()

The rest is similar to what we discussed in http://www.coderanch.com/t/432205/Other-Open-Source-Projects/Display-Bar-Values-Chart


Android appsImageJ pluginsJava web charts
Steve Dyke
Ranch Hand

Joined: Nov 16, 2004
Posts: 1254
Ulf Dittmer wrote:
CategoryItemrenderer render = ((CategoryPlot) myChart.getPlot()).getRenderer()



Can this be used with the ChartFactory method or do I have to back up and design the chart from scratch?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35241
    
    7
You'd use the chart instance created by the ChartFactory method. Before the chart is actually created, all the settings can be changed - in the Plot, Renderer, Axis, etc.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Display Bar Values in JFreeChart
 
Similar Threads
create chart application in java
how to display bar chart based on the database values using jsp
Need help writing a code involving bar charts!
code for Bar chart
Export Chart into Excel file..?