This is a migrated thread and some comments may be shown as answers.

Multiple windows with charts on one page

8 Answers 661 Views
Window
This is a migrated thread and some comments may be shown as answers.
jonas
Top achievements
Rank 1
jonas asked on 06 Feb 2012, 10:41 PM
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

8 Answers, 1 is accepted

Sort by
0
Alexander Valchev
Telerik team
answered on 07 Feb 2012, 04:27 PM
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!
0
jonas
Top achievements
Rank 1
answered on 07 Feb 2012, 06:13 PM
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
0
Alexander Valchev
Telerik team
answered on 08 Feb 2012, 01:37 PM
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!
0
jonas
Top achievements
Rank 1
answered on 09 Feb 2012, 11:08 AM
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
0
Alexander Valchev
Telerik team
answered on 09 Feb 2012, 03:11 PM
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!
0
leo
Top achievements
Rank 1
answered on 19 Jan 2015, 10:37 AM
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. :)
0
leo
Top achievements
Rank 1
answered on 19 Jan 2015, 10:37 AM
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. :)
0
Alexander Valchev
Telerik team
answered on 22 Jan 2015, 08:38 AM
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!
 
Tags
Window
Asked by
jonas
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
jonas
Top achievements
Rank 1
leo
Top achievements
Rank 1
Share this question
or