A discussion forum for JFreeChart (a 2D chart library for the Java platform).
-
reach2kanchan
- Posts: 32
- Joined: Wed Jan 07, 2009 5:09 am
Post
by reach2kanchan » Mon Nov 23, 2009 11:39 am
Hi,
At first thanks jfreechart team to develop such good API.It is really good.
I am facing a problem while color the axis level using setLabelPaint in XY chart.
I have used
Code: Select all
valueAxis.setLabelPaint(new Color(0,102,204));
timeAxis.setLabelPaint(new Color(0,102,204));
for color the level.But the color which i am seeing is not right.It is totally different from actual color.
Should i post the image?
Can anybody help to solve the problem?
Thanks
-
reach2kanchan
- Posts: 32
- Joined: Wed Jan 07, 2009 5:09 am
Post
by reach2kanchan » Mon Nov 23, 2009 2:16 pm
Hi,
I have also faced another problem if my Lebel color is dark blue and Axisline color is light blue then it is not properly come.Everything(level and axisline) comes in different color with dark.
Code: Select all
Paint labelsPaint = Color.decode("#00317A");
Paint axisPaint = Color.decode("#0066CC");
valueAxis.setLabelPaint(labelsPaint);
valueAxis.setAxisLinePaint(axisPaint);
timeAxis.setLabelPaint(labelsPaint);
timeAxis.setAxisLinePaint(axisPaint);
I think there have some problem in color.
Can anybody help about this matter?
Thanks
-
paradoxoff
- Posts: 1634
- Joined: Sat Feb 17, 2007 1:51 pm
Post
by paradoxoff » Mon Nov 23, 2009 9:32 pm
Two thoughts:
1. Make sure that the axis you are changing belongs to the chart that you are seeing.
2. Make sure that, after you apply the label and axis line paint to the axis, you are not changing it again. For example, applying a ChartTheme to your chart could change your settings.
-
reach2kanchan
- Posts: 32
- Joined: Wed Jan 07, 2009 5:09 am
Post
by reach2kanchan » Fri Nov 27, 2009 2:05 pm
Thanks for your reply.
But i have found the real cause.It is for image type.Basically i was viewing the chart in web and temporarily it was saved as JPEG format.I don't know what JPEG format do but it is main reason.When i have saved the chart as PNG format everything is fine.
Thanks