2 Replies Latest reply on Mar 17, 2008 11:22 PM by Deeptika Gottipati

    ScrollableAxisRenderer in Line Chart

    FlexyBoy Level 1
      Hello Flex 3 Users,

      I have a question regarding ScrollableAxisRenderer.
      You can take a look at the example below where ScrollableAxisRenderer is used : http://www.connectedpixel.com/blog/srcview/scrollchart/index.html

      However I want to use it with LineChart. In the example above it is used with BarChart and Column Chart. I also modified the .as file to use LineChart but when load my swf, a blank screen is displayed.

      Is ScrollableAxisRenderer only limited to BarChart and ColumnChart ?

      Or if their is a way to do it in LineChart, I would like to know it.

      Happy flexing to All.
        • 1. Re: ScrollableAxisRenderer in Line Chart
          jylaxx Level 1
          I don't know what ScrollableAxisRenderer is doing but if you want to scroll (or zoom) a chart you just have to play with minimum and maximum properties of the axis...
          • 2. ScrollableAxisRenderer in Line Chart
            Deeptika Gottipati Adobe Employee
            Replacing ColumnSeries with LineSeries in the given sample ColumnScrollChart... should work. If you want to use only LineChart for LineSeries but not ColumnChart, you may have to change the code for ScrollableAxisRenderer. In createChildren() some code that makes it usable only with ColumnChart should be commented out to make it work for all other charts.

            Here it is

            else //if (this.chart is ColumnChart)
            {
            if (!horizontal){
            throw new Error("ScrollableAxisRenderer can only render the horizontal axis on a ColumnChart");
            }
            }
            /* else{
            throw new Error("ScrollableAxisRenderer only works with ColumnCharts and BarCharts");
            } */