Flex :: Making DateTimeAxis With Weekly Labels Set Ticks On An Arbitrary Day Of The Week?
Jul 26, 2010
I'm using a CartesianChart with a DateTimeAxis to display weekly data in a Flex application.When I set dataUnits="weeks" and labelUnits="weeks" on the DateTimeAxis, it automatically places each major tick on a Sunday. However, I would like to provide users with the option of beginning the week on a Sunday or a Monday. How can I ask the DateTimeAxis to instead place the major ticks on a Monday (or some other day of week)?For example, if the user is looking at total sum of something over the week, and requests that weeks start on a Sunday, the Series data would look like:
x: Date(July 11, 2010) y: 25
x: Date(July 18, 2010) y: 30
x: Date(July 25, 2010) y: 32
[code]......
View 2 Replies
Similar Posts:
May 3, 2011
I've been trying for a while to set the number of labels being shown with a datetimeaxis being used for the y-axis. Unfortunately, I'm not able to get the desired behaviour.I'd like to have the y-axis separated into days (i.e. a tick on the axis for each day). However, it is spacing them out one week at a time. I have tried setting labelUnits and minorTickUnits to "days" but no joy.
<mx:DateTimeAxis id="vStepAxis" labelUnits="days" minorTickUnits="days" parseFunction="ParseDateForAxis" title="Date/Time"/>
View 1 Replies
Sep 23, 2011
I have a chart that uses a DateTimeAxis for the x-axis and a renderer defined for it. I also have a function defined for the label on the axis but I am not able to get the labels to show.
Trying to print out a static time to test working.
private function timeAxisLabelFunction(obj1:Object, obj2:Object, axis:IAxis):String
{
return "9:30AM";
}
[Code]....
Apparently, the font family I was using doesnt support a font style that is used in the renderer. Not sure what style attribute it is yet.
View 1 Replies
Jan 26, 2007
I'm using this great XML Calendar for a friend's band's website. It works really well, but I can't seem to change it so Sunday is the first day of the week.Below is the main code of the calendar, so if any kind soul could give it a looksee,
[Code]...
View 7 Replies
Dec 22, 2010
Still a newbie, I am trying to understand how labels work with buttons. So eventually, I can create a rollover effect and have a button on a menu either glow or have an effect.
So far just testing how labels work, I have made a movieclip with labels in it. Then made a test button to try to trigger movement from label to label. Nothing works. The movie clip simply runs over and over again.I have tried some tutorials, but using their as, still does not work.
[Code]...
View 2 Replies
Apr 10, 2011
I want to show a full 24 hours along the datetimeaxis wherever the values fed into it happen to fall. I thought that setting the minimum and maximum of a datetime axis on the chart would have that effect.
so I have private function loadDayComplete():void{ //called when data is reloaded. also includes reassigning the dataprovider of the chart.
[Code]...
When I load up the function though it doesn't plot any points when the min and max are set. If I take out the minimum and maximum they show up fine! I double checked in debug mode that the minChartDate and maxChartDate are what they should be.. but maybe I'm misunderstanding how minimum and maximum are supposed to function... I also tried widening the min/max to include several days and still no luck. I also tried assigning the min/max when the chart data changes like so:
View 1 Replies
Apr 12, 2011
I have a LineChart with a DateTimeAxis as horizontalAxis and a maximum set. If a point is beyond the maximum date, the whole segment will not appear. Yet, is there a way to make it appear until it reachs the border of the chart?The code here :
<?xml version="1.0"?>
<!-- Simple example to demonstrate the DateTimeAxis class. -->
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
[code].....
View 1 Replies
Jan 12, 2012
I have a chart with X-axis showing timeline and Y-axis showing value for an object. The time line values are in 'milliseconds'. I have give the user a way to select timeline, user can select a day/week/month/months. So, in my Chart I want to show all the data points for the selected range but want to limit the date labels displayed on the X-axis. For Ex: if user selects a week, I want to display Mon to Sun on the X-axis. And if user selects a day, want to display a label for every 3 hrs like that...
I guess it is possible if only, I look at the selected time range at run-time and based on the starting (t1) and end (t2) time, I make a decision. Is there any API available in Flex's DateTimeAxis to achieve this ? Or any other ideas on how to get this working ?
View 2 Replies
Sep 22, 2009
Is there a way in flex 3 chart component to display both the date and time using horizontal DateTimeAxis?
Currently the DateTimeAxis element has an attribute dataunits which allows to set the value to any of "milliseconds|seconds|minutes|hours|days|weeks|months|years" but I want to display the label as "2009/09/15 06:00:00" which includes the day and the time too.
[Code]...
View 1 Replies
Nov 17, 2009
I am working with a Flex DateTimeAxis. I have a scenario where the DateTimeAxis sometimes creates duplicate months on the Axis. The month label unit is generated based on a min/max value that is supplied to the DateTimeAxis, it is NOT generated by the series data as far as I can tell. In other words, the duplication does not exist within the data supplied to the chart, but is part of automatic label generation process that DateTimeAxis will execute when supplying a min/max value for the axis.[code]...
View 1 Replies
Oct 1, 2010
I'm working with an AreaSeries + DateTimeAxis in Flex 4. The dates for the time axis originate from a server in another time zone. I'd like to see the graph (in my local time zone) displayed using the server's time zone.I know that I can set the DateTimeAxis.displayLocalTime property to true or false, to have dates displayed in the local or UTC time zone. But the time zone I want is neither of those.Is there a simple way to make DateTimeAxis work with another time zone? Or even a complicated way?
View 2 Replies
Dec 2, 2010
This simple code results in November 7th in 2 places on the horizontal dateTimeAxis:
[Code]...
View 4 Replies
Feb 2, 2010
For example, today is Tuesday, Feb 02. Well the equivalent "Tuesday" from last year was on Feb 03. How can I find this out programmatically?
View 2 Replies
Mar 2, 2010
I could not find a method in Flex Date object to get the week of year (1 to 52)
What is the best way to find this? Is there any useful library for flex for such date operations like JodaTime in Java.
View 4 Replies
Feb 2, 2011
I'm sure there's a simple method or function out there to do this (at least I'm hoping there is). I want to return the name of a day of the week for a specific date using ActionScript.
For example, if I provide "2/2/2011" as a parameter, it should return "Wednesday". What's the best way to make this happen?
While both of them will work, I'm curious to know if anyone can think of a reason why one would be preferred over the other.
View 2 Replies
Jul 31, 2009
I'm working with an Adobe Flex project and I have data I'm plotting against a DateTimeAxis (X-axis) but because there are a lot of points, I have to do some manipulation and remove some objects in the array (I do this by copying data to another array, removing items, then copying the new array into the original array). However, sometimes after I do this, the date labels disappear off of the x-axis! Why does this happen? I look through my array and I cannot find a reason its occurring (no objects with nothing in them, everything appears in chronological order).
View 1 Replies
Aug 22, 2011
I'd like to convert an arbitrary string (or for easier process a string hash) to a float number between 0 and 1. The purpose is to create a function that returns a color code for a given string so the user always sees that entity in the same color that is generated from its name.OP included this code in comments (included here for readability):
var hashed:String = MD5.hash(input); // creates a 32 long hexa
const max:Number = Number("0xffffffffffffffffffffffffffffffff");
var hashedHexa:Number = Number("0x" + hashed);
[code]....
View 1 Replies
Jun 28, 2010
I have a problem zooming in on a line chart with a dateTimeAxis as horizontal axis. I want to zoom in and out, by setting the minimum and the maximum attribute of the dateTimeAxis with a slider. The date labels change as should, but the lines disappear as I set the minimum or the maximum. Here's a part of the code I have:
[Code]...
View 2 Replies
May 12, 2009
I have an arbitrary number of files that I need to load in an AIR app.I want to iterate through an array of File object and create and launch Loaders for each one's File.url.When they are done (event COMPLETED or IOErrorEvent.IO_ERROR), I want to stuff their data somewhere. If they fail, I want to make an exception report. I cannot find any way to reference the File object from the event listener (certainly not the IO_ERROR)The best way would be to create individual event handlers for each Launcher that had the File information "hard-coded" into it. At the very least, I could use the function itself as an index to a Dictionary:
foo(fileToLoad : File) : void
{
var theCompletedHandler : Function =
{
[code]....
Can I use event.currentTaget and use the Loader instance as an index? Will that have any weird dependencies ?
View 1 Replies
Jun 21, 2011
I have a LineChar, with one LineSeries, on which i am drawing values ( Y axis ), on specific time ( X axis ).The problem is that i don't wanna the points which is distanced on a specific distance in time ( let say 6 hours ) to be connected.Is there a way to make LineSeries with DateTimeAxis not connecting points distanted in specific time ?
View 1 Replies
May 5, 2011
I would like to see different colors in my DateChooser / CalendarLayout for weekdays and weekend days. I would also like to achieve this using a custom stylename (for example: "weekColor" and "weekendColor".
View 2 Replies
May 15, 2011
I'm trying to write a custom fadeTo(component, x, y):void method, which takes an arbitrary Flex Component as an argument and moves it to a given location, but smoothly.
The problem I'm running into is the following.
I want to send the component itself as argument, like this: (using Button as an example only)
fadeTo(myButton, 200, 500);
(this should move myButton smoothly from its current position to the position indicated as parameter)
However, I don't really know what type an arbitrary Flex Component is. How should I handle that?
View 1 Replies
Feb 18, 2006
I've just come upon an idea, on how people could learn to write AS. Every week there would be announced projects that would have to be written in AS. There could also be levels of difficulty for different people.
After annoucing the task, for instance: "Make a dynamic slide show, that will load files from a XML file, and display them by fading-in / fading-out at some intervals". People could start writing something, and if someone would have any trouble, It could have been answered in the topic. After a week, the best working projects would be selected and added as a opensource, or mayby even converted into tutorials.
I know that my idea was allready made a hundred times, that was just an example. If the idea would pass, there could be a poll, or another topic for project ideas.
I think that it's an idea worth thinking about. I personally would participate in it, just for the challenge.
P.S: Im posting this here, because in other forums the topic could just die, w/o much people viewing it.
View 5 Replies
Nov 2, 2008
I have a flash program which uses asp to work with amicrosoft access database and Im trying to find the best way toupdate information at a specific time. I have time and date storedin a record in the database and would like to have the flashprogram update some text when this time and date is reached. Sothis could be hourly,daily,weekly or monthly.Would it be best to use the timer event or is there a betterway to do this? I think the timer event would be useful forrefreshing every hour, however im not so sure about thedaily,weekly and monthly options. If I was to refresh theinformation every week or month, would I leave timer running for awhole month or is there are better way to do it?
View 4 Replies
Jan 30, 2011
I've created a circle and I need to draw equal separated ticks along ityou know like in a humanscale analogue machine.
View 5 Replies
Sep 2, 2011
I'm making a snake game and on every tick the snake moves. because the snake is moving a whole unit on each tick the animation is jumpy. The game is on an invisable grid so the snake can only change directions at specific points. Would it be considered better practice to have a timer that will move the snake a pixels at a time counting it with a variable, and on every n tick run the code to change direction. Or is it better to have two separate timers; one for move the snake a pixel at a time and another for changing the snakes direction?
View 1 Replies
May 21, 2010
I find the output of the following code extremely strange!
ActionScript Code:
package {
import flash.display.Sprite;
[code]....
View 3 Replies
Sep 17, 2010
Is there a way to set a fixed number of ticks on a DateTimeAxis?
View 3 Replies
Jun 25, 2011
im completely lost on how to do a simple multiline label. The docs say that labels are best used as single lined elements, but that alludes to it being able to do multiline if necessary. Anyone have any clarification on the subject?
View 3 Replies
Apr 18, 2010
Can I set label visibility in Flex ?
[Code]...
View 1 Replies