hi
i am generating 3D bar chart. i am using CategoryAxis as x-axis.
the graph represents weekly statistics.
now due to space issues i would like to have date format on x-axis as
"dd" whereas in the tooltip i would like to display the entire date
yyyy-MM-dd.
how do i acheieve this?
i can create StandardCategoryToolTipGenerator but if i pass DateFormat
in this, it is applied to the value axis which is actually plain
numbers. i want to apply this format to domain (x) axis.
if i use date directly on the x-axis, i am facing space issues as the
label is not displayed properly.
so basically if the date is 29 Jan 2007 i want to display it as
on x-axis : 29
in tooltip : 2007-01-29
any clues ?
thanks & regards
amey
dnx - 29 Jan 2007 09:25 GMT
> hi
>
[quoted text clipped - 21 lines]
> thanks & regards
> amey
Something like this should work:
((DateAxis) plot.getDomainAxis()).setDateFormatOverride(new
SimpleDateFormat("dd"));
DNX
ameyas - 29 Jan 2007 09:45 GMT
now wouldn't that throw ClassCastException ?
> ((DateAxis) plot.getDomainAxis()).setDateFormatOverride(new
> SimpleDateFormat("dd"));
>
> DNX
dnx - 29 Jan 2007 10:22 GMT
> now wouldn't that throw ClassCastException ?
yes... :/
sorry, i haven't noticed what is your x-axis