1 Reply Latest reply on Oct 22, 2008 7:14 PM by Newsgroup_User

    Locking LineSeries update until data ready

    ybjames
      I have a LineChart that displays several LineSeries which are updated on certain mouse clicks. The LineSeries use a Bindable ArrayCollection as their dataProvider. This ArrayCollection is updated using a function that employs an HTTPService.

      There is a minor problem in that the asynchronous monitoring of the dataProvider by the LineSeries causes them to being updating the LineChart before my data update method has finished. The result is a visible jump in the chart when transitioning to the new data.

      Is there a way to "freeze" the LineSeries before I begin my update and then "unfreeze" it when I'm finished? This would prevent the LIneSeries from noticing the changing dataProvider until the data set is complete.

      Thanks,

      James
        • 1. Re: Locking LineSeries update until data ready
          Level 7

          "ybjames" <webforumsuser@macromedia.com> wrote in message
          news:gdo2ei$89e$1@forums.macromedia.com...
          >I have a LineChart that displays several LineSeries which are updated on
          > certain mouse clicks. The LineSeries use a Bindable ArrayCollection as
          > their
          > dataProvider. This ArrayCollection is updated using a function that
          > employs an
          > HTTPService.
          >
          > There is a minor problem in that the asynchronous monitoring of the
          > dataProvider by the LineSeries causes them to being updating the LineChart
          > before my data update method has finished. The result is a visible jump
          > in the
          > chart when transitioning to the new data.
          >
          > Is there a way to "freeze" the LineSeries before I begin my update and
          > then
          > "unfreeze" it when I'm finished? This would prevent the LIneSeries from
          > noticing the changing dataProvider until the data set is complete.

          yourArrayCollection.disableAutoUpdate()