Search same Pie sample like http://www.advsofteng.com

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
pcouas
Posts: 9
Joined: Wed Feb 14, 2007 7:10 pm

Search same Pie sample like http://www.advsofteng.com

Post by pcouas » Wed Feb 14, 2007 7:28 pm

Hi,

I prefer using JFRREECHART, but my bosse prefer using //www.advsofteng.com/gallery_pie.html .
He think that there is no equivalent to bottom sample pie into freechart sample ?
Could you give me an url with same sample that last in bottom page

Regards
Philippe

jawednazarali
Posts: 6
Joined: Wed Feb 14, 2007 8:49 am

Post by jawednazarali » Thu Feb 15, 2007 10:34 am

I don't have any link but you may show your boss the demo-jar that comes with the APIs. Show your boss tooltip labels of PieChartDemo2.java and pieChart2DDemo1.java, (remove the aplpha, for making solid colors) if properties of these two charts are combined, which can be, you will get what your boss wants. colors of the tooltip background is also configurable and also can customize the tooltip data format. Following explanation will help you in customizing the labels for tooltip. This is taken from the Jfree Developer guide 1.0.4.

The StandardPieSectionLabelGenerator class is typically used as the generator, and provides enough flexibility to handle most custom labelling requirements (but if not, you are free two write your own class that implements the PieSectionLabelGenerator interface). The generator works by using Java’s MessageFormat class to construct labels by substituting values that are derived from the dataset:

Key --> Value:
{0} --> The section key as a String.
{1} --> The section value.
{2} --> The section value as a percentage of the total of all values in the dataset.

By way of example, suppose you have a PieDataset containing the following values:
Section Key --> Section Value:
S1 --> 3.0
S2 --> 5.0
S3 --> null
S4 --> 2.0

following format strings would generate the labels shown:
Format String --> Section --> Generated Label:
{0} --> 0 --> S1
{0} has value {1} --> 1 --> S2 has value 5.0
{0} ({2} percent) --> 0 --> S1 (30 percent)
{0} = {1} --> 2 --> S3 = null
Jawed Ali
http://www.jawed.info

Software is Harder than it sounds.

pcouas
Posts: 9
Joined: Wed Feb 14, 2007 7:10 pm

Search same Pie sample like http://www.advsofteng.com

Post by pcouas » Thu Feb 15, 2007 11:43 am

Hi,

Could i have gradually background image color and background bullet image color.
Like last sample 'Cost BreakDown'

Regards
Philippe

jawednazarali
Posts: 6
Joined: Wed Feb 14, 2007 8:49 am

Post by jawednazarali » Thu Feb 15, 2007 12:11 pm

I don't know about applying gradient on tooltips. Lets wait what GURU has to say about it.
Jawed Ali
http://www.jawed.info

Software is Harder than it sounds.

pcouas
Posts: 9
Joined: Wed Feb 14, 2007 7:10 pm

Post by pcouas » Tue Feb 27, 2007 6:35 pm

Hi,

I have just found an
pieplot.setLabelBackgroundPaint(new GradientPaint(0.0F, 0.0F, Color.white, 1000F, 0.0F, Color.red));

that make an gradiant color on all label, but for example i want that each label in PiechartDemo2 as same color like section ?
I search too an gradiant and 3d effect on theses labels

Regards
Philippe

Locked