1 Reply Latest reply on Aug 27, 2008 10:01 AM by Newsgroup_User

    ColumnChart - display number of items per time interval

    anoweb Level 1
      I have a collection of objects. Each object has a "time" property of type Date.

      I need to display a ColumnChart which shows one column representing the number of objects in a time interval. For example if I had 5 objects:
      2 have a "time" of 3:00:00
      1 has a "time" of 3:00:12
      2 have a "time" of 3:00:17

      And my time interval should be 10 seconds...then I would have to columns one representing 3:00:00 - 3:00:09 and one representing 3:00:10 - 3:00:19. The first column would have a y-value of 2 and the second column would have a y-value of 3.

      Any suggestions on how to do this? Should I maintain a Dictionary that maps a time to a count? and bind my chart to that Dictionary?
        • 1. Re: ColumnChart - display number of items per time interval
          Level 7

          "anoweb" <webforumsuser@macromedia.com> wrote in message
          news:g93s6o$oca$1@forums.macromedia.com...
          >I have a collection of objects. Each object has a "time" property of type
          >Date.
          >
          > I need to display a ColumnChart which shows one column representing the
          > number
          > of objects in a time interval. For example if I had 5 objects:
          > 2 have a "time" of 3:00:00
          > 1 has a "time" of 3:00:12
          > 2 have a "time" of 3:00:17
          >
          > And my time interval should be 10 seconds...then I would have to columns
          > one
          > representing 3:00:00 - 3:00:09 and one representing 3:00:10 - 3:00:19.
          > The
          > first column would have a y-value of 2 and the second column would have a
          > y-value of 3.
          >
          > Any suggestions on how to do this? Should I maintain a Dictionary that
          > maps a
          > time to a count? and bind my chart to that Dictionary?

          Use a dataFunction.

          HTH;

          Amy