How to place graphs and modify options in rasa webchat

can you check this video url by replacing it https://security.dimabusiness.com/img/icon/Dima_video.mp4


it works

@KhalidBentaleb Its not working for me I don’t know why?

Can you show me any screenshot?

@KhalidBentaleb, you’re welcome, glad to help :blush::+1:

videoscreenchat

utter_dns_work:
    - text: "Here is the video:"
      attachment: { "type":"video", "payload":{ "src": "https://security.dimabusiness.com/img/icon/Dima_video.mp4" } }

It works for me, which version rasa are you using ?

rasa 1.9.3 rasa x 0.27.2

Check your script.js if it contains this

Ok I will check it now.

I don’t have that if block for video in my script.js file only image,buttons and custom messages only.

So you have to use this Github Repo @JiteshGaikwad :

2 Likes

Yes, now its working fine. Thank you

@skjainmiah you are welcome :slight_smile:

1 Like

hi, i have a question…

how do I dynamically insert data for the chart? … I would like the data to be read for example in slots (ticket and tclosed). I tried to write like that but it doesn’t work. where am i wrong?

utter_xxxx:

  • text: “Here a chart”

    custom:

    payload: chart

    data:

     title: esempio
    
     labels:
    
     - x1
    
     - x2
    
     backgroundColor:
    
     - "#36a2eb"
    
     - "#ffcd56"
    
     chartsData:
    
     - slot{'ticket': 10}
    
     - slot{'tclosed': 10}
    
     chartType: pie
    
     displayLegend: 'true'

@JiteshGaikwad hi bro i’ve used your collapsible widget exactly the same it’s not working can you please help me out!!

if (val[i].hasOwnProperty(“custom”)){

                //check if the custom payload type is "cardsCarousel"
                if (val[i].custom.payload == "cardsCarousel") {
                    restaurantsData = (val[i].custom.data)
                    showCardsCarousel(restaurantsData);
                    return;
                }

			   //check of the custom payload type is "collapsible"
			       if (val[i].custom.payload == "collapsible") {
					    data = (val[i].custom.data);
					    //pass the data variable to createCollapsible function
					    createCollapsible(data);
			       }
             function createCollapsible(data) {
//sample data format:
//var data=[{"title":"abc","description":"xyz"},{"title":"pqr","description":"jkl"}]
list = "";
for (i = 0; i < data.length; i++) {
    item = '<li>' +
        '<div class="collapsible-header">' + data[i].title + '</div>' +
        '<div class="collapsible-body"><span>' + data[i].description + '</span></div>' +
        '</li>'
    list += item;
}
var contents = '<ul class="collapsible">' + list + '</uL>';
$(contents).appendTo(".chats");

// initialize the collapsible
$('.collapsible').collapsible();
scrollToBottomOfResults();

}Capture

@ahhirsha, can you show me the browser console logs?

hi @JiteshGaikwad

@ahhirsha can you please post the browser console logs, I mean the Chatbot widget’s html page browser logs.

@JiteshGaikwad please have a look and let me know if i’m wrong somewhere or missed something.

thanks in advance