dphoeck@gmail.com
Posts: 11
Joined: Sun Mar 21, 2021 11:21 pm
Contact: Send private message

Re: chart - updating data with an array issue

Hi Serhii,

I tried every way to make this work, but it didn't work with that TS code.

I tried adding the TS code here (in the success mapping), but that didn't work:

mapping with JSON.PNG

Then I tried mapping the API response key value directly to the "data" variable, but that didn't work either:

chart data from data variable.PNG
mapping to data variable.PNG

I tried mapping to the "data" variable with and without the TS code, but neither worked.

What am I doing wrong?

You do not have the required permissions to view the files attached to this post.
Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm
Contact: Send private message

Re: chart - updating data with an array issue

Hello,

Please add the alert on that mapping. Do you see the value from that mapping there?

I suggest you use a plain TS code to get this value, not a mapping.

  1. Just read the full response and print it to the label/alert.
  2. If you see it there - add the child property to the label/alert to read only that child property
  3. Repeat #2 while you don't get the exact value
dphoeck@gmail.com
Posts: 11
Joined: Sun Mar 21, 2021 11:21 pm
Contact: Send private message

Re: chart - updating data with an array issue

Hi,

When I map the child property directly to the text label it works fine. This is what happens when I invoke the service on the button click and map the response's child property to the text label:

child to label.PNG

It looks like the response is fine, the problem is, when I apply this same mapping directly to the chart, it doesn't work.

I'm not sure how map this to the label with TS, much less how to directly do this to set the data variable, so I will need to figure that out. I tried doing a success event after invoking the service of TS of "this.data = JSON.parse(res.feed.entry[0].content.$t);" but that didn't work.

You do not have the required permissions to view the files attached to this post.

Return to “Issues”

Who is online

Users browsing this forum: aantsypau, Alexia, Majestic-12 [Bot] and 1 guest