5 Replies Latest reply on Jul 23, 2010 4:19 AM by allanjard

    SeriesInterpolate - remove data at start of array

    allanjard Level 1

      Hello all,


      I've been experimenting with the charts available in Flash Builder 4 and I love the abilities of the charts, but have run into one area which didn't quite work as I was expecting. Specifically, when adding and removing a data point from an array, with SeriesInterpolate set.


      I've put up three examples, as I expect these will make a lot more sense than me trying to explain it with words only!:


           - http://sprymedia.co.uk/media/misc/flex/linechart/LineChart-Add.swf

                - Clicking the button in the top right adds a new data point to the end of the data array, and the chart is smoothly updated (almost smoothly there is a 1px shift when animating which is odd...)


           - http://sprymedia.co.uk/media/misc/flex/linechart/LineChart-Delete.swf

                - Clicking the button (which is now labelled incorrectly) will remove the item at the start of the data array - but the chart draws this as if it were removing the end element.


           - http://sprymedia.co.uk/media/misc/flex/linechart/LineChart-AddDelete.swf

                - This is sort of what I'm eventually aiming for - a smooth side scroll chart, where new data is added at the end and the old data is sifted off the front. However the delete behaviour makes this look a bit odd.


      Is there a way to get the smooth transition I'm looking with SeriesInterpolate? Or and it be implemented in another way?


      Many thanks,