MeterChart - Legend not visible

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
patrickherber
Posts: 8
Joined: Mon Jul 28, 2003 5:07 pm

MeterChart - Legend not visible

Post by patrickherber » Fri Nov 28, 2003 9:22 am

Hi!
I'm using JFreeChart 0.9.14 and I see that the legend of a MeterChart is not displayed (this also happened in the Demo example).

Is that a bug or something is wrong with me?
Thanks a lot for your help!
Regards,
Patrick

patrickherber
Posts: 8
Joined: Mon Jul 28, 2003 5:07 pm

... problem sussist also with JFreeChart 0.9.15

Post by patrickherber » Sat Nov 29, 2003 6:07 pm

Sorry for bothering again.
I've installed today JFreeChart 0.9.15, but I've notice that this problem (at least by me) sussist.
Did/Can anybody test the MeterChart Demo and tell me if by him/her is the legend visible? (Perhaps it is really only a problem with my configuration).
Thanks a lot and bye
Patrick

Bryan.Scott
Posts: 26
Joined: Fri May 09, 2003 4:55 am
Location: Tasmania, Australia
Contact:

Post by Bryan.Scott » Sun Nov 30, 2003 10:26 pm

Patrick

I think you are right that no legend is displayed. But I think that currently MeterPlot only supports one dataset and that this might be why. No much point displaying a legend when you only have one series?

The demo explicity turn off legend creation, but even if it is turned on it is no displayed.

Code: Select all

        JFreeChart chart = new JFreeChart(
            "Meter Chart",
            JFreeChart.DEFAULT_TITLE_FONT,
            plot,
            false
        );
Bryan

patrickherber
Posts: 8
Joined: Mon Jul 28, 2003 5:07 pm

Post by patrickherber » Mon Dec 01, 2003 8:26 am

Thanks a lot for your answer.

If you have the Developer Guide, you can see (27.12.1) that the legend of a Meter Chart is something special. It looks like:

Code: Select all

Sample Meter Current Value: 85
Meter Graph Range 20 to 140
Critical Range 120 to 140
Warning Range 100 to 120
Normal Range 70 to 100
So I think, it has usefull only for one series (to better explain the chart).

Regards
Patrick

bmoody
Posts: 9
Joined: Tue Nov 25, 2003 7:02 pm

Post by bmoody » Thu Dec 18, 2003 6:06 am

So, how would one go about displaying the legend as shown in the demo.

Thanks,

dbasten
Posts: 52
Joined: Fri Jul 25, 2003 4:29 pm

Post by dbasten » Fri Jun 18, 2004 10:11 pm

There were a few bugs that prevented the MeterLegend from showing.

If you need this functionality, I have included the fixes with an enhancement to add multiple ranges to a MeterPlot. They can be found at http://sourceforge.net/tracker/index.ph ... tid=365494.

However, since the API I implemented could be changed to match the JFreeChart standards, I would wait until David incorporates it into a future release.

Regards,
David

Locked