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 <[email protected]>: > 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 < > [email protected]> > wrote: > > > > > > > On Mon, Mar 26, 2018 at 12:34 AM, Piotr Zarzycki < > > [email protected]> 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 <[email protected]>: > >> > >> > 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 <[email protected] > > > >> > 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" <[email protected]> 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 > >> > > >><[email protected]> 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 <[email protected]>: > >> > > >> > >> > > >>> It looks like you are missing <js:ApplicationDataBinding/> > >> > > >>> > >> > > >>>> On Mar 16, 2018, at 11:21 AM, OmPrakash Muppirala > >> > > >>>><[email protected]> > >> > > >>> 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>*
