0 Replies Latest reply on May 17, 2008 7:41 AM by flashharry!

    Dynamically changing chart labels

    flashharry! Level 1
      HI
      I'm after an how too really, point me in the right direction is possible.

      I have a new dashboard app, monitoring a server, last part is load balance.
      I created a daemon in C, that I can call and it gives me back server info, one being uptime, pre-processed by awk. returns current time in minutes, average load balance last minute, 5 minute, 15 minute all standard stuff.

      My flex app is set to call this daemon every minute and updates the display. Working great :)
      I have an array collection that I add too each time, pushing in current time, and the 3 average load balance numbers.

      I have this array collection as a data provider to a line chart, the chart happily plots the values. I assigned the current time too the horizontal category. So my chart plots 10.00,10.01,10.02,10.03,10.04 so on and so fourth each minute the values update.

      This is fine for about 30-40 minutes then the labels become too much.
      I would like to alter the horizontal axis scale a few times.
      So after say 30 minutes, show labels every 5 minutes, but still update data every minute. Then say after two hours change so the labels are every 15 minutes but still update every minute. Then if say 12 hours have gone by change to hours, so on and so fourth. could do value change on length of array collection, if last index is 30 we know 30 minutes have gone by, if last index is 120 then we know 2 hours have gone by etc.

      Next part, if the chart gets two much info. is there a way of scrolling the data off to the left, maybe a simple un-shift(remove item at) off the data will do, but would be nice to be able to scroll the data back and fourth is the user wanted too.

      Thanks in advance.
      BTW can we post images here? screen shots etc