From dev-return-3698-archive-asf-public=cust-asf.ponee.io@royale.apache.org Tue Mar 27 10:54:56 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 70D2618064E for ; Tue, 27 Mar 2018 10:54:55 +0200 (CEST) Received: (qmail 97775 invoked by uid 500); 27 Mar 2018 08:54:54 -0000 Mailing-List: contact dev-help@royale.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@royale.apache.org Delivered-To: mailing list dev@royale.apache.org Received: (qmail 97759 invoked by uid 99); 27 Mar 2018 08:54:53 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Mar 2018 08:54:53 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 4C115C0145 for ; Tue, 27 Mar 2018 08:54:52 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 4.02 X-Spam-Level: **** X-Spam-Status: No, score=4.02 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, HTML_MESSAGE=2, HTTP_ESCAPED_HOST=1.621, KAM_LOTSOFHASH=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id Hb3o1J80ScCr for ; Tue, 27 Mar 2018 08:54:48 +0000 (UTC) Received: from mail-it0-f48.google.com (mail-it0-f48.google.com [209.85.214.48]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 327725FB59 for ; Tue, 27 Mar 2018 08:54:47 +0000 (UTC) Received: by mail-it0-f48.google.com with SMTP id e98-v6so14286769itd.4 for ; Tue, 27 Mar 2018 01:54:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to; bh=wkoHCd5yLe0vFytHm9Cc2AMy1vVwfCagi9mAbpKbcKE=; b=dy7kNNIHHnZDn9wd9h+rbKDXHucAGdpEsYHrZ5IaO/9Cm+cVYOjRonL1jw1O1+ohlM 6is/WHbo49T1QvbvlSQbpdTRGQRQDaU4Pwzth5tURKGXE5yn6j3bpc2DyLGCBMOUFeUO iics8sLLFTTvWtX9z4C1qR+37vgxATmJWUskG5H8UJaAHTHaurUS2ysfArxY6d92EY5W KPIFEICONnhqUlb6V4U/WbgI1draciz+cujis0RQ6CU7ecODBvYLGK08bhlaMpMU4Xag fJ93ZYrYm+ZoahyXs0o1t0ewuGtX5fbfZWcHwaVZywlbqWIuD77SGfzJNgWeeOZhrhS7 5V9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to; bh=wkoHCd5yLe0vFytHm9Cc2AMy1vVwfCagi9mAbpKbcKE=; b=jkybPmYAMCHpBPXCGzlB0H8kPfunQMqfAc6+L2fHkZEC8MbAIEGOKo9S2ngqi3Mdg8 Fi6cVNZF5MbZQPU0ask5B2LN9GwvhEYg0ZSJxGE1hM4E8GLNWBA/cj+2KnBBBZfXAtnd ljJOhtNxBR0UpTSE/4gQUXBNxm18UTyebEYsNvRapJxIhG76lAYGFU2PKlWFAWvDaBHo PppO89DIaXO1QgN16RYlUd3UY3slB6A1Y6J6q7la+GLoxTKIEaNu+NBjitTtW3q2TEGD /R0tV1fyGdYq0J0syCkHsHXiYfMjdSR6PCejyzLp7qtn9AKRtFahUQ9Ew4Km0OjxWpQ7 EiNw== X-Gm-Message-State: AElRT7GsqljT2jHtfbKzdyz8TJfoRSVQtJ+bnCrJgqZgkHOzURN7os0G vDCIzwpO3P7zU3QTqGjFZd7pakZQggRjOjFQTXshCg== X-Google-Smtp-Source: AIpwx4/MQnuRBypLI/HL5zG1zwZGIprxlhBg8LGR8Z0IDicD9qjQmpWnsIyr/FI2AkyROx0I9bWpG+LRiWxVn/74dPg= X-Received: by 2002:a24:a445:: with SMTP id v5-v6mr11707167iti.39.1522140885148; Tue, 27 Mar 2018 01:54:45 -0700 (PDT) MIME-Version: 1.0 Sender: omuppi1@gmail.com Received: by 10.2.160.193 with HTTP; Tue, 27 Mar 2018 01:54:14 -0700 (PDT) In-Reply-To: References: <60D995F5-691E-461D-AF44-B3187F3A2E30@gmail.com> From: OmPrakash Muppirala Date: Tue, 27 Mar 2018 01:54:14 -0700 X-Google-Sender-Auth: 903P_gv79RWfhNXH2KUH7p7Pl-Y Message-ID: Subject: Re: Setting/binding data in mxml - what am I doing wrong? To: dev@royale.apache.org Content-Type: multipart/related; boundary="000000000000c2227d0568610ad8" --000000000000c2227d0568610ad8 Content-Type: multipart/alternative; boundary="000000000000c2227b0568610ad7" --000000000000c2227b0568610ad7 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 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" 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 : > > > >> 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=3D > https%3A%2F%2Fgoo.gl%2 > >>FafXdPr&data=3D02%7C01%7Caharui%40adobe.com%7C47043e4531a148aef4d208d59= 2f0 > 5 > >>00e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0% > 7C636576483221343567&sdata > >>=3D%2FyCH3DmV45%2FNp8O0shMTRoSnbhXpOTUfHKCpCsSlSkI%3D&reserved=3D0 > >> >> [2] > >>https://na01.safelinks.protection.outlook.com/?url=3D > https%3A%2F%2Fgoo.gl%2 > >>FNz8YbE&data=3D02%7C01%7Caharui%40adobe.com%7C47043e4531a148aef4d208d59= 2f0 > 5 > >>00e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0% > 7C636576483221343567&sdata > >>=3DE2ZaeAOXXKA4gEACwPx6D%2B4oUiwT%2Bk2QLSeKEl%2BEGTM%3D&reserved=3D0 > >> > > >> > > >> > 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 >: > >> >> > >> >> > 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: > >> >> > > >> >> > > >> >> > > >> >> > > >> >> > > >> >> > >> >> > > >>link=3D"https://na01.safelinks.protection.outlook. > com/?url=3Dhttp%3A%2F%2Fwww > >>.google.com&data=3D02%7C01%7Caharui%40adobe.com% > 7C47043e4531a148aef4d208d59 > >>2f0500e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0% > 7C636576483221343567&s > >>data=3DZ1QFgp5ZetKGJay0kOB5HIfLUaSGX55jZvf1A8Mx5Dk%3D&reserved=3D0" > >>target=3D"_self" /> > >> >> > > >> >> > > >> >> > > >> >> > > >> >> > > >> >> > > >> >> > > >> >> > > >> >> > > >> >> > > >> >> > > >> >> > > >> >> > > >> >> > > >> >> > > >> >> > > >> >> > > >> >> > 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=3D > https%3A%2F%2Fgithub.c > >>om%2Fapache%2Froyale-asjs%2Fblob%2F4ae36845c19a923a5& > data=3D02%7C01%7Caharu > >>i%40adobe.com%7C47043e4531a148aef4d208d592f0 > 500e%7Cfa7b1b5a7b34438794aed2 > >>c178decee1%7C0%7C0%7C636576483221343567&sdata=3D > tUpeAO4RBkOAdBWSEA8RGvjxhzU > >>WdpPWXMAb8s%2B%2F0Lo%3D&reserved=3D0 > >> >> 8f795738b2f42 > >> >> > 8c2615d130/examples/royale/ECharts/src/echarts/EChartsOptions.as > >> >> > > >> >> > Series.as: > >> >> > > >>https://na01.safelinks.protection.outlook.com/?url=3D > https%3A%2F%2Fgithub.c > >>om%2Fapache%2Froyale-asjs%2Fblob%2F4ae36845c19a923a5& > data=3D02%7C01%7Caharu > >>i%40adobe.com%7C47043e4531a148aef4d208d592f0 > 500e%7Cfa7b1b5a7b34438794aed2 > >>c178decee1%7C0%7C0%7C636576483221343567&sdata=3D > tUpeAO4RBkOAdBWSEA8RGvjxhzU > >>WdpPWXMAb8s%2B%2F0Lo%3D&reserved=3D0 > >> >> 8f795738b2f42 > >> >> > 8c2615d130/examples/royale/ECharts/src/echarts/Series.as > >> >> > > >> >> > Any pointers? > >> >> > > >> >> > Thanks, > >> >> > Om > >> >> > > >> >> > On Fri, Mar 16, 2018 at 9:16 AM, Alex Harui > >> >> > > >> >> > 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" wrote: > >> >> > > > >> >> > > >I=E2=80=99m pretty sure that only works if the view is a separ= ate mxml > >> file. > >> >> > > > > >> >> > > >> On Mar 16, 2018, at 11:28 AM, Piotr Zarzycki > >> >> > > >> wrote: > >> >> > > >> > >> >> > > >> I'm also wondering whether it will work if he apply > >> >> > >> >> > > >>/> > >> >> > > >> in View only... > >> >> > > >> > >> >> > > >> 2018-03-16 10:26 GMT+01:00 Harbs : > >> >> > > >> > >> >> > > >>> It looks like you are missing > >> >> > > >>> > >> >> > > >>>> On Mar 16, 2018, at 11:21 AM, OmPrakash Muppirala > >> >> > > >>>> > >> >> > > >>> 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=3D > >> >> > > https%3A%2F%2Fgithub > >> >> > > >>>>.com%2Fapache%2Froyale-asjs%2Fblob%2Ffeature%2F&data=3D > >> >> > > 02%7C01%7Caharui%4 > >> >> > > >>>>0adobe.com%7Cc0b67f1e7b0b44699adb08d58b21 > >> >> > > 4cf5%7Cfa7b1b5a7b34438794aed2c > >> >> > > >>>>178decee1%7C0%7C0%7C636567897496708478&sdata=3D > >> >> > > zjAObepBqE9V2O8ktwnjs%2F%2 > >> >> > > >>>>Fpl%2F0J%2FIpj%2B1%2FsCTK%2B6WA%3D&reserved=3D0 > >> >> > > >>> echarts/examples/royale/ECharts/src/Main.mxml#L26 > >> >> > > >>>> [2] > >> >> > > >>>> > >> >> > > >>>>https://na01.safelinks.protection.outlook.com/?url=3D > >> >> > > https%3A%2F%2Fgithub > >> >> > > >>>>.com%2Fapache%2Froyale-asjs%2Fblob%2Ffeature%2F&data=3D > >> >> > > 02%7C01%7Caharui%4 > >> >> > > >>>>0adobe.com%7Cc0b67f1e7b0b44699adb08d58b21 > >> >> > > 4cf5%7Cfa7b1b5a7b34438794aed2c > >> >> > > >>>>178decee1%7C0%7C0%7C636567897496708478&sdata=3D > >> >> > > zjAObepBqE9V2O8ktwnjs%2F%2 > >> >> > > >>>>Fpl%2F0J%2FIpj%2B1%2FsCTK%2B6WA%3D&reserved=3D0 > >> >> > > >>> echarts/examples/royale/ECharts/src/Main.mxml#L31 > >> >> > > >>>> [3] > >> >> > > >>>> > >> >> > > >>>>https://na01.safelinks.protection.outlook.com/?url=3D > >> >> > > https%3A%2F%2Fgithub > >> >> > > >>>>.com%2Fapache%2Froyale-asjs%2Fblob%2Ffeature%2F&data=3D > >> >> > > 02%7C01%7Caharui%4 > >> >> > > >>>>0adobe.com%7Cc0b67f1e7b0b44699adb08d58b21 > >> >> > > 4cf5%7Cfa7b1b5a7b34438794aed2c > >> >> > > >>>>178decee1%7C0%7C0%7C636567897496708478&sdata=3D > >> >> > > zjAObepBqE9V2O8ktwnjs%2F%2 > >> >> > > >>>>Fpl%2F0J%2FIpj%2B1%2FsCTK%2B6WA%3D&reserved=3D0 > >> >> > > >>> echarts/examples/royale/ECharts > >> >> > > >>> > >> >> > > >>> > >> >> > > >> > >> >> > > >> > >> >> > > >> -- > >> >> > > >> > >> >> > > >> Piotr Zarzycki > >> >> > > >> > >> >> > > >> Patreon: > >> >> > > >>*https://na01.safelinks.protection.outlook.com/?url=3D > >> >> > > https%3A%2F%2Fwww.pat > >> >> > > >>reon.com%2Fpiotrzarzycki&data=3D02%7C01%7Caharui%40adobe.com > >> >> > > %7Cc0b67f1e7b0b > >> >> > > >>44699adb08d58b214cf5%7Cfa7b1b5a7b34438794aed2c178de > >> >> > > cee1%7C0%7C0%7C6365678 > >> >> > > >>97496708478&sdata=3DB%2FFqHMwrwAGEnorLx5Z4kia4K73rXy > >> >> > > RtoTn9kE0xDOg%3D&reserv > >> >> > > >>ed=3D0 > >> >> > > >> > >> >> > > >> >> >> > > https%3A%2F%2Fwww.pat > >> >> > > >>reon.com%2Fpiotrzarzycki&data=3D02%7C01%7Caharui%40adobe.com > >> >> > > %7Cc0b67f1e7b0b > >> >> > > >>44699adb08d58b214cf5%7Cfa7b1b5a7b34438794aed2c178de > >> >> > > cee1%7C0%7C0%7C6365678 > >> >> > > >>97496708478&sdata=3DB%2FFqHMwrwAGEnorLx5Z4kia4K73rXy > >> >> > > RtoTn9kE0xDOg%3D&reserv > >> >> > > >>ed=3D0>* > >> >> > > > > >> >> > > > >> >> > > > >> >> > > >> >> > >> >> > >> >> > >> >> -- > >> >> > >> >> Piotr Zarzycki > >> >> > >> >> Patreon: > >>*https://na01.safelinks.protection.outlook.com/?url=3D > https%3A%2F%2Fwww.pat > >>reon.com%2Fpiotrzarzycki&data=3D02%7C01%7Caharui%40adobe.com > %7C47043e4531a1 > >>48aef4d208d592f0500e%7Cfa7b1b5a7b34438794aed2c178de > cee1%7C0%7C0%7C6365764 > >>83221343567&sdata=3DbtUXyJZQB%2F9AgUawlpJ29StZvDvCgOwJYeyZ% > 2BjJ6YTk%3D&rese > >>rved=3D0 > >> >> > >> https%3A%2F%2Fwww.pat > >>reon.com%2Fpiotrzarzycki&data=3D02%7C01%7Caharui%40adobe.com > %7C47043e4531a1 > >>48aef4d208d592f0500e%7Cfa7b1b5a7b34438794aed2c178de > cee1%7C0%7C0%7C6365764 > >>83221343567&sdata=3DbtUXyJZQB%2F9AgUawlpJ29StZvDvCgOwJYeyZ% > 2BjJ6YTk%3D&rese > >>rved=3D0>* > >> >> > >> > > >> > > >> > > > > > > > >-- > > > >Piotr Zarzycki > > > >Patreon: > >*https://na01.safelinks.protection.outlook.com/?url=3D > https%3A%2F%2Fwww.patr > >eon.com%2Fpiotrzarzycki&data=3D02%7C01%7Caharui%40adobe.com% > 7C47043e4531a148 > >aef4d208d592f0500e%7Cfa7b1b5a7b34438794aed2c178de > cee1%7C0%7C0%7C6365764832 > >21343567&sdata=3DbtUXyJZQB%2F9AgUawlpJ29StZvDvCgOwJYeyZ% > 2BjJ6YTk%3D&reserved > >=3D0 > > https%3A%2F%2Fwww.patr > >eon.com%2Fpiotrzarzycki&data=3D02%7C01%7Caharui%40adobe.com% > 7C47043e4531a148 > >aef4d208d592f0500e%7Cfa7b1b5a7b34438794aed2c178de > cee1%7C0%7C0%7C6365764832 > >21343567&sdata=3DbtUXyJZQB%2F9AgUawlpJ29StZvDvCgOwJYeyZ% > 2BjJ6YTk%3D&reserved > >=3D0>* > > --000000000000c2227b0568610ad7 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks for the pointers, Alex and Piotr.=C2=A0 I was able = to make this work.=C2=A0 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.= =C2=A0 I'm not sure if that is a bug or an expected feature.=C2=A0 Thou= ghts?

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

Thanks,
Om

=

On Mo= n, Mar 26, 2018 at 9:25 AM, Alex Harui <aharui@adobe.com.invalid> wrote:
In the end, DataBindi= ng is really just a convenient way to generate
listeners for change events and handlers that update things.=C2=A0 When you=
look at nested data structures, some kinds of changes are easily detected and others are not.=C2=A0 It is useful to understand what kinds of changes<= br> could be made.=C2=A0 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.=C2=A0 You have to either change to a subclass of ArrayList or drop a bead on it to detect #2.=C2=A0 I don't = think
we've written code for #3 yet.=C2=A0 Not sure about #4.=C2=A0 For #3, e= vent
listeners need to be added on each item in the ArrayList (and removed if the item is removed from the ArrayList).=C2=A0 We don't handle all of t= hese
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.=C2=A0 And possibly use a different DataBinding
implementation to detect those changes at certain times.=C2=A0 That's w= hat
ItemRendererDataBinding does.

HTH,
-Alex

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

>Om,
>
>You are right! I did look into the PieChart and found=C2=A0 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.=C2=A0 Is that a= better
>> approach?
>>
>> Thanks,
>> Om
>>
>> On Mon, Mar 26, 2018 at 12:47 AM, OmPrakash Muppirala <
>> bigosmallm@gmail.com&g= t;
>> 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.=C2=A0 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=3Dhttps%3A%2F%2Fgoo= .gl%2
>>FafXdPr&data=3D02%7C01%7Caharui%40adobe.com%7C47043e4531= a148aef4d208d592f05
>>00e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636= 576483221343567&sdata
>>=3D%2FyCH3DmV45%2FNp8O0shMTRoSnbhXpOTUfHKCpCsSlSkI%3D&= ;reserved=3D0
>> >> [2]
>>https://na01.safe= links.protection.outlook.com/?url=3Dhttps%3A%2F%2Fgoo.gl%2 >>FNz8YbE&data=3D02%7C01%7Caharui%40adobe.com%7C47043e4531= a148aef4d208d592f05
>>00e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636= 576483221343567&sdata
>>=3DE2ZaeAOXXKA4gEACwPx6D%2B4oUiwT%2Bk2QLSeKEl%2BEGTM%3D&a= mp;reserved=3D0
>> >
>> >
>> > Thanks for the pointers.=C2=A0 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=3D"chart">
>> >> > <ns2:chartOptions>
>> >> > <ns2:EChartsOptions>
>> >> > <ns2:title>
>> >> > <ns2:Title text=3D"My ECharts Title" sh= ow=3D"true"
>> >> >
>>link=3D"htt= ps://na01.safelinks.protection.outlook.com/?url=3Dhttp%3A%2F%2Fww= w
>>.google.com&data=3D02%7C01%7Caharui%40adobe.com%7C47043e4531= a148aef4d208d59
>>2f0500e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7= C636576483221343567&s
>>data=3DZ1QFgp5ZetKGJay0kOB5HIfLUaSGX55jZvf1A8Mx5Dk%3D&= ;reserved=3D0"
>>target=3D"_self" />
>> >> > </ns2:title>
>> >> > <ns2:xAxis>
>> >> > <ns2:XAxis data=3D"{this.data}" positio= n=3D"top" />
>> >> > </ns2:xAxis>
>> >> > <ns2:yAxis>
>> >> > <ns2:YAxis/>
>> >> > </ns2:yAxis>
>> >> > <ns2:series>
>> >> > <js:ArrayList>
>> >> > <ns2:Series name=3D"Accounts" type=3D&q= uot;bar" data=3D"{this.seriesData}" />
>> >> > </js:ArrayList>
>> >> > </ns2:series>
>> >> > </ns2:EChartsOptions>
>> >> > </ns2:chartOptions>
>> >> > </ns2:ECharts>
>> >> >
>> >> >
>> >> > The databinding on xAxis.data works fine now.=C2=A0 = Now I need to make
>>the
>> >> same
>> >> > thing work with series[0].data.
>> >> >
>> >> > The relevant classes are here:
>> >> > EChartsOptions.as:
>> >> >
>>https://na= 01.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fgithub.c=
>>om%2Fapache%2Froyale-asjs%2Fblob%2F4ae36845c19a923a5&= data=3D02%7C01%7Caharu
>>i%40adobe.com%7C47043e4531a148aef4d208d592f0500e%7Cfa7b1b5a7= b34438794aed2
>>c178decee1%7C0%7C0%7C636576483221343567&sdata=3DtUpeA= O4RBkOAdBWSEA8RGvjxhzU
>>WdpPWXMAb8s%2B%2F0Lo%3D&reserved=3D0
>> >> 8f795738b2f42
>> >> > 8c2615d130/examples/royale/ECharts/src/echarts/= EChartsOptions.as
>> >> >
>> >> > Series.as:
>> >> >
>>https://na01.safe= links.protection.outlook.com/?url=3Dhttps%3A%2F%2Fgithub.c >>om%2Fapache%2Froyale-asjs%2Fblob%2F4ae36845c19a923a5&= data=3D02%7C01%7Caharu
>>i%40adobe.com%7C47043e4531a148aef4d208d592f0500e%7Cfa7b1b5a7= b34438794aed2
>>c178decee1%7C0%7C0%7C636576483221343567&sdata=3DtUpeA= O4RBkOAdBWSEA8RGvjxhzU
>>WdpPWXMAb8s%2B%2F0Lo%3D&reserved=3D0
>> >> 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, whi= ch should have
>> >> > > ApplicationDataBinding baked in.=C2=A0 That can= be verified in the
>> >> debugger by
>> >> > > checking what is on the strand.
>> >> > >
>> >> > > Bindings are not evaluated at instantiation tim= e so the
>>destination
>> >> > > properties need to handle changing at runtime o= r the entire
>> component
>> >> > > needs to apply all properties at the right time= .
>> >> > >
>> >> > > HTH,
>> >> > > -Alex
>> >> > >
>> >> > > On 3/16/18, 2:35 AM, "Harbs" <harbs.lists@gmail.com> wrote: >> >> > >
>> >> > > >I=E2=80=99m pretty sure that only works if = the view is a separate mxml
>> file.
>> >> > > >
>> >> > > >> On Mar 16, 2018, at 11:28 AM, Piotr Za= rzycki
>> >> > > >><piotrzarzycki21@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 <<= a href=3D"mailto:harbs.lists@gmail.com">harbs.lists@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 us= age 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 he= re: [3]
>> >> > > >>>>
>> >> > > >>>> Thanks,
>> >> > > >>>> Om
>> >> > > >>>>
>> >> > > >>>>
>> >> > > >>>> [1]
>> >> > > >>>>
>> >> > > >>>>htt= ps://na01.safelinks.protection.outlook.com/?url=3D
>> >> > > https%3A%2F%2Fgithub
>> >> > > >>>>.com%2Fapache%2Froyale-asj= s%2Fblob%2Ffeature%2F&data=3D
>> >> > > 02%7C01%7Caharui%4
>> >> > > >>>>0adobe.com%7Cc0b67f1e7b0b44699= adb08d58b21
>> >> > > 4cf5%7Cfa7b1b5a7b34438794aed2c
>> >> > > >>>>178decee1%7C0%7C0%7C636567= 897496708478&sdata=3D
>> >> > > zjAObepBqE9V2O8ktwnjs%2F%2
>> >> > > >>>>Fpl%2F0J%2FIpj%2B1%2FsCTK%= 2B6WA%3D&reserved=3D0
>> >> > > >>> echarts/examples/royale/EChar= ts/src/Main.mxml#L26
>> >> > > >>>> [2]
>> >> > > >>>>
>> >> > > >>>>htt= ps://na01.safelinks.protection.outlook.com/?url=3D
>> >> > > https%3A%2F%2Fgithub
>> >> > > >>>>.com%2Fapache%2Froyale-asj= s%2Fblob%2Ffeature%2F&data=3D
>> >> > > 02%7C01%7Caharui%4
>> >> > > >>>>0adobe.com%7Cc0b67f1e7b0b44699= adb08d58b21
>> >> > > 4cf5%7Cfa7b1b5a7b34438794aed2c
>> >> > > >>>>178decee1%7C0%7C0%7C636567= 897496708478&sdata=3D
>> >> > > zjAObepBqE9V2O8ktwnjs%2F%2
>> >> > > >>>>Fpl%2F0J%2FIpj%2B1%2FsCTK%= 2B6WA%3D&reserved=3D0
>> >> > > >>> echarts/examples/royale/EChar= ts/src/Main.mxml#L31
>> >> > > >>>> [3]
>> >> > > >>>>
>> >> > > >>>>htt= ps://na01.safelinks.protection.outlook.com/?url=3D
>> >> > > https%3A%2F%2Fgithub
>> >> > > >>>>.com%2Fapache%2Froyale-asj= s%2Fblob%2Ffeature%2F&data=3D
>> >> > > 02%7C01%7Caharui%4
>> >> > > >>>>0adobe.com%7Cc0b67f1e7b0b44699= adb08d58b21
>> >> > > 4cf5%7Cfa7b1b5a7b34438794aed2c
>> >> > > >>>>178decee1%7C0%7C0%7C636567= 897496708478&sdata=3D
>> >> > > zjAObepBqE9V2O8ktwnjs%2F%2
>> >> > > >>>>Fpl%2F0J%2FIpj%2B1%2FsCTK%= 2B6WA%3D&reserved=3D0
>> >> > > >>> echarts/examples/royale/EChar= ts
>> >> > > >>>
>> >> > > >>>
>> >> > > >>
>> >> > > >>
>> >> > > >> --
>> >> > > >>
>> >> > > >> Piotr Zarzycki
>> >> > > >>
>> >> > > >> Patreon:
>> >> > > >>*https://na= 01.safelinks.protection.outlook.com/?url=3D
>> >> > > https%3A%2F%2Fwww.pat
>> >> > > >>reon.com%2Fpiotrzarzycki&data=3D02%7= C01%7Caharui%40adobe.com
>> >> > > %7Cc0b67f1e7b0b
>> >> > > >>44699adb08d58b214cf5%7Cfa7b1b5a7b3= 4438794aed2c178de
>> >> > > cee1%7C0%7C0%7C6365678
>> >> > > >>97496708478&sdata=3DB%2FFqHMwr= wAGEnorLx5Z4kia4K73rXy
>> >> > > RtoTn9kE0xDOg%3D&reserv
>> >> > > >>ed=3D0
>> >> > > >>
>> >> > > >><https:/= /na01.safelinks.protection.outlook.com/?url=3D
>> >> > > https%3A%2F%2Fwww.pat
>> >> > > >>reon.com%2Fpiotrzarzycki&data=3D02%7= C01%7Caharui%40adobe.com
>> >> > > %7Cc0b67f1e7b0b
>> >> > > >>44699adb08d58b214cf5%7Cfa7b1b5a7b3= 4438794aed2c178de
>> >> > > cee1%7C0%7C0%7C6365678
>> >> > > >>97496708478&sdata=3DB%2FFqHMwr= wAGEnorLx5Z4kia4K73rXy
>> >> > > RtoTn9kE0xDOg%3D&reserv
>> >> > > >>ed=3D0>*
>> >> > > >
>> >> > >
>> >> > >
>> >> >
>> >>
>> >>
>> >>
>> >> --
>> >>
>> >> Piotr Zarzycki
>> >>
>> >> Patreon:
>>*https= ://na01.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fwww= .pat
>>re= on.com%2Fpiotrzarzycki&data=3D02%7C01%7Caharui%40adobe.com%7= C47043e4531a1
>>48aef4d208d592f0500e%7Cfa7b1b5a7b34438794aed2c178decee1%7= C0%7C0%7C6365764
>>83221343567&sdata=3DbtUXyJZQB%2F9AgUawlpJ29StZvDvCgOwJYeyZ= %2BjJ6YTk%3D&rese
>>rved=3D0
>> >>
>><https://na01= .safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fwww.pat
>>
re= on.com%2Fpiotrzarzycki&data=3D02%7C01%7Caharui%40adobe.com%7= C47043e4531a1
>>48aef4d208d592f0500e%7Cfa7b1b5a7b34438794aed2c178decee1%7= C0%7C0%7C6365764
>>83221343567&sdata=3DbtUXyJZQB%2F9AgUawlpJ29StZvDvCgOwJYeyZ= %2BjJ6YTk%3D&rese
>>rved=3D0>*
>> >>
>> >
>> >
>>
>
>
>
>--
>
>Piotr Zarzycki
>
>Patreon:
>*https://na01.safelin= ks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fwww.patr
>eon.com= %2Fpiotrzarzycki&data=3D02%7C01%7Caharui%40adobe.com%7C47043= e4531a148
>aef4d208d592f0500e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0= %7C6365764832
>21343567&sdata=3DbtUXyJZQB%2F9AgUawlpJ29StZvDvCgOwJYeyZ%2= BjJ6YTk%3D&reserved
>=3D0
><https://na01.safe= links.protection.outlook.com/?url=3Dhttps%3A%2F%2Fwww.patr >eon.com= %2Fpiotrzarzycki&data=3D02%7C01%7Caharui%40adobe.com%7C47043= e4531a148
>aef4d208d592f0500e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0= %7C6365764832
>21343567&sdata=3DbtUXyJZQB%2F9AgUawlpJ29StZvDvCgOwJYeyZ%2= BjJ6YTk%3D&reserved
>=3D0>*


--000000000000c2227b0568610ad7-- --000000000000c2227d0568610ad8--