1 Reply Latest reply on Oct 8, 2008 1:07 PM by Newsgroup_User

    lineSeries.form

    MrFork Level 1
      Im going mental. Can please someone help me. Im trying to dynamically create a series on my line chart with the code below. All works absolutely fine apart from when I try to add ls.form = "segment" I get a 1119 Error

      Access of possibly undefined property.

      Am I missing something stupid here or is there something wrong with me flex, as I've clearly statically created a lineseries and given it a form = "segment"

      It doesnt come up in the code helping function, so I type ls. and form is not present in the list.

      PLEASE HELP!

      public function addSeries2007():void
      {
      //Get the 2007 Data
      MonthSalesValue2007HTTP.send();


      //Add a new series to the country graph
      var ls:LineSeries = new LineSeries();

      ls.displayName = "2007";
      ls.yField = 'salesvalue';
      ls.xField = 'month';
      ls.form = "segment";

      ls.dataProvider = MonthSalesValue2007;
      ls.width = 5;
      summarychart.series.push(ls);

      summarychart.series = summarychart.series;


      dataGrid2007.dataProvider = MonthSalesValue2008;
      }
        • 1. Re: lineSeries.from
          Level 7

          "MrFork" <webforumsuser@macromedia.com> wrote in message
          news:gcj0jr$qoh$1@forums.macromedia.com...
          > Im going mental. Can please someone help me. Im trying to dynamically
          > create a
          > series on my line chart with the code below. All works absolutely fine
          > apart
          > from when I try to add ls.form = "segment" I get a 1119 Error
          >
          > Access of possibly undefined property.
          >
          > Am I missing something stupid here or is there something wrong with me
          > flex,
          > as I've clearly statically created a lineseries and given it a form =
          > "segment"
          >
          > It doesnt come up in the code helping function, so I type ls. and form is
          > not
          > present in the list.
          >
          > PLEASE HELP!
          >
          > public function addSeries2007():void
          > {
          > //Get the 2007 Data
          > MonthSalesValue2007HTTP.send();
          >
          >
          > //Add a new series to the country graph
          > var ls:LineSeries = new LineSeries();
          >
          > ls.displayName = "2007";
          > ls.yField = 'salesvalue';
          > ls.xField = 'month';
          > ls.form = "segment"

          I think that's a style, so perhaps
          ls.setStyle('form', 'segment')
          would work?