We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Map chart is replaced with bar chart when converting as image

When using the ToImage function to convert a map chart to an image, the image chart resulted is not a map chart, but a bar chart.

    Tuple<string, string> input = Tuple.Create("Chart 1", "\\Chart 1.png");

    var imageOrPrintOptions = new ImageOrPrintOptions
    {
        Quality = 100,
        VerticalResolution = 200,
        HorizontalResolution = 200,
        PrintingPage = PrintingPageType.IgnoreBlank,
        ChartImageType = ImageFormat.Png,
        OnePagePerSheet = true,
        OnlyArea = true
    };

    using (FileStream fs = File.OpenRead(Server.MapPath("/File") + "\\Input.xlsx"))
    {
        var workbook = new Workbook(fs);
        var chart = workbook.Worksheets["Sheet1"].Charts[input.Item1];
        var image = chart.ToImage(imageOrPrintOptions);
        image.Save(Server.MapPath("/File") + input.Item2, ImageFormat.Png);
    };

I have also attached the Web App reproducing this issue
WebAppAspose.zip (696.4 KB)

@edis.omer,

Map chart is not supported for rendering to image/PDF at the moment. We have logged a ticket with an id “CELLSNET-50543” for your issue. We will look into it soon.

Once we have an update on it, we will let you know.