It is currently Sun Aug 31, 2014 10:20 am Advanced search

[BUG] Pie chart and SVG

Technical support, bug reports and more.

[BUG] Pie chart and SVG

Postby Crhys » Thu Feb 23, 2012 3:37 pm

Hi everybody,

I'm using highcharts for a webpage, and that's really great!

I have a script which export all my page in PDF with the charts!

There is no problem in many cases, but when i have a pie chart on my web page, i can't generate my pdf...

I don't know why...Maybe a problem with the SVG or with my Firefox release which is 3.6.23...(i can't change my firefox release, it's forbidden on my firm..).

Do you know how can i do that?

Thank you :)
Crhys
 
Posts: 16
Joined: Mon Oct 03, 2011 11:40 am

Re: [BUG] Pie chart and SVG

Postby Fusher » Fri Feb 24, 2012 5:21 pm

So, all other charts are generated, but only this one pie doesn't ? Do you using callback ?
Paweł Fus
Highcharts support team
Fusher
 
Posts: 6928
Joined: Mon Jan 30, 2012 12:16 pm

Re: [BUG] Pie chart and SVG

Postby Crhys » Mon Feb 27, 2012 10:17 am

Hi,

On my web site, i can see the pie chart, but when i want to generate this chart on my PDF, it doesn't work...
With all the others charts on my page (which are basics column charts) it works.

I'm not using callback ... :cry:
Crhys
 
Posts: 16
Joined: Mon Oct 03, 2011 11:40 am

Re: [BUG] Pie chart and SVG

Postby Fusher » Mon Feb 27, 2012 12:11 pm

Which version are you using?
Look at this example: http://jsfiddle.net/highcharts/aJjKG/ it works.
Paweł Fus
Highcharts support team
Fusher
 
Posts: 6928
Joined: Mon Jan 30, 2012 12:16 pm

Re: [BUG] Pie chart and SVG

Postby Crhys » Mon Feb 27, 2012 12:25 pm

I'm using the v2.1.5 version.

Yeah, it works .... But maybe it's not the same version :?
Crhys
 
Posts: 16
Joined: Mon Oct 03, 2011 11:40 am

Re: [BUG] Pie chart and SVG

Postby Fusher » Mon Feb 27, 2012 1:37 pm

Latest version is 2.2.0 - try with this version.
Paweł Fus
Highcharts support team
Fusher
 
Posts: 6928
Joined: Mon Jan 30, 2012 12:16 pm

Re: [BUG] Pie chart and SVG

Postby Crhys » Mon Feb 27, 2012 3:05 pm

Ok, same pb with the new version....
I don't understand because with Chrome or a recent firefox, there is no pb....

I don't have any idea....
Crhys
 
Posts: 16
Joined: Mon Oct 03, 2011 11:40 am

Re: [BUG] Pie chart and SVG

Postby Fusher » Mon Feb 27, 2012 3:34 pm

Could you show example of your pie chart?
For example paste your js code here and save it : http://highcharts.com/jsbin/okivik/edit
Paweł Fus
Highcharts support team
Fusher
 
Posts: 6928
Joined: Mon Jan 30, 2012 12:16 pm

Re: [BUG] Pie chart and SVG

Postby Crhys » Mon Feb 27, 2012 5:22 pm

This is my code for the pie chart :roll:

Code: Select all
var chart = new Highcharts.Chart({
                            chart: {
                                    renderTo: 'container',
                                    defaultSeriesType: 'column',
                zoomType: 'xy'
                            },
                            title: {
                                    text: 'Etat des FT'
                            },
                            credits :{
                                    enabled: false
                            },
                            legend: {
                                margin : 5,
                                y : 10,
                                layout : 'vertical',
                                verticalAlign : 'middle',
                                align : 'right'
                            },
                            tooltip: {
                                    formatter: function() {
                                            return this.point.name +': '+ this.y;
                                    }
                            },
                            plotOptions: {
                                    column: {
                                        stacking : 'normal',
                                        groupPadding: 0.05,
                                        pointPadding: 0.05
                                    },
                                    pie: {
                                            allowPointSelect: true,
                                            cursor: 'pointer',
                                            dataLabels: {
                                               enabled: true,
                                               distance : 15,
                                               formatter: function() {
                                                    return '<b>'+ this.point.name +'</b>: '+ this.percentage.toFixed(1) +' %';
                                               }           
                                            },
                                            showInLegend: true
                                     }
                            },
                        series: [{
                                    type: 'pie',
                                    name: 'Repartition Etat',
                                    data: [
                                        {
                                            name : 'Ouverts',
                                            color : 'rgb(253,9,9)',
                                            y : 20
                                           
                                        },
                                        {
                                            name : 'Clos',
                                             color : 'rgb(2,251,9)',
                                            y : 60
                                        }
                                    ]
                                 }
                            ]
                    });
Crhys
 
Posts: 16
Joined: Mon Oct 03, 2011 11:40 am

Re: [BUG] Pie chart and SVG

Postby Crhys » Mon Feb 27, 2012 5:23 pm

But maybe my problem is due to my script which generate the PDF....
But if it works with a basic column chart, I don't understand why it doesn't work with this pie chart :roll:
Crhys
 
Posts: 16
Joined: Mon Oct 03, 2011 11:40 am

Re: [BUG] Pie chart and SVG

Postby Fusher » Mon Feb 27, 2012 5:32 pm

What do you use to export this chart?
Paweł Fus
Highcharts support team
Fusher
 
Posts: 6928
Joined: Mon Jan 30, 2012 12:16 pm

Re: [BUG] Pie chart and SVG

Postby Crhys » Mon Feb 27, 2012 6:00 pm

First, i generate the chart on my div.

Then, when the user click on my "export PDF" button i use a HTML canvas to save the SVG of the chart thanks to the API canvg. After that i recover the content of the canvas and i generate a png of the SVG.
And finally, i send this png on the server side thanks to a hidden form and with a php script i save the png on the server...

If you have an other solution....tell me that :D

But it works like that with basic column charts.... :?
Crhys
 
Posts: 16
Joined: Mon Oct 03, 2011 11:40 am

Re: [BUG] Pie chart and SVG

Postby Fusher » Mon Feb 27, 2012 6:08 pm

Can't you use highcharts exporting module ? :)
Look at this example: http://jsfiddle.net/fXHB5/20/
And documentation: http://www.highcharts.com/ref/#exporting
Paweł Fus
Highcharts support team
Fusher
 
Posts: 6928
Joined: Mon Jan 30, 2012 12:16 pm

Re: [BUG] Pie chart and SVG

Postby Crhys » Mon Feb 27, 2012 7:33 pm

I already tried that but i want to generate a PDF with all the content of my web page...

With the export module there's a notification...And i don't know how to hide it...

If you have a solution to print all my page without any notification, i'm interested in! :P

Of course, if it's posible to do that....It could be the best solution i guess... :D
Crhys
 
Posts: 16
Joined: Mon Oct 03, 2011 11:40 am

Re: [BUG] Pie chart and SVG

Postby hfrntt » Tue Feb 28, 2012 6:51 pm

Have you seen this topic: viewtopic.php?f=10&t=9239?
Slawek Kolodziej
Highcharts support team
hfrntt
 
Posts: 6394
Joined: Mon Aug 30, 2010 10:41 am

Next

Return to Highcharts Usage

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 3 guests