I want to change font type,font size of dual axis chart

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
vairamuthum
Posts: 9
Joined: Tue Jul 11, 2006 8:10 am
Location: Delhi
Contact:

I want to change font type,font size of dual axis chart

Post by vairamuthum » Thu Aug 10, 2006 11:06 am

Dear Dave and all,
With the help of our jfree members i have created a dual axis chart.But i faced a problem that i am trying to change the font size,font type of label,tick units but i got only one left axis values changed according to the font type and size and set by me,other axis(right side doesn't get changed).

Code: Select all

final JFreeChart chart = new JFreeChart("Unbilled Milestones Chart", plot);
			chart.setBackgroundPaint(Color.white);
			//chart.getLegend().setAnchor(Legend.SOUTH);
			plot.setBackgroundPaint(new Color(0xEE, 0xEE, 0xFF));
			plot.setDomainAxisLocation(AxisLocation.BOTTOM_OR_RIGHT);
			plot.setDataset(1, dataset2);
			plot.mapDatasetToRangeAxis(1, 1);
			final Font f=new Font("Diagram", Font.BOLD, 11);
			final ValueAxis axis2 = new NumberAxis("Amount");
			plot.setRangeAxis(1, axis2);
			rangeAxis.setUpperBound(15);
			plot.setRangeAxisLocation(1, AxisLocation.BOTTOM_OR_RIGHT);
			final BarRenderer renderer2 = new BarRenderer();
			plot.setRenderer(1, renderer2);
final NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis();
			final Font f=new Font("Diagram", Font.BOLD, 11);
			plot.getDomainAxis().setLabelFont(f);
			plot.getDomainAxis().setTickLabelFont(f);	
			plot.getRangeAxis().setLabelFont(f);
			plot.getRangeAxis().setTickLabelFont(f);




	
I am really happy if i got the solution


Regards,
Vairamuthu M
						

Locked