Pricing Blog

Difference between two array outputs?

  • lululucaschae-1228412676669964459

    lululucaschae

    1 year ago

    I'm building a chart.js package, and got it to work perfectly in "test app" view.
    However, I noticed that none of the charts show up when I launch it in a new tab.

    After a few experiments, the only way to get it to show up was by manually creating a constant array within the node editor, and passing that to the data attribute of the chart component. (as opposed to using dynamic data)

    I hope these screenshots and annotations give you a good idea of what I've tried and what's not working.

    I've made a minimum reproducible example you can check out below.
    https://editor.nordcraft.com/projects/chartjs/branches/main
    1228412677106303127-image.png
    1228412677466886164-image.png
    1
  • lululucaschae-1228413890845737000

    lululucaschae

    1 year ago

    The component only has three attributes for this specific example
    1228413890656866435-image.png
  • lucasg-1228425995728457819

    Lucas G

    1 year ago

    It seems that the formula 'generateData' isn't being loaded on the frontpage
  • lululucaschae-1228530701926666310

    lululucaschae

    1 year ago

    Yeah, I tried using action and event/listeners it worked, but it stopped working in the process of changing the attribute variables. I'll retrace my steps today and fix it. Thank you!
  • lululucaschae-1228533890264596490

    lululucaschae

    1 year ago

    This solution seems to work!
    1. On page load, call an action that assigns data to the variable
    2. Then call an action to render chart and pass the variable set in setp1 as attributes
    1228533890008875048-image.png
  • Tod-1228533892483518496

    Tod

    1 year ago

    Great energy @lululucaschae! Your continuous contribution to the toddle Community just made you advance to Community Level 4!