https://discord.gg/botpress logo
Chart display wont load at first
# 🤝help
b
Hello, I was trying to use the Chart integration, but I have a problem because it is not displayed on the image card at first time. That is, it is displayed, and I am sure that the image URL has been generated, but it is not visible on the image card. I also tried using a text card, but first I used an execute card to create dynamic text with certain content plus the image added in markdown. I also made sure that the image URL already existed, but just like the first time, it doesn't show up, although the rest does. The same thing happens with the image card. It turns out that if I scroll (removing that part of the conversation that is displayed, going further back with the scroll and then returning), for example, or jump to the editor, or refresh there, the image loads. What could it be? I thought it might be some asynchronous problem with the image generation, but the URL already exists at the moment it is supposed to be displayed.
l
Hey @billowy-morning-42410 can you please drop some screenshots of your workflow / relevant card? It would help finding a solution much faster
b
here trying a PIE Chart, then assigning the result to a variable. Using it in the execute card to concatenate it in a markdown that I have to generate (Note that I already tried with an Image Card directly and the same thing happens; here I did it to verify that I already have the URL for that; I have an if statement that helps me debug). If you look at the photo where I show the variables, the URL already exists (bottom left third photo). However, it is not visible in the emulator; it appears as broken. But if I switch from the conversation to the inspector and go back there, it loads (fourth photo). The same thing happens in production, except that I have to refresh and then it appears, but the first time it appears broken until I refresh. Remember that I already tried the simplest way, which is the Image card, and the same thing happens. https://cdn.discordapp.com/attachments/1436048192394494105/1436069030321717308/image.png?ex=690e4301&is=690cf181&hm=d81011829ddef6cf59c851c0b90f4ab7ee57c11ea1745e642b8ce9abacea8211& https://cdn.discordapp.com/attachments/1436048192394494105/1436069030766317630/image.png?ex=690e4301&is=690cf181&hm=0b38b8ca4911efc21d9f99fbe6136be33a5daa5a58bdd02c0df44280e71cfee4& https://cdn.discordapp.com/attachments/1436048192394494105/1436069031252594718/image.png?ex=690e4301&is=690cf181&hm=b7441c9d5b7680d07823d91353d0be661dd7df9545946f88d9514c9a78924396& https://cdn.discordapp.com/attachments/1436048192394494105/1436069031705837678/image.png?ex=690e4302&is=690cf182&hm=81d4d75730662ae79b644dbfd426e6a9645be5b127d5e4760c074dbb501a33da&
l
Just to clarify the image does not load right away > *In studio * - You need to click inspector and then back in emulator for the pie chart to appear > In prod / webchat - You need to refresh the page for the chart to appear Am I understanding this correctly?
@billowy-morning-42410
Can you also provide your workspace ID
b
Yes, exactly, it seems like there should be some kind of “refresh.” workspace id 3c23bd3d-7ce3-4d9e-a4c5-06b3f27836be
l
Im going to add myself to the workspace and take a look myself. Is that okay? @billowy-morning-42410
b
yes of course Ross
l
It might kick you off do not be shocked
b
By the way, I was a dedicated Botpress ambassador a couple of years ago. Thank you for your quick reply.
l
which bot?
b
Mila
l
Oh cool!! Thats why your name looked so familiar!
Will need a little help to replicate it because of the spanish @billowy-morning-42410 can you guide me on wha to input in the emulator to get to the pie chart?
b
This bot will then have to be completely dynamic with HTTP requests to endpoints, but for now I am using static values just to see these new features and if I can customize it as we want.
l
or if you can show me a previous conversation you had and i'll replicate the steps
b
ok, pick first option ResolucionInversa del DNS
then Organizacion 1
l
ill ✅ when I do thes tep
b
then first option again
b
sorry, Organizacion 1 then Estados rDNS in the select
l
where is organizacion 1?
i'll restart
b
ok yes, four option now
estado de rdns
ok
b
first option, Prefijo IPv4 (/22)....
l
okay great thanks!
I'll get back when I have some insight
b
🙌🏻
I am a full stack developer and I work a lot with chart.js. I wanted to create my own endpoint to generate the graph (for further configuration), but in this case I have my doubts that the problem lies in the card itself being created before the graph is generated. As I mentioned earlier, the URL is already created, so I used execute card just to see if the URL was already available at that point, and it appears that it is, so the Chart integration seems to be fine. In other words, if I go directly to the generated URL, the graph is already there.
but text cards with embedded images using markdown or image cards do not display the chart at first.
l
Hey @billowy-morning-42410 So this is definitely a bug! As a temporary work around you can add an input card before the pie chart generation and then the image should display right away!
I added one for now so you can test it out on your end its just a basic raw input card!
I've also noted the bug to the team!
b
Thanks Ross, excellent.
l
Tested and it works on emulator and in prod 🙂 big shoutout to our dev team for helping me!