I was given the task of building a flex 3 chart that relates each day(ex: 15/06/2010) of a pre-determined period with a time in hours (ex: 03:34:45 -> that would be 3 hours, 34 minutes, 45 seconds). In other words, a certain amount of time in hours for each day.
I've managed to set the 'days axis' using DateTimeAxis. But I'm clueless about how to do the same thing for the 'hours axis', I've tried a lot of different things, all of which have failed.. Any ideas?
I'm doing the following for the 'days axis':
var vAxis:DateTimeAxis = new DateTimeAxis();
vAxis.dataUnits = "days";
// Set this to false to display the leftmost label.
vAxis.alignLabelsToUnits = false;
// object from it.
vAxis.parseFunction = createDate;
barChart.verticalAxis = vAxis;
public function createDate(s:String):Date {
var a:Array = s.split("/");
// The existing String s is in the format "MM/DD/YYYY".
// To create a Date object, you pass "YYYY,MM,DD",
// where MM is zero-based, to the Date() constructor.
var newDate:Date = new Date(a[2],a[1]-1,a[0]);
return newDate;
}