Tooltips/labels above Bars

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
selven
Posts: 1
Joined: Tue Mar 29, 2005 8:43 am

Tooltips/labels above Bars

Post by selven » Tue Mar 29, 2005 8:49 am

Hi,
Im having problems adding permanent tooltips/labels to my bar charts. i want the values corresponding to the y axis to be shown on the bars of my bar graph or just above the bars.
my program is almost exactly like bar chart demo.

Many thanks...
SKG

timw
Posts: 20
Joined: Fri Mar 18, 2005 12:36 pm
Location: London

Post by timw » Thu Mar 31, 2005 10:48 am

Code: Select all

        BarRenderer renderer = (BarRenderer) plot.getRenderer();
        renderer.setItemLabelFont(new Font("Arial", Font.BOLD, 9));
        renderer.setLabelGenerator(new StandardCategoryLabelGenerator( 
                "{2}", new DecimalFormat("0.0") 
        )); 
        renderer.setItemMargin(0.0);
        renderer.setItemLabelsVisible(true);
i think this is the code that adds labels just above bars for me

Guest

Post by Guest » Tue Apr 05, 2005 10:12 am

Hello,

can anyone help me to place labels above 3D bars.

Bye Equ

Locked