Chart X Axis Labels inbetween data points? [message #1014879] |
Tue, 26 February 2013 11:23  |
Eclipse Guest Messages: 93 Registered: February 2013 Location: Vienna |
Member |
|
|
Hi,
I have a dataset with categories on x axis and numbers on y axis. But the categories (x axis) represent datetime values. I won't explain why I use the categories instead of a datetime axis, just accept that I have a reason for it 
So my problem now is that I want to display hours on the x axis labels. Since my datapoints represent hourly aggregates, it would be inappropriate to put the label "10:00" under a datapoint which actually represents the aggregate 10-11 o'clock. So I want the date/datetime/time to be displayed under the tick to the left of the category. That way, the datapoint for the aggregate 10-11 o'clock would be positioned in the middle of the label '10:00' and the label '11:00' which makes it easier for the user to understand that it's the aggregate of 10:00-11:00.
By the way: "Cross between categories" doesn't work because it moves both the label and the datapoint.
In the attached picture you will understand what I mean: I create the labels from a string (in beforeDrawAxisLabel) but they should appear under the ticks and not under the datapoints.
Any help is very much appreciated!
Thanks in advance for your input. Cheers, Jakob
[Updated on: Tue, 26 February 2013 11:28] by Moderator
|
|
|
|
Re: Chart X Axis Labels inbetween data points? [message #1014946 is a reply to message #1014941] |
Tue, 26 February 2013 17:07   |
Eclipse Guest Messages: 93 Registered: February 2013 Location: Vienna |
Member |
|
|
Thanks for the idea. That may work, but it puts some constraints: no chart resize, no resizing of the font / changing the font etc. Otherwise it will mess everything up. Furthermore it would not be possible to create a label for the last tick (as I would need one tick more than I have categories.
So... thanks so far, but if anybody has another idea I would appreciate it very much!
|
|
|
|
|
Re: Chart X Axis Labels inbetween data points? [message #1023091 is a reply to message #1022072] |
Sat, 23 March 2013 04:08   |
Eclipse Guest Messages: 93 Registered: February 2013 Location: Vienna |
Member |
|
|
No, I didn't find a solution and just went with labels '8:00-9:59 o'clock' for example. Maybe something which would work but which I did not try: A colleague came up with the idea: If I have the category 8:00 which stands for 8-10 o'clock, I would programmatically create a date add one hour, so the date would be 9:00. Then, in the axis settings, set the interval to 2, so that only ticks for 8:00 and 10:00 would be displayed. And the same for an interval of 1 hour, there one would set the interval to 1 and set the artificial date to 8:30.
|
|
|
|
Powered by
FUDForum. Page generated in 0.05142 seconds