You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@royale.apache.org by OmPrakash Muppirala <bi...@gmail.com> on 2018/03/16 09:21:13 UTC

Setting/binding data in mxml - what am I doing wrong?

Please take a look at these usage examples: [1], [2]

I am trying to set/bind arrays as values to the chart components.  But
those values dont get applied at all.

Can someone please take a look?

The entire app can be found here: [3]

Thanks,
Om


[1]
https://github.com/apache/royale-asjs/blob/feature/echarts/examples/royale/ECharts/src/Main.mxml#L26
[2]
https://github.com/apache/royale-asjs/blob/feature/echarts/examples/royale/ECharts/src/Main.mxml#L31
[3]
https://github.com/apache/royale-asjs/blob/feature/echarts/examples/royale/ECharts

Re: Setting/binding data in mxml - what am I doing wrong?

Posted by Carlos Rovira <ca...@apache.org>.
Hi Om,

that looks great! Congrats! :)

about questions, only can respond to 2), yes we have DefaultProperty, for
example in Group.as you can see [DefaultProperty("mxmlContent")]

2018-03-27 11:19 GMT+02:00 OmPrakash Muppirala <bi...@gmail.com>:

> And here is the mxml for this chart:
>
> <ns2:ECharts id="chart">
> <ns2:chartOptions>
> <ns2:EChartsOptions>
> <ns2:title>
> <ns2:Title text="Sales vs. Profit" show="true"
> link="https://ecomfe.github.io/echarts-examples/public/index.html" target=
> "_self" />
> </ns2:title>
> <ns2:xAxis>
> <ns2:XAxis data="{this.data}" position="top" />
> </ns2:xAxis>
> <ns2:yAxis>
> <ns2:YAxis/>
> </ns2:yAxis>
> <ns2:seriesList>
> <ns2:SeriesList>
> <ns2:series>
> <fx:Array>
> <ns2:Series name="Sales" type="bar" data="{this.salesData}" />
> <ns2:Series name="Profit" type="line" data="{this.profitData}" />
> </fx:Array>
> </ns2:series>
> </ns2:SeriesList>
> </ns2:seriesList>
> </ns2:EChartsOptions>
> </ns2:chartOptions>
> </ns2:ECharts>
>
>
> 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?
>
> 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>
>
>
> On Tue, Mar 27, 2018 at 2:01 AM, OmPrakash Muppirala <bigosmallm@gmail.com
> >
> wrote:
>
> > Ah, thanks for catching that.  Here is a screenshot: https://snag.gy/6W
> > XsCi.jpg
> >
> > Regards,
> > Om
> >
> > On Tue, Mar 27, 2018 at 1:59 AM, Carlos Rovira <ca...@apache.org>
> > wrote:
> >
> >> Hi Om,
> >>
> >> that's great, but image is not shown, better upload to snaggit and then
> >> send the link
> >> thanks for working on that! :)
> >>
> >> 2018-03-27 10:54 GMT+02:00 OmPrakash Muppirala <bi...@gmail.com>:
> >>
> >> > Thanks for the pointers, Alex and Piotr.  I was able to make this
> work.
> >> > Now we have a nice little Echarts chart showing up :-)
> >> >
> >> >
> >> > One issue I noticed was that setting values inside an anonymous
> function
> >> > does not trigger bindings.  I'm not sure if that is a bug or an
> expected
> >> > feature.  Thoughts?
> >> >
> >> > In any case, I am now unblocked so I will be able add more features.
> I
> >> > will put up a demo/example page for this work soon.
> >> >
> >> > Thanks,
> >> > Om
> >> >
> >> >
> >> > On Mon, Mar 26, 2018 at 9:25 AM, Alex Harui <aharui@adobe.com.invalid
> >
> >> > wrote:
> >> >
> >> >> In the end, DataBinding is really just a convenient way to generate
> >> >> listeners for change events and handlers that update things.  When
> you
> >> >> look at nested data structures, some kinds of changes are easily
> >> detected
> >> >> and others are not.  It is useful to understand what kinds of changes
> >> >> could be made.  I listed some possibilities earlier.
> >> >>
> >> >> For a series:
> >> >> 1) change the entire ArrayList
> >> >> 2) add/remove items
> >> >> 3) change the data in the item itself.
> >> >> 4) change the array wrapped by the ArrayList
> >> >>
> >> >> Each of these requires code that detects changes at different levels.
> >> >> Most of Royale can easily detect #1.  You have to either change to a
> >> >> subclass of ArrayList or drop a bead on it to detect #2.  I don't
> think
> >> >> we've written code for #3 yet.  Not sure about #4.  For #3, event
> >> >> listeners need to be added on each item in the ArrayList (and removed
> >> if
> >> >> the item is removed from the ArrayList).  We don't handle all of
> these
> >> >> cases out-of-the-box for PAYG reasons.
> >> >>
> >> >> So, you have to understand how the data is changing and get it to
> >> trigger
> >> >> events on those changes.  And possibly use a different DataBinding
> >> >> implementation to detect those changes at certain times.  That's what
> >> >> ItemRendererDataBinding does.
> >> >>
> >> >> HTH,
> >> >> -Alex
> >> >>
> >> >> On 3/26/18, 1:05 AM, "Piotr Zarzycki" <pi...@gmail.com>
> >> wrote:
> >> >>
> >> >> >Om,
> >> >> >
> >> >> >You are right! I did look into the PieChart and found  ChartBase,
> >> which
> >> >> >extends List, but you are using EChart which is simple UIBase.
> >> >> >However still probably should be similar bead factory created which
> >> >> >handles
> >> >> >creation of each item.
> >> >> >
> >> >> >Sorry for the confusion.
> >> >> >
> >> >> >Thanks, Piotr
> >> >> >
> >> >> >2018-03-26 9:54 GMT+02:00 OmPrakash Muppirala <bigosmallm@gmail.com
> >:
> >> >> >
> >> >> >> So, if I create a echarts.SeriesList class that extends ArrayList
> -
> >> it
> >> >> >>can
> >> >> >> handle the addition and updates of Series objects.  Is that a
> better
> >> >> >> approach?
> >> >> >>
> >> >> >> Thanks,
> >> >> >> Om
> >> >> >>
> >> >> >> On Mon, Mar 26, 2018 at 12:47 AM, OmPrakash Muppirala <
> >> >> >> bigosmallm@gmail.com>
> >> >> >> wrote:
> >> >> >>
> >> >> >> >
> >> >> >> >
> >> >> >> > On Mon, Mar 26, 2018 at 12:34 AM, Piotr Zarzycki <
> >> >> >> > piotrzarzycki21@gmail.com> wrote:
> >> >> >> >
> >> >> >> >> Hi Om,
> >> >> >> >>
> >> >> >> >> Since your base chart class is a actually a List,
> >> >> >> >
> >> >> >> >
> >> >> >> > I'm confused.  How is it a List?
> >> >> >> >
> >> >> >> >
> >> >> >> >> your EChart should use
> >> >> >> >> [1] and [2]. However it is possible that you will have to
> >> implement
> >> >> >>your
> >> >> >> >> own Factory which is extends the current one.
> >> >> >> >>
> >> >> >> >> [1]
> >> >> >>https://na01.safelinks.protection.outlook.com/?url=https%
> >> >> 3A%2F%2Fgoo.gl%2
> >> >> >>FafXdPr&data=02%7C01%7Caharui%40adobe.com%7C47043e4531a148
> >> >> aef4d208d592f05
> >> >> >>00e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636576483
> >> >> 221343567&sdata
> >> >> >>=%2FyCH3DmV45%2FNp8O0shMTRoSnbhXpOTUfHKCpCsSlSkI%3D&reserved=0
> >> >> >> >> [2]
> >> >> >>https://na01.safelinks.protection.outlook.com/?url=https%
> >> >> 3A%2F%2Fgoo.gl%2
> >> >> >>FNz8YbE&data=02%7C01%7Caharui%40adobe.com%7C47043e4531a148
> >> >> aef4d208d592f05
> >> >> >>00e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636576483
> >> >> 221343567&sdata
> >> >> >>=E2ZaeAOXXKA4gEACwPx6D%2B4oUiwT%2Bk2QLSeKEl%2BEGTM%3D&reserved=0
> >> >> >> >
> >> >> >> >
> >> >> >> > Thanks for the pointers.  I will study this code and see how I
> can
> >> >> >>adapt
> >> >> >> > this.
> >> >> >> >
> >> >> >> > Regards,
> >> >> >> > Om
> >> >> >> >
> >> >> >> >
> >> >> >> >>
> >> >> >> >>
> >> >> >> >> Thanks, Piotr
> >> >> >> >>
> >> >> >> >> 2018-03-26 9:16 GMT+02:00 OmPrakash Muppirala <
> >> bigosmallm@gmail.com
> >> >> >:
> >> >> >> >>
> >> >> >> >> > Okay, I was able to make quite a bit of progress on the
> ECharts
> >> >> >> effort.
> >> >> >> >> > The next thing I am stuck on is on how to listen to changes
> to
> >> >> >>items
> >> >> >> in
> >> >> >> >> an
> >> >> >> >> > ArrayList.
> >> >> >> >> > This is how the mxml looks like:
> >> >> >> >> >
> >> >> >> >> > <ns2:ECharts id="chart">
> >> >> >> >> > <ns2:chartOptions>
> >> >> >> >> > <ns2:EChartsOptions>
> >> >> >> >> > <ns2:title>
> >> >> >> >> > <ns2:Title text="My ECharts Title" show="true"
> >> >> >> >> >
> >> >> >>link="https://na01.safelinks.protection.outlook.com/?url=
> >> >> http%3A%2F%2Fwww
> >> >> >>.google.com&data=02%7C01%7Caharui%40adobe.com%7C47043e4531
> >> >> a148aef4d208d59
> >> >> >>2f0500e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C63657
> >> >> 6483221343567&s
> >> >> >>data=Z1QFgp5ZetKGJay0kOB5HIfLUaSGX55jZvf1A8Mx5Dk%3D&reserved=0"
> >> >> >>target="_self" />
> >> >> >> >> > </ns2:title>
> >> >> >> >> > <ns2:xAxis>
> >> >> >> >> > <ns2:XAxis data="{this.data}" position="top" />
> >> >> >> >> > </ns2:xAxis>
> >> >> >> >> > <ns2:yAxis>
> >> >> >> >> > <ns2:YAxis/>
> >> >> >> >> > </ns2:yAxis>
> >> >> >> >> > <ns2:series>
> >> >> >> >> > <js:ArrayList>
> >> >> >> >> > <ns2:Series name="Accounts" type="bar"
> >> data="{this.seriesData}" />
> >> >> >> >> > </js:ArrayList>
> >> >> >> >> > </ns2:series>
> >> >> >> >> > </ns2:EChartsOptions>
> >> >> >> >> > </ns2:chartOptions>
> >> >> >> >> > </ns2:ECharts>
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> > The databinding on xAxis.data works fine now.  Now I need to
> >> make
> >> >> >>the
> >> >> >> >> same
> >> >> >> >> > thing work with series[0].data.
> >> >> >> >> >
> >> >> >> >> > The relevant classes are here:
> >> >> >> >> > EChartsOptions.as:
> >> >> >> >> >
> >> >> >>https://na01.safelinks.protection.outlook.com/?url=https%
> >> >> 3A%2F%2Fgithub.c
> >> >> >>om%2Fapache%2Froyale-asjs%2Fblob%2F4ae36845c19a923a5&data=
> >> >> 02%7C01%7Caharu
> >> >> >>i%40adobe.com%7C47043e4531a148aef4d208d592f0500e%
> >> >> 7Cfa7b1b5a7b34438794aed2
> >> >> >>c178decee1%7C0%7C0%7C636576483221343567&sdata=tUpeAO4RBkOA
> >> >> dBWSEA8RGvjxhzU
> >> >> >>WdpPWXMAb8s%2B%2F0Lo%3D&reserved=0
> >> >> >> >> 8f795738b2f42
> >> >> >> >> > 8c2615d130/examples/royale/ECharts/src/echarts/EChartsOption
> >> s.as
> >> >> >> >> >
> >> >> >> >> > Series.as:
> >> >> >> >> >
> >> >> >>https://na01.safelinks.protection.outlook.com/?url=https%
> >> >> 3A%2F%2Fgithub.c
> >> >> >>om%2Fapache%2Froyale-asjs%2Fblob%2F4ae36845c19a923a5&data=
> >> >> 02%7C01%7Caharu
> >> >> >>i%40adobe.com%7C47043e4531a148aef4d208d592f0500e%
> >> >> 7Cfa7b1b5a7b34438794aed2
> >> >> >>c178decee1%7C0%7C0%7C636576483221343567&sdata=tUpeAO4RBkOA
> >> >> dBWSEA8RGvjxhzU
> >> >> >>WdpPWXMAb8s%2B%2F0Lo%3D&reserved=0
> >> >> >> >> 8f795738b2f42
> >> >> >> >> > 8c2615d130/examples/royale/ECharts/src/echarts/Series.as
> >> >> >> >> >
> >> >> >> >> > Any pointers?
> >> >> >> >> >
> >> >> >> >> > Thanks,
> >> >> >> >> > Om
> >> >> >> >> >
> >> >> >> >> > On Fri, Mar 16, 2018 at 9:16 AM, Alex Harui
> >> >> >><aharui@adobe.com.invalid
> >> >> >> >
> >> >> >> >> > wrote:
> >> >> >> >> >
> >> >> >> >> > > Om appears to be using Express Application, which should
> have
> >> >> >> >> > > ApplicationDataBinding baked in.  That can be verified in
> the
> >> >> >> >> debugger by
> >> >> >> >> > > checking what is on the strand.
> >> >> >> >> > >
> >> >> >> >> > > Bindings are not evaluated at instantiation time so the
> >> >> >>destination
> >> >> >> >> > > properties need to handle changing at runtime or the entire
> >> >> >> component
> >> >> >> >> > > needs to apply all properties at the right time.
> >> >> >> >> > >
> >> >> >> >> > > HTH,
> >> >> >> >> > > -Alex
> >> >> >> >> > >
> >> >> >> >> > > On 3/16/18, 2:35 AM, "Harbs" <ha...@gmail.com>
> wrote:
> >> >> >> >> > >
> >> >> >> >> > > >I’m pretty sure that only works if the view is a separate
> >> mxml
> >> >> >> file.
> >> >> >> >> > > >
> >> >> >> >> > > >> On Mar 16, 2018, at 11:28 AM, Piotr Zarzycki
> >> >> >> >> > > >><pi...@gmail.com> wrote:
> >> >> >> >> > > >>
> >> >> >> >> > > >> I'm also wondering whether it will work if he apply
> >> >> >> >> > <js:ViewDataBinding
> >> >> >> >> > > >>/>
> >> >> >> >> > > >> in View only...
> >> >> >> >> > > >>
> >> >> >> >> > > >> 2018-03-16 10:26 GMT+01:00 Harbs <harbs.lists@gmail.com
> >:
> >> >> >> >> > > >>
> >> >> >> >> > > >>> It looks like you are missing
> >> <js:ApplicationDataBinding/>
> >> >> >> >> > > >>>
> >> >> >> >> > > >>>> On Mar 16, 2018, at 11:21 AM, OmPrakash Muppirala
> >> >> >> >> > > >>>><bi...@gmail.com>
> >> >> >> >> > > >>> wrote:
> >> >> >> >> > > >>>>
> >> >> >> >> > > >>>> Please take a look at these usage examples: [1], [2]
> >> >> >> >> > > >>>>
> >> >> >> >> > > >>>> I am trying to set/bind arrays as values to the chart
> >> >> >> components.
> >> >> >> >> > But
> >> >> >> >> > > >>>> those values dont get applied at all.
> >> >> >> >> > > >>>>
> >> >> >> >> > > >>>> Can someone please take a look?
> >> >> >> >> > > >>>>
> >> >> >> >> > > >>>> The entire app can be found here: [3]
> >> >> >> >> > > >>>>
> >> >> >> >> > > >>>> Thanks,
> >> >> >> >> > > >>>> Om
> >> >> >> >> > > >>>>
> >> >> >> >> > > >>>>
> >> >> >> >> > > >>>> [1]
> >> >> >> >> > > >>>>
> >> >> >> >> > > >>>>https://na01.safelinks.protection.outlook.com/?url=
> >> >> >> >> > > https%3A%2F%2Fgithub
> >> >> >> >> > > >>>>.com%2Fapache%2Froyale-asjs%2Fblob%2Ffeature%2F&data=
> >> >> >> >> > > 02%7C01%7Caharui%4
> >> >> >> >> > > >>>>0adobe.com%7Cc0b67f1e7b0b44699adb08d58b21
> >> >> >> >> > > 4cf5%7Cfa7b1b5a7b34438794aed2c
> >> >> >> >> > > >>>>178decee1%7C0%7C0%7C636567897496708478&sdata=
> >> >> >> >> > > zjAObepBqE9V2O8ktwnjs%2F%2
> >> >> >> >> > > >>>>Fpl%2F0J%2FIpj%2B1%2FsCTK%2B6WA%3D&reserved=0
> >> >> >> >> > > >>> echarts/examples/royale/ECharts/src/Main.mxml#L26
> >> >> >> >> > > >>>> [2]
> >> >> >> >> > > >>>>
> >> >> >> >> > > >>>>https://na01.safelinks.protection.outlook.com/?url=
> >> >> >> >> > > https%3A%2F%2Fgithub
> >> >> >> >> > > >>>>.com%2Fapache%2Froyale-asjs%2Fblob%2Ffeature%2F&data=
> >> >> >> >> > > 02%7C01%7Caharui%4
> >> >> >> >> > > >>>>0adobe.com%7Cc0b67f1e7b0b44699adb08d58b21
> >> >> >> >> > > 4cf5%7Cfa7b1b5a7b34438794aed2c
> >> >> >> >> > > >>>>178decee1%7C0%7C0%7C636567897496708478&sdata=
> >> >> >> >> > > zjAObepBqE9V2O8ktwnjs%2F%2
> >> >> >> >> > > >>>>Fpl%2F0J%2FIpj%2B1%2FsCTK%2B6WA%3D&reserved=0
> >> >> >> >> > > >>> echarts/examples/royale/ECharts/src/Main.mxml#L31
> >> >> >> >> > > >>>> [3]
> >> >> >> >> > > >>>>
> >> >> >> >> > > >>>>https://na01.safelinks.protection.outlook.com/?url=
> >> >> >> >> > > https%3A%2F%2Fgithub
> >> >> >> >> > > >>>>.com%2Fapache%2Froyale-asjs%2Fblob%2Ffeature%2F&data=
> >> >> >> >> > > 02%7C01%7Caharui%4
> >> >> >> >> > > >>>>0adobe.com%7Cc0b67f1e7b0b44699adb08d58b21
> >> >> >> >> > > 4cf5%7Cfa7b1b5a7b34438794aed2c
> >> >> >> >> > > >>>>178decee1%7C0%7C0%7C636567897496708478&sdata=
> >> >> >> >> > > zjAObepBqE9V2O8ktwnjs%2F%2
> >> >> >> >> > > >>>>Fpl%2F0J%2FIpj%2B1%2FsCTK%2B6WA%3D&reserved=0
> >> >> >> >> > > >>> echarts/examples/royale/ECharts
> >> >> >> >> > > >>>
> >> >> >> >> > > >>>
> >> >> >> >> > > >>
> >> >> >> >> > > >>
> >> >> >> >> > > >> --
> >> >> >> >> > > >>
> >> >> >> >> > > >> Piotr Zarzycki
> >> >> >> >> > > >>
> >> >> >> >> > > >> Patreon:
> >> >> >> >> > > >>*https://na01.safelinks.protection.outlook.com/?url=
> >> >> >> >> > > https%3A%2F%2Fwww.pat
> >> >> >> >> > > >>reon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.
> com
> >> >> >> >> > > %7Cc0b67f1e7b0b
> >> >> >> >> > > >>44699adb08d58b214cf5%7Cfa7b1b5a7b34438794aed2c178de
> >> >> >> >> > > cee1%7C0%7C0%7C6365678
> >> >> >> >> > > >>97496708478&sdata=B%2FFqHMwrwAGEnorLx5Z4kia4K73rXy
> >> >> >> >> > > RtoTn9kE0xDOg%3D&reserv
> >> >> >> >> > > >>ed=0
> >> >> >> >> > > >>
> >> >> >> >> > > >><https://na01.safelinks.protection.outlook.com/?url=
> >> >> >> >> > > https%3A%2F%2Fwww.pat
> >> >> >> >> > > >>reon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.
> com
> >> >> >> >> > > %7Cc0b67f1e7b0b
> >> >> >> >> > > >>44699adb08d58b214cf5%7Cfa7b1b5a7b34438794aed2c178de
> >> >> >> >> > > cee1%7C0%7C0%7C6365678
> >> >> >> >> > > >>97496708478&sdata=B%2FFqHMwrwAGEnorLx5Z4kia4K73rXy
> >> >> >> >> > > RtoTn9kE0xDOg%3D&reserv
> >> >> >> >> > > >>ed=0>*
> >> >> >> >> > > >
> >> >> >> >> > >
> >> >> >> >> > >
> >> >> >> >> >
> >> >> >> >>
> >> >> >> >>
> >> >> >> >>
> >> >> >> >> --
> >> >> >> >>
> >> >> >> >> Piotr Zarzycki
> >> >> >> >>
> >> >> >> >> Patreon:
> >> >> >>*https://na01.safelinks.protection.outlook.com/?url=https%
> >> >> 3A%2F%2Fwww.pat
> >> >> >>reon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com
> >> >> %7C47043e4531a1
> >> >> >>48aef4d208d592f0500e%7Cfa7b1b5a7b34438794aed2c178decee1%
> >> >> 7C0%7C0%7C6365764
> >> >> >>83221343567&sdata=btUXyJZQB%2F9AgUawlpJ29StZvDvCgOwJYeyZ%2
> >> >> BjJ6YTk%3D&rese
> >> >> >>rved=0
> >> >> >> >>
> >> >> >><https://na01.safelinks.protection.outlook.com/?url=https%
> >> >> 3A%2F%2Fwww.pat
> >> >> >>reon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com
> >> >> %7C47043e4531a1
> >> >> >>48aef4d208d592f0500e%7Cfa7b1b5a7b34438794aed2c178decee1%
> >> >> 7C0%7C0%7C6365764
> >> >> >>83221343567&sdata=btUXyJZQB%2F9AgUawlpJ29StZvDvCgOwJYeyZ%2
> >> >> BjJ6YTk%3D&rese
> >> >> >>rved=0>*
> >> >> >> >>
> >> >> >> >
> >> >> >> >
> >> >> >>
> >> >> >
> >> >> >
> >> >> >
> >> >> >--
> >> >> >
> >> >> >Piotr Zarzycki
> >> >> >
> >> >> >Patreon:
> >> >> >*https://na01.safelinks.protection.outlook.com/?url=https%
> >> >> 3A%2F%2Fwww.patr
> >> >> >eon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com%7
> >> >> C47043e4531a148
> >> >> >aef4d208d592f0500e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%
> >> >> 7C0%7C6365764832
> >> >> >21343567&sdata=btUXyJZQB%2F9AgUawlpJ29StZvDvCgOwJYeyZ%2BjJ6
> >> >> YTk%3D&reserved
> >> >> >=0
> >> >> ><https://na01.safelinks.protection.outlook.com/?url=https%
> >> >> 3A%2F%2Fwww.patr
> >> >> >eon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com%7
> >> >> C47043e4531a148
> >> >> >aef4d208d592f0500e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%
> >> >> 7C0%7C6365764832
> >> >> >21343567&sdata=btUXyJZQB%2F9AgUawlpJ29StZvDvCgOwJYeyZ%2BjJ6
> >> >> YTk%3D&reserved
> >> >> >=0>*
> >> >>
> >> >>
> >> >
> >>
> >>
> >> --
> >> Carlos Rovira
> >> http://about.me/carlosrovira
> >>
> >
> >
>



-- 
Carlos Rovira
http://about.me/carlosrovira

Re: Setting/binding data in mxml - what am I doing wrong?

Posted by Alex Harui <ah...@adobe.com.INVALID>.

On 3/27/18, 11:27 AM, "omuppi1@gmail.com on behalf of OmPrakash Muppirala"
<omuppi1@gmail.com on behalf of bigosmallm@gmail.com> wrote:

>>
>> <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.

Up to you.  In other places where a dataProvider is assigned an Array, it
might get wrapped internally by a Collection.  If every user is just going
to blindly wrap the Series array in a SeriesList, you can do the wrapping
internally and thus save some more MXML tags.  The reason I suggested
making it a bead is so that folks can use a known pattern to override
SeriesList should they need to.

-Alex
>


Re: Setting/binding data in mxml - what am I doing wrong?

Posted by OmPrakash Muppirala <bi...@gmail.com>.
On Tue, Mar 27, 2018 at 9:26 AM, Alex Harui <ah...@adobe.com.invalid>
wrote:

>
>
> On 3/27/18, 2:19 AM, "omuppi1@gmail.com on behalf of OmPrakash Muppirala"
> <omuppi1@gmail.com on behalf of bigosmallm@gmail.com> 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
>
>

Re: Setting/binding data in mxml - what am I doing wrong?

Posted by Alex Harui <ah...@adobe.com.INVALID>.

On 3/27/18, 2:19 AM, "omuppi1@gmail.com on behalf of OmPrakash Muppirala"
<omuppi1@gmail.com on behalf of bigosmallm@gmail.com> 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.

<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.


HTH,
-Alex
>
>On Tue, Mar 27, 2018 at 2:01 AM, OmPrakash Muppirala
><bi...@gmail.com>
>wrote:
>
>> Ah, thanks for catching that.  Here is a screenshot:
>>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsnag.gy%
>>2F6W&data=02%7C01%7Caharui%40adobe.com%7C413a06f60a9b4095b77f08d593c3e1a3
>>%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636577391888691558&sdata=sW
>>Krdvw6iMYokVVb4DPWgZeYuBdwGtlXOfiTqTGdfj0%3D&reserved=0
>> XsCi.jpg
>>
>> Regards,
>> Om
>>
>> On Tue, Mar 27, 2018 at 1:59 AM, Carlos Rovira <ca...@apache.org>
>> wrote:
>>
>>> Hi Om,
>>>
>>> that's great, but image is not shown, better upload to snaggit and then
>>> send the link
>>> thanks for working on that! :)
>>>
>>> 2018-03-27 10:54 GMT+02:00 OmPrakash Muppirala <bi...@gmail.com>:
>>>
>>> > Thanks for the pointers, Alex and Piotr.  I was able to make this
>>>work.
>>> > Now we have a nice little Echarts chart showing up :-)
>>> >
>>> >
>>> > One issue I noticed was that setting values inside an anonymous
>>>function
>>> > does not trigger bindings.  I'm not sure if that is a bug or an
>>>expected
>>> > feature.  Thoughts?
>>> >
>>> > In any case, I am now unblocked so I will be able add more features.
>>> I
>>> > will put up a demo/example page for this work soon.
>>> >
>>> > Thanks,
>>> > Om
>>> >
>>> >
>>> > On Mon, Mar 26, 2018 at 9:25 AM, Alex Harui
>>><ah...@adobe.com.invalid>
>>> > wrote:
>>> >
>>> >> In the end, DataBinding is really just a convenient way to generate
>>> >> listeners for change events and handlers that update things.  When
>>>you
>>> >> look at nested data structures, some kinds of changes are easily
>>> detected
>>> >> and others are not.  It is useful to understand what kinds of
>>>changes
>>> >> could be made.  I listed some possibilities earlier.
>>> >>
>>> >> For a series:
>>> >> 1) change the entire ArrayList
>>> >> 2) add/remove items
>>> >> 3) change the data in the item itself.
>>> >> 4) change the array wrapped by the ArrayList
>>> >>
>>> >> Each of these requires code that detects changes at different
>>>levels.
>>> >> Most of Royale can easily detect #1.  You have to either change to a
>>> >> subclass of ArrayList or drop a bead on it to detect #2.  I don't
>>>think
>>> >> we've written code for #3 yet.  Not sure about #4.  For #3, event
>>> >> listeners need to be added on each item in the ArrayList (and
>>>removed
>>> if
>>> >> the item is removed from the ArrayList).  We don't handle all of
>>>these
>>> >> cases out-of-the-box for PAYG reasons.
>>> >>
>>> >> So, you have to understand how the data is changing and get it to
>>> trigger
>>> >> events on those changes.  And possibly use a different DataBinding
>>> >> implementation to detect those changes at certain times.  That's
>>>what
>>> >> ItemRendererDataBinding does.
>>> >>
>>> >> HTH,
>>> >> -Alex
>>> >>
>>> >> On 3/26/18, 1:05 AM, "Piotr Zarzycki" <pi...@gmail.com>
>>> wrote:
>>> >>
>>> >> >Om,
>>> >> >
>>> >> >You are right! I did look into the PieChart and found  ChartBase,
>>> which
>>> >> >extends List, but you are using EChart which is simple UIBase.
>>> >> >However still probably should be similar bead factory created which
>>> >> >handles
>>> >> >creation of each item.
>>> >> >
>>> >> >Sorry for the confusion.
>>> >> >
>>> >> >Thanks, Piotr
>>> >> >
>>> >> >2018-03-26 9:54 GMT+02:00 OmPrakash Muppirala
>>><bi...@gmail.com>:
>>> >> >
>>> >> >> So, if I create a echarts.SeriesList class that extends
>>>ArrayList -
>>> it
>>> >> >>can
>>> >> >> handle the addition and updates of Series objects.  Is that a
>>>better
>>> >> >> approach?
>>> >> >>
>>> >> >> Thanks,
>>> >> >> Om
>>> >> >>
>>> >> >> On Mon, Mar 26, 2018 at 12:47 AM, OmPrakash Muppirala <
>>> >> >> bigosmallm@gmail.com>
>>> >> >> wrote:
>>> >> >>
>>> >> >> >
>>> >> >> >
>>> >> >> > On Mon, Mar 26, 2018 at 12:34 AM, Piotr Zarzycki <
>>> >> >> > piotrzarzycki21@gmail.com> wrote:
>>> >> >> >
>>> >> >> >> Hi Om,
>>> >> >> >>
>>> >> >> >> Since your base chart class is a actually a List,
>>> >> >> >
>>> >> >> >
>>> >> >> > I'm confused.  How is it a List?
>>> >> >> >
>>> >> >> >
>>> >> >> >> your EChart should use
>>> >> >> >> [1] and [2]. However it is possible that you will have to
>>> implement
>>> >> >>your
>>> >> >> >> own Factory which is extends the current one.
>>> >> >> >>
>>> >> >> >> [1]
>>> >> >>https://na01.safelinks.protection.outlook.com/?url=https%
>>> >> 3A%2F%2Fgoo.gl%2
>>> >> >>FafXdPr&data=02%7C01%7Caharui%40adobe.com%7C47043e4531a148
>>> >> aef4d208d592f05
>>> >> >>00e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636576483
>>> >> 221343567&sdata
>>> >> >>=%2FyCH3DmV45%2FNp8O0shMTRoSnbhXpOTUfHKCpCsSlSkI%3D&reserved=0
>>> >> >> >> [2]
>>> >> >>https://na01.safelinks.protection.outlook.com/?url=https%
>>> >> 3A%2F%2Fgoo.gl%2
>>> >> >>FNz8YbE&data=02%7C01%7Caharui%40adobe.com%7C47043e4531a148
>>> >> aef4d208d592f05
>>> >> >>00e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636576483
>>> >> 221343567&sdata
>>> >> >>=E2ZaeAOXXKA4gEACwPx6D%2B4oUiwT%2Bk2QLSeKEl%2BEGTM%3D&reserved=0
>>> >> >> >
>>> >> >> >
>>> >> >> > Thanks for the pointers.  I will study this code and see how I
>>>can
>>> >> >>adapt
>>> >> >> > this.
>>> >> >> >
>>> >> >> > Regards,
>>> >> >> > Om
>>> >> >> >
>>> >> >> >
>>> >> >> >>
>>> >> >> >>
>>> >> >> >> Thanks, Piotr
>>> >> >> >>
>>> >> >> >> 2018-03-26 9:16 GMT+02:00 OmPrakash Muppirala <
>>> bigosmallm@gmail.com
>>> >> >:
>>> >> >> >>
>>> >> >> >> > Okay, I was able to make quite a bit of progress on the
>>>ECharts
>>> >> >> effort.
>>> >> >> >> > The next thing I am stuck on is on how to listen to changes
>>>to
>>> >> >>items
>>> >> >> in
>>> >> >> >> an
>>> >> >> >> > ArrayList.
>>> >> >> >> > This is how the mxml looks like:
>>> >> >> >> >
>>> >> >> >> > <ns2:ECharts id="chart">
>>> >> >> >> > <ns2:chartOptions>
>>> >> >> >> > <ns2:EChartsOptions>
>>> >> >> >> > <ns2:title>
>>> >> >> >> > <ns2:Title text="My ECharts Title" show="true"
>>> >> >> >> >
>>> >> >>link="https://na01.safelinks.protection.outlook.com/?url=
>>> >> http%3A%2F%2Fwww
>>> >> >>.google.com&data=02%7C01%7Caharui%40adobe.com%7C47043e4531
>>> >> a148aef4d208d59
>>> >> >>2f0500e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C63657
>>> >> 6483221343567&s
>>> >> >>data=Z1QFgp5ZetKGJay0kOB5HIfLUaSGX55jZvf1A8Mx5Dk%3D&reserved=0"
>>> >> >>target="_self" />
>>> >> >> >> > </ns2:title>
>>> >> >> >> > <ns2:xAxis>
>>> >> >> >> > <ns2:XAxis data="{this.data}" position="top" />
>>> >> >> >> > </ns2:xAxis>
>>> >> >> >> > <ns2:yAxis>
>>> >> >> >> > <ns2:YAxis/>
>>> >> >> >> > </ns2:yAxis>
>>> >> >> >> > <ns2:series>
>>> >> >> >> > <js:ArrayList>
>>> >> >> >> > <ns2:Series name="Accounts" type="bar"
>>> data="{this.seriesData}" />
>>> >> >> >> > </js:ArrayList>
>>> >> >> >> > </ns2:series>
>>> >> >> >> > </ns2:EChartsOptions>
>>> >> >> >> > </ns2:chartOptions>
>>> >> >> >> > </ns2:ECharts>
>>> >> >> >> >
>>> >> >> >> >
>>> >> >> >> > The databinding on xAxis.data works fine now.  Now I need to
>>> make
>>> >> >>the
>>> >> >> >> same
>>> >> >> >> > thing work with series[0].data.
>>> >> >> >> >
>>> >> >> >> > The relevant classes are here:
>>> >> >> >> > EChartsOptions.as:
>>> >> >> >> >
>>> >> >>https://na01.safelinks.protection.outlook.com/?url=https%
>>> >> 3A%2F%2Fgithub.c
>>> >> >>om%2Fapache%2Froyale-asjs%2Fblob%2F4ae36845c19a923a5&data=
>>> >> 02%7C01%7Caharu
>>> >> >>i%40adobe.com%7C47043e4531a148aef4d208d592f0500e%
>>> >> 7Cfa7b1b5a7b34438794aed2
>>> >> >>c178decee1%7C0%7C0%7C636576483221343567&sdata=tUpeAO4RBkOA
>>> >> dBWSEA8RGvjxhzU
>>> >> >>WdpPWXMAb8s%2B%2F0Lo%3D&reserved=0
>>> >> >> >> 8f795738b2f42
>>> >> >> >> > 8c2615d130/examples/royale/ECharts/src/echarts/EChartsOption
>>> s.as
>>> >> >> >> >
>>> >> >> >> > Series.as:
>>> >> >> >> >
>>> >> >>https://na01.safelinks.protection.outlook.com/?url=https%
>>> >> 3A%2F%2Fgithub.c
>>> >> >>om%2Fapache%2Froyale-asjs%2Fblob%2F4ae36845c19a923a5&data=
>>> >> 02%7C01%7Caharu
>>> >> >>i%40adobe.com%7C47043e4531a148aef4d208d592f0500e%
>>> >> 7Cfa7b1b5a7b34438794aed2
>>> >> >>c178decee1%7C0%7C0%7C636576483221343567&sdata=tUpeAO4RBkOA
>>> >> dBWSEA8RGvjxhzU
>>> >> >>WdpPWXMAb8s%2B%2F0Lo%3D&reserved=0
>>> >> >> >> 8f795738b2f42
>>> >> >> >> > 8c2615d130/examples/royale/ECharts/src/echarts/Series.as
>>> >> >> >> >
>>> >> >> >> > Any pointers?
>>> >> >> >> >
>>> >> >> >> > Thanks,
>>> >> >> >> > Om
>>> >> >> >> >
>>> >> >> >> > On Fri, Mar 16, 2018 at 9:16 AM, Alex Harui
>>> >> >><aharui@adobe.com.invalid
>>> >> >> >
>>> >> >> >> > wrote:
>>> >> >> >> >
>>> >> >> >> > > Om appears to be using Express Application, which should
>>>have
>>> >> >> >> > > ApplicationDataBinding baked in.  That can be verified in
>>>the
>>> >> >> >> debugger by
>>> >> >> >> > > checking what is on the strand.
>>> >> >> >> > >
>>> >> >> >> > > Bindings are not evaluated at instantiation time so the
>>> >> >>destination
>>> >> >> >> > > properties need to handle changing at runtime or the
>>>entire
>>> >> >> component
>>> >> >> >> > > needs to apply all properties at the right time.
>>> >> >> >> > >
>>> >> >> >> > > HTH,
>>> >> >> >> > > -Alex
>>> >> >> >> > >
>>> >> >> >> > > On 3/16/18, 2:35 AM, "Harbs" <ha...@gmail.com>
>>>wrote:
>>> >> >> >> > >
>>> >> >> >> > > >I’m pretty sure that only works if the view is a separate
>>> mxml
>>> >> >> file.
>>> >> >> >> > > >
>>> >> >> >> > > >> On Mar 16, 2018, at 11:28 AM, Piotr Zarzycki
>>> >> >> >> > > >><pi...@gmail.com> wrote:
>>> >> >> >> > > >>
>>> >> >> >> > > >> I'm also wondering whether it will work if he apply
>>> >> >> >> > <js:ViewDataBinding
>>> >> >> >> > > >>/>
>>> >> >> >> > > >> in View only...
>>> >> >> >> > > >>
>>> >> >> >> > > >> 2018-03-16 10:26 GMT+01:00 Harbs
>>><ha...@gmail.com>:
>>> >> >> >> > > >>
>>> >> >> >> > > >>> It looks like you are missing
>>> <js:ApplicationDataBinding/>
>>> >> >> >> > > >>>
>>> >> >> >> > > >>>> On Mar 16, 2018, at 11:21 AM, OmPrakash Muppirala
>>> >> >> >> > > >>>><bi...@gmail.com>
>>> >> >> >> > > >>> wrote:
>>> >> >> >> > > >>>>
>>> >> >> >> > > >>>> Please take a look at these usage examples: [1], [2]
>>> >> >> >> > > >>>>
>>> >> >> >> > > >>>> I am trying to set/bind arrays as values to the chart
>>> >> >> components.
>>> >> >> >> > But
>>> >> >> >> > > >>>> those values dont get applied at all.
>>> >> >> >> > > >>>>
>>> >> >> >> > > >>>> Can someone please take a look?
>>> >> >> >> > > >>>>
>>> >> >> >> > > >>>> The entire app can be found here: [3]
>>> >> >> >> > > >>>>
>>> >> >> >> > > >>>> Thanks,
>>> >> >> >> > > >>>> Om
>>> >> >> >> > > >>>>
>>> >> >> >> > > >>>>
>>> >> >> >> > > >>>> [1]
>>> >> >> >> > > >>>>
>>> >> >> >> > > >>>>https://na01.safelinks.protection.outlook.com/?url=
>>> >> >> >> > > https%3A%2F%2Fgithub
>>> >> >> >> > > >>>>.com%2Fapache%2Froyale-asjs%2Fblob%2Ffeature%2F&data=
>>> >> >> >> > > 02%7C01%7Caharui%4
>>> >> >> >> > > >>>>0adobe.com%7Cc0b67f1e7b0b44699adb08d58b21
>>> >> >> >> > > 4cf5%7Cfa7b1b5a7b34438794aed2c
>>> >> >> >> > > >>>>178decee1%7C0%7C0%7C636567897496708478&sdata=
>>> >> >> >> > > zjAObepBqE9V2O8ktwnjs%2F%2
>>> >> >> >> > > >>>>Fpl%2F0J%2FIpj%2B1%2FsCTK%2B6WA%3D&reserved=0
>>> >> >> >> > > >>> echarts/examples/royale/ECharts/src/Main.mxml#L26
>>> >> >> >> > > >>>> [2]
>>> >> >> >> > > >>>>
>>> >> >> >> > > >>>>https://na01.safelinks.protection.outlook.com/?url=
>>> >> >> >> > > https%3A%2F%2Fgithub
>>> >> >> >> > > >>>>.com%2Fapache%2Froyale-asjs%2Fblob%2Ffeature%2F&data=
>>> >> >> >> > > 02%7C01%7Caharui%4
>>> >> >> >> > > >>>>0adobe.com%7Cc0b67f1e7b0b44699adb08d58b21
>>> >> >> >> > > 4cf5%7Cfa7b1b5a7b34438794aed2c
>>> >> >> >> > > >>>>178decee1%7C0%7C0%7C636567897496708478&sdata=
>>> >> >> >> > > zjAObepBqE9V2O8ktwnjs%2F%2
>>> >> >> >> > > >>>>Fpl%2F0J%2FIpj%2B1%2FsCTK%2B6WA%3D&reserved=0
>>> >> >> >> > > >>> echarts/examples/royale/ECharts/src/Main.mxml#L31
>>> >> >> >> > > >>>> [3]
>>> >> >> >> > > >>>>
>>> >> >> >> > > >>>>https://na01.safelinks.protection.outlook.com/?url=
>>> >> >> >> > > https%3A%2F%2Fgithub
>>> >> >> >> > > >>>>.com%2Fapache%2Froyale-asjs%2Fblob%2Ffeature%2F&data=
>>> >> >> >> > > 02%7C01%7Caharui%4
>>> >> >> >> > > >>>>0adobe.com%7Cc0b67f1e7b0b44699adb08d58b21
>>> >> >> >> > > 4cf5%7Cfa7b1b5a7b34438794aed2c
>>> >> >> >> > > >>>>178decee1%7C0%7C0%7C636567897496708478&sdata=
>>> >> >> >> > > zjAObepBqE9V2O8ktwnjs%2F%2
>>> >> >> >> > > >>>>Fpl%2F0J%2FIpj%2B1%2FsCTK%2B6WA%3D&reserved=0
>>> >> >> >> > > >>> echarts/examples/royale/ECharts
>>> >> >> >> > > >>>
>>> >> >> >> > > >>>
>>> >> >> >> > > >>
>>> >> >> >> > > >>
>>> >> >> >> > > >> --
>>> >> >> >> > > >>
>>> >> >> >> > > >> Piotr Zarzycki
>>> >> >> >> > > >>
>>> >> >> >> > > >> Patreon:
>>> >> >> >> > > >>*https://na01.safelinks.protection.outlook.com/?url=
>>> >> >> >> > > https%3A%2F%2Fwww.pat
>>> >> >> >> > > 
>>>>>reon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com
>>> >> >> >> > > %7Cc0b67f1e7b0b
>>> >> >> >> > > >>44699adb08d58b214cf5%7Cfa7b1b5a7b34438794aed2c178de
>>> >> >> >> > > cee1%7C0%7C0%7C6365678
>>> >> >> >> > > >>97496708478&sdata=B%2FFqHMwrwAGEnorLx5Z4kia4K73rXy
>>> >> >> >> > > RtoTn9kE0xDOg%3D&reserv
>>> >> >> >> > > >>ed=0
>>> >> >> >> > > >>
>>> >> >> >> > > >><https://na01.safelinks.protection.outlook.com/?url=
>>> >> >> >> > > https%3A%2F%2Fwww.pat
>>> >> >> >> > > 
>>>>>reon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com
>>> >> >> >> > > %7Cc0b67f1e7b0b
>>> >> >> >> > > >>44699adb08d58b214cf5%7Cfa7b1b5a7b34438794aed2c178de
>>> >> >> >> > > cee1%7C0%7C0%7C6365678
>>> >> >> >> > > >>97496708478&sdata=B%2FFqHMwrwAGEnorLx5Z4kia4K73rXy
>>> >> >> >> > > RtoTn9kE0xDOg%3D&reserv
>>> >> >> >> > > >>ed=0>*
>>> >> >> >> > > >
>>> >> >> >> > >
>>> >> >> >> > >
>>> >> >> >> >
>>> >> >> >>
>>> >> >> >>
>>> >> >> >>
>>> >> >> >> --
>>> >> >> >>
>>> >> >> >> Piotr Zarzycki
>>> >> >> >>
>>> >> >> >> Patreon:
>>> >> >>*https://na01.safelinks.protection.outlook.com/?url=https%
>>> >> 3A%2F%2Fwww.pat
>>> >> >>reon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com
>>> >> %7C47043e4531a1
>>> >> >>48aef4d208d592f0500e%7Cfa7b1b5a7b34438794aed2c178decee1%
>>> >> 7C0%7C0%7C6365764
>>> >> >>83221343567&sdata=btUXyJZQB%2F9AgUawlpJ29StZvDvCgOwJYeyZ%2
>>> >> BjJ6YTk%3D&rese
>>> >> >>rved=0
>>> >> >> >>
>>> >> >><https://na01.safelinks.protection.outlook.com/?url=https%
>>> >> 3A%2F%2Fwww.pat
>>> >> >>reon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com
>>> >> %7C47043e4531a1
>>> >> >>48aef4d208d592f0500e%7Cfa7b1b5a7b34438794aed2c178decee1%
>>> >> 7C0%7C0%7C6365764
>>> >> >>83221343567&sdata=btUXyJZQB%2F9AgUawlpJ29StZvDvCgOwJYeyZ%2
>>> >> BjJ6YTk%3D&rese
>>> >> >>rved=0>*
>>> >> >> >>
>>> >> >> >
>>> >> >> >
>>> >> >>
>>> >> >
>>> >> >
>>> >> >
>>> >> >--
>>> >> >
>>> >> >Piotr Zarzycki
>>> >> >
>>> >> >Patreon:
>>> >> >*https://na01.safelinks.protection.outlook.com/?url=https%
>>> >> 3A%2F%2Fwww.patr
>>> >> >eon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com%7
>>> >> C47043e4531a148
>>> >> >aef4d208d592f0500e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%
>>> >> 7C0%7C6365764832
>>> >> >21343567&sdata=btUXyJZQB%2F9AgUawlpJ29StZvDvCgOwJYeyZ%2BjJ6
>>> >> YTk%3D&reserved
>>> >> >=0
>>> >> ><https://na01.safelinks.protection.outlook.com/?url=https%
>>> >> 3A%2F%2Fwww.patr
>>> >> >eon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com%7
>>> >> C47043e4531a148
>>> >> >aef4d208d592f0500e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%
>>> >> 7C0%7C6365764832
>>> >> >21343567&sdata=btUXyJZQB%2F9AgUawlpJ29StZvDvCgOwJYeyZ%2BjJ6
>>> >> YTk%3D&reserved
>>> >> >=0>*
>>> >>
>>> >>
>>> >
>>>
>>>
>>> --
>>> Carlos Rovira
>>> 
>>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me
>>>%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C413a06f60a9b4095b77f
>>>08d593c3e1a3%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C63657739188869
>>>1558&sdata=uQ%2BPkNmtxcmo8tOcYJJ92WlGbC%2FxAvtqLKw2vr1IZqo%3D&reserved=0
>>>
>>
>>


Re: Setting/binding data in mxml - what am I doing wrong?

Posted by OmPrakash Muppirala <bi...@gmail.com>.
And here is the mxml for this chart:

<ns2:ECharts id="chart">
<ns2:chartOptions>
<ns2:EChartsOptions>
<ns2:title>
<ns2:Title text="Sales vs. Profit" show="true"
link="https://ecomfe.github.io/echarts-examples/public/index.html" target=
"_self" />
</ns2:title>
<ns2:xAxis>
<ns2:XAxis data="{this.data}" position="top" />
</ns2:xAxis>
<ns2:yAxis>
<ns2:YAxis/>
</ns2:yAxis>
<ns2:seriesList>
<ns2:SeriesList>
<ns2:series>
<fx:Array>
<ns2:Series name="Sales" type="bar" data="{this.salesData}" />
<ns2:Series name="Profit" type="line" data="{this.profitData}" />
</fx:Array>
</ns2:series>
</ns2:SeriesList>
</ns2:seriesList>
</ns2:EChartsOptions>
</ns2:chartOptions>
</ns2:ECharts>


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?

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>


On Tue, Mar 27, 2018 at 2:01 AM, OmPrakash Muppirala <bi...@gmail.com>
wrote:

> Ah, thanks for catching that.  Here is a screenshot: https://snag.gy/6W
> XsCi.jpg
>
> Regards,
> Om
>
> On Tue, Mar 27, 2018 at 1:59 AM, Carlos Rovira <ca...@apache.org>
> wrote:
>
>> Hi Om,
>>
>> that's great, but image is not shown, better upload to snaggit and then
>> send the link
>> thanks for working on that! :)
>>
>> 2018-03-27 10:54 GMT+02:00 OmPrakash Muppirala <bi...@gmail.com>:
>>
>> > Thanks for the pointers, Alex and Piotr.  I was able to make this work.
>> > Now we have a nice little Echarts chart showing up :-)
>> >
>> >
>> > One issue I noticed was that setting values inside an anonymous function
>> > does not trigger bindings.  I'm not sure if that is a bug or an expected
>> > feature.  Thoughts?
>> >
>> > In any case, I am now unblocked so I will be able add more features.  I
>> > will put up a demo/example page for this work soon.
>> >
>> > Thanks,
>> > Om
>> >
>> >
>> > On Mon, Mar 26, 2018 at 9:25 AM, Alex Harui <ah...@adobe.com.invalid>
>> > wrote:
>> >
>> >> In the end, DataBinding is really just a convenient way to generate
>> >> listeners for change events and handlers that update things.  When you
>> >> look at nested data structures, some kinds of changes are easily
>> detected
>> >> and others are not.  It is useful to understand what kinds of changes
>> >> could be made.  I listed some possibilities earlier.
>> >>
>> >> For a series:
>> >> 1) change the entire ArrayList
>> >> 2) add/remove items
>> >> 3) change the data in the item itself.
>> >> 4) change the array wrapped by the ArrayList
>> >>
>> >> Each of these requires code that detects changes at different levels.
>> >> Most of Royale can easily detect #1.  You have to either change to a
>> >> subclass of ArrayList or drop a bead on it to detect #2.  I don't think
>> >> we've written code for #3 yet.  Not sure about #4.  For #3, event
>> >> listeners need to be added on each item in the ArrayList (and removed
>> if
>> >> the item is removed from the ArrayList).  We don't handle all of these
>> >> cases out-of-the-box for PAYG reasons.
>> >>
>> >> So, you have to understand how the data is changing and get it to
>> trigger
>> >> events on those changes.  And possibly use a different DataBinding
>> >> implementation to detect those changes at certain times.  That's what
>> >> ItemRendererDataBinding does.
>> >>
>> >> HTH,
>> >> -Alex
>> >>
>> >> On 3/26/18, 1:05 AM, "Piotr Zarzycki" <pi...@gmail.com>
>> wrote:
>> >>
>> >> >Om,
>> >> >
>> >> >You are right! I did look into the PieChart and found  ChartBase,
>> which
>> >> >extends List, but you are using EChart which is simple UIBase.
>> >> >However still probably should be similar bead factory created which
>> >> >handles
>> >> >creation of each item.
>> >> >
>> >> >Sorry for the confusion.
>> >> >
>> >> >Thanks, Piotr
>> >> >
>> >> >2018-03-26 9:54 GMT+02:00 OmPrakash Muppirala <bi...@gmail.com>:
>> >> >
>> >> >> So, if I create a echarts.SeriesList class that extends ArrayList -
>> it
>> >> >>can
>> >> >> handle the addition and updates of Series objects.  Is that a better
>> >> >> approach?
>> >> >>
>> >> >> Thanks,
>> >> >> Om
>> >> >>
>> >> >> On Mon, Mar 26, 2018 at 12:47 AM, OmPrakash Muppirala <
>> >> >> bigosmallm@gmail.com>
>> >> >> wrote:
>> >> >>
>> >> >> >
>> >> >> >
>> >> >> > On Mon, Mar 26, 2018 at 12:34 AM, Piotr Zarzycki <
>> >> >> > piotrzarzycki21@gmail.com> wrote:
>> >> >> >
>> >> >> >> Hi Om,
>> >> >> >>
>> >> >> >> Since your base chart class is a actually a List,
>> >> >> >
>> >> >> >
>> >> >> > I'm confused.  How is it a List?
>> >> >> >
>> >> >> >
>> >> >> >> your EChart should use
>> >> >> >> [1] and [2]. However it is possible that you will have to
>> implement
>> >> >>your
>> >> >> >> own Factory which is extends the current one.
>> >> >> >>
>> >> >> >> [1]
>> >> >>https://na01.safelinks.protection.outlook.com/?url=https%
>> >> 3A%2F%2Fgoo.gl%2
>> >> >>FafXdPr&data=02%7C01%7Caharui%40adobe.com%7C47043e4531a148
>> >> aef4d208d592f05
>> >> >>00e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636576483
>> >> 221343567&sdata
>> >> >>=%2FyCH3DmV45%2FNp8O0shMTRoSnbhXpOTUfHKCpCsSlSkI%3D&reserved=0
>> >> >> >> [2]
>> >> >>https://na01.safelinks.protection.outlook.com/?url=https%
>> >> 3A%2F%2Fgoo.gl%2
>> >> >>FNz8YbE&data=02%7C01%7Caharui%40adobe.com%7C47043e4531a148
>> >> aef4d208d592f05
>> >> >>00e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636576483
>> >> 221343567&sdata
>> >> >>=E2ZaeAOXXKA4gEACwPx6D%2B4oUiwT%2Bk2QLSeKEl%2BEGTM%3D&reserved=0
>> >> >> >
>> >> >> >
>> >> >> > Thanks for the pointers.  I will study this code and see how I can
>> >> >>adapt
>> >> >> > this.
>> >> >> >
>> >> >> > Regards,
>> >> >> > Om
>> >> >> >
>> >> >> >
>> >> >> >>
>> >> >> >>
>> >> >> >> Thanks, Piotr
>> >> >> >>
>> >> >> >> 2018-03-26 9:16 GMT+02:00 OmPrakash Muppirala <
>> bigosmallm@gmail.com
>> >> >:
>> >> >> >>
>> >> >> >> > Okay, I was able to make quite a bit of progress on the ECharts
>> >> >> effort.
>> >> >> >> > The next thing I am stuck on is on how to listen to changes to
>> >> >>items
>> >> >> in
>> >> >> >> an
>> >> >> >> > ArrayList.
>> >> >> >> > This is how the mxml looks like:
>> >> >> >> >
>> >> >> >> > <ns2:ECharts id="chart">
>> >> >> >> > <ns2:chartOptions>
>> >> >> >> > <ns2:EChartsOptions>
>> >> >> >> > <ns2:title>
>> >> >> >> > <ns2:Title text="My ECharts Title" show="true"
>> >> >> >> >
>> >> >>link="https://na01.safelinks.protection.outlook.com/?url=
>> >> http%3A%2F%2Fwww
>> >> >>.google.com&data=02%7C01%7Caharui%40adobe.com%7C47043e4531
>> >> a148aef4d208d59
>> >> >>2f0500e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C63657
>> >> 6483221343567&s
>> >> >>data=Z1QFgp5ZetKGJay0kOB5HIfLUaSGX55jZvf1A8Mx5Dk%3D&reserved=0"
>> >> >>target="_self" />
>> >> >> >> > </ns2:title>
>> >> >> >> > <ns2:xAxis>
>> >> >> >> > <ns2:XAxis data="{this.data}" position="top" />
>> >> >> >> > </ns2:xAxis>
>> >> >> >> > <ns2:yAxis>
>> >> >> >> > <ns2:YAxis/>
>> >> >> >> > </ns2:yAxis>
>> >> >> >> > <ns2:series>
>> >> >> >> > <js:ArrayList>
>> >> >> >> > <ns2:Series name="Accounts" type="bar"
>> data="{this.seriesData}" />
>> >> >> >> > </js:ArrayList>
>> >> >> >> > </ns2:series>
>> >> >> >> > </ns2:EChartsOptions>
>> >> >> >> > </ns2:chartOptions>
>> >> >> >> > </ns2:ECharts>
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > The databinding on xAxis.data works fine now.  Now I need to
>> make
>> >> >>the
>> >> >> >> same
>> >> >> >> > thing work with series[0].data.
>> >> >> >> >
>> >> >> >> > The relevant classes are here:
>> >> >> >> > EChartsOptions.as:
>> >> >> >> >
>> >> >>https://na01.safelinks.protection.outlook.com/?url=https%
>> >> 3A%2F%2Fgithub.c
>> >> >>om%2Fapache%2Froyale-asjs%2Fblob%2F4ae36845c19a923a5&data=
>> >> 02%7C01%7Caharu
>> >> >>i%40adobe.com%7C47043e4531a148aef4d208d592f0500e%
>> >> 7Cfa7b1b5a7b34438794aed2
>> >> >>c178decee1%7C0%7C0%7C636576483221343567&sdata=tUpeAO4RBkOA
>> >> dBWSEA8RGvjxhzU
>> >> >>WdpPWXMAb8s%2B%2F0Lo%3D&reserved=0
>> >> >> >> 8f795738b2f42
>> >> >> >> > 8c2615d130/examples/royale/ECharts/src/echarts/EChartsOption
>> s.as
>> >> >> >> >
>> >> >> >> > Series.as:
>> >> >> >> >
>> >> >>https://na01.safelinks.protection.outlook.com/?url=https%
>> >> 3A%2F%2Fgithub.c
>> >> >>om%2Fapache%2Froyale-asjs%2Fblob%2F4ae36845c19a923a5&data=
>> >> 02%7C01%7Caharu
>> >> >>i%40adobe.com%7C47043e4531a148aef4d208d592f0500e%
>> >> 7Cfa7b1b5a7b34438794aed2
>> >> >>c178decee1%7C0%7C0%7C636576483221343567&sdata=tUpeAO4RBkOA
>> >> dBWSEA8RGvjxhzU
>> >> >>WdpPWXMAb8s%2B%2F0Lo%3D&reserved=0
>> >> >> >> 8f795738b2f42
>> >> >> >> > 8c2615d130/examples/royale/ECharts/src/echarts/Series.as
>> >> >> >> >
>> >> >> >> > Any pointers?
>> >> >> >> >
>> >> >> >> > Thanks,
>> >> >> >> > Om
>> >> >> >> >
>> >> >> >> > On Fri, Mar 16, 2018 at 9:16 AM, Alex Harui
>> >> >><aharui@adobe.com.invalid
>> >> >> >
>> >> >> >> > wrote:
>> >> >> >> >
>> >> >> >> > > Om appears to be using Express Application, which should have
>> >> >> >> > > ApplicationDataBinding baked in.  That can be verified in the
>> >> >> >> debugger by
>> >> >> >> > > checking what is on the strand.
>> >> >> >> > >
>> >> >> >> > > Bindings are not evaluated at instantiation time so the
>> >> >>destination
>> >> >> >> > > properties need to handle changing at runtime or the entire
>> >> >> component
>> >> >> >> > > needs to apply all properties at the right time.
>> >> >> >> > >
>> >> >> >> > > HTH,
>> >> >> >> > > -Alex
>> >> >> >> > >
>> >> >> >> > > On 3/16/18, 2:35 AM, "Harbs" <ha...@gmail.com> wrote:
>> >> >> >> > >
>> >> >> >> > > >I’m pretty sure that only works if the view is a separate
>> mxml
>> >> >> file.
>> >> >> >> > > >
>> >> >> >> > > >> On Mar 16, 2018, at 11:28 AM, Piotr Zarzycki
>> >> >> >> > > >><pi...@gmail.com> wrote:
>> >> >> >> > > >>
>> >> >> >> > > >> I'm also wondering whether it will work if he apply
>> >> >> >> > <js:ViewDataBinding
>> >> >> >> > > >>/>
>> >> >> >> > > >> in View only...
>> >> >> >> > > >>
>> >> >> >> > > >> 2018-03-16 10:26 GMT+01:00 Harbs <ha...@gmail.com>:
>> >> >> >> > > >>
>> >> >> >> > > >>> It looks like you are missing
>> <js:ApplicationDataBinding/>
>> >> >> >> > > >>>
>> >> >> >> > > >>>> On Mar 16, 2018, at 11:21 AM, OmPrakash Muppirala
>> >> >> >> > > >>>><bi...@gmail.com>
>> >> >> >> > > >>> wrote:
>> >> >> >> > > >>>>
>> >> >> >> > > >>>> Please take a look at these usage examples: [1], [2]
>> >> >> >> > > >>>>
>> >> >> >> > > >>>> I am trying to set/bind arrays as values to the chart
>> >> >> components.
>> >> >> >> > But
>> >> >> >> > > >>>> those values dont get applied at all.
>> >> >> >> > > >>>>
>> >> >> >> > > >>>> Can someone please take a look?
>> >> >> >> > > >>>>
>> >> >> >> > > >>>> The entire app can be found here: [3]
>> >> >> >> > > >>>>
>> >> >> >> > > >>>> Thanks,
>> >> >> >> > > >>>> Om
>> >> >> >> > > >>>>
>> >> >> >> > > >>>>
>> >> >> >> > > >>>> [1]
>> >> >> >> > > >>>>
>> >> >> >> > > >>>>https://na01.safelinks.protection.outlook.com/?url=
>> >> >> >> > > https%3A%2F%2Fgithub
>> >> >> >> > > >>>>.com%2Fapache%2Froyale-asjs%2Fblob%2Ffeature%2F&data=
>> >> >> >> > > 02%7C01%7Caharui%4
>> >> >> >> > > >>>>0adobe.com%7Cc0b67f1e7b0b44699adb08d58b21
>> >> >> >> > > 4cf5%7Cfa7b1b5a7b34438794aed2c
>> >> >> >> > > >>>>178decee1%7C0%7C0%7C636567897496708478&sdata=
>> >> >> >> > > zjAObepBqE9V2O8ktwnjs%2F%2
>> >> >> >> > > >>>>Fpl%2F0J%2FIpj%2B1%2FsCTK%2B6WA%3D&reserved=0
>> >> >> >> > > >>> echarts/examples/royale/ECharts/src/Main.mxml#L26
>> >> >> >> > > >>>> [2]
>> >> >> >> > > >>>>
>> >> >> >> > > >>>>https://na01.safelinks.protection.outlook.com/?url=
>> >> >> >> > > https%3A%2F%2Fgithub
>> >> >> >> > > >>>>.com%2Fapache%2Froyale-asjs%2Fblob%2Ffeature%2F&data=
>> >> >> >> > > 02%7C01%7Caharui%4
>> >> >> >> > > >>>>0adobe.com%7Cc0b67f1e7b0b44699adb08d58b21
>> >> >> >> > > 4cf5%7Cfa7b1b5a7b34438794aed2c
>> >> >> >> > > >>>>178decee1%7C0%7C0%7C636567897496708478&sdata=
>> >> >> >> > > zjAObepBqE9V2O8ktwnjs%2F%2
>> >> >> >> > > >>>>Fpl%2F0J%2FIpj%2B1%2FsCTK%2B6WA%3D&reserved=0
>> >> >> >> > > >>> echarts/examples/royale/ECharts/src/Main.mxml#L31
>> >> >> >> > > >>>> [3]
>> >> >> >> > > >>>>
>> >> >> >> > > >>>>https://na01.safelinks.protection.outlook.com/?url=
>> >> >> >> > > https%3A%2F%2Fgithub
>> >> >> >> > > >>>>.com%2Fapache%2Froyale-asjs%2Fblob%2Ffeature%2F&data=
>> >> >> >> > > 02%7C01%7Caharui%4
>> >> >> >> > > >>>>0adobe.com%7Cc0b67f1e7b0b44699adb08d58b21
>> >> >> >> > > 4cf5%7Cfa7b1b5a7b34438794aed2c
>> >> >> >> > > >>>>178decee1%7C0%7C0%7C636567897496708478&sdata=
>> >> >> >> > > zjAObepBqE9V2O8ktwnjs%2F%2
>> >> >> >> > > >>>>Fpl%2F0J%2FIpj%2B1%2FsCTK%2B6WA%3D&reserved=0
>> >> >> >> > > >>> echarts/examples/royale/ECharts
>> >> >> >> > > >>>
>> >> >> >> > > >>>
>> >> >> >> > > >>
>> >> >> >> > > >>
>> >> >> >> > > >> --
>> >> >> >> > > >>
>> >> >> >> > > >> Piotr Zarzycki
>> >> >> >> > > >>
>> >> >> >> > > >> Patreon:
>> >> >> >> > > >>*https://na01.safelinks.protection.outlook.com/?url=
>> >> >> >> > > https%3A%2F%2Fwww.pat
>> >> >> >> > > >>reon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com
>> >> >> >> > > %7Cc0b67f1e7b0b
>> >> >> >> > > >>44699adb08d58b214cf5%7Cfa7b1b5a7b34438794aed2c178de
>> >> >> >> > > cee1%7C0%7C0%7C6365678
>> >> >> >> > > >>97496708478&sdata=B%2FFqHMwrwAGEnorLx5Z4kia4K73rXy
>> >> >> >> > > RtoTn9kE0xDOg%3D&reserv
>> >> >> >> > > >>ed=0
>> >> >> >> > > >>
>> >> >> >> > > >><https://na01.safelinks.protection.outlook.com/?url=
>> >> >> >> > > https%3A%2F%2Fwww.pat
>> >> >> >> > > >>reon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com
>> >> >> >> > > %7Cc0b67f1e7b0b
>> >> >> >> > > >>44699adb08d58b214cf5%7Cfa7b1b5a7b34438794aed2c178de
>> >> >> >> > > cee1%7C0%7C0%7C6365678
>> >> >> >> > > >>97496708478&sdata=B%2FFqHMwrwAGEnorLx5Z4kia4K73rXy
>> >> >> >> > > RtoTn9kE0xDOg%3D&reserv
>> >> >> >> > > >>ed=0>*
>> >> >> >> > > >
>> >> >> >> > >
>> >> >> >> > >
>> >> >> >> >
>> >> >> >>
>> >> >> >>
>> >> >> >>
>> >> >> >> --
>> >> >> >>
>> >> >> >> Piotr Zarzycki
>> >> >> >>
>> >> >> >> Patreon:
>> >> >>*https://na01.safelinks.protection.outlook.com/?url=https%
>> >> 3A%2F%2Fwww.pat
>> >> >>reon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com
>> >> %7C47043e4531a1
>> >> >>48aef4d208d592f0500e%7Cfa7b1b5a7b34438794aed2c178decee1%
>> >> 7C0%7C0%7C6365764
>> >> >>83221343567&sdata=btUXyJZQB%2F9AgUawlpJ29StZvDvCgOwJYeyZ%2
>> >> BjJ6YTk%3D&rese
>> >> >>rved=0
>> >> >> >>
>> >> >><https://na01.safelinks.protection.outlook.com/?url=https%
>> >> 3A%2F%2Fwww.pat
>> >> >>reon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com
>> >> %7C47043e4531a1
>> >> >>48aef4d208d592f0500e%7Cfa7b1b5a7b34438794aed2c178decee1%
>> >> 7C0%7C0%7C6365764
>> >> >>83221343567&sdata=btUXyJZQB%2F9AgUawlpJ29StZvDvCgOwJYeyZ%2
>> >> BjJ6YTk%3D&rese
>> >> >>rved=0>*
>> >> >> >>
>> >> >> >
>> >> >> >
>> >> >>
>> >> >
>> >> >
>> >> >
>> >> >--
>> >> >
>> >> >Piotr Zarzycki
>> >> >
>> >> >Patreon:
>> >> >*https://na01.safelinks.protection.outlook.com/?url=https%
>> >> 3A%2F%2Fwww.patr
>> >> >eon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com%7
>> >> C47043e4531a148
>> >> >aef4d208d592f0500e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%
>> >> 7C0%7C6365764832
>> >> >21343567&sdata=btUXyJZQB%2F9AgUawlpJ29StZvDvCgOwJYeyZ%2BjJ6
>> >> YTk%3D&reserved
>> >> >=0
>> >> ><https://na01.safelinks.protection.outlook.com/?url=https%
>> >> 3A%2F%2Fwww.patr
>> >> >eon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com%7
>> >> C47043e4531a148
>> >> >aef4d208d592f0500e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%
>> >> 7C0%7C6365764832
>> >> >21343567&sdata=btUXyJZQB%2F9AgUawlpJ29StZvDvCgOwJYeyZ%2BjJ6
>> >> YTk%3D&reserved
>> >> >=0>*
>> >>
>> >>
>> >
>>
>>
>> --
>> Carlos Rovira
>> http://about.me/carlosrovira
>>
>
>

Re: Setting/binding data in mxml - what am I doing wrong?

Posted by OmPrakash Muppirala <bi...@gmail.com>.
Ah, thanks for catching that.  Here is a screenshot:
https://snag.gy/6WXsCi.jpg

Regards,
Om

On Tue, Mar 27, 2018 at 1:59 AM, Carlos Rovira <ca...@apache.org>
wrote:

> Hi Om,
>
> that's great, but image is not shown, better upload to snaggit and then
> send the link
> thanks for working on that! :)
>
> 2018-03-27 10:54 GMT+02:00 OmPrakash Muppirala <bi...@gmail.com>:
>
> > Thanks for the pointers, Alex and Piotr.  I was able to make this work.
> > Now we have a nice little Echarts chart showing up :-)
> >
> >
> > One issue I noticed was that setting values inside an anonymous function
> > does not trigger bindings.  I'm not sure if that is a bug or an expected
> > feature.  Thoughts?
> >
> > In any case, I am now unblocked so I will be able add more features.  I
> > will put up a demo/example page for this work soon.
> >
> > Thanks,
> > Om
> >
> >
> > On Mon, Mar 26, 2018 at 9:25 AM, Alex Harui <ah...@adobe.com.invalid>
> > wrote:
> >
> >> In the end, DataBinding is really just a convenient way to generate
> >> listeners for change events and handlers that update things.  When you
> >> look at nested data structures, some kinds of changes are easily
> detected
> >> and others are not.  It is useful to understand what kinds of changes
> >> could be made.  I listed some possibilities earlier.
> >>
> >> For a series:
> >> 1) change the entire ArrayList
> >> 2) add/remove items
> >> 3) change the data in the item itself.
> >> 4) change the array wrapped by the ArrayList
> >>
> >> Each of these requires code that detects changes at different levels.
> >> Most of Royale can easily detect #1.  You have to either change to a
> >> subclass of ArrayList or drop a bead on it to detect #2.  I don't think
> >> we've written code for #3 yet.  Not sure about #4.  For #3, event
> >> listeners need to be added on each item in the ArrayList (and removed if
> >> the item is removed from the ArrayList).  We don't handle all of these
> >> cases out-of-the-box for PAYG reasons.
> >>
> >> So, you have to understand how the data is changing and get it to
> trigger
> >> events on those changes.  And possibly use a different DataBinding
> >> implementation to detect those changes at certain times.  That's what
> >> ItemRendererDataBinding does.
> >>
> >> HTH,
> >> -Alex
> >>
> >> On 3/26/18, 1:05 AM, "Piotr Zarzycki" <pi...@gmail.com>
> wrote:
> >>
> >> >Om,
> >> >
> >> >You are right! I did look into the PieChart and found  ChartBase, which
> >> >extends List, but you are using EChart which is simple UIBase.
> >> >However still probably should be similar bead factory created which
> >> >handles
> >> >creation of each item.
> >> >
> >> >Sorry for the confusion.
> >> >
> >> >Thanks, Piotr
> >> >
> >> >2018-03-26 9:54 GMT+02:00 OmPrakash Muppirala <bi...@gmail.com>:
> >> >
> >> >> So, if I create a echarts.SeriesList class that extends ArrayList -
> it
> >> >>can
> >> >> handle the addition and updates of Series objects.  Is that a better
> >> >> approach?
> >> >>
> >> >> Thanks,
> >> >> Om
> >> >>
> >> >> On Mon, Mar 26, 2018 at 12:47 AM, OmPrakash Muppirala <
> >> >> bigosmallm@gmail.com>
> >> >> wrote:
> >> >>
> >> >> >
> >> >> >
> >> >> > On Mon, Mar 26, 2018 at 12:34 AM, Piotr Zarzycki <
> >> >> > piotrzarzycki21@gmail.com> wrote:
> >> >> >
> >> >> >> Hi Om,
> >> >> >>
> >> >> >> Since your base chart class is a actually a List,
> >> >> >
> >> >> >
> >> >> > I'm confused.  How is it a List?
> >> >> >
> >> >> >
> >> >> >> your EChart should use
> >> >> >> [1] and [2]. However it is possible that you will have to
> implement
> >> >>your
> >> >> >> own Factory which is extends the current one.
> >> >> >>
> >> >> >> [1]
> >> >>https://na01.safelinks.protection.outlook.com/?url=https%
> >> 3A%2F%2Fgoo.gl%2
> >> >>FafXdPr&data=02%7C01%7Caharui%40adobe.com%7C47043e4531a148
> >> aef4d208d592f05
> >> >>00e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636576483
> >> 221343567&sdata
> >> >>=%2FyCH3DmV45%2FNp8O0shMTRoSnbhXpOTUfHKCpCsSlSkI%3D&reserved=0
> >> >> >> [2]
> >> >>https://na01.safelinks.protection.outlook.com/?url=https%
> >> 3A%2F%2Fgoo.gl%2
> >> >>FNz8YbE&data=02%7C01%7Caharui%40adobe.com%7C47043e4531a148
> >> aef4d208d592f05
> >> >>00e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636576483
> >> 221343567&sdata
> >> >>=E2ZaeAOXXKA4gEACwPx6D%2B4oUiwT%2Bk2QLSeKEl%2BEGTM%3D&reserved=0
> >> >> >
> >> >> >
> >> >> > Thanks for the pointers.  I will study this code and see how I can
> >> >>adapt
> >> >> > this.
> >> >> >
> >> >> > Regards,
> >> >> > Om
> >> >> >
> >> >> >
> >> >> >>
> >> >> >>
> >> >> >> Thanks, Piotr
> >> >> >>
> >> >> >> 2018-03-26 9:16 GMT+02:00 OmPrakash Muppirala <
> bigosmallm@gmail.com
> >> >:
> >> >> >>
> >> >> >> > Okay, I was able to make quite a bit of progress on the ECharts
> >> >> effort.
> >> >> >> > The next thing I am stuck on is on how to listen to changes to
> >> >>items
> >> >> in
> >> >> >> an
> >> >> >> > ArrayList.
> >> >> >> > This is how the mxml looks like:
> >> >> >> >
> >> >> >> > <ns2:ECharts id="chart">
> >> >> >> > <ns2:chartOptions>
> >> >> >> > <ns2:EChartsOptions>
> >> >> >> > <ns2:title>
> >> >> >> > <ns2:Title text="My ECharts Title" show="true"
> >> >> >> >
> >> >>link="https://na01.safelinks.protection.outlook.com/?url=
> >> http%3A%2F%2Fwww
> >> >>.google.com&data=02%7C01%7Caharui%40adobe.com%7C47043e4531
> >> a148aef4d208d59
> >> >>2f0500e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C63657
> >> 6483221343567&s
> >> >>data=Z1QFgp5ZetKGJay0kOB5HIfLUaSGX55jZvf1A8Mx5Dk%3D&reserved=0"
> >> >>target="_self" />
> >> >> >> > </ns2:title>
> >> >> >> > <ns2:xAxis>
> >> >> >> > <ns2:XAxis data="{this.data}" position="top" />
> >> >> >> > </ns2:xAxis>
> >> >> >> > <ns2:yAxis>
> >> >> >> > <ns2:YAxis/>
> >> >> >> > </ns2:yAxis>
> >> >> >> > <ns2:series>
> >> >> >> > <js:ArrayList>
> >> >> >> > <ns2:Series name="Accounts" type="bar" data="{this.seriesData}"
> />
> >> >> >> > </js:ArrayList>
> >> >> >> > </ns2:series>
> >> >> >> > </ns2:EChartsOptions>
> >> >> >> > </ns2:chartOptions>
> >> >> >> > </ns2:ECharts>
> >> >> >> >
> >> >> >> >
> >> >> >> > The databinding on xAxis.data works fine now.  Now I need to
> make
> >> >>the
> >> >> >> same
> >> >> >> > thing work with series[0].data.
> >> >> >> >
> >> >> >> > The relevant classes are here:
> >> >> >> > EChartsOptions.as:
> >> >> >> >
> >> >>https://na01.safelinks.protection.outlook.com/?url=https%
> >> 3A%2F%2Fgithub.c
> >> >>om%2Fapache%2Froyale-asjs%2Fblob%2F4ae36845c19a923a5&data=
> >> 02%7C01%7Caharu
> >> >>i%40adobe.com%7C47043e4531a148aef4d208d592f0500e%
> >> 7Cfa7b1b5a7b34438794aed2
> >> >>c178decee1%7C0%7C0%7C636576483221343567&sdata=tUpeAO4RBkOA
> >> dBWSEA8RGvjxhzU
> >> >>WdpPWXMAb8s%2B%2F0Lo%3D&reserved=0
> >> >> >> 8f795738b2f42
> >> >> >> > 8c2615d130/examples/royale/ECharts/src/echarts/
> EChartsOptions.as
> >> >> >> >
> >> >> >> > Series.as:
> >> >> >> >
> >> >>https://na01.safelinks.protection.outlook.com/?url=https%
> >> 3A%2F%2Fgithub.c
> >> >>om%2Fapache%2Froyale-asjs%2Fblob%2F4ae36845c19a923a5&data=
> >> 02%7C01%7Caharu
> >> >>i%40adobe.com%7C47043e4531a148aef4d208d592f0500e%
> >> 7Cfa7b1b5a7b34438794aed2
> >> >>c178decee1%7C0%7C0%7C636576483221343567&sdata=tUpeAO4RBkOA
> >> dBWSEA8RGvjxhzU
> >> >>WdpPWXMAb8s%2B%2F0Lo%3D&reserved=0
> >> >> >> 8f795738b2f42
> >> >> >> > 8c2615d130/examples/royale/ECharts/src/echarts/Series.as
> >> >> >> >
> >> >> >> > Any pointers?
> >> >> >> >
> >> >> >> > Thanks,
> >> >> >> > Om
> >> >> >> >
> >> >> >> > On Fri, Mar 16, 2018 at 9:16 AM, Alex Harui
> >> >><aharui@adobe.com.invalid
> >> >> >
> >> >> >> > wrote:
> >> >> >> >
> >> >> >> > > Om appears to be using Express Application, which should have
> >> >> >> > > ApplicationDataBinding baked in.  That can be verified in the
> >> >> >> debugger by
> >> >> >> > > checking what is on the strand.
> >> >> >> > >
> >> >> >> > > Bindings are not evaluated at instantiation time so the
> >> >>destination
> >> >> >> > > properties need to handle changing at runtime or the entire
> >> >> component
> >> >> >> > > needs to apply all properties at the right time.
> >> >> >> > >
> >> >> >> > > HTH,
> >> >> >> > > -Alex
> >> >> >> > >
> >> >> >> > > On 3/16/18, 2:35 AM, "Harbs" <ha...@gmail.com> wrote:
> >> >> >> > >
> >> >> >> > > >I’m pretty sure that only works if the view is a separate
> mxml
> >> >> file.
> >> >> >> > > >
> >> >> >> > > >> On Mar 16, 2018, at 11:28 AM, Piotr Zarzycki
> >> >> >> > > >><pi...@gmail.com> wrote:
> >> >> >> > > >>
> >> >> >> > > >> I'm also wondering whether it will work if he apply
> >> >> >> > <js:ViewDataBinding
> >> >> >> > > >>/>
> >> >> >> > > >> in View only...
> >> >> >> > > >>
> >> >> >> > > >> 2018-03-16 10:26 GMT+01:00 Harbs <ha...@gmail.com>:
> >> >> >> > > >>
> >> >> >> > > >>> It looks like you are missing <js:ApplicationDataBinding/>
> >> >> >> > > >>>
> >> >> >> > > >>>> On Mar 16, 2018, at 11:21 AM, OmPrakash Muppirala
> >> >> >> > > >>>><bi...@gmail.com>
> >> >> >> > > >>> wrote:
> >> >> >> > > >>>>
> >> >> >> > > >>>> Please take a look at these usage examples: [1], [2]
> >> >> >> > > >>>>
> >> >> >> > > >>>> I am trying to set/bind arrays as values to the chart
> >> >> components.
> >> >> >> > But
> >> >> >> > > >>>> those values dont get applied at all.
> >> >> >> > > >>>>
> >> >> >> > > >>>> Can someone please take a look?
> >> >> >> > > >>>>
> >> >> >> > > >>>> The entire app can be found here: [3]
> >> >> >> > > >>>>
> >> >> >> > > >>>> Thanks,
> >> >> >> > > >>>> Om
> >> >> >> > > >>>>
> >> >> >> > > >>>>
> >> >> >> > > >>>> [1]
> >> >> >> > > >>>>
> >> >> >> > > >>>>https://na01.safelinks.protection.outlook.com/?url=
> >> >> >> > > https%3A%2F%2Fgithub
> >> >> >> > > >>>>.com%2Fapache%2Froyale-asjs%2Fblob%2Ffeature%2F&data=
> >> >> >> > > 02%7C01%7Caharui%4
> >> >> >> > > >>>>0adobe.com%7Cc0b67f1e7b0b44699adb08d58b21
> >> >> >> > > 4cf5%7Cfa7b1b5a7b34438794aed2c
> >> >> >> > > >>>>178decee1%7C0%7C0%7C636567897496708478&sdata=
> >> >> >> > > zjAObepBqE9V2O8ktwnjs%2F%2
> >> >> >> > > >>>>Fpl%2F0J%2FIpj%2B1%2FsCTK%2B6WA%3D&reserved=0
> >> >> >> > > >>> echarts/examples/royale/ECharts/src/Main.mxml#L26
> >> >> >> > > >>>> [2]
> >> >> >> > > >>>>
> >> >> >> > > >>>>https://na01.safelinks.protection.outlook.com/?url=
> >> >> >> > > https%3A%2F%2Fgithub
> >> >> >> > > >>>>.com%2Fapache%2Froyale-asjs%2Fblob%2Ffeature%2F&data=
> >> >> >> > > 02%7C01%7Caharui%4
> >> >> >> > > >>>>0adobe.com%7Cc0b67f1e7b0b44699adb08d58b21
> >> >> >> > > 4cf5%7Cfa7b1b5a7b34438794aed2c
> >> >> >> > > >>>>178decee1%7C0%7C0%7C636567897496708478&sdata=
> >> >> >> > > zjAObepBqE9V2O8ktwnjs%2F%2
> >> >> >> > > >>>>Fpl%2F0J%2FIpj%2B1%2FsCTK%2B6WA%3D&reserved=0
> >> >> >> > > >>> echarts/examples/royale/ECharts/src/Main.mxml#L31
> >> >> >> > > >>>> [3]
> >> >> >> > > >>>>
> >> >> >> > > >>>>https://na01.safelinks.protection.outlook.com/?url=
> >> >> >> > > https%3A%2F%2Fgithub
> >> >> >> > > >>>>.com%2Fapache%2Froyale-asjs%2Fblob%2Ffeature%2F&data=
> >> >> >> > > 02%7C01%7Caharui%4
> >> >> >> > > >>>>0adobe.com%7Cc0b67f1e7b0b44699adb08d58b21
> >> >> >> > > 4cf5%7Cfa7b1b5a7b34438794aed2c
> >> >> >> > > >>>>178decee1%7C0%7C0%7C636567897496708478&sdata=
> >> >> >> > > zjAObepBqE9V2O8ktwnjs%2F%2
> >> >> >> > > >>>>Fpl%2F0J%2FIpj%2B1%2FsCTK%2B6WA%3D&reserved=0
> >> >> >> > > >>> echarts/examples/royale/ECharts
> >> >> >> > > >>>
> >> >> >> > > >>>
> >> >> >> > > >>
> >> >> >> > > >>
> >> >> >> > > >> --
> >> >> >> > > >>
> >> >> >> > > >> Piotr Zarzycki
> >> >> >> > > >>
> >> >> >> > > >> Patreon:
> >> >> >> > > >>*https://na01.safelinks.protection.outlook.com/?url=
> >> >> >> > > https%3A%2F%2Fwww.pat
> >> >> >> > > >>reon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com
> >> >> >> > > %7Cc0b67f1e7b0b
> >> >> >> > > >>44699adb08d58b214cf5%7Cfa7b1b5a7b34438794aed2c178de
> >> >> >> > > cee1%7C0%7C0%7C6365678
> >> >> >> > > >>97496708478&sdata=B%2FFqHMwrwAGEnorLx5Z4kia4K73rXy
> >> >> >> > > RtoTn9kE0xDOg%3D&reserv
> >> >> >> > > >>ed=0
> >> >> >> > > >>
> >> >> >> > > >><https://na01.safelinks.protection.outlook.com/?url=
> >> >> >> > > https%3A%2F%2Fwww.pat
> >> >> >> > > >>reon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com
> >> >> >> > > %7Cc0b67f1e7b0b
> >> >> >> > > >>44699adb08d58b214cf5%7Cfa7b1b5a7b34438794aed2c178de
> >> >> >> > > cee1%7C0%7C0%7C6365678
> >> >> >> > > >>97496708478&sdata=B%2FFqHMwrwAGEnorLx5Z4kia4K73rXy
> >> >> >> > > RtoTn9kE0xDOg%3D&reserv
> >> >> >> > > >>ed=0>*
> >> >> >> > > >
> >> >> >> > >
> >> >> >> > >
> >> >> >> >
> >> >> >>
> >> >> >>
> >> >> >>
> >> >> >> --
> >> >> >>
> >> >> >> Piotr Zarzycki
> >> >> >>
> >> >> >> Patreon:
> >> >>*https://na01.safelinks.protection.outlook.com/?url=https%
> >> 3A%2F%2Fwww.pat
> >> >>reon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com
> >> %7C47043e4531a1
> >> >>48aef4d208d592f0500e%7Cfa7b1b5a7b34438794aed2c178decee1%
> >> 7C0%7C0%7C6365764
> >> >>83221343567&sdata=btUXyJZQB%2F9AgUawlpJ29StZvDvCgOwJYeyZ%2
> >> BjJ6YTk%3D&rese
> >> >>rved=0
> >> >> >>
> >> >><https://na01.safelinks.protection.outlook.com/?url=https%
> >> 3A%2F%2Fwww.pat
> >> >>reon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com
> >> %7C47043e4531a1
> >> >>48aef4d208d592f0500e%7Cfa7b1b5a7b34438794aed2c178decee1%
> >> 7C0%7C0%7C6365764
> >> >>83221343567&sdata=btUXyJZQB%2F9AgUawlpJ29StZvDvCgOwJYeyZ%2
> >> BjJ6YTk%3D&rese
> >> >>rved=0>*
> >> >> >>
> >> >> >
> >> >> >
> >> >>
> >> >
> >> >
> >> >
> >> >--
> >> >
> >> >Piotr Zarzycki
> >> >
> >> >Patreon:
> >> >*https://na01.safelinks.protection.outlook.com/?url=https%
> >> 3A%2F%2Fwww.patr
> >> >eon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com%7
> >> C47043e4531a148
> >> >aef4d208d592f0500e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%
> >> 7C0%7C6365764832
> >> >21343567&sdata=btUXyJZQB%2F9AgUawlpJ29StZvDvCgOwJYeyZ%2BjJ6
> >> YTk%3D&reserved
> >> >=0
> >> ><https://na01.safelinks.protection.outlook.com/?url=https%
> >> 3A%2F%2Fwww.patr
> >> >eon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com%7
> >> C47043e4531a148
> >> >aef4d208d592f0500e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%
> >> 7C0%7C6365764832
> >> >21343567&sdata=btUXyJZQB%2F9AgUawlpJ29StZvDvCgOwJYeyZ%2BjJ6
> >> YTk%3D&reserved
> >> >=0>*
> >>
> >>
> >
>
>
> --
> Carlos Rovira
> http://about.me/carlosrovira
>

Re: Setting/binding data in mxml - what am I doing wrong?

Posted by Carlos Rovira <ca...@apache.org>.
Hi Om,

that's great, but image is not shown, better upload to snaggit and then
send the link
thanks for working on that! :)

2018-03-27 10:54 GMT+02:00 OmPrakash Muppirala <bi...@gmail.com>:

> Thanks for the pointers, Alex and Piotr.  I was able to make this work.
> Now we have a nice little Echarts chart showing up :-)
>
>
> One issue I noticed was that setting values inside an anonymous function
> does not trigger bindings.  I'm not sure if that is a bug or an expected
> feature.  Thoughts?
>
> In any case, I am now unblocked so I will be able add more features.  I
> will put up a demo/example page for this work soon.
>
> Thanks,
> Om
>
>
> On Mon, Mar 26, 2018 at 9:25 AM, Alex Harui <ah...@adobe.com.invalid>
> wrote:
>
>> In the end, DataBinding is really just a convenient way to generate
>> listeners for change events and handlers that update things.  When you
>> look at nested data structures, some kinds of changes are easily detected
>> and others are not.  It is useful to understand what kinds of changes
>> could be made.  I listed some possibilities earlier.
>>
>> For a series:
>> 1) change the entire ArrayList
>> 2) add/remove items
>> 3) change the data in the item itself.
>> 4) change the array wrapped by the ArrayList
>>
>> Each of these requires code that detects changes at different levels.
>> Most of Royale can easily detect #1.  You have to either change to a
>> subclass of ArrayList or drop a bead on it to detect #2.  I don't think
>> we've written code for #3 yet.  Not sure about #4.  For #3, event
>> listeners need to be added on each item in the ArrayList (and removed if
>> the item is removed from the ArrayList).  We don't handle all of these
>> cases out-of-the-box for PAYG reasons.
>>
>> So, you have to understand how the data is changing and get it to trigger
>> events on those changes.  And possibly use a different DataBinding
>> implementation to detect those changes at certain times.  That's what
>> ItemRendererDataBinding does.
>>
>> HTH,
>> -Alex
>>
>> On 3/26/18, 1:05 AM, "Piotr Zarzycki" <pi...@gmail.com> wrote:
>>
>> >Om,
>> >
>> >You are right! I did look into the PieChart and found  ChartBase, which
>> >extends List, but you are using EChart which is simple UIBase.
>> >However still probably should be similar bead factory created which
>> >handles
>> >creation of each item.
>> >
>> >Sorry for the confusion.
>> >
>> >Thanks, Piotr
>> >
>> >2018-03-26 9:54 GMT+02:00 OmPrakash Muppirala <bi...@gmail.com>:
>> >
>> >> So, if I create a echarts.SeriesList class that extends ArrayList - it
>> >>can
>> >> handle the addition and updates of Series objects.  Is that a better
>> >> approach?
>> >>
>> >> Thanks,
>> >> Om
>> >>
>> >> On Mon, Mar 26, 2018 at 12:47 AM, OmPrakash Muppirala <
>> >> bigosmallm@gmail.com>
>> >> wrote:
>> >>
>> >> >
>> >> >
>> >> > On Mon, Mar 26, 2018 at 12:34 AM, Piotr Zarzycki <
>> >> > piotrzarzycki21@gmail.com> wrote:
>> >> >
>> >> >> Hi Om,
>> >> >>
>> >> >> Since your base chart class is a actually a List,
>> >> >
>> >> >
>> >> > I'm confused.  How is it a List?
>> >> >
>> >> >
>> >> >> your EChart should use
>> >> >> [1] and [2]. However it is possible that you will have to implement
>> >>your
>> >> >> own Factory which is extends the current one.
>> >> >>
>> >> >> [1]
>> >>https://na01.safelinks.protection.outlook.com/?url=https%
>> 3A%2F%2Fgoo.gl%2
>> >>FafXdPr&data=02%7C01%7Caharui%40adobe.com%7C47043e4531a148
>> aef4d208d592f05
>> >>00e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636576483
>> 221343567&sdata
>> >>=%2FyCH3DmV45%2FNp8O0shMTRoSnbhXpOTUfHKCpCsSlSkI%3D&reserved=0
>> >> >> [2]
>> >>https://na01.safelinks.protection.outlook.com/?url=https%
>> 3A%2F%2Fgoo.gl%2
>> >>FNz8YbE&data=02%7C01%7Caharui%40adobe.com%7C47043e4531a148
>> aef4d208d592f05
>> >>00e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636576483
>> 221343567&sdata
>> >>=E2ZaeAOXXKA4gEACwPx6D%2B4oUiwT%2Bk2QLSeKEl%2BEGTM%3D&reserved=0
>> >> >
>> >> >
>> >> > Thanks for the pointers.  I will study this code and see how I can
>> >>adapt
>> >> > this.
>> >> >
>> >> > Regards,
>> >> > Om
>> >> >
>> >> >
>> >> >>
>> >> >>
>> >> >> Thanks, Piotr
>> >> >>
>> >> >> 2018-03-26 9:16 GMT+02:00 OmPrakash Muppirala <bigosmallm@gmail.com
>> >:
>> >> >>
>> >> >> > Okay, I was able to make quite a bit of progress on the ECharts
>> >> effort.
>> >> >> > The next thing I am stuck on is on how to listen to changes to
>> >>items
>> >> in
>> >> >> an
>> >> >> > ArrayList.
>> >> >> > This is how the mxml looks like:
>> >> >> >
>> >> >> > <ns2:ECharts id="chart">
>> >> >> > <ns2:chartOptions>
>> >> >> > <ns2:EChartsOptions>
>> >> >> > <ns2:title>
>> >> >> > <ns2:Title text="My ECharts Title" show="true"
>> >> >> >
>> >>link="https://na01.safelinks.protection.outlook.com/?url=
>> http%3A%2F%2Fwww
>> >>.google.com&data=02%7C01%7Caharui%40adobe.com%7C47043e4531
>> a148aef4d208d59
>> >>2f0500e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C63657
>> 6483221343567&s
>> >>data=Z1QFgp5ZetKGJay0kOB5HIfLUaSGX55jZvf1A8Mx5Dk%3D&reserved=0"
>> >>target="_self" />
>> >> >> > </ns2:title>
>> >> >> > <ns2:xAxis>
>> >> >> > <ns2:XAxis data="{this.data}" position="top" />
>> >> >> > </ns2:xAxis>
>> >> >> > <ns2:yAxis>
>> >> >> > <ns2:YAxis/>
>> >> >> > </ns2:yAxis>
>> >> >> > <ns2:series>
>> >> >> > <js:ArrayList>
>> >> >> > <ns2:Series name="Accounts" type="bar" data="{this.seriesData}" />
>> >> >> > </js:ArrayList>
>> >> >> > </ns2:series>
>> >> >> > </ns2:EChartsOptions>
>> >> >> > </ns2:chartOptions>
>> >> >> > </ns2:ECharts>
>> >> >> >
>> >> >> >
>> >> >> > The databinding on xAxis.data works fine now.  Now I need to make
>> >>the
>> >> >> same
>> >> >> > thing work with series[0].data.
>> >> >> >
>> >> >> > The relevant classes are here:
>> >> >> > EChartsOptions.as:
>> >> >> >
>> >>https://na01.safelinks.protection.outlook.com/?url=https%
>> 3A%2F%2Fgithub.c
>> >>om%2Fapache%2Froyale-asjs%2Fblob%2F4ae36845c19a923a5&data=
>> 02%7C01%7Caharu
>> >>i%40adobe.com%7C47043e4531a148aef4d208d592f0500e%
>> 7Cfa7b1b5a7b34438794aed2
>> >>c178decee1%7C0%7C0%7C636576483221343567&sdata=tUpeAO4RBkOA
>> dBWSEA8RGvjxhzU
>> >>WdpPWXMAb8s%2B%2F0Lo%3D&reserved=0
>> >> >> 8f795738b2f42
>> >> >> > 8c2615d130/examples/royale/ECharts/src/echarts/EChartsOptions.as
>> >> >> >
>> >> >> > Series.as:
>> >> >> >
>> >>https://na01.safelinks.protection.outlook.com/?url=https%
>> 3A%2F%2Fgithub.c
>> >>om%2Fapache%2Froyale-asjs%2Fblob%2F4ae36845c19a923a5&data=
>> 02%7C01%7Caharu
>> >>i%40adobe.com%7C47043e4531a148aef4d208d592f0500e%
>> 7Cfa7b1b5a7b34438794aed2
>> >>c178decee1%7C0%7C0%7C636576483221343567&sdata=tUpeAO4RBkOA
>> dBWSEA8RGvjxhzU
>> >>WdpPWXMAb8s%2B%2F0Lo%3D&reserved=0
>> >> >> 8f795738b2f42
>> >> >> > 8c2615d130/examples/royale/ECharts/src/echarts/Series.as
>> >> >> >
>> >> >> > Any pointers?
>> >> >> >
>> >> >> > Thanks,
>> >> >> > Om
>> >> >> >
>> >> >> > On Fri, Mar 16, 2018 at 9:16 AM, Alex Harui
>> >><aharui@adobe.com.invalid
>> >> >
>> >> >> > wrote:
>> >> >> >
>> >> >> > > Om appears to be using Express Application, which should have
>> >> >> > > ApplicationDataBinding baked in.  That can be verified in the
>> >> >> debugger by
>> >> >> > > checking what is on the strand.
>> >> >> > >
>> >> >> > > Bindings are not evaluated at instantiation time so the
>> >>destination
>> >> >> > > properties need to handle changing at runtime or the entire
>> >> component
>> >> >> > > needs to apply all properties at the right time.
>> >> >> > >
>> >> >> > > HTH,
>> >> >> > > -Alex
>> >> >> > >
>> >> >> > > On 3/16/18, 2:35 AM, "Harbs" <ha...@gmail.com> wrote:
>> >> >> > >
>> >> >> > > >I’m pretty sure that only works if the view is a separate mxml
>> >> file.
>> >> >> > > >
>> >> >> > > >> On Mar 16, 2018, at 11:28 AM, Piotr Zarzycki
>> >> >> > > >><pi...@gmail.com> wrote:
>> >> >> > > >>
>> >> >> > > >> I'm also wondering whether it will work if he apply
>> >> >> > <js:ViewDataBinding
>> >> >> > > >>/>
>> >> >> > > >> in View only...
>> >> >> > > >>
>> >> >> > > >> 2018-03-16 10:26 GMT+01:00 Harbs <ha...@gmail.com>:
>> >> >> > > >>
>> >> >> > > >>> It looks like you are missing <js:ApplicationDataBinding/>
>> >> >> > > >>>
>> >> >> > > >>>> On Mar 16, 2018, at 11:21 AM, OmPrakash Muppirala
>> >> >> > > >>>><bi...@gmail.com>
>> >> >> > > >>> wrote:
>> >> >> > > >>>>
>> >> >> > > >>>> Please take a look at these usage examples: [1], [2]
>> >> >> > > >>>>
>> >> >> > > >>>> I am trying to set/bind arrays as values to the chart
>> >> components.
>> >> >> > But
>> >> >> > > >>>> those values dont get applied at all.
>> >> >> > > >>>>
>> >> >> > > >>>> Can someone please take a look?
>> >> >> > > >>>>
>> >> >> > > >>>> The entire app can be found here: [3]
>> >> >> > > >>>>
>> >> >> > > >>>> Thanks,
>> >> >> > > >>>> Om
>> >> >> > > >>>>
>> >> >> > > >>>>
>> >> >> > > >>>> [1]
>> >> >> > > >>>>
>> >> >> > > >>>>https://na01.safelinks.protection.outlook.com/?url=
>> >> >> > > https%3A%2F%2Fgithub
>> >> >> > > >>>>.com%2Fapache%2Froyale-asjs%2Fblob%2Ffeature%2F&data=
>> >> >> > > 02%7C01%7Caharui%4
>> >> >> > > >>>>0adobe.com%7Cc0b67f1e7b0b44699adb08d58b21
>> >> >> > > 4cf5%7Cfa7b1b5a7b34438794aed2c
>> >> >> > > >>>>178decee1%7C0%7C0%7C636567897496708478&sdata=
>> >> >> > > zjAObepBqE9V2O8ktwnjs%2F%2
>> >> >> > > >>>>Fpl%2F0J%2FIpj%2B1%2FsCTK%2B6WA%3D&reserved=0
>> >> >> > > >>> echarts/examples/royale/ECharts/src/Main.mxml#L26
>> >> >> > > >>>> [2]
>> >> >> > > >>>>
>> >> >> > > >>>>https://na01.safelinks.protection.outlook.com/?url=
>> >> >> > > https%3A%2F%2Fgithub
>> >> >> > > >>>>.com%2Fapache%2Froyale-asjs%2Fblob%2Ffeature%2F&data=
>> >> >> > > 02%7C01%7Caharui%4
>> >> >> > > >>>>0adobe.com%7Cc0b67f1e7b0b44699adb08d58b21
>> >> >> > > 4cf5%7Cfa7b1b5a7b34438794aed2c
>> >> >> > > >>>>178decee1%7C0%7C0%7C636567897496708478&sdata=
>> >> >> > > zjAObepBqE9V2O8ktwnjs%2F%2
>> >> >> > > >>>>Fpl%2F0J%2FIpj%2B1%2FsCTK%2B6WA%3D&reserved=0
>> >> >> > > >>> echarts/examples/royale/ECharts/src/Main.mxml#L31
>> >> >> > > >>>> [3]
>> >> >> > > >>>>
>> >> >> > > >>>>https://na01.safelinks.protection.outlook.com/?url=
>> >> >> > > https%3A%2F%2Fgithub
>> >> >> > > >>>>.com%2Fapache%2Froyale-asjs%2Fblob%2Ffeature%2F&data=
>> >> >> > > 02%7C01%7Caharui%4
>> >> >> > > >>>>0adobe.com%7Cc0b67f1e7b0b44699adb08d58b21
>> >> >> > > 4cf5%7Cfa7b1b5a7b34438794aed2c
>> >> >> > > >>>>178decee1%7C0%7C0%7C636567897496708478&sdata=
>> >> >> > > zjAObepBqE9V2O8ktwnjs%2F%2
>> >> >> > > >>>>Fpl%2F0J%2FIpj%2B1%2FsCTK%2B6WA%3D&reserved=0
>> >> >> > > >>> echarts/examples/royale/ECharts
>> >> >> > > >>>
>> >> >> > > >>>
>> >> >> > > >>
>> >> >> > > >>
>> >> >> > > >> --
>> >> >> > > >>
>> >> >> > > >> Piotr Zarzycki
>> >> >> > > >>
>> >> >> > > >> Patreon:
>> >> >> > > >>*https://na01.safelinks.protection.outlook.com/?url=
>> >> >> > > https%3A%2F%2Fwww.pat
>> >> >> > > >>reon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com
>> >> >> > > %7Cc0b67f1e7b0b
>> >> >> > > >>44699adb08d58b214cf5%7Cfa7b1b5a7b34438794aed2c178de
>> >> >> > > cee1%7C0%7C0%7C6365678
>> >> >> > > >>97496708478&sdata=B%2FFqHMwrwAGEnorLx5Z4kia4K73rXy
>> >> >> > > RtoTn9kE0xDOg%3D&reserv
>> >> >> > > >>ed=0
>> >> >> > > >>
>> >> >> > > >><https://na01.safelinks.protection.outlook.com/?url=
>> >> >> > > https%3A%2F%2Fwww.pat
>> >> >> > > >>reon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com
>> >> >> > > %7Cc0b67f1e7b0b
>> >> >> > > >>44699adb08d58b214cf5%7Cfa7b1b5a7b34438794aed2c178de
>> >> >> > > cee1%7C0%7C0%7C6365678
>> >> >> > > >>97496708478&sdata=B%2FFqHMwrwAGEnorLx5Z4kia4K73rXy
>> >> >> > > RtoTn9kE0xDOg%3D&reserv
>> >> >> > > >>ed=0>*
>> >> >> > > >
>> >> >> > >
>> >> >> > >
>> >> >> >
>> >> >>
>> >> >>
>> >> >>
>> >> >> --
>> >> >>
>> >> >> Piotr Zarzycki
>> >> >>
>> >> >> Patreon:
>> >>*https://na01.safelinks.protection.outlook.com/?url=https%
>> 3A%2F%2Fwww.pat
>> >>reon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com
>> %7C47043e4531a1
>> >>48aef4d208d592f0500e%7Cfa7b1b5a7b34438794aed2c178decee1%
>> 7C0%7C0%7C6365764
>> >>83221343567&sdata=btUXyJZQB%2F9AgUawlpJ29StZvDvCgOwJYeyZ%2
>> BjJ6YTk%3D&rese
>> >>rved=0
>> >> >>
>> >><https://na01.safelinks.protection.outlook.com/?url=https%
>> 3A%2F%2Fwww.pat
>> >>reon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com
>> %7C47043e4531a1
>> >>48aef4d208d592f0500e%7Cfa7b1b5a7b34438794aed2c178decee1%
>> 7C0%7C0%7C6365764
>> >>83221343567&sdata=btUXyJZQB%2F9AgUawlpJ29StZvDvCgOwJYeyZ%2
>> BjJ6YTk%3D&rese
>> >>rved=0>*
>> >> >>
>> >> >
>> >> >
>> >>
>> >
>> >
>> >
>> >--
>> >
>> >Piotr Zarzycki
>> >
>> >Patreon:
>> >*https://na01.safelinks.protection.outlook.com/?url=https%
>> 3A%2F%2Fwww.patr
>> >eon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com%7
>> C47043e4531a148
>> >aef4d208d592f0500e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%
>> 7C0%7C6365764832
>> >21343567&sdata=btUXyJZQB%2F9AgUawlpJ29StZvDvCgOwJYeyZ%2BjJ6
>> YTk%3D&reserved
>> >=0
>> ><https://na01.safelinks.protection.outlook.com/?url=https%
>> 3A%2F%2Fwww.patr
>> >eon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com%7
>> C47043e4531a148
>> >aef4d208d592f0500e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%
>> 7C0%7C6365764832
>> >21343567&sdata=btUXyJZQB%2F9AgUawlpJ29StZvDvCgOwJYeyZ%2BjJ6
>> YTk%3D&reserved
>> >=0>*
>>
>>
>


-- 
Carlos Rovira
http://about.me/carlosrovira

Re: Setting/binding data in mxml - what am I doing wrong?

Posted by OmPrakash Muppirala <bi...@gmail.com>.
Thanks for the pointers, Alex and Piotr.  I was able to make this work.
Now we have a nice little Echarts chart showing up :-)


One issue I noticed was that setting values inside an anonymous function
does not trigger bindings.  I'm not sure if that is a bug or an expected
feature.  Thoughts?

In any case, I am now unblocked so I will be able add more features.  I
will put up a demo/example page for this work soon.

Thanks,
Om


On Mon, Mar 26, 2018 at 9:25 AM, Alex Harui <ah...@adobe.com.invalid>
wrote:

> In the end, DataBinding is really just a convenient way to generate
> listeners for change events and handlers that update things.  When you
> look at nested data structures, some kinds of changes are easily detected
> and others are not.  It is useful to understand what kinds of changes
> could be made.  I listed some possibilities earlier.
>
> For a series:
> 1) change the entire ArrayList
> 2) add/remove items
> 3) change the data in the item itself.
> 4) change the array wrapped by the ArrayList
>
> Each of these requires code that detects changes at different levels.
> Most of Royale can easily detect #1.  You have to either change to a
> subclass of ArrayList or drop a bead on it to detect #2.  I don't think
> we've written code for #3 yet.  Not sure about #4.  For #3, event
> listeners need to be added on each item in the ArrayList (and removed if
> the item is removed from the ArrayList).  We don't handle all of these
> cases out-of-the-box for PAYG reasons.
>
> So, you have to understand how the data is changing and get it to trigger
> events on those changes.  And possibly use a different DataBinding
> implementation to detect those changes at certain times.  That's what
> ItemRendererDataBinding does.
>
> HTH,
> -Alex
>
> On 3/26/18, 1:05 AM, "Piotr Zarzycki" <pi...@gmail.com> wrote:
>
> >Om,
> >
> >You are right! I did look into the PieChart and found  ChartBase, which
> >extends List, but you are using EChart which is simple UIBase.
> >However still probably should be similar bead factory created which
> >handles
> >creation of each item.
> >
> >Sorry for the confusion.
> >
> >Thanks, Piotr
> >
> >2018-03-26 9:54 GMT+02:00 OmPrakash Muppirala <bi...@gmail.com>:
> >
> >> So, if I create a echarts.SeriesList class that extends ArrayList - it
> >>can
> >> handle the addition and updates of Series objects.  Is that a better
> >> approach?
> >>
> >> Thanks,
> >> Om
> >>
> >> On Mon, Mar 26, 2018 at 12:47 AM, OmPrakash Muppirala <
> >> bigosmallm@gmail.com>
> >> wrote:
> >>
> >> >
> >> >
> >> > On Mon, Mar 26, 2018 at 12:34 AM, Piotr Zarzycki <
> >> > piotrzarzycki21@gmail.com> wrote:
> >> >
> >> >> Hi Om,
> >> >>
> >> >> Since your base chart class is a actually a List,
> >> >
> >> >
> >> > I'm confused.  How is it a List?
> >> >
> >> >
> >> >> your EChart should use
> >> >> [1] and [2]. However it is possible that you will have to implement
> >>your
> >> >> own Factory which is extends the current one.
> >> >>
> >> >> [1]
> >>https://na01.safelinks.protection.outlook.com/?url=
> https%3A%2F%2Fgoo.gl%2
> >>FafXdPr&data=02%7C01%7Caharui%40adobe.com%7C47043e4531a148aef4d208d592f0
> 5
> >>00e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%
> 7C636576483221343567&sdata
> >>=%2FyCH3DmV45%2FNp8O0shMTRoSnbhXpOTUfHKCpCsSlSkI%3D&reserved=0
> >> >> [2]
> >>https://na01.safelinks.protection.outlook.com/?url=
> https%3A%2F%2Fgoo.gl%2
> >>FNz8YbE&data=02%7C01%7Caharui%40adobe.com%7C47043e4531a148aef4d208d592f0
> 5
> >>00e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%
> 7C636576483221343567&sdata
> >>=E2ZaeAOXXKA4gEACwPx6D%2B4oUiwT%2Bk2QLSeKEl%2BEGTM%3D&reserved=0
> >> >
> >> >
> >> > Thanks for the pointers.  I will study this code and see how I can
> >>adapt
> >> > this.
> >> >
> >> > Regards,
> >> > Om
> >> >
> >> >
> >> >>
> >> >>
> >> >> Thanks, Piotr
> >> >>
> >> >> 2018-03-26 9:16 GMT+02:00 OmPrakash Muppirala <bigosmallm@gmail.com
> >:
> >> >>
> >> >> > Okay, I was able to make quite a bit of progress on the ECharts
> >> effort.
> >> >> > The next thing I am stuck on is on how to listen to changes to
> >>items
> >> in
> >> >> an
> >> >> > ArrayList.
> >> >> > This is how the mxml looks like:
> >> >> >
> >> >> > <ns2:ECharts id="chart">
> >> >> > <ns2:chartOptions>
> >> >> > <ns2:EChartsOptions>
> >> >> > <ns2:title>
> >> >> > <ns2:Title text="My ECharts Title" show="true"
> >> >> >
> >>link="https://na01.safelinks.protection.outlook.
> com/?url=http%3A%2F%2Fwww
> >>.google.com&data=02%7C01%7Caharui%40adobe.com%
> 7C47043e4531a148aef4d208d59
> >>2f0500e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%
> 7C636576483221343567&s
> >>data=Z1QFgp5ZetKGJay0kOB5HIfLUaSGX55jZvf1A8Mx5Dk%3D&reserved=0"
> >>target="_self" />
> >> >> > </ns2:title>
> >> >> > <ns2:xAxis>
> >> >> > <ns2:XAxis data="{this.data}" position="top" />
> >> >> > </ns2:xAxis>
> >> >> > <ns2:yAxis>
> >> >> > <ns2:YAxis/>
> >> >> > </ns2:yAxis>
> >> >> > <ns2:series>
> >> >> > <js:ArrayList>
> >> >> > <ns2:Series name="Accounts" type="bar" data="{this.seriesData}" />
> >> >> > </js:ArrayList>
> >> >> > </ns2:series>
> >> >> > </ns2:EChartsOptions>
> >> >> > </ns2:chartOptions>
> >> >> > </ns2:ECharts>
> >> >> >
> >> >> >
> >> >> > The databinding on xAxis.data works fine now.  Now I need to make
> >>the
> >> >> same
> >> >> > thing work with series[0].data.
> >> >> >
> >> >> > The relevant classes are here:
> >> >> > EChartsOptions.as:
> >> >> >
> >>https://na01.safelinks.protection.outlook.com/?url=
> https%3A%2F%2Fgithub.c
> >>om%2Fapache%2Froyale-asjs%2Fblob%2F4ae36845c19a923a5&
> data=02%7C01%7Caharu
> >>i%40adobe.com%7C47043e4531a148aef4d208d592f0
> 500e%7Cfa7b1b5a7b34438794aed2
> >>c178decee1%7C0%7C0%7C636576483221343567&sdata=
> tUpeAO4RBkOAdBWSEA8RGvjxhzU
> >>WdpPWXMAb8s%2B%2F0Lo%3D&reserved=0
> >> >> 8f795738b2f42
> >> >> > 8c2615d130/examples/royale/ECharts/src/echarts/EChartsOptions.as
> >> >> >
> >> >> > Series.as:
> >> >> >
> >>https://na01.safelinks.protection.outlook.com/?url=
> https%3A%2F%2Fgithub.c
> >>om%2Fapache%2Froyale-asjs%2Fblob%2F4ae36845c19a923a5&
> data=02%7C01%7Caharu
> >>i%40adobe.com%7C47043e4531a148aef4d208d592f0
> 500e%7Cfa7b1b5a7b34438794aed2
> >>c178decee1%7C0%7C0%7C636576483221343567&sdata=
> tUpeAO4RBkOAdBWSEA8RGvjxhzU
> >>WdpPWXMAb8s%2B%2F0Lo%3D&reserved=0
> >> >> 8f795738b2f42
> >> >> > 8c2615d130/examples/royale/ECharts/src/echarts/Series.as
> >> >> >
> >> >> > Any pointers?
> >> >> >
> >> >> > Thanks,
> >> >> > Om
> >> >> >
> >> >> > On Fri, Mar 16, 2018 at 9:16 AM, Alex Harui
> >><aharui@adobe.com.invalid
> >> >
> >> >> > wrote:
> >> >> >
> >> >> > > Om appears to be using Express Application, which should have
> >> >> > > ApplicationDataBinding baked in.  That can be verified in the
> >> >> debugger by
> >> >> > > checking what is on the strand.
> >> >> > >
> >> >> > > Bindings are not evaluated at instantiation time so the
> >>destination
> >> >> > > properties need to handle changing at runtime or the entire
> >> component
> >> >> > > needs to apply all properties at the right time.
> >> >> > >
> >> >> > > HTH,
> >> >> > > -Alex
> >> >> > >
> >> >> > > On 3/16/18, 2:35 AM, "Harbs" <ha...@gmail.com> wrote:
> >> >> > >
> >> >> > > >I’m pretty sure that only works if the view is a separate mxml
> >> file.
> >> >> > > >
> >> >> > > >> On Mar 16, 2018, at 11:28 AM, Piotr Zarzycki
> >> >> > > >><pi...@gmail.com> wrote:
> >> >> > > >>
> >> >> > > >> I'm also wondering whether it will work if he apply
> >> >> > <js:ViewDataBinding
> >> >> > > >>/>
> >> >> > > >> in View only...
> >> >> > > >>
> >> >> > > >> 2018-03-16 10:26 GMT+01:00 Harbs <ha...@gmail.com>:
> >> >> > > >>
> >> >> > > >>> It looks like you are missing <js:ApplicationDataBinding/>
> >> >> > > >>>
> >> >> > > >>>> On Mar 16, 2018, at 11:21 AM, OmPrakash Muppirala
> >> >> > > >>>><bi...@gmail.com>
> >> >> > > >>> wrote:
> >> >> > > >>>>
> >> >> > > >>>> Please take a look at these usage examples: [1], [2]
> >> >> > > >>>>
> >> >> > > >>>> I am trying to set/bind arrays as values to the chart
> >> components.
> >> >> > But
> >> >> > > >>>> those values dont get applied at all.
> >> >> > > >>>>
> >> >> > > >>>> Can someone please take a look?
> >> >> > > >>>>
> >> >> > > >>>> The entire app can be found here: [3]
> >> >> > > >>>>
> >> >> > > >>>> Thanks,
> >> >> > > >>>> Om
> >> >> > > >>>>
> >> >> > > >>>>
> >> >> > > >>>> [1]
> >> >> > > >>>>
> >> >> > > >>>>https://na01.safelinks.protection.outlook.com/?url=
> >> >> > > https%3A%2F%2Fgithub
> >> >> > > >>>>.com%2Fapache%2Froyale-asjs%2Fblob%2Ffeature%2F&data=
> >> >> > > 02%7C01%7Caharui%4
> >> >> > > >>>>0adobe.com%7Cc0b67f1e7b0b44699adb08d58b21
> >> >> > > 4cf5%7Cfa7b1b5a7b34438794aed2c
> >> >> > > >>>>178decee1%7C0%7C0%7C636567897496708478&sdata=
> >> >> > > zjAObepBqE9V2O8ktwnjs%2F%2
> >> >> > > >>>>Fpl%2F0J%2FIpj%2B1%2FsCTK%2B6WA%3D&reserved=0
> >> >> > > >>> echarts/examples/royale/ECharts/src/Main.mxml#L26
> >> >> > > >>>> [2]
> >> >> > > >>>>
> >> >> > > >>>>https://na01.safelinks.protection.outlook.com/?url=
> >> >> > > https%3A%2F%2Fgithub
> >> >> > > >>>>.com%2Fapache%2Froyale-asjs%2Fblob%2Ffeature%2F&data=
> >> >> > > 02%7C01%7Caharui%4
> >> >> > > >>>>0adobe.com%7Cc0b67f1e7b0b44699adb08d58b21
> >> >> > > 4cf5%7Cfa7b1b5a7b34438794aed2c
> >> >> > > >>>>178decee1%7C0%7C0%7C636567897496708478&sdata=
> >> >> > > zjAObepBqE9V2O8ktwnjs%2F%2
> >> >> > > >>>>Fpl%2F0J%2FIpj%2B1%2FsCTK%2B6WA%3D&reserved=0
> >> >> > > >>> echarts/examples/royale/ECharts/src/Main.mxml#L31
> >> >> > > >>>> [3]
> >> >> > > >>>>
> >> >> > > >>>>https://na01.safelinks.protection.outlook.com/?url=
> >> >> > > https%3A%2F%2Fgithub
> >> >> > > >>>>.com%2Fapache%2Froyale-asjs%2Fblob%2Ffeature%2F&data=
> >> >> > > 02%7C01%7Caharui%4
> >> >> > > >>>>0adobe.com%7Cc0b67f1e7b0b44699adb08d58b21
> >> >> > > 4cf5%7Cfa7b1b5a7b34438794aed2c
> >> >> > > >>>>178decee1%7C0%7C0%7C636567897496708478&sdata=
> >> >> > > zjAObepBqE9V2O8ktwnjs%2F%2
> >> >> > > >>>>Fpl%2F0J%2FIpj%2B1%2FsCTK%2B6WA%3D&reserved=0
> >> >> > > >>> echarts/examples/royale/ECharts
> >> >> > > >>>
> >> >> > > >>>
> >> >> > > >>
> >> >> > > >>
> >> >> > > >> --
> >> >> > > >>
> >> >> > > >> Piotr Zarzycki
> >> >> > > >>
> >> >> > > >> Patreon:
> >> >> > > >>*https://na01.safelinks.protection.outlook.com/?url=
> >> >> > > https%3A%2F%2Fwww.pat
> >> >> > > >>reon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com
> >> >> > > %7Cc0b67f1e7b0b
> >> >> > > >>44699adb08d58b214cf5%7Cfa7b1b5a7b34438794aed2c178de
> >> >> > > cee1%7C0%7C0%7C6365678
> >> >> > > >>97496708478&sdata=B%2FFqHMwrwAGEnorLx5Z4kia4K73rXy
> >> >> > > RtoTn9kE0xDOg%3D&reserv
> >> >> > > >>ed=0
> >> >> > > >>
> >> >> > > >><https://na01.safelinks.protection.outlook.com/?url=
> >> >> > > https%3A%2F%2Fwww.pat
> >> >> > > >>reon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com
> >> >> > > %7Cc0b67f1e7b0b
> >> >> > > >>44699adb08d58b214cf5%7Cfa7b1b5a7b34438794aed2c178de
> >> >> > > cee1%7C0%7C0%7C6365678
> >> >> > > >>97496708478&sdata=B%2FFqHMwrwAGEnorLx5Z4kia4K73rXy
> >> >> > > RtoTn9kE0xDOg%3D&reserv
> >> >> > > >>ed=0>*
> >> >> > > >
> >> >> > >
> >> >> > >
> >> >> >
> >> >>
> >> >>
> >> >>
> >> >> --
> >> >>
> >> >> Piotr Zarzycki
> >> >>
> >> >> Patreon:
> >>*https://na01.safelinks.protection.outlook.com/?url=
> https%3A%2F%2Fwww.pat
> >>reon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com
> %7C47043e4531a1
> >>48aef4d208d592f0500e%7Cfa7b1b5a7b34438794aed2c178de
> cee1%7C0%7C0%7C6365764
> >>83221343567&sdata=btUXyJZQB%2F9AgUawlpJ29StZvDvCgOwJYeyZ%
> 2BjJ6YTk%3D&rese
> >>rved=0
> >> >>
> >><https://na01.safelinks.protection.outlook.com/?url=
> https%3A%2F%2Fwww.pat
> >>reon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com
> %7C47043e4531a1
> >>48aef4d208d592f0500e%7Cfa7b1b5a7b34438794aed2c178de
> cee1%7C0%7C0%7C6365764
> >>83221343567&sdata=btUXyJZQB%2F9AgUawlpJ29StZvDvCgOwJYeyZ%
> 2BjJ6YTk%3D&rese
> >>rved=0>*
> >> >>
> >> >
> >> >
> >>
> >
> >
> >
> >--
> >
> >Piotr Zarzycki
> >
> >Patreon:
> >*https://na01.safelinks.protection.outlook.com/?url=
> https%3A%2F%2Fwww.patr
> >eon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com%
> 7C47043e4531a148
> >aef4d208d592f0500e%7Cfa7b1b5a7b34438794aed2c178de
> cee1%7C0%7C0%7C6365764832
> >21343567&sdata=btUXyJZQB%2F9AgUawlpJ29StZvDvCgOwJYeyZ%
> 2BjJ6YTk%3D&reserved
> >=0
> ><https://na01.safelinks.protection.outlook.com/?url=
> https%3A%2F%2Fwww.patr
> >eon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com%
> 7C47043e4531a148
> >aef4d208d592f0500e%7Cfa7b1b5a7b34438794aed2c178de
> cee1%7C0%7C0%7C6365764832
> >21343567&sdata=btUXyJZQB%2F9AgUawlpJ29StZvDvCgOwJYeyZ%
> 2BjJ6YTk%3D&reserved
> >=0>*
>
>

Re: Setting/binding data in mxml - what am I doing wrong?

Posted by Alex Harui <ah...@adobe.com.INVALID>.
In the end, DataBinding is really just a convenient way to generate
listeners for change events and handlers that update things.  When you
look at nested data structures, some kinds of changes are easily detected
and others are not.  It is useful to understand what kinds of changes
could be made.  I listed some possibilities earlier.

For a series:
1) change the entire ArrayList
2) add/remove items
3) change the data in the item itself.
4) change the array wrapped by the ArrayList

Each of these requires code that detects changes at different levels.
Most of Royale can easily detect #1.  You have to either change to a
subclass of ArrayList or drop a bead on it to detect #2.  I don't think
we've written code for #3 yet.  Not sure about #4.  For #3, event
listeners need to be added on each item in the ArrayList (and removed if
the item is removed from the ArrayList).  We don't handle all of these
cases out-of-the-box for PAYG reasons.

So, you have to understand how the data is changing and get it to trigger
events on those changes.  And possibly use a different DataBinding
implementation to detect those changes at certain times.  That's what
ItemRendererDataBinding does.

HTH,
-Alex

On 3/26/18, 1:05 AM, "Piotr Zarzycki" <pi...@gmail.com> wrote:

>Om,
>
>You are right! I did look into the PieChart and found  ChartBase, which
>extends List, but you are using EChart which is simple UIBase.
>However still probably should be similar bead factory created which
>handles
>creation of each item.
>
>Sorry for the confusion.
>
>Thanks, Piotr
>
>2018-03-26 9:54 GMT+02:00 OmPrakash Muppirala <bi...@gmail.com>:
>
>> So, if I create a echarts.SeriesList class that extends ArrayList - it
>>can
>> handle the addition and updates of Series objects.  Is that a better
>> approach?
>>
>> Thanks,
>> Om
>>
>> On Mon, Mar 26, 2018 at 12:47 AM, OmPrakash Muppirala <
>> bigosmallm@gmail.com>
>> wrote:
>>
>> >
>> >
>> > On Mon, Mar 26, 2018 at 12:34 AM, Piotr Zarzycki <
>> > piotrzarzycki21@gmail.com> wrote:
>> >
>> >> Hi Om,
>> >>
>> >> Since your base chart class is a actually a List,
>> >
>> >
>> > I'm confused.  How is it a List?
>> >
>> >
>> >> your EChart should use
>> >> [1] and [2]. However it is possible that you will have to implement
>>your
>> >> own Factory which is extends the current one.
>> >>
>> >> [1]  
>>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgoo.gl%2
>>FafXdPr&data=02%7C01%7Caharui%40adobe.com%7C47043e4531a148aef4d208d592f05
>>00e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636576483221343567&sdata
>>=%2FyCH3DmV45%2FNp8O0shMTRoSnbhXpOTUfHKCpCsSlSkI%3D&reserved=0
>> >> [2]  
>>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgoo.gl%2
>>FNz8YbE&data=02%7C01%7Caharui%40adobe.com%7C47043e4531a148aef4d208d592f05
>>00e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636576483221343567&sdata
>>=E2ZaeAOXXKA4gEACwPx6D%2B4oUiwT%2Bk2QLSeKEl%2BEGTM%3D&reserved=0
>> >
>> >
>> > Thanks for the pointers.  I will study this code and see how I can
>>adapt
>> > this.
>> >
>> > Regards,
>> > Om
>> >
>> >
>> >>
>> >>
>> >> Thanks, Piotr
>> >>
>> >> 2018-03-26 9:16 GMT+02:00 OmPrakash Muppirala <bi...@gmail.com>:
>> >>
>> >> > Okay, I was able to make quite a bit of progress on the ECharts
>> effort.
>> >> > The next thing I am stuck on is on how to listen to changes to
>>items
>> in
>> >> an
>> >> > ArrayList.
>> >> > This is how the mxml looks like:
>> >> >
>> >> > <ns2:ECharts id="chart">
>> >> > <ns2:chartOptions>
>> >> > <ns2:EChartsOptions>
>> >> > <ns2:title>
>> >> > <ns2:Title text="My ECharts Title" show="true"
>> >> > 
>>link="https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww
>>.google.com&data=02%7C01%7Caharui%40adobe.com%7C47043e4531a148aef4d208d59
>>2f0500e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636576483221343567&s
>>data=Z1QFgp5ZetKGJay0kOB5HIfLUaSGX55jZvf1A8Mx5Dk%3D&reserved=0"
>>target="_self" />
>> >> > </ns2:title>
>> >> > <ns2:xAxis>
>> >> > <ns2:XAxis data="{this.data}" position="top" />
>> >> > </ns2:xAxis>
>> >> > <ns2:yAxis>
>> >> > <ns2:YAxis/>
>> >> > </ns2:yAxis>
>> >> > <ns2:series>
>> >> > <js:ArrayList>
>> >> > <ns2:Series name="Accounts" type="bar" data="{this.seriesData}" />
>> >> > </js:ArrayList>
>> >> > </ns2:series>
>> >> > </ns2:EChartsOptions>
>> >> > </ns2:chartOptions>
>> >> > </ns2:ECharts>
>> >> >
>> >> >
>> >> > The databinding on xAxis.data works fine now.  Now I need to make
>>the
>> >> same
>> >> > thing work with series[0].data.
>> >> >
>> >> > The relevant classes are here:
>> >> > EChartsOptions.as:
>> >> > 
>>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.c
>>om%2Fapache%2Froyale-asjs%2Fblob%2F4ae36845c19a923a5&data=02%7C01%7Caharu
>>i%40adobe.com%7C47043e4531a148aef4d208d592f0500e%7Cfa7b1b5a7b34438794aed2
>>c178decee1%7C0%7C0%7C636576483221343567&sdata=tUpeAO4RBkOAdBWSEA8RGvjxhzU
>>WdpPWXMAb8s%2B%2F0Lo%3D&reserved=0
>> >> 8f795738b2f42
>> >> > 8c2615d130/examples/royale/ECharts/src/echarts/EChartsOptions.as
>> >> >
>> >> > Series.as:
>> >> > 
>>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.c
>>om%2Fapache%2Froyale-asjs%2Fblob%2F4ae36845c19a923a5&data=02%7C01%7Caharu
>>i%40adobe.com%7C47043e4531a148aef4d208d592f0500e%7Cfa7b1b5a7b34438794aed2
>>c178decee1%7C0%7C0%7C636576483221343567&sdata=tUpeAO4RBkOAdBWSEA8RGvjxhzU
>>WdpPWXMAb8s%2B%2F0Lo%3D&reserved=0
>> >> 8f795738b2f42
>> >> > 8c2615d130/examples/royale/ECharts/src/echarts/Series.as
>> >> >
>> >> > Any pointers?
>> >> >
>> >> > Thanks,
>> >> > Om
>> >> >
>> >> > On Fri, Mar 16, 2018 at 9:16 AM, Alex Harui
>><aharui@adobe.com.invalid
>> >
>> >> > wrote:
>> >> >
>> >> > > Om appears to be using Express Application, which should have
>> >> > > ApplicationDataBinding baked in.  That can be verified in the
>> >> debugger by
>> >> > > checking what is on the strand.
>> >> > >
>> >> > > Bindings are not evaluated at instantiation time so the
>>destination
>> >> > > properties need to handle changing at runtime or the entire
>> component
>> >> > > needs to apply all properties at the right time.
>> >> > >
>> >> > > HTH,
>> >> > > -Alex
>> >> > >
>> >> > > On 3/16/18, 2:35 AM, "Harbs" <ha...@gmail.com> wrote:
>> >> > >
>> >> > > >I’m pretty sure that only works if the view is a separate mxml
>> file.
>> >> > > >
>> >> > > >> On Mar 16, 2018, at 11:28 AM, Piotr Zarzycki
>> >> > > >><pi...@gmail.com> wrote:
>> >> > > >>
>> >> > > >> I'm also wondering whether it will work if he apply
>> >> > <js:ViewDataBinding
>> >> > > >>/>
>> >> > > >> in View only...
>> >> > > >>
>> >> > > >> 2018-03-16 10:26 GMT+01:00 Harbs <ha...@gmail.com>:
>> >> > > >>
>> >> > > >>> It looks like you are missing <js:ApplicationDataBinding/>
>> >> > > >>>
>> >> > > >>>> On Mar 16, 2018, at 11:21 AM, OmPrakash Muppirala
>> >> > > >>>><bi...@gmail.com>
>> >> > > >>> wrote:
>> >> > > >>>>
>> >> > > >>>> Please take a look at these usage examples: [1], [2]
>> >> > > >>>>
>> >> > > >>>> I am trying to set/bind arrays as values to the chart
>> components.
>> >> > But
>> >> > > >>>> those values dont get applied at all.
>> >> > > >>>>
>> >> > > >>>> Can someone please take a look?
>> >> > > >>>>
>> >> > > >>>> The entire app can be found here: [3]
>> >> > > >>>>
>> >> > > >>>> Thanks,
>> >> > > >>>> Om
>> >> > > >>>>
>> >> > > >>>>
>> >> > > >>>> [1]
>> >> > > >>>>
>> >> > > >>>>https://na01.safelinks.protection.outlook.com/?url=
>> >> > > https%3A%2F%2Fgithub
>> >> > > >>>>.com%2Fapache%2Froyale-asjs%2Fblob%2Ffeature%2F&data=
>> >> > > 02%7C01%7Caharui%4
>> >> > > >>>>0adobe.com%7Cc0b67f1e7b0b44699adb08d58b21
>> >> > > 4cf5%7Cfa7b1b5a7b34438794aed2c
>> >> > > >>>>178decee1%7C0%7C0%7C636567897496708478&sdata=
>> >> > > zjAObepBqE9V2O8ktwnjs%2F%2
>> >> > > >>>>Fpl%2F0J%2FIpj%2B1%2FsCTK%2B6WA%3D&reserved=0
>> >> > > >>> echarts/examples/royale/ECharts/src/Main.mxml#L26
>> >> > > >>>> [2]
>> >> > > >>>>
>> >> > > >>>>https://na01.safelinks.protection.outlook.com/?url=
>> >> > > https%3A%2F%2Fgithub
>> >> > > >>>>.com%2Fapache%2Froyale-asjs%2Fblob%2Ffeature%2F&data=
>> >> > > 02%7C01%7Caharui%4
>> >> > > >>>>0adobe.com%7Cc0b67f1e7b0b44699adb08d58b21
>> >> > > 4cf5%7Cfa7b1b5a7b34438794aed2c
>> >> > > >>>>178decee1%7C0%7C0%7C636567897496708478&sdata=
>> >> > > zjAObepBqE9V2O8ktwnjs%2F%2
>> >> > > >>>>Fpl%2F0J%2FIpj%2B1%2FsCTK%2B6WA%3D&reserved=0
>> >> > > >>> echarts/examples/royale/ECharts/src/Main.mxml#L31
>> >> > > >>>> [3]
>> >> > > >>>>
>> >> > > >>>>https://na01.safelinks.protection.outlook.com/?url=
>> >> > > https%3A%2F%2Fgithub
>> >> > > >>>>.com%2Fapache%2Froyale-asjs%2Fblob%2Ffeature%2F&data=
>> >> > > 02%7C01%7Caharui%4
>> >> > > >>>>0adobe.com%7Cc0b67f1e7b0b44699adb08d58b21
>> >> > > 4cf5%7Cfa7b1b5a7b34438794aed2c
>> >> > > >>>>178decee1%7C0%7C0%7C636567897496708478&sdata=
>> >> > > zjAObepBqE9V2O8ktwnjs%2F%2
>> >> > > >>>>Fpl%2F0J%2FIpj%2B1%2FsCTK%2B6WA%3D&reserved=0
>> >> > > >>> echarts/examples/royale/ECharts
>> >> > > >>>
>> >> > > >>>
>> >> > > >>
>> >> > > >>
>> >> > > >> --
>> >> > > >>
>> >> > > >> Piotr Zarzycki
>> >> > > >>
>> >> > > >> Patreon:
>> >> > > >>*https://na01.safelinks.protection.outlook.com/?url=
>> >> > > https%3A%2F%2Fwww.pat
>> >> > > >>reon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com
>> >> > > %7Cc0b67f1e7b0b
>> >> > > >>44699adb08d58b214cf5%7Cfa7b1b5a7b34438794aed2c178de
>> >> > > cee1%7C0%7C0%7C6365678
>> >> > > >>97496708478&sdata=B%2FFqHMwrwAGEnorLx5Z4kia4K73rXy
>> >> > > RtoTn9kE0xDOg%3D&reserv
>> >> > > >>ed=0
>> >> > > >>
>> >> > > >><https://na01.safelinks.protection.outlook.com/?url=
>> >> > > https%3A%2F%2Fwww.pat
>> >> > > >>reon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com
>> >> > > %7Cc0b67f1e7b0b
>> >> > > >>44699adb08d58b214cf5%7Cfa7b1b5a7b34438794aed2c178de
>> >> > > cee1%7C0%7C0%7C6365678
>> >> > > >>97496708478&sdata=B%2FFqHMwrwAGEnorLx5Z4kia4K73rXy
>> >> > > RtoTn9kE0xDOg%3D&reserv
>> >> > > >>ed=0>*
>> >> > > >
>> >> > >
>> >> > >
>> >> >
>> >>
>> >>
>> >>
>> >> --
>> >>
>> >> Piotr Zarzycki
>> >>
>> >> Patreon: 
>>*https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.pat
>>reon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com%7C47043e4531a1
>>48aef4d208d592f0500e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C6365764
>>83221343567&sdata=btUXyJZQB%2F9AgUawlpJ29StZvDvCgOwJYeyZ%2BjJ6YTk%3D&rese
>>rved=0
>> >> 
>><https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.pat
>>reon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com%7C47043e4531a1
>>48aef4d208d592f0500e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C6365764
>>83221343567&sdata=btUXyJZQB%2F9AgUawlpJ29StZvDvCgOwJYeyZ%2BjJ6YTk%3D&rese
>>rved=0>*
>> >>
>> >
>> >
>>
>
>
>
>-- 
>
>Piotr Zarzycki
>
>Patreon: 
>*https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.patr
>eon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com%7C47043e4531a148
>aef4d208d592f0500e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C6365764832
>21343567&sdata=btUXyJZQB%2F9AgUawlpJ29StZvDvCgOwJYeyZ%2BjJ6YTk%3D&reserved
>=0
><https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.patr
>eon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com%7C47043e4531a148
>aef4d208d592f0500e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C6365764832
>21343567&sdata=btUXyJZQB%2F9AgUawlpJ29StZvDvCgOwJYeyZ%2BjJ6YTk%3D&reserved
>=0>*


Re: Setting/binding data in mxml - what am I doing wrong?

Posted by Piotr Zarzycki <pi...@gmail.com>.
Om,

You are right! I did look into the PieChart and found  ChartBase, which
extends List, but you are using EChart which is simple UIBase.
However still probably should be similar bead factory created which handles
creation of each item.

Sorry for the confusion.

Thanks, Piotr

2018-03-26 9:54 GMT+02:00 OmPrakash Muppirala <bi...@gmail.com>:

> So, if I create a echarts.SeriesList class that extends ArrayList - it can
> handle the addition and updates of Series objects.  Is that a better
> approach?
>
> Thanks,
> Om
>
> On Mon, Mar 26, 2018 at 12:47 AM, OmPrakash Muppirala <
> bigosmallm@gmail.com>
> wrote:
>
> >
> >
> > On Mon, Mar 26, 2018 at 12:34 AM, Piotr Zarzycki <
> > piotrzarzycki21@gmail.com> wrote:
> >
> >> Hi Om,
> >>
> >> Since your base chart class is a actually a List,
> >
> >
> > I'm confused.  How is it a List?
> >
> >
> >> your EChart should use
> >> [1] and [2]. However it is possible that you will have to implement your
> >> own Factory which is extends the current one.
> >>
> >> [1]  https://goo.gl/afXdPr
> >> [2]  https://goo.gl/Nz8YbE
> >
> >
> > Thanks for the pointers.  I will study this code and see how I can adapt
> > this.
> >
> > Regards,
> > Om
> >
> >
> >>
> >>
> >> Thanks, Piotr
> >>
> >> 2018-03-26 9:16 GMT+02:00 OmPrakash Muppirala <bi...@gmail.com>:
> >>
> >> > Okay, I was able to make quite a bit of progress on the ECharts
> effort.
> >> > The next thing I am stuck on is on how to listen to changes to items
> in
> >> an
> >> > ArrayList.
> >> > This is how the mxml looks like:
> >> >
> >> > <ns2:ECharts id="chart">
> >> > <ns2:chartOptions>
> >> > <ns2:EChartsOptions>
> >> > <ns2:title>
> >> > <ns2:Title text="My ECharts Title" show="true"
> >> > link="http://www.google.com" target="_self" />
> >> > </ns2:title>
> >> > <ns2:xAxis>
> >> > <ns2:XAxis data="{this.data}" position="top" />
> >> > </ns2:xAxis>
> >> > <ns2:yAxis>
> >> > <ns2:YAxis/>
> >> > </ns2:yAxis>
> >> > <ns2:series>
> >> > <js:ArrayList>
> >> > <ns2:Series name="Accounts" type="bar" data="{this.seriesData}" />
> >> > </js:ArrayList>
> >> > </ns2:series>
> >> > </ns2:EChartsOptions>
> >> > </ns2:chartOptions>
> >> > </ns2:ECharts>
> >> >
> >> >
> >> > The databinding on xAxis.data works fine now.  Now I need to make the
> >> same
> >> > thing work with series[0].data.
> >> >
> >> > The relevant classes are here:
> >> > EChartsOptions.as:
> >> > https://github.com/apache/royale-asjs/blob/4ae36845c19a923a5
> >> 8f795738b2f42
> >> > 8c2615d130/examples/royale/ECharts/src/echarts/EChartsOptions.as
> >> >
> >> > Series.as:
> >> > https://github.com/apache/royale-asjs/blob/4ae36845c19a923a5
> >> 8f795738b2f42
> >> > 8c2615d130/examples/royale/ECharts/src/echarts/Series.as
> >> >
> >> > Any pointers?
> >> >
> >> > Thanks,
> >> > Om
> >> >
> >> > On Fri, Mar 16, 2018 at 9:16 AM, Alex Harui <aharui@adobe.com.invalid
> >
> >> > wrote:
> >> >
> >> > > Om appears to be using Express Application, which should have
> >> > > ApplicationDataBinding baked in.  That can be verified in the
> >> debugger by
> >> > > checking what is on the strand.
> >> > >
> >> > > Bindings are not evaluated at instantiation time so the destination
> >> > > properties need to handle changing at runtime or the entire
> component
> >> > > needs to apply all properties at the right time.
> >> > >
> >> > > HTH,
> >> > > -Alex
> >> > >
> >> > > On 3/16/18, 2:35 AM, "Harbs" <ha...@gmail.com> wrote:
> >> > >
> >> > > >I’m pretty sure that only works if the view is a separate mxml
> file.
> >> > > >
> >> > > >> On Mar 16, 2018, at 11:28 AM, Piotr Zarzycki
> >> > > >><pi...@gmail.com> wrote:
> >> > > >>
> >> > > >> I'm also wondering whether it will work if he apply
> >> > <js:ViewDataBinding
> >> > > >>/>
> >> > > >> in View only...
> >> > > >>
> >> > > >> 2018-03-16 10:26 GMT+01:00 Harbs <ha...@gmail.com>:
> >> > > >>
> >> > > >>> It looks like you are missing <js:ApplicationDataBinding/>
> >> > > >>>
> >> > > >>>> On Mar 16, 2018, at 11:21 AM, OmPrakash Muppirala
> >> > > >>>><bi...@gmail.com>
> >> > > >>> wrote:
> >> > > >>>>
> >> > > >>>> Please take a look at these usage examples: [1], [2]
> >> > > >>>>
> >> > > >>>> I am trying to set/bind arrays as values to the chart
> components.
> >> > But
> >> > > >>>> those values dont get applied at all.
> >> > > >>>>
> >> > > >>>> Can someone please take a look?
> >> > > >>>>
> >> > > >>>> The entire app can be found here: [3]
> >> > > >>>>
> >> > > >>>> Thanks,
> >> > > >>>> Om
> >> > > >>>>
> >> > > >>>>
> >> > > >>>> [1]
> >> > > >>>>
> >> > > >>>>https://na01.safelinks.protection.outlook.com/?url=
> >> > > https%3A%2F%2Fgithub
> >> > > >>>>.com%2Fapache%2Froyale-asjs%2Fblob%2Ffeature%2F&data=
> >> > > 02%7C01%7Caharui%4
> >> > > >>>>0adobe.com%7Cc0b67f1e7b0b44699adb08d58b21
> >> > > 4cf5%7Cfa7b1b5a7b34438794aed2c
> >> > > >>>>178decee1%7C0%7C0%7C636567897496708478&sdata=
> >> > > zjAObepBqE9V2O8ktwnjs%2F%2
> >> > > >>>>Fpl%2F0J%2FIpj%2B1%2FsCTK%2B6WA%3D&reserved=0
> >> > > >>> echarts/examples/royale/ECharts/src/Main.mxml#L26
> >> > > >>>> [2]
> >> > > >>>>
> >> > > >>>>https://na01.safelinks.protection.outlook.com/?url=
> >> > > https%3A%2F%2Fgithub
> >> > > >>>>.com%2Fapache%2Froyale-asjs%2Fblob%2Ffeature%2F&data=
> >> > > 02%7C01%7Caharui%4
> >> > > >>>>0adobe.com%7Cc0b67f1e7b0b44699adb08d58b21
> >> > > 4cf5%7Cfa7b1b5a7b34438794aed2c
> >> > > >>>>178decee1%7C0%7C0%7C636567897496708478&sdata=
> >> > > zjAObepBqE9V2O8ktwnjs%2F%2
> >> > > >>>>Fpl%2F0J%2FIpj%2B1%2FsCTK%2B6WA%3D&reserved=0
> >> > > >>> echarts/examples/royale/ECharts/src/Main.mxml#L31
> >> > > >>>> [3]
> >> > > >>>>
> >> > > >>>>https://na01.safelinks.protection.outlook.com/?url=
> >> > > https%3A%2F%2Fgithub
> >> > > >>>>.com%2Fapache%2Froyale-asjs%2Fblob%2Ffeature%2F&data=
> >> > > 02%7C01%7Caharui%4
> >> > > >>>>0adobe.com%7Cc0b67f1e7b0b44699adb08d58b21
> >> > > 4cf5%7Cfa7b1b5a7b34438794aed2c
> >> > > >>>>178decee1%7C0%7C0%7C636567897496708478&sdata=
> >> > > zjAObepBqE9V2O8ktwnjs%2F%2
> >> > > >>>>Fpl%2F0J%2FIpj%2B1%2FsCTK%2B6WA%3D&reserved=0
> >> > > >>> echarts/examples/royale/ECharts
> >> > > >>>
> >> > > >>>
> >> > > >>
> >> > > >>
> >> > > >> --
> >> > > >>
> >> > > >> Piotr Zarzycki
> >> > > >>
> >> > > >> Patreon:
> >> > > >>*https://na01.safelinks.protection.outlook.com/?url=
> >> > > https%3A%2F%2Fwww.pat
> >> > > >>reon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com
> >> > > %7Cc0b67f1e7b0b
> >> > > >>44699adb08d58b214cf5%7Cfa7b1b5a7b34438794aed2c178de
> >> > > cee1%7C0%7C0%7C6365678
> >> > > >>97496708478&sdata=B%2FFqHMwrwAGEnorLx5Z4kia4K73rXy
> >> > > RtoTn9kE0xDOg%3D&reserv
> >> > > >>ed=0
> >> > > >>
> >> > > >><https://na01.safelinks.protection.outlook.com/?url=
> >> > > https%3A%2F%2Fwww.pat
> >> > > >>reon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com
> >> > > %7Cc0b67f1e7b0b
> >> > > >>44699adb08d58b214cf5%7Cfa7b1b5a7b34438794aed2c178de
> >> > > cee1%7C0%7C0%7C6365678
> >> > > >>97496708478&sdata=B%2FFqHMwrwAGEnorLx5Z4kia4K73rXy
> >> > > RtoTn9kE0xDOg%3D&reserv
> >> > > >>ed=0>*
> >> > > >
> >> > >
> >> > >
> >> >
> >>
> >>
> >>
> >> --
> >>
> >> Piotr Zarzycki
> >>
> >> Patreon: *https://www.patreon.com/piotrzarzycki
> >> <https://www.patreon.com/piotrzarzycki>*
> >>
> >
> >
>



-- 

Piotr Zarzycki

Patreon: *https://www.patreon.com/piotrzarzycki
<https://www.patreon.com/piotrzarzycki>*

Re: Setting/binding data in mxml - what am I doing wrong?

Posted by OmPrakash Muppirala <bi...@gmail.com>.
So, if I create a echarts.SeriesList class that extends ArrayList - it can
handle the addition and updates of Series objects.  Is that a better
approach?

Thanks,
Om

On Mon, Mar 26, 2018 at 12:47 AM, OmPrakash Muppirala <bi...@gmail.com>
wrote:

>
>
> On Mon, Mar 26, 2018 at 12:34 AM, Piotr Zarzycki <
> piotrzarzycki21@gmail.com> wrote:
>
>> Hi Om,
>>
>> Since your base chart class is a actually a List,
>
>
> I'm confused.  How is it a List?
>
>
>> your EChart should use
>> [1] and [2]. However it is possible that you will have to implement your
>> own Factory which is extends the current one.
>>
>> [1]  https://goo.gl/afXdPr
>> [2]  https://goo.gl/Nz8YbE
>
>
> Thanks for the pointers.  I will study this code and see how I can adapt
> this.
>
> Regards,
> Om
>
>
>>
>>
>> Thanks, Piotr
>>
>> 2018-03-26 9:16 GMT+02:00 OmPrakash Muppirala <bi...@gmail.com>:
>>
>> > Okay, I was able to make quite a bit of progress on the ECharts effort.
>> > The next thing I am stuck on is on how to listen to changes to items in
>> an
>> > ArrayList.
>> > This is how the mxml looks like:
>> >
>> > <ns2:ECharts id="chart">
>> > <ns2:chartOptions>
>> > <ns2:EChartsOptions>
>> > <ns2:title>
>> > <ns2:Title text="My ECharts Title" show="true"
>> > link="http://www.google.com" target="_self" />
>> > </ns2:title>
>> > <ns2:xAxis>
>> > <ns2:XAxis data="{this.data}" position="top" />
>> > </ns2:xAxis>
>> > <ns2:yAxis>
>> > <ns2:YAxis/>
>> > </ns2:yAxis>
>> > <ns2:series>
>> > <js:ArrayList>
>> > <ns2:Series name="Accounts" type="bar" data="{this.seriesData}" />
>> > </js:ArrayList>
>> > </ns2:series>
>> > </ns2:EChartsOptions>
>> > </ns2:chartOptions>
>> > </ns2:ECharts>
>> >
>> >
>> > The databinding on xAxis.data works fine now.  Now I need to make the
>> same
>> > thing work with series[0].data.
>> >
>> > The relevant classes are here:
>> > EChartsOptions.as:
>> > https://github.com/apache/royale-asjs/blob/4ae36845c19a923a5
>> 8f795738b2f42
>> > 8c2615d130/examples/royale/ECharts/src/echarts/EChartsOptions.as
>> >
>> > Series.as:
>> > https://github.com/apache/royale-asjs/blob/4ae36845c19a923a5
>> 8f795738b2f42
>> > 8c2615d130/examples/royale/ECharts/src/echarts/Series.as
>> >
>> > Any pointers?
>> >
>> > Thanks,
>> > Om
>> >
>> > On Fri, Mar 16, 2018 at 9:16 AM, Alex Harui <ah...@adobe.com.invalid>
>> > wrote:
>> >
>> > > Om appears to be using Express Application, which should have
>> > > ApplicationDataBinding baked in.  That can be verified in the
>> debugger by
>> > > checking what is on the strand.
>> > >
>> > > Bindings are not evaluated at instantiation time so the destination
>> > > properties need to handle changing at runtime or the entire component
>> > > needs to apply all properties at the right time.
>> > >
>> > > HTH,
>> > > -Alex
>> > >
>> > > On 3/16/18, 2:35 AM, "Harbs" <ha...@gmail.com> wrote:
>> > >
>> > > >I’m pretty sure that only works if the view is a separate mxml file.
>> > > >
>> > > >> On Mar 16, 2018, at 11:28 AM, Piotr Zarzycki
>> > > >><pi...@gmail.com> wrote:
>> > > >>
>> > > >> I'm also wondering whether it will work if he apply
>> > <js:ViewDataBinding
>> > > >>/>
>> > > >> in View only...
>> > > >>
>> > > >> 2018-03-16 10:26 GMT+01:00 Harbs <ha...@gmail.com>:
>> > > >>
>> > > >>> It looks like you are missing <js:ApplicationDataBinding/>
>> > > >>>
>> > > >>>> On Mar 16, 2018, at 11:21 AM, OmPrakash Muppirala
>> > > >>>><bi...@gmail.com>
>> > > >>> wrote:
>> > > >>>>
>> > > >>>> Please take a look at these usage examples: [1], [2]
>> > > >>>>
>> > > >>>> I am trying to set/bind arrays as values to the chart components.
>> > But
>> > > >>>> those values dont get applied at all.
>> > > >>>>
>> > > >>>> Can someone please take a look?
>> > > >>>>
>> > > >>>> The entire app can be found here: [3]
>> > > >>>>
>> > > >>>> Thanks,
>> > > >>>> Om
>> > > >>>>
>> > > >>>>
>> > > >>>> [1]
>> > > >>>>
>> > > >>>>https://na01.safelinks.protection.outlook.com/?url=
>> > > https%3A%2F%2Fgithub
>> > > >>>>.com%2Fapache%2Froyale-asjs%2Fblob%2Ffeature%2F&data=
>> > > 02%7C01%7Caharui%4
>> > > >>>>0adobe.com%7Cc0b67f1e7b0b44699adb08d58b21
>> > > 4cf5%7Cfa7b1b5a7b34438794aed2c
>> > > >>>>178decee1%7C0%7C0%7C636567897496708478&sdata=
>> > > zjAObepBqE9V2O8ktwnjs%2F%2
>> > > >>>>Fpl%2F0J%2FIpj%2B1%2FsCTK%2B6WA%3D&reserved=0
>> > > >>> echarts/examples/royale/ECharts/src/Main.mxml#L26
>> > > >>>> [2]
>> > > >>>>
>> > > >>>>https://na01.safelinks.protection.outlook.com/?url=
>> > > https%3A%2F%2Fgithub
>> > > >>>>.com%2Fapache%2Froyale-asjs%2Fblob%2Ffeature%2F&data=
>> > > 02%7C01%7Caharui%4
>> > > >>>>0adobe.com%7Cc0b67f1e7b0b44699adb08d58b21
>> > > 4cf5%7Cfa7b1b5a7b34438794aed2c
>> > > >>>>178decee1%7C0%7C0%7C636567897496708478&sdata=
>> > > zjAObepBqE9V2O8ktwnjs%2F%2
>> > > >>>>Fpl%2F0J%2FIpj%2B1%2FsCTK%2B6WA%3D&reserved=0
>> > > >>> echarts/examples/royale/ECharts/src/Main.mxml#L31
>> > > >>>> [3]
>> > > >>>>
>> > > >>>>https://na01.safelinks.protection.outlook.com/?url=
>> > > https%3A%2F%2Fgithub
>> > > >>>>.com%2Fapache%2Froyale-asjs%2Fblob%2Ffeature%2F&data=
>> > > 02%7C01%7Caharui%4
>> > > >>>>0adobe.com%7Cc0b67f1e7b0b44699adb08d58b21
>> > > 4cf5%7Cfa7b1b5a7b34438794aed2c
>> > > >>>>178decee1%7C0%7C0%7C636567897496708478&sdata=
>> > > zjAObepBqE9V2O8ktwnjs%2F%2
>> > > >>>>Fpl%2F0J%2FIpj%2B1%2FsCTK%2B6WA%3D&reserved=0
>> > > >>> echarts/examples/royale/ECharts
>> > > >>>
>> > > >>>
>> > > >>
>> > > >>
>> > > >> --
>> > > >>
>> > > >> Piotr Zarzycki
>> > > >>
>> > > >> Patreon:
>> > > >>*https://na01.safelinks.protection.outlook.com/?url=
>> > > https%3A%2F%2Fwww.pat
>> > > >>reon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com
>> > > %7Cc0b67f1e7b0b
>> > > >>44699adb08d58b214cf5%7Cfa7b1b5a7b34438794aed2c178de
>> > > cee1%7C0%7C0%7C6365678
>> > > >>97496708478&sdata=B%2FFqHMwrwAGEnorLx5Z4kia4K73rXy
>> > > RtoTn9kE0xDOg%3D&reserv
>> > > >>ed=0
>> > > >>
>> > > >><https://na01.safelinks.protection.outlook.com/?url=
>> > > https%3A%2F%2Fwww.pat
>> > > >>reon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com
>> > > %7Cc0b67f1e7b0b
>> > > >>44699adb08d58b214cf5%7Cfa7b1b5a7b34438794aed2c178de
>> > > cee1%7C0%7C0%7C6365678
>> > > >>97496708478&sdata=B%2FFqHMwrwAGEnorLx5Z4kia4K73rXy
>> > > RtoTn9kE0xDOg%3D&reserv
>> > > >>ed=0>*
>> > > >
>> > >
>> > >
>> >
>>
>>
>>
>> --
>>
>> Piotr Zarzycki
>>
>> Patreon: *https://www.patreon.com/piotrzarzycki
>> <https://www.patreon.com/piotrzarzycki>*
>>
>
>

Re: Setting/binding data in mxml - what am I doing wrong?

Posted by OmPrakash Muppirala <bi...@gmail.com>.
On Mon, Mar 26, 2018 at 12:34 AM, Piotr Zarzycki <pi...@gmail.com>
wrote:

> Hi Om,
>
> Since your base chart class is a actually a List,


I'm confused.  How is it a List?


> your EChart should use
> [1] and [2]. However it is possible that you will have to implement your
> own Factory which is extends the current one.
>
> [1]  https://goo.gl/afXdPr
> [2]  https://goo.gl/Nz8YbE


Thanks for the pointers.  I will study this code and see how I can adapt
this.

Regards,
Om


>
>
> Thanks, Piotr
>
> 2018-03-26 9:16 GMT+02:00 OmPrakash Muppirala <bi...@gmail.com>:
>
> > Okay, I was able to make quite a bit of progress on the ECharts effort.
> > The next thing I am stuck on is on how to listen to changes to items in
> an
> > ArrayList.
> > This is how the mxml looks like:
> >
> > <ns2:ECharts id="chart">
> > <ns2:chartOptions>
> > <ns2:EChartsOptions>
> > <ns2:title>
> > <ns2:Title text="My ECharts Title" show="true"
> > link="http://www.google.com" target="_self" />
> > </ns2:title>
> > <ns2:xAxis>
> > <ns2:XAxis data="{this.data}" position="top" />
> > </ns2:xAxis>
> > <ns2:yAxis>
> > <ns2:YAxis/>
> > </ns2:yAxis>
> > <ns2:series>
> > <js:ArrayList>
> > <ns2:Series name="Accounts" type="bar" data="{this.seriesData}" />
> > </js:ArrayList>
> > </ns2:series>
> > </ns2:EChartsOptions>
> > </ns2:chartOptions>
> > </ns2:ECharts>
> >
> >
> > The databinding on xAxis.data works fine now.  Now I need to make the
> same
> > thing work with series[0].data.
> >
> > The relevant classes are here:
> > EChartsOptions.as:
> > https://github.com/apache/royale-asjs/blob/
> 4ae36845c19a923a58f795738b2f42
> > 8c2615d130/examples/royale/ECharts/src/echarts/EChartsOptions.as
> >
> > Series.as:
> > https://github.com/apache/royale-asjs/blob/
> 4ae36845c19a923a58f795738b2f42
> > 8c2615d130/examples/royale/ECharts/src/echarts/Series.as
> >
> > Any pointers?
> >
> > Thanks,
> > Om
> >
> > On Fri, Mar 16, 2018 at 9:16 AM, Alex Harui <ah...@adobe.com.invalid>
> > wrote:
> >
> > > Om appears to be using Express Application, which should have
> > > ApplicationDataBinding baked in.  That can be verified in the debugger
> by
> > > checking what is on the strand.
> > >
> > > Bindings are not evaluated at instantiation time so the destination
> > > properties need to handle changing at runtime or the entire component
> > > needs to apply all properties at the right time.
> > >
> > > HTH,
> > > -Alex
> > >
> > > On 3/16/18, 2:35 AM, "Harbs" <ha...@gmail.com> wrote:
> > >
> > > >I’m pretty sure that only works if the view is a separate mxml file.
> > > >
> > > >> On Mar 16, 2018, at 11:28 AM, Piotr Zarzycki
> > > >><pi...@gmail.com> wrote:
> > > >>
> > > >> I'm also wondering whether it will work if he apply
> > <js:ViewDataBinding
> > > >>/>
> > > >> in View only...
> > > >>
> > > >> 2018-03-16 10:26 GMT+01:00 Harbs <ha...@gmail.com>:
> > > >>
> > > >>> It looks like you are missing <js:ApplicationDataBinding/>
> > > >>>
> > > >>>> On Mar 16, 2018, at 11:21 AM, OmPrakash Muppirala
> > > >>>><bi...@gmail.com>
> > > >>> wrote:
> > > >>>>
> > > >>>> Please take a look at these usage examples: [1], [2]
> > > >>>>
> > > >>>> I am trying to set/bind arrays as values to the chart components.
> > But
> > > >>>> those values dont get applied at all.
> > > >>>>
> > > >>>> Can someone please take a look?
> > > >>>>
> > > >>>> The entire app can be found here: [3]
> > > >>>>
> > > >>>> Thanks,
> > > >>>> Om
> > > >>>>
> > > >>>>
> > > >>>> [1]
> > > >>>>
> > > >>>>https://na01.safelinks.protection.outlook.com/?url=
> > > https%3A%2F%2Fgithub
> > > >>>>.com%2Fapache%2Froyale-asjs%2Fblob%2Ffeature%2F&data=
> > > 02%7C01%7Caharui%4
> > > >>>>0adobe.com%7Cc0b67f1e7b0b44699adb08d58b21
> > > 4cf5%7Cfa7b1b5a7b34438794aed2c
> > > >>>>178decee1%7C0%7C0%7C636567897496708478&sdata=
> > > zjAObepBqE9V2O8ktwnjs%2F%2
> > > >>>>Fpl%2F0J%2FIpj%2B1%2FsCTK%2B6WA%3D&reserved=0
> > > >>> echarts/examples/royale/ECharts/src/Main.mxml#L26
> > > >>>> [2]
> > > >>>>
> > > >>>>https://na01.safelinks.protection.outlook.com/?url=
> > > https%3A%2F%2Fgithub
> > > >>>>.com%2Fapache%2Froyale-asjs%2Fblob%2Ffeature%2F&data=
> > > 02%7C01%7Caharui%4
> > > >>>>0adobe.com%7Cc0b67f1e7b0b44699adb08d58b21
> > > 4cf5%7Cfa7b1b5a7b34438794aed2c
> > > >>>>178decee1%7C0%7C0%7C636567897496708478&sdata=
> > > zjAObepBqE9V2O8ktwnjs%2F%2
> > > >>>>Fpl%2F0J%2FIpj%2B1%2FsCTK%2B6WA%3D&reserved=0
> > > >>> echarts/examples/royale/ECharts/src/Main.mxml#L31
> > > >>>> [3]
> > > >>>>
> > > >>>>https://na01.safelinks.protection.outlook.com/?url=
> > > https%3A%2F%2Fgithub
> > > >>>>.com%2Fapache%2Froyale-asjs%2Fblob%2Ffeature%2F&data=
> > > 02%7C01%7Caharui%4
> > > >>>>0adobe.com%7Cc0b67f1e7b0b44699adb08d58b21
> > > 4cf5%7Cfa7b1b5a7b34438794aed2c
> > > >>>>178decee1%7C0%7C0%7C636567897496708478&sdata=
> > > zjAObepBqE9V2O8ktwnjs%2F%2
> > > >>>>Fpl%2F0J%2FIpj%2B1%2FsCTK%2B6WA%3D&reserved=0
> > > >>> echarts/examples/royale/ECharts
> > > >>>
> > > >>>
> > > >>
> > > >>
> > > >> --
> > > >>
> > > >> Piotr Zarzycki
> > > >>
> > > >> Patreon:
> > > >>*https://na01.safelinks.protection.outlook.com/?url=
> > > https%3A%2F%2Fwww.pat
> > > >>reon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com
> > > %7Cc0b67f1e7b0b
> > > >>44699adb08d58b214cf5%7Cfa7b1b5a7b34438794aed2c178de
> > > cee1%7C0%7C0%7C6365678
> > > >>97496708478&sdata=B%2FFqHMwrwAGEnorLx5Z4kia4K73rXy
> > > RtoTn9kE0xDOg%3D&reserv
> > > >>ed=0
> > > >>
> > > >><https://na01.safelinks.protection.outlook.com/?url=
> > > https%3A%2F%2Fwww.pat
> > > >>reon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com
> > > %7Cc0b67f1e7b0b
> > > >>44699adb08d58b214cf5%7Cfa7b1b5a7b34438794aed2c178de
> > > cee1%7C0%7C0%7C6365678
> > > >>97496708478&sdata=B%2FFqHMwrwAGEnorLx5Z4kia4K73rXy
> > > RtoTn9kE0xDOg%3D&reserv
> > > >>ed=0>*
> > > >
> > >
> > >
> >
>
>
>
> --
>
> Piotr Zarzycki
>
> Patreon: *https://www.patreon.com/piotrzarzycki
> <https://www.patreon.com/piotrzarzycki>*
>

Re: Setting/binding data in mxml - what am I doing wrong?

Posted by Piotr Zarzycki <pi...@gmail.com>.
Hi Om,

Since your base chart class is a actually a List, your EChart should use
[1] and [2]. However it is possible that you will have to implement your
own Factory which is extends the current one.

[1]  https://goo.gl/afXdPr
[2]  https://goo.gl/Nz8YbE

Thanks, Piotr

2018-03-26 9:16 GMT+02:00 OmPrakash Muppirala <bi...@gmail.com>:

> Okay, I was able to make quite a bit of progress on the ECharts effort.
> The next thing I am stuck on is on how to listen to changes to items in an
> ArrayList.
> This is how the mxml looks like:
>
> <ns2:ECharts id="chart">
> <ns2:chartOptions>
> <ns2:EChartsOptions>
> <ns2:title>
> <ns2:Title text="My ECharts Title" show="true"
> link="http://www.google.com" target="_self" />
> </ns2:title>
> <ns2:xAxis>
> <ns2:XAxis data="{this.data}" position="top" />
> </ns2:xAxis>
> <ns2:yAxis>
> <ns2:YAxis/>
> </ns2:yAxis>
> <ns2:series>
> <js:ArrayList>
> <ns2:Series name="Accounts" type="bar" data="{this.seriesData}" />
> </js:ArrayList>
> </ns2:series>
> </ns2:EChartsOptions>
> </ns2:chartOptions>
> </ns2:ECharts>
>
>
> The databinding on xAxis.data works fine now.  Now I need to make the same
> thing work with series[0].data.
>
> The relevant classes are here:
> EChartsOptions.as:
> https://github.com/apache/royale-asjs/blob/4ae36845c19a923a58f795738b2f42
> 8c2615d130/examples/royale/ECharts/src/echarts/EChartsOptions.as
>
> Series.as:
> https://github.com/apache/royale-asjs/blob/4ae36845c19a923a58f795738b2f42
> 8c2615d130/examples/royale/ECharts/src/echarts/Series.as
>
> Any pointers?
>
> Thanks,
> Om
>
> On Fri, Mar 16, 2018 at 9:16 AM, Alex Harui <ah...@adobe.com.invalid>
> wrote:
>
> > Om appears to be using Express Application, which should have
> > ApplicationDataBinding baked in.  That can be verified in the debugger by
> > checking what is on the strand.
> >
> > Bindings are not evaluated at instantiation time so the destination
> > properties need to handle changing at runtime or the entire component
> > needs to apply all properties at the right time.
> >
> > HTH,
> > -Alex
> >
> > On 3/16/18, 2:35 AM, "Harbs" <ha...@gmail.com> wrote:
> >
> > >I’m pretty sure that only works if the view is a separate mxml file.
> > >
> > >> On Mar 16, 2018, at 11:28 AM, Piotr Zarzycki
> > >><pi...@gmail.com> wrote:
> > >>
> > >> I'm also wondering whether it will work if he apply
> <js:ViewDataBinding
> > >>/>
> > >> in View only...
> > >>
> > >> 2018-03-16 10:26 GMT+01:00 Harbs <ha...@gmail.com>:
> > >>
> > >>> It looks like you are missing <js:ApplicationDataBinding/>
> > >>>
> > >>>> On Mar 16, 2018, at 11:21 AM, OmPrakash Muppirala
> > >>>><bi...@gmail.com>
> > >>> wrote:
> > >>>>
> > >>>> Please take a look at these usage examples: [1], [2]
> > >>>>
> > >>>> I am trying to set/bind arrays as values to the chart components.
> But
> > >>>> those values dont get applied at all.
> > >>>>
> > >>>> Can someone please take a look?
> > >>>>
> > >>>> The entire app can be found here: [3]
> > >>>>
> > >>>> Thanks,
> > >>>> Om
> > >>>>
> > >>>>
> > >>>> [1]
> > >>>>
> > >>>>https://na01.safelinks.protection.outlook.com/?url=
> > https%3A%2F%2Fgithub
> > >>>>.com%2Fapache%2Froyale-asjs%2Fblob%2Ffeature%2F&data=
> > 02%7C01%7Caharui%4
> > >>>>0adobe.com%7Cc0b67f1e7b0b44699adb08d58b21
> > 4cf5%7Cfa7b1b5a7b34438794aed2c
> > >>>>178decee1%7C0%7C0%7C636567897496708478&sdata=
> > zjAObepBqE9V2O8ktwnjs%2F%2
> > >>>>Fpl%2F0J%2FIpj%2B1%2FsCTK%2B6WA%3D&reserved=0
> > >>> echarts/examples/royale/ECharts/src/Main.mxml#L26
> > >>>> [2]
> > >>>>
> > >>>>https://na01.safelinks.protection.outlook.com/?url=
> > https%3A%2F%2Fgithub
> > >>>>.com%2Fapache%2Froyale-asjs%2Fblob%2Ffeature%2F&data=
> > 02%7C01%7Caharui%4
> > >>>>0adobe.com%7Cc0b67f1e7b0b44699adb08d58b21
> > 4cf5%7Cfa7b1b5a7b34438794aed2c
> > >>>>178decee1%7C0%7C0%7C636567897496708478&sdata=
> > zjAObepBqE9V2O8ktwnjs%2F%2
> > >>>>Fpl%2F0J%2FIpj%2B1%2FsCTK%2B6WA%3D&reserved=0
> > >>> echarts/examples/royale/ECharts/src/Main.mxml#L31
> > >>>> [3]
> > >>>>
> > >>>>https://na01.safelinks.protection.outlook.com/?url=
> > https%3A%2F%2Fgithub
> > >>>>.com%2Fapache%2Froyale-asjs%2Fblob%2Ffeature%2F&data=
> > 02%7C01%7Caharui%4
> > >>>>0adobe.com%7Cc0b67f1e7b0b44699adb08d58b21
> > 4cf5%7Cfa7b1b5a7b34438794aed2c
> > >>>>178decee1%7C0%7C0%7C636567897496708478&sdata=
> > zjAObepBqE9V2O8ktwnjs%2F%2
> > >>>>Fpl%2F0J%2FIpj%2B1%2FsCTK%2B6WA%3D&reserved=0
> > >>> echarts/examples/royale/ECharts
> > >>>
> > >>>
> > >>
> > >>
> > >> --
> > >>
> > >> Piotr Zarzycki
> > >>
> > >> Patreon:
> > >>*https://na01.safelinks.protection.outlook.com/?url=
> > https%3A%2F%2Fwww.pat
> > >>reon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com
> > %7Cc0b67f1e7b0b
> > >>44699adb08d58b214cf5%7Cfa7b1b5a7b34438794aed2c178de
> > cee1%7C0%7C0%7C6365678
> > >>97496708478&sdata=B%2FFqHMwrwAGEnorLx5Z4kia4K73rXy
> > RtoTn9kE0xDOg%3D&reserv
> > >>ed=0
> > >>
> > >><https://na01.safelinks.protection.outlook.com/?url=
> > https%3A%2F%2Fwww.pat
> > >>reon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com
> > %7Cc0b67f1e7b0b
> > >>44699adb08d58b214cf5%7Cfa7b1b5a7b34438794aed2c178de
> > cee1%7C0%7C0%7C6365678
> > >>97496708478&sdata=B%2FFqHMwrwAGEnorLx5Z4kia4K73rXy
> > RtoTn9kE0xDOg%3D&reserv
> > >>ed=0>*
> > >
> >
> >
>



-- 

Piotr Zarzycki

Patreon: *https://www.patreon.com/piotrzarzycki
<https://www.patreon.com/piotrzarzycki>*

Re: Setting/binding data in mxml - what am I doing wrong?

Posted by OmPrakash Muppirala <bi...@gmail.com>.
Hmm, I just realized that if I do this in mxml:
<ns2:series>
<js:ArrayList>
<ns2:Series name="Accounts" type="bar" data="{this.seriesData}" />
</js:ArrayList>
</ns2:series>

The setter: set series(v:ArrayList) gets an empty ArrayList.  That looks
like a bug.

Or, am I missing something?

Thanks,
Om

On Mon, Mar 26, 2018 at 12:16 AM, OmPrakash Muppirala <bi...@gmail.com>
wrote:

> Okay, I was able to make quite a bit of progress on the ECharts effort.
> The next thing I am stuck on is on how to listen to changes to items in an
> ArrayList.
> This is how the mxml looks like:
>
> <ns2:ECharts id="chart">
> <ns2:chartOptions>
> <ns2:EChartsOptions>
> <ns2:title>
> <ns2:Title text="My ECharts Title" show="true"
> link="http://www.google.com" target="_self" />
> </ns2:title>
> <ns2:xAxis>
> <ns2:XAxis data="{this.data}" position="top" />
> </ns2:xAxis>
> <ns2:yAxis>
> <ns2:YAxis/>
> </ns2:yAxis>
> <ns2:series>
> <js:ArrayList>
> <ns2:Series name="Accounts" type="bar" data="{this.seriesData}" />
> </js:ArrayList>
> </ns2:series>
> </ns2:EChartsOptions>
> </ns2:chartOptions>
> </ns2:ECharts>
>
>
> The databinding on xAxis.data works fine now.  Now I need to make the same
> thing work with series[0].data.
>
> The relevant classes are here:
> EChartsOptions.as: https://github.com/apache/royale-asjs/blob/
> 4ae36845c19a923a58f795738b2f428c2615d130/examples/royale/
> ECharts/src/echarts/EChartsOptions.as
>
> Series.as: https://github.com/apache/royale-asjs/blob/
> 4ae36845c19a923a58f795738b2f428c2615d130/examples/royale/
> ECharts/src/echarts/Series.as
>
> Any pointers?
>
> Thanks,
> Om
>
> On Fri, Mar 16, 2018 at 9:16 AM, Alex Harui <ah...@adobe.com.invalid>
> wrote:
>
>> Om appears to be using Express Application, which should have
>> ApplicationDataBinding baked in.  That can be verified in the debugger by
>> checking what is on the strand.
>>
>> Bindings are not evaluated at instantiation time so the destination
>> properties need to handle changing at runtime or the entire component
>> needs to apply all properties at the right time.
>>
>> HTH,
>> -Alex
>>
>> On 3/16/18, 2:35 AM, "Harbs" <ha...@gmail.com> wrote:
>>
>> >I’m pretty sure that only works if the view is a separate mxml file.
>> >
>> >> On Mar 16, 2018, at 11:28 AM, Piotr Zarzycki
>> >><pi...@gmail.com> wrote:
>> >>
>> >> I'm also wondering whether it will work if he apply <js:ViewDataBinding
>> >>/>
>> >> in View only...
>> >>
>> >> 2018-03-16 10:26 GMT+01:00 Harbs <ha...@gmail.com>:
>> >>
>> >>> It looks like you are missing <js:ApplicationDataBinding/>
>> >>>
>> >>>> On Mar 16, 2018, at 11:21 AM, OmPrakash Muppirala
>> >>>><bi...@gmail.com>
>> >>> wrote:
>> >>>>
>> >>>> Please take a look at these usage examples: [1], [2]
>> >>>>
>> >>>> I am trying to set/bind arrays as values to the chart components.
>> But
>> >>>> those values dont get applied at all.
>> >>>>
>> >>>> Can someone please take a look?
>> >>>>
>> >>>> The entire app can be found here: [3]
>> >>>>
>> >>>> Thanks,
>> >>>> Om
>> >>>>
>> >>>>
>> >>>> [1]
>> >>>>
>> >>>>https://na01.safelinks.protection.outlook.com/?url=https
>> %3A%2F%2Fgithub
>> >>>>.com%2Fapache%2Froyale-asjs%2Fblob%2Ffeature%2F&data=02%
>> 7C01%7Caharui%4
>> >>>>0adobe.com%7Cc0b67f1e7b0b44699adb08d58b214cf5%
>> 7Cfa7b1b5a7b34438794aed2c
>> >>>>178decee1%7C0%7C0%7C636567897496708478&sdata=zjAObepBqE9
>> V2O8ktwnjs%2F%2
>> >>>>Fpl%2F0J%2FIpj%2B1%2FsCTK%2B6WA%3D&reserved=0
>> >>> echarts/examples/royale/ECharts/src/Main.mxml#L26
>> >>>> [2]
>> >>>>
>> >>>>https://na01.safelinks.protection.outlook.com/?url=https
>> %3A%2F%2Fgithub
>> >>>>.com%2Fapache%2Froyale-asjs%2Fblob%2Ffeature%2F&data=02%
>> 7C01%7Caharui%4
>> >>>>0adobe.com%7Cc0b67f1e7b0b44699adb08d58b214cf5%
>> 7Cfa7b1b5a7b34438794aed2c
>> >>>>178decee1%7C0%7C0%7C636567897496708478&sdata=zjAObepBqE9
>> V2O8ktwnjs%2F%2
>> >>>>Fpl%2F0J%2FIpj%2B1%2FsCTK%2B6WA%3D&reserved=0
>> >>> echarts/examples/royale/ECharts/src/Main.mxml#L31
>> >>>> [3]
>> >>>>
>> >>>>https://na01.safelinks.protection.outlook.com/?url=https
>> %3A%2F%2Fgithub
>> >>>>.com%2Fapache%2Froyale-asjs%2Fblob%2Ffeature%2F&data=02%
>> 7C01%7Caharui%4
>> >>>>0adobe.com%7Cc0b67f1e7b0b44699adb08d58b214cf5%
>> 7Cfa7b1b5a7b34438794aed2c
>> >>>>178decee1%7C0%7C0%7C636567897496708478&sdata=zjAObepBqE9
>> V2O8ktwnjs%2F%2
>> >>>>Fpl%2F0J%2FIpj%2B1%2FsCTK%2B6WA%3D&reserved=0
>> >>> echarts/examples/royale/ECharts
>> >>>
>> >>>
>> >>
>> >>
>> >> --
>> >>
>> >> Piotr Zarzycki
>> >>
>> >> Patreon:
>> >>*https://na01.safelinks.protection.outlook.com/?url=https%
>> 3A%2F%2Fwww.pat
>> >>reon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com
>> %7Cc0b67f1e7b0b
>> >>44699adb08d58b214cf5%7Cfa7b1b5a7b34438794aed2c178decee1%
>> 7C0%7C0%7C6365678
>> >>97496708478&sdata=B%2FFqHMwrwAGEnorLx5Z4kia4K73rXyRtoTn9kE
>> 0xDOg%3D&reserv
>> >>ed=0
>> >>
>> >><https://na01.safelinks.protection.outlook.com/?url=https%
>> 3A%2F%2Fwww.pat
>> >>reon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com
>> %7Cc0b67f1e7b0b
>> >>44699adb08d58b214cf5%7Cfa7b1b5a7b34438794aed2c178decee1%
>> 7C0%7C0%7C6365678
>> >>97496708478&sdata=B%2FFqHMwrwAGEnorLx5Z4kia4K73rXyRtoTn9kE
>> 0xDOg%3D&reserv
>> >>ed=0>*
>> >
>>
>>
>

Re: Setting/binding data in mxml - what am I doing wrong?

Posted by OmPrakash Muppirala <bi...@gmail.com>.
>
> Next up is the binding expression itself.   Binding to "{series[0].data}"
> has several possible interpretations.  One is that, once set, the value
> never changes.  Another is that series could change or new items could
> replace what is at 0, or data itself changes.  Each requires more and more
> sophisticated change event handling.  But what didn't make sense right
> away was that you said series is an ArrayList and ArrayList doesn't have
> [0] slots, you have to call getItemAt instead.
>

The mention of series[0].data was just an expression to convey the
concept.  The code series[0].data does not appear anywhere.

Thanks,
Om

Re: Setting/binding data in mxml - what am I doing wrong?

Posted by Alex Harui <ah...@adobe.com.INVALID>.
DataBinding in Royale attempts to be smarter than Flex.  In Flex, there
was one DataBinding implementation that evaluated data bindings in many
different parts of the lifecycle "just-in-case" something might be missed.

In Royale, we are implementing scenario-specific data bindings in order to
optimize data binding evaluation for those scenarios.  For example, there
is an ItemRendererDataBinding that knows that it isn't worth evaluating
the binding until the data property on the renderer is set.

Charts often have renderers and other parts that are handed data at a
particular point.  So you may wish to borrow ItemRendererDataBinding or
use it as inspiration for when your Chart knows it is time to evaluate the
bindings.

Next up is the binding expression itself.   Binding to "{series[0].data}"
has several possible interpretations.  One is that, once set, the value
never changes.  Another is that series could change or new items could
replace what is at 0, or data itself changes.  Each requires more and more
sophisticated change event handling.  But what didn't make sense right
away was that you said series is an ArrayList and ArrayList doesn't have
[0] slots, you have to call getItemAt instead.

Finally, I think you have to type-cast the expression otherwise it won't
minify correctly.  The "data" appears to be an Array, but what are the
items?

I'm done for tonight.  Will check in the morning.

HTH,
-Alex

On 3/26/18, 12:16 AM, "omuppi1@gmail.com on behalf of OmPrakash Muppirala"
<omuppi1@gmail.com on behalf of bigosmallm@gmail.com> wrote:

>Okay, I was able to make quite a bit of progress on the ECharts effort.
>The next thing I am stuck on is on how to listen to changes to items in an
>ArrayList.
>This is how the mxml looks like:
>
><ns2:ECharts id="chart">
><ns2:chartOptions>
><ns2:EChartsOptions>
><ns2:title>
><ns2:Title text="My ECharts Title" show="true"
>link="https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.
>google.com&data=02%7C01%7Caharui%40adobe.com%7C5bddf23a8d4f4e7d4a6408d592e
>a4696%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636576457277211437&sdat
>a=22hoowu75%2FND%2BFIMDe6iWedS2HboxagS6iXLtKAlUb8%3D&reserved=0"
>target="_self" />
></ns2:title>
><ns2:xAxis>
><ns2:XAxis data="{this.data}" position="top" />
></ns2:xAxis>
><ns2:yAxis>
><ns2:YAxis/>
></ns2:yAxis>
><ns2:series>
><js:ArrayList>
><ns2:Series name="Accounts" type="bar" data="{this.seriesData}" />
></js:ArrayList>
></ns2:series>
></ns2:EChartsOptions>
></ns2:chartOptions>
></ns2:ECharts>
>
>
>The databinding on xAxis.data works fine now.  Now I need to make the same
>thing work with series[0].data.
>
>The relevant classes are here:
>EChartsOptions.as:
>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.co
>m%2Fapache%2Froyale-asjs%2Fblob%2F4ae36845c19a923a58f795738b2f428c2615d130
>%2Fexamples%2Froyale%2FECharts%2Fsrc%2Fecharts%2FEChartsOptions.as&data=02
>%7C01%7Caharui%40adobe.com%7C5bddf23a8d4f4e7d4a6408d592ea4696%7Cfa7b1b5a7b
>34438794aed2c178decee1%7C0%7C0%7C636576457277211437&sdata=miFt57IMcqypLMUD
>%2FlmsnTTKPl4tsbUtNNOfg5zHwJk%3D&reserved=0
>
>Series.as:
>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.co
>m%2Fapache%2Froyale-asjs%2Fblob%2F4ae36845c19a923a58f795738b2f428c2615d130
>%2Fexamples%2Froyale%2FECharts%2Fsrc%2Fecharts%2FSeries.as&data=02%7C01%7C
>aharui%40adobe.com%7C5bddf23a8d4f4e7d4a6408d592ea4696%7Cfa7b1b5a7b34438794
>aed2c178decee1%7C0%7C0%7C636576457277211437&sdata=AR%2BepTyqM9T37vbK61no5t
>A9bjGRsHAkgljgmBxxRy8%3D&reserved=0
>
>Any pointers?
>
>Thanks,
>Om
>
>On Fri, Mar 16, 2018 at 9:16 AM, Alex Harui <ah...@adobe.com.invalid>
>wrote:
>
>> Om appears to be using Express Application, which should have
>> ApplicationDataBinding baked in.  That can be verified in the debugger
>>by
>> checking what is on the strand.
>>
>> Bindings are not evaluated at instantiation time so the destination
>> properties need to handle changing at runtime or the entire component
>> needs to apply all properties at the right time.
>>
>> HTH,
>> -Alex
>>
>> On 3/16/18, 2:35 AM, "Harbs" <ha...@gmail.com> wrote:
>>
>> >I’m pretty sure that only works if the view is a separate mxml file.
>> >
>> >> On Mar 16, 2018, at 11:28 AM, Piotr Zarzycki
>> >><pi...@gmail.com> wrote:
>> >>
>> >> I'm also wondering whether it will work if he apply
>><js:ViewDataBinding
>> >>/>
>> >> in View only...
>> >>
>> >> 2018-03-16 10:26 GMT+01:00 Harbs <ha...@gmail.com>:
>> >>
>> >>> It looks like you are missing <js:ApplicationDataBinding/>
>> >>>
>> >>>> On Mar 16, 2018, at 11:21 AM, OmPrakash Muppirala
>> >>>><bi...@gmail.com>
>> >>> wrote:
>> >>>>
>> >>>> Please take a look at these usage examples: [1], [2]
>> >>>>
>> >>>> I am trying to set/bind arrays as values to the chart components.
>>But
>> >>>> those values dont get applied at all.
>> >>>>
>> >>>> Can someone please take a look?
>> >>>>
>> >>>> The entire app can be found here: [3]
>> >>>>
>> >>>> Thanks,
>> >>>> Om
>> >>>>
>> >>>>
>> >>>> [1]
>> >>>>
>> >>>>https://na01.safelinks.protection.outlook.com/?url=
>> https%3A%2F%2Fgithub
>> >>>>.com%2Fapache%2Froyale-asjs%2Fblob%2Ffeature%2F&data=
>> 02%7C01%7Caharui%4
>> >>>>0adobe.com%7Cc0b67f1e7b0b44699adb08d58b21
>> 4cf5%7Cfa7b1b5a7b34438794aed2c
>> >>>>178decee1%7C0%7C0%7C636567897496708478&sdata=
>> zjAObepBqE9V2O8ktwnjs%2F%2
>> >>>>Fpl%2F0J%2FIpj%2B1%2FsCTK%2B6WA%3D&reserved=0
>> >>> echarts/examples/royale/ECharts/src/Main.mxml#L26
>> >>>> [2]
>> >>>>
>> >>>>https://na01.safelinks.protection.outlook.com/?url=
>> https%3A%2F%2Fgithub
>> >>>>.com%2Fapache%2Froyale-asjs%2Fblob%2Ffeature%2F&data=
>> 02%7C01%7Caharui%4
>> >>>>0adobe.com%7Cc0b67f1e7b0b44699adb08d58b21
>> 4cf5%7Cfa7b1b5a7b34438794aed2c
>> >>>>178decee1%7C0%7C0%7C636567897496708478&sdata=
>> zjAObepBqE9V2O8ktwnjs%2F%2
>> >>>>Fpl%2F0J%2FIpj%2B1%2FsCTK%2B6WA%3D&reserved=0
>> >>> echarts/examples/royale/ECharts/src/Main.mxml#L31
>> >>>> [3]
>> >>>>
>> >>>>https://na01.safelinks.protection.outlook.com/?url=
>> https%3A%2F%2Fgithub
>> >>>>.com%2Fapache%2Froyale-asjs%2Fblob%2Ffeature%2F&data=
>> 02%7C01%7Caharui%4
>> >>>>0adobe.com%7Cc0b67f1e7b0b44699adb08d58b21
>> 4cf5%7Cfa7b1b5a7b34438794aed2c
>> >>>>178decee1%7C0%7C0%7C636567897496708478&sdata=
>> zjAObepBqE9V2O8ktwnjs%2F%2
>> >>>>Fpl%2F0J%2FIpj%2B1%2FsCTK%2B6WA%3D&reserved=0
>> >>> echarts/examples/royale/ECharts
>> >>>
>> >>>
>> >>
>> >>
>> >> --
>> >>
>> >> Piotr Zarzycki
>> >>
>> >> Patreon:
>> >>*https://na01.safelinks.protection.outlook.com/?url=
>> https%3A%2F%2Fwww.pat
>> >>reon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com
>> %7Cc0b67f1e7b0b
>> >>44699adb08d58b214cf5%7Cfa7b1b5a7b34438794aed2c178de
>> cee1%7C0%7C0%7C6365678
>> >>97496708478&sdata=B%2FFqHMwrwAGEnorLx5Z4kia4K73rXy
>> RtoTn9kE0xDOg%3D&reserv
>> >>ed=0
>> >>
>> >><https://na01.safelinks.protection.outlook.com/?url=
>> https%3A%2F%2Fwww.pat
>> >>reon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com
>> %7Cc0b67f1e7b0b
>> >>44699adb08d58b214cf5%7Cfa7b1b5a7b34438794aed2c178de
>> cee1%7C0%7C0%7C6365678
>> >>97496708478&sdata=B%2FFqHMwrwAGEnorLx5Z4kia4K73rXy
>> RtoTn9kE0xDOg%3D&reserv
>> >>ed=0>*
>> >
>>
>>


Re: Setting/binding data in mxml - what am I doing wrong?

Posted by OmPrakash Muppirala <bi...@gmail.com>.
Okay, I was able to make quite a bit of progress on the ECharts effort.
The next thing I am stuck on is on how to listen to changes to items in an
ArrayList.
This is how the mxml looks like:

<ns2:ECharts id="chart">
<ns2:chartOptions>
<ns2:EChartsOptions>
<ns2:title>
<ns2:Title text="My ECharts Title" show="true"
link="http://www.google.com" target="_self" />
</ns2:title>
<ns2:xAxis>
<ns2:XAxis data="{this.data}" position="top" />
</ns2:xAxis>
<ns2:yAxis>
<ns2:YAxis/>
</ns2:yAxis>
<ns2:series>
<js:ArrayList>
<ns2:Series name="Accounts" type="bar" data="{this.seriesData}" />
</js:ArrayList>
</ns2:series>
</ns2:EChartsOptions>
</ns2:chartOptions>
</ns2:ECharts>


The databinding on xAxis.data works fine now.  Now I need to make the same
thing work with series[0].data.

The relevant classes are here:
EChartsOptions.as:
https://github.com/apache/royale-asjs/blob/4ae36845c19a923a58f795738b2f428c2615d130/examples/royale/ECharts/src/echarts/EChartsOptions.as

Series.as:
https://github.com/apache/royale-asjs/blob/4ae36845c19a923a58f795738b2f428c2615d130/examples/royale/ECharts/src/echarts/Series.as

Any pointers?

Thanks,
Om

On Fri, Mar 16, 2018 at 9:16 AM, Alex Harui <ah...@adobe.com.invalid>
wrote:

> Om appears to be using Express Application, which should have
> ApplicationDataBinding baked in.  That can be verified in the debugger by
> checking what is on the strand.
>
> Bindings are not evaluated at instantiation time so the destination
> properties need to handle changing at runtime or the entire component
> needs to apply all properties at the right time.
>
> HTH,
> -Alex
>
> On 3/16/18, 2:35 AM, "Harbs" <ha...@gmail.com> wrote:
>
> >I’m pretty sure that only works if the view is a separate mxml file.
> >
> >> On Mar 16, 2018, at 11:28 AM, Piotr Zarzycki
> >><pi...@gmail.com> wrote:
> >>
> >> I'm also wondering whether it will work if he apply <js:ViewDataBinding
> >>/>
> >> in View only...
> >>
> >> 2018-03-16 10:26 GMT+01:00 Harbs <ha...@gmail.com>:
> >>
> >>> It looks like you are missing <js:ApplicationDataBinding/>
> >>>
> >>>> On Mar 16, 2018, at 11:21 AM, OmPrakash Muppirala
> >>>><bi...@gmail.com>
> >>> wrote:
> >>>>
> >>>> Please take a look at these usage examples: [1], [2]
> >>>>
> >>>> I am trying to set/bind arrays as values to the chart components.  But
> >>>> those values dont get applied at all.
> >>>>
> >>>> Can someone please take a look?
> >>>>
> >>>> The entire app can be found here: [3]
> >>>>
> >>>> Thanks,
> >>>> Om
> >>>>
> >>>>
> >>>> [1]
> >>>>
> >>>>https://na01.safelinks.protection.outlook.com/?url=
> https%3A%2F%2Fgithub
> >>>>.com%2Fapache%2Froyale-asjs%2Fblob%2Ffeature%2F&data=
> 02%7C01%7Caharui%4
> >>>>0adobe.com%7Cc0b67f1e7b0b44699adb08d58b21
> 4cf5%7Cfa7b1b5a7b34438794aed2c
> >>>>178decee1%7C0%7C0%7C636567897496708478&sdata=
> zjAObepBqE9V2O8ktwnjs%2F%2
> >>>>Fpl%2F0J%2FIpj%2B1%2FsCTK%2B6WA%3D&reserved=0
> >>> echarts/examples/royale/ECharts/src/Main.mxml#L26
> >>>> [2]
> >>>>
> >>>>https://na01.safelinks.protection.outlook.com/?url=
> https%3A%2F%2Fgithub
> >>>>.com%2Fapache%2Froyale-asjs%2Fblob%2Ffeature%2F&data=
> 02%7C01%7Caharui%4
> >>>>0adobe.com%7Cc0b67f1e7b0b44699adb08d58b21
> 4cf5%7Cfa7b1b5a7b34438794aed2c
> >>>>178decee1%7C0%7C0%7C636567897496708478&sdata=
> zjAObepBqE9V2O8ktwnjs%2F%2
> >>>>Fpl%2F0J%2FIpj%2B1%2FsCTK%2B6WA%3D&reserved=0
> >>> echarts/examples/royale/ECharts/src/Main.mxml#L31
> >>>> [3]
> >>>>
> >>>>https://na01.safelinks.protection.outlook.com/?url=
> https%3A%2F%2Fgithub
> >>>>.com%2Fapache%2Froyale-asjs%2Fblob%2Ffeature%2F&data=
> 02%7C01%7Caharui%4
> >>>>0adobe.com%7Cc0b67f1e7b0b44699adb08d58b21
> 4cf5%7Cfa7b1b5a7b34438794aed2c
> >>>>178decee1%7C0%7C0%7C636567897496708478&sdata=
> zjAObepBqE9V2O8ktwnjs%2F%2
> >>>>Fpl%2F0J%2FIpj%2B1%2FsCTK%2B6WA%3D&reserved=0
> >>> echarts/examples/royale/ECharts
> >>>
> >>>
> >>
> >>
> >> --
> >>
> >> Piotr Zarzycki
> >>
> >> Patreon:
> >>*https://na01.safelinks.protection.outlook.com/?url=
> https%3A%2F%2Fwww.pat
> >>reon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com
> %7Cc0b67f1e7b0b
> >>44699adb08d58b214cf5%7Cfa7b1b5a7b34438794aed2c178de
> cee1%7C0%7C0%7C6365678
> >>97496708478&sdata=B%2FFqHMwrwAGEnorLx5Z4kia4K73rXy
> RtoTn9kE0xDOg%3D&reserv
> >>ed=0
> >>
> >><https://na01.safelinks.protection.outlook.com/?url=
> https%3A%2F%2Fwww.pat
> >>reon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com
> %7Cc0b67f1e7b0b
> >>44699adb08d58b214cf5%7Cfa7b1b5a7b34438794aed2c178de
> cee1%7C0%7C0%7C6365678
> >>97496708478&sdata=B%2FFqHMwrwAGEnorLx5Z4kia4K73rXy
> RtoTn9kE0xDOg%3D&reserv
> >>ed=0>*
> >
>
>

Re: Setting/binding data in mxml - what am I doing wrong?

Posted by Alex Harui <ah...@adobe.com.INVALID>.
Om appears to be using Express Application, which should have
ApplicationDataBinding baked in.  That can be verified in the debugger by
checking what is on the strand.

Bindings are not evaluated at instantiation time so the destination
properties need to handle changing at runtime or the entire component
needs to apply all properties at the right time.

HTH,
-Alex

On 3/16/18, 2:35 AM, "Harbs" <ha...@gmail.com> wrote:

>I’m pretty sure that only works if the view is a separate mxml file.
>
>> On Mar 16, 2018, at 11:28 AM, Piotr Zarzycki
>><pi...@gmail.com> wrote:
>> 
>> I'm also wondering whether it will work if he apply <js:ViewDataBinding
>>/>
>> in View only...
>> 
>> 2018-03-16 10:26 GMT+01:00 Harbs <ha...@gmail.com>:
>> 
>>> It looks like you are missing <js:ApplicationDataBinding/>
>>> 
>>>> On Mar 16, 2018, at 11:21 AM, OmPrakash Muppirala
>>>><bi...@gmail.com>
>>> wrote:
>>>> 
>>>> Please take a look at these usage examples: [1], [2]
>>>> 
>>>> I am trying to set/bind arrays as values to the chart components.  But
>>>> those values dont get applied at all.
>>>> 
>>>> Can someone please take a look?
>>>> 
>>>> The entire app can be found here: [3]
>>>> 
>>>> Thanks,
>>>> Om
>>>> 
>>>> 
>>>> [1]
>>>> 
>>>>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub
>>>>.com%2Fapache%2Froyale-asjs%2Fblob%2Ffeature%2F&data=02%7C01%7Caharui%4
>>>>0adobe.com%7Cc0b67f1e7b0b44699adb08d58b214cf5%7Cfa7b1b5a7b34438794aed2c
>>>>178decee1%7C0%7C0%7C636567897496708478&sdata=zjAObepBqE9V2O8ktwnjs%2F%2
>>>>Fpl%2F0J%2FIpj%2B1%2FsCTK%2B6WA%3D&reserved=0
>>> echarts/examples/royale/ECharts/src/Main.mxml#L26
>>>> [2]
>>>> 
>>>>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub
>>>>.com%2Fapache%2Froyale-asjs%2Fblob%2Ffeature%2F&data=02%7C01%7Caharui%4
>>>>0adobe.com%7Cc0b67f1e7b0b44699adb08d58b214cf5%7Cfa7b1b5a7b34438794aed2c
>>>>178decee1%7C0%7C0%7C636567897496708478&sdata=zjAObepBqE9V2O8ktwnjs%2F%2
>>>>Fpl%2F0J%2FIpj%2B1%2FsCTK%2B6WA%3D&reserved=0
>>> echarts/examples/royale/ECharts/src/Main.mxml#L31
>>>> [3]
>>>> 
>>>>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub
>>>>.com%2Fapache%2Froyale-asjs%2Fblob%2Ffeature%2F&data=02%7C01%7Caharui%4
>>>>0adobe.com%7Cc0b67f1e7b0b44699adb08d58b214cf5%7Cfa7b1b5a7b34438794aed2c
>>>>178decee1%7C0%7C0%7C636567897496708478&sdata=zjAObepBqE9V2O8ktwnjs%2F%2
>>>>Fpl%2F0J%2FIpj%2B1%2FsCTK%2B6WA%3D&reserved=0
>>> echarts/examples/royale/ECharts
>>> 
>>> 
>> 
>> 
>> -- 
>> 
>> Piotr Zarzycki
>> 
>> Patreon: 
>>*https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.pat
>>reon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com%7Cc0b67f1e7b0b
>>44699adb08d58b214cf5%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C6365678
>>97496708478&sdata=B%2FFqHMwrwAGEnorLx5Z4kia4K73rXyRtoTn9kE0xDOg%3D&reserv
>>ed=0
>> 
>><https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.pat
>>reon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com%7Cc0b67f1e7b0b
>>44699adb08d58b214cf5%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C6365678
>>97496708478&sdata=B%2FFqHMwrwAGEnorLx5Z4kia4K73rXyRtoTn9kE0xDOg%3D&reserv
>>ed=0>*
>


Re: Setting/binding data in mxml - what am I doing wrong?

Posted by Harbs <ha...@gmail.com>.
I’m pretty sure that only works if the view is a separate mxml file.

> On Mar 16, 2018, at 11:28 AM, Piotr Zarzycki <pi...@gmail.com> wrote:
> 
> I'm also wondering whether it will work if he apply <js:ViewDataBinding />
> in View only...
> 
> 2018-03-16 10:26 GMT+01:00 Harbs <ha...@gmail.com>:
> 
>> It looks like you are missing <js:ApplicationDataBinding/>
>> 
>>> On Mar 16, 2018, at 11:21 AM, OmPrakash Muppirala <bi...@gmail.com>
>> wrote:
>>> 
>>> Please take a look at these usage examples: [1], [2]
>>> 
>>> I am trying to set/bind arrays as values to the chart components.  But
>>> those values dont get applied at all.
>>> 
>>> Can someone please take a look?
>>> 
>>> The entire app can be found here: [3]
>>> 
>>> Thanks,
>>> Om
>>> 
>>> 
>>> [1]
>>> https://github.com/apache/royale-asjs/blob/feature/
>> echarts/examples/royale/ECharts/src/Main.mxml#L26
>>> [2]
>>> https://github.com/apache/royale-asjs/blob/feature/
>> echarts/examples/royale/ECharts/src/Main.mxml#L31
>>> [3]
>>> https://github.com/apache/royale-asjs/blob/feature/
>> echarts/examples/royale/ECharts
>> 
>> 
> 
> 
> -- 
> 
> Piotr Zarzycki
> 
> Patreon: *https://www.patreon.com/piotrzarzycki
> <https://www.patreon.com/piotrzarzycki>*


Re: Setting/binding data in mxml - what am I doing wrong?

Posted by OmPrakash Muppirala <bi...@gmail.com>.
On Fri, Mar 16, 2018 at 2:28 AM, Piotr Zarzycki <pi...@gmail.com>
wrote:

> I'm also wondering whether it will work if he apply <js:ViewDataBinding />
> in View only...
>

Setting

<js:beads>
<js:ViewDataBinding/>
</js:beads>

under View, does not help either.

Thanks,
Om


>
> 2018-03-16 10:26 GMT+01:00 Harbs <ha...@gmail.com>:
>
> > It looks like you are missing <js:ApplicationDataBinding/>
> >
> > > On Mar 16, 2018, at 11:21 AM, OmPrakash Muppirala <
> bigosmallm@gmail.com>
> > wrote:
> > >
> > > Please take a look at these usage examples: [1], [2]
> > >
> > > I am trying to set/bind arrays as values to the chart components.  But
> > > those values dont get applied at all.
> > >
> > > Can someone please take a look?
> > >
> > > The entire app can be found here: [3]
> > >
> > > Thanks,
> > > Om
> > >
> > >
> > > [1]
> > > https://github.com/apache/royale-asjs/blob/feature/
> > echarts/examples/royale/ECharts/src/Main.mxml#L26
> > > [2]
> > > https://github.com/apache/royale-asjs/blob/feature/
> > echarts/examples/royale/ECharts/src/Main.mxml#L31
> > > [3]
> > > https://github.com/apache/royale-asjs/blob/feature/
> > echarts/examples/royale/ECharts
> >
> >
>
>
> --
>
> Piotr Zarzycki
>
> Patreon: *https://www.patreon.com/piotrzarzycki
> <https://www.patreon.com/piotrzarzycki>*
>

Re: Setting/binding data in mxml - what am I doing wrong?

Posted by Piotr Zarzycki <pi...@gmail.com>.
I'm also wondering whether it will work if he apply <js:ViewDataBinding />
in View only...

2018-03-16 10:26 GMT+01:00 Harbs <ha...@gmail.com>:

> It looks like you are missing <js:ApplicationDataBinding/>
>
> > On Mar 16, 2018, at 11:21 AM, OmPrakash Muppirala <bi...@gmail.com>
> wrote:
> >
> > Please take a look at these usage examples: [1], [2]
> >
> > I am trying to set/bind arrays as values to the chart components.  But
> > those values dont get applied at all.
> >
> > Can someone please take a look?
> >
> > The entire app can be found here: [3]
> >
> > Thanks,
> > Om
> >
> >
> > [1]
> > https://github.com/apache/royale-asjs/blob/feature/
> echarts/examples/royale/ECharts/src/Main.mxml#L26
> > [2]
> > https://github.com/apache/royale-asjs/blob/feature/
> echarts/examples/royale/ECharts/src/Main.mxml#L31
> > [3]
> > https://github.com/apache/royale-asjs/blob/feature/
> echarts/examples/royale/ECharts
>
>


-- 

Piotr Zarzycki

Patreon: *https://www.patreon.com/piotrzarzycki
<https://www.patreon.com/piotrzarzycki>*

Re: Setting/binding data in mxml - what am I doing wrong?

Posted by OmPrakash Muppirala <bi...@gmail.com>.
On Fri, Mar 16, 2018 at 2:26 AM, Harbs <ha...@gmail.com> wrote:

> It looks like you are missing <js:ApplicationDataBinding/>
>
>
I added this:

<js:beads>
<js:ApplicationDataBinding/>
</js:beads>


Does not seem to help.

Thanks,
Om


> > On Mar 16, 2018, at 11:21 AM, OmPrakash Muppirala <bi...@gmail.com>
> wrote:
> >
> > Please take a look at these usage examples: [1], [2]
> >
> > I am trying to set/bind arrays as values to the chart components.  But
> > those values dont get applied at all.
> >
> > Can someone please take a look?
> >
> > The entire app can be found here: [3]
> >
> > Thanks,
> > Om
> >
> >
> > [1]
> > https://github.com/apache/royale-asjs/blob/feature/
> echarts/examples/royale/ECharts/src/Main.mxml#L26
> > [2]
> > https://github.com/apache/royale-asjs/blob/feature/
> echarts/examples/royale/ECharts/src/Main.mxml#L31
> > [3]
> > https://github.com/apache/royale-asjs/blob/feature/
> echarts/examples/royale/ECharts
>
>

Re: Setting/binding data in mxml - what am I doing wrong?

Posted by Harbs <ha...@gmail.com>.
It looks like you are missing <js:ApplicationDataBinding/>

> On Mar 16, 2018, at 11:21 AM, OmPrakash Muppirala <bi...@gmail.com> wrote:
> 
> Please take a look at these usage examples: [1], [2]
> 
> I am trying to set/bind arrays as values to the chart components.  But
> those values dont get applied at all.
> 
> Can someone please take a look?
> 
> The entire app can be found here: [3]
> 
> Thanks,
> Om
> 
> 
> [1]
> https://github.com/apache/royale-asjs/blob/feature/echarts/examples/royale/ECharts/src/Main.mxml#L26
> [2]
> https://github.com/apache/royale-asjs/blob/feature/echarts/examples/royale/ECharts/src/Main.mxml#L31
> [3]
> https://github.com/apache/royale-asjs/blob/feature/echarts/examples/royale/ECharts