1 Reply Latest reply on Dec 27, 2017 10:05 AM by patrick.byrne.0

    How to embed 4 sheets on one html page using Javascript API ?

    Krunal Patel

      I am new to Javascript API, I would like to embed 4 different sheets of one dashboard on HTML page using javascript API.  I know I can create one dashboard and put all sheets in it but based on requirement I have to add them to different places and use year filter to filter all 4 sheets on the page. If someone has done it or has any idea how to do it can you please help? Russell Christopher Robert Rouse

        • 1. Re: How to embed 4 sheets on one html page using Javascript API ?
          patrick.byrne.0

          Hello Krunal,

           

          I believe that you could in theory you can set the filter that is used on the page as in this example(Filter) to filter all 4 of the Vizzes at once. Given they all have a value in common between them to filter on.

           

          Below is the code for the stand alone filter per the link above:

           

          <body onload="initViz();"> <div id="vizContainer" style="width:800px; height:700px;"></div> <div id="controls" style="padding:20px;"> Year: <select id="changeYear" onchange="yearFilter(value);"> <option value="">All</option> <option value="2013">2013</option> <option value="2014">2014</option> </select> </div> </body>

           

          Reusing the "yearFilter" function in each of the embed codes I believe will allow them all to be refreshed by the single filter change.

           

          I am not JavaScript expert and I am not a developer. This is how I think it can be approached.

           

          Hope this helps!

           

          Cheers,

          Byrne, Patrick