Type of Chart

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Pellegrino
Posts: 16
Joined: Wed Jun 17, 2009 5:00 pm

Type of Chart

Post by Pellegrino » Mon Jun 29, 2009 5:37 pm

Hello!

I have a problem with choosing the type of chart, that I need.
and it needs to create almost the same in JFreeChart (TickLabels can be sample).

Thank you very much for give me your opinion.
Last edited by Pellegrino on Thu Nov 12, 2009 11:38 am, edited 1 time in total.

aram535
Posts: 25
Joined: Thu Apr 24, 2008 11:59 pm

Re: Type of Chart

Post by aram535 » Tue Jun 30, 2009 1:17 am

Can't see image, needs uid/pw

Pellegrino
Posts: 16
Joined: Wed Jun 17, 2009 5:00 pm

Re: Type of Chart

Post by Pellegrino » Tue Jun 30, 2009 10:19 am

Excuse me, now you can access there...

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Re: Type of Chart

Post by david.gilbert » Tue Jun 30, 2009 10:27 am

I still see the login page.
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

Pellegrino
Posts: 16
Joined: Wed Jun 17, 2009 5:00 pm

Re: Type of Chart

Post by Pellegrino » Tue Jun 30, 2009 2:40 pm


aram535
Posts: 25
Joined: Thu Apr 24, 2008 11:59 pm

Re: Type of Chart

Post by aram535 » Tue Jun 30, 2009 2:42 pm

You can do that with a CandleStick or a HighLowChart.

Pellegrino
Posts: 16
Joined: Wed Jun 17, 2009 5:00 pm

Re: Type of Chart

Post by Pellegrino » Tue Jun 30, 2009 3:03 pm

1) for CandleStickChart:
1. Can I make the top and bottom line for every "candle" (see my picture for example...)? (it's necessary)
2. Is it possible to add the graphic of Constant (or horizontal line) ? and dotted line?
2) for HighLowChart:
1. (see 1.1)
2. It needs to have a small rectangle on every "stick"...

I saw YIntervalChart, but I cannot change the position of rectangle in center...

aram535
Posts: 25
Joined: Thu Apr 24, 2008 11:59 pm

Re: Type of Chart

Post by aram535 » Tue Jun 30, 2009 3:13 pm

You mean the high water and low water mark? Than yes you can.

Pellegrino
Posts: 16
Joined: Wed Jun 17, 2009 5:00 pm

Re: Type of Chart

Post by Pellegrino » Tue Jul 07, 2009 4:38 pm

Evrika!!!!

Almost the same!!!

Code: Select all

// CategoryAxis 
        CategoryAxis valueAxis1 = new CategoryAxis();
    	valueAxis1.setLabelFont(labelFont);
    	valueAxis1.setTickLabelFont(tickLabelFont);
    	
    	// NumberAxis 
    	ValueAxis valueAxis2 = new NumberAxis();
    	valueAxis2.setTickLabelsVisible(false);
    	
    	MinMaxCategoryRenderer renderer = new MinMaxCategoryRenderer();
    	renderer.setMaxIcon(new ImageIcon("transparent.jpg"));
    	renderer.setMinIcon(new ImageIcon("transparent.jpg"));

    	renderer.setSeriesStroke(1, new BasicStroke (7.0F, BasicStroke.CAP_BUTT, 
                BasicStroke.JOIN_BEVEL));
    	
    	renderer.setSeriesPaint(0, Color.black);
    	renderer.setSeriesPaint(1, Color.black);
    	renderer.setSeriesPaint(2, Color.black);
    	
    	final CategoryPlot plot = new CategoryPlot(dataset, valueAxis1, valueAxis2, renderer);//chart.getCategoryPlot();

Locked