mardi 4 août 2015

Dotnet.Highcharts error in export image

I am using ASP.NET MVC website using Highcharts for graph, when i use export image as PNG,JPEG,... export looks like this enter image description here

With this labels cut in image, when should looks like is showing in website enter image description here

I've tryed to set .SetExporting with different properties, but no success This is my code

var chart = new Highcharts("chart")
            .InitChart(new Chart { PlotShadow = false })
            .SetTitle(new Title { Text = String.Empty })
            .SetCredits(new Credits { Enabled = false })
            .SetTooltip(new Tooltip { Formatter = "function() { return '<b>'+ this.point.name +'</b>: '+ this.y; }" })
            //.SetExporting(new Exporting() { Width = 2000, Enabled = true, Filename = "Teste" })
            .SetPlotOptions(new PlotOptions
            {
                Pie = new PlotOptionsPie
                {
                    AllowPointSelect = true,
                    Cursor = Cursors.Pointer,
                    DataLabels = new PlotOptionsPieDataLabels
                    {
                        Color = ColorTranslator.FromHtml("#000000"),
                        ConnectorColor = ColorTranslator.FromHtml("#000000"),
                        Formatter = "function() { return '<b>'+ this.point.name +'</b>: '+ this.percentage.toFixed(2) +' %'; }"
                    }
                }
            })
            .SetSeries(new Series
            {
                Type = ChartTypes.Pie,
                Name = String.Empty,
                Data = new Data((from o in data
                                 select new DotNet.Highcharts.Options.Point
                                 {
                                     Name = o.Key.Name,
                                     Y = o.count
                                 }).ToArray())
            });



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire