Multiple windows with charts on one page

9 posts, 0 answers
  1. jonas
    jonas avatar
    3 posts
    Member since:
    Feb 2012

    Posted 06 Feb 2012 Link to this post

    Hi KendoUI Team

    I really do love the KendoUI framework but I have some problems with it. Why isn't it possible to load 2 different windows with 2 different charts? If I generate a second window and put my KendoUI chart in it'll just load one of the tow charts so I have to click on the refresh button at the top of the window to make it work and display both charts.

    Any help?

    Thanks,

    Jonas
  2. Alexander Valchev
    Admin
    Alexander Valchev avatar
    2875 posts

    Posted 07 Feb 2012 Link to this post

    Hello Jonas,

    I am not sure if I understood your case correctly. I made a demo that loads two different windows with two different charts. Please check the attachment and let me know if I missed something.

    Kind regards,
    Alexander Valchev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Kendo UI is VS 2017 Ready
  4. jonas
    jonas avatar
    3 posts
    Member since:
    Feb 2012

    Posted 07 Feb 2012 Link to this post

    Hi Alexander,

    Yes you understood me right but this has not solved my problem. Your example works just fine but mine not. 

    I load my charts with ajax so that my be causing the problem. What do you think?

    Thanks,

    Jonas
  5. Alexander Valchev
    Admin
    Alexander Valchev avatar
    2875 posts

    Posted 08 Feb 2012 Link to this post

    Hello Jonas,

    I created a new sample that loads the data with Ajax. The demo could be found here - it uses echo service (jsfiddle) to simulate binding to remote JSON data.
    Please check it and if you still experience problems, it would be best to send a sample project so I can investigate further.


    Greetings,
    Alexander Valchev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  6. jonas
    jonas avatar
    3 posts
    Member since:
    Feb 2012

    Posted 09 Feb 2012 Link to this post

    Hi Alexander

    I've looked at it with an internal developer and we haven't solved the problem. We think that one lode procedure just interupt the other. Here is my code that loads the window:

    function createWindows() {
        var window1 = $("#window1").kendoWindow({
                    content: ./src/charts/pie.php,
                    width: "300px",
                    actions: ["Refresh","Close"],
                    title: "Pie Chart"
                    
        });
                    
        $("#window2").kendoWindow({
                    content: ./src/charts/bar.php,
                    width: "500px",
                    height: "400px",
                    actions: ["Refresh","Close"],
                    title: "Bar Chart"
                     
        });
         
    }

    <script>
    $(document).ready(function(){
         
            var window = $('#window1').data('kendoWindow');
            window.open();
             
            var window = $('#window2').data('kendoWindow');
            window.center();
            window.open();
             
             
     });
    </script>

    We tried all different things but none of them works. 

    The strange thing is: You can not really say why one chart is not loaded cause sometimes window1 is loaded and sometimes window2 but never both at the same time. If you press the reload button the charts shows up just perfect. But i'd like it onload and not by pressing a button.

    Thanks,
    Jonas
  7. Alexander Valchev
    Admin
    Alexander Valchev avatar
    2875 posts

    Posted 09 Feb 2012 Link to this post

    Hello Jonas,

    The code snippets that you posted look OK and I am afraid that without a runnable project that could be examined in closer details, we cannot be of much help. Please provide such project and we will check it right away.

    Kind regards,
    Alexander Valchev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  8. leo
    leo avatar
    6 posts
    Member since:
    Jan 2015

    Posted 19 Jan 2015 Link to this post

    Hi,

    I also need to create something like this, but is it possible for a page to have 2 line charts? I am using JSP and I am iterating the json. Do you think it is possible? Some post on the internet said that it is not supported.


    Thanks. :)
  9. leo
    leo avatar
    6 posts
    Member since:
    Jan 2015

    Posted 19 Jan 2015 in reply to Alexander Valchev Link to this post

    Hi,



    I also need to create something like this, but is it possible for a page
    to have 2 line charts? I am using JSP and I am iterating the json. Do
    you think it is possible? Some post on the internet said that it is not
    supported.





    Thanks. :)
  10. Alexander Valchev
    Admin
    Alexander Valchev avatar
    2875 posts

    Posted 22 Jan 2015 Link to this post

    Hi Leo,

    Generally speaking it is possible to create two separate line charts in one page.

    Please note that this forum thread is about 3 years old and the information inside it may be outdated. If you need further assistance post your question in UI for JSP forum section.
    We will appreciate if you provide the needed information (code snippets/example/screenshot) so we understand the issue and help you resolve it.

    Regards,
    Alexander Valchev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
Back to Top
Kendo UI is VS 2017 Ready