Chart export to image not working?

UI Components for JSF
Post Reply
User avatar
bjorntj
Posts: 277
Joined: 30 Jul 2010, 10:46

24 Jun 2016, 21:52

I am following the showcase example on how to export a chart to an image but I keep getting the following error in my browser (and I get the same problem in all the browsers I have tried):

Code: Select all

A script on this page may be busy, or it may have stopped responding. You can stop the script now, open the script in the debugger, or let the script continue.
I am using the following code in my xthml page:

Code: Select all

                             <p:dialog widgetVar="dlg" showEffect="fade" modal="true" header="#{msgs.graph}" resizable="true">
                                <p:outputPanel id="output" layout="block" style="width:1000px;height:500px"/>
                            </p:dialog>

                            <script type="text/javascript">
                                function exportChart() {
                                    //export image
                                    $('#output').empty().append(PF('chart').exportAsImage());

                                    //show the dialog
                                    PF('dlg').show();
                                }
                            </script>
I also have a different older project I have used the same code which works as it should (thoug with an older version of PF...)

What am I missing?


Regards,

BTJ
PrimeFaces 11.x | PrimeVue 3.x | Spring Boot 2.7.x | Undertow | Mojarra 2.3.x
Mac OS, Firefox and Chromium

User avatar
sudheer
PrimeFaces Core Developer
Posts: 4345
Joined: 16 Oct 2011, 19:19
Location: Singapore

25 Jun 2016, 16:14

What is the browser name and version? Is it same with all browsers? Did you find the issue on PF 6.0 showcase??
Author,Speaker
https://twitter.com/sudheerjonna
Github: https://github.com/sudheerj
Website http://sudheerjonna.com/

___________________
Sudheer Jonna

User avatar
bjorntj
Posts: 277
Joined: 30 Jul 2010, 10:46

25 Jun 2016, 16:19

I have tried using the latest Firefox, latest Google Chrome and latest Chromium... No problem using the PF showcase...
I am using Spring Boot but don't think that should make any difference...
PrimeFaces 11.x | PrimeVue 3.x | Spring Boot 2.7.x | Undertow | Mojarra 2.3.x
Mac OS, Firefox and Chromium

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 40 guests