On Tue, Mar 27, 2018 at 9:26 AM, Alex Harui <[email protected]> wrote:
> > > On 3/27/18, 2:19 AM, "[email protected] on behalf of OmPrakash Muppirala" > <[email protected] on behalf of [email protected]> wrote: > > > > >Couple of questions: > > > >1. I would like to provide a drop down of options for some properties > >like > >Series.type like "bar", "line", etc. I believe you could do that in Flex > >using the [Inspectable] metadata tag. Does Royale support that? > > Royale will let you put any sort of metadata you want. [Inspectable] was > for the IDEs. I don't know which IDEs work with [Inspectable]. > > > >2. The above mxml, though works fine, seems a bit too verbose. Is it > >possible to specify default properties via the DefaultProperty metadata > >tag? > >For example, if SeriesList had this tag: [DefaultProperty("series")], > > > >we could simplify the seriesList element as: > > > ><ns2:seriesList> > ><ns2:SeriesList> > ><fx:Array> > ><ns2:Series name="Sales" type="bar" data="{this.salesData}" /> > ><ns2:Series name="Profit" type="line" data="{this.profitData}" /> > ></fx:Array> > ></ns2:SeriesList> > ></ns2:seriesList> > > > If series is an Array, I think you can even drop the fx:Array. > That worked. Thanks! > > <ns2:seriesList> > <ns2:SeriesList> > <ns2:Series name="Sales" type="bar" data="{this.salesData}" /> > <ns2:Series name="Profit" type="line" data="{this.profitData}" /> > </ns2:SeriesList> > </ns2:seriesList> > > What is SeriesList? When would someone need to replace SeriesList with an > alternative class to wrap the series? You might be able to drop that as > well by making SeriesList a bead. > SeriesList is an object that composes a series array. It will set change listeners on every Series object in the series array. When any of the change listeners fire, it will dispatch an event so as to apply the change to the chart and cause a re-render. I am not sure if I want to make that a bead. I don't see a reason to alter or re-implement the SeriesList behavior. Thanks, Om > > > HTH, > -Alex > >
