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

Free Support Forum - aspose.com

Its an excel with 3D chart which does not show Legends correctly and 3D Represnetation is off

We have issue in converting excel to tiff
It’s an excel with 3D chart which does not show Legends correctly and 3D Representation is off.
67826.zip (11.8 KB)

We are using below code.
Aspose.Cells.Workbook book = new Aspose.Cells.Workbook(fileDetail.FileInfo.FullName);
Aspose.Cells.Rendering.ImageOrPrintOptions imgOptions = new Aspose.Cells.Rendering.ImageOrPrintOptions();
imgOptions.OnePagePerSheet = true;
imgOptions.HorizontalResolution = 300;
imgOptions.VerticalResolution = 300;
imgOptions.TiffCompression = Aspose.Cells.Rendering.TiffCompression.CompressionLZW;
imgOptions.TiffColorDepth = Aspose.Cells.Rendering.ColorDepth.Format4bpp;
imgOptions.ImageType = Aspose.Cells.Drawing.ImageType.Tiff;
Aspose.Cells.Rendering.WorkbookRender wr = new Aspose.Cells.Rendering.WorkbookRender(book, imgOptions);

Excel is attached in zip folder. Please let us know the solution asap.


Please notice, I am able to reproduce the issue as you mentioned by using your template file. I found 3D chart is not rendered correctly in the TIFF format. I have logged a ticket with an id “CELLSNET-49637” for your issue. We will look into it soon.

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

Hi @atyagi39
We have investigated this issue and have the following findings to share and communicate with you:

1, First problem, we noticed the unusual white circle in the center of the chart, which we traced back to the setting of ColorDepth.Format8bpp, please see the images we have generated, which are generated in Format4bpp, Format8bpp, Format24bpp.

You can see that the image generated under Format24bpp has a white highlight effect in the center area, which is a 3D highlight effect that also exists in excel chart and can not be displayed properly under Format8bpp due to the limit of color depth.

So for this image, we recommend that you set ColorDepth.Format24bpp or ColorDepth.Default, because of the white highlight in the middle.
CELLSNET49637_pic.zip (451.4 KB)

2, About the 3D Representation effect, As you can see from “CELLSNET49637_24.tiff”, we actually tried to generate 3D effect, but the depth of Chart is too small and the effect of 3D is not obvious. Legend Names did not get enough space to be drawn, again due to the small depth of the chart.

In fact, we currently don’t support real 3D engine effects, all of the 3D effects are drawn on 2D images with simulation effect, X, Y rotation angle and other 3d parameters are fixed(For example, can not rotate by angle), so in some cases the effect of 3D is not obvious.

Although we won’t be able to support real 3D effects in a short time, we’ll try to optimize this issue, increase the depth of the chart under the necessary cases, and allow the Legend names to be drawn. It will take some time.

Yes We saw that as well and it was not coming with 24 color depth. But our requirement is we cant look into a each file as we have to convert millions of file and due to legislation we have to create it with 8bpp and LZW compression. We are ok with 2D conversion from 3D but it should show what is in file.
It should not loose the values in conversions.

How could color depth impact the height or width? As i understand it can only impact color depth.
BTW for us its difficult to check each and every file and to decide color depth. We are bound to use fixed configuration.

Hi @atyagi39
It is not ColorDepth that affects the depth of the chart. In this case, the depth of the chart is small, probably because there are only two Legends, and their type is line. We’ll try to optimize that, Making the chart look more consistent without losing its Legend name. (This is the first issue)

I mean, color depth only affects the white circle in the center of the image, not the chart drawing logic. (this is the second issue)
So your requirement is that all the images will be set to color depth.FORMAT4BPP?

Should not be more than 8BPP.

Hi @atyagi39
We will prioritize the missing elements in the chart.

Thanks a lot.

We optimized the problem, and the next release takes effect, about 1-2 days release.
We will remind you here when it is released.

Hi @atyagi39
Please use Aspose.Cells 21.11, We have optimized this chart so you can download it directly from nuget.
The optimized result is shown in figure:
1109.Png (20.9 KB)

Thanks I will do this and let you know.

This is working now. Will look forward for a fix on the second issue with circle in the image.


Good to know that it works for your needs a bit. For your second issue, we will continue to look into it.


The chart area fill is a circle path gradient brush, the color changed linearly from circle center to outside. When you converting a 32 or 24 bits image to a 4 bits(ColorDepth.Format4bpp) image, color is lost. This cause some colors in circle path gradient brush filled area to a color in 4 bits and the other colors to another color in 4 bits. So a circle appears in 4 bits image. I don’ think there is a good way to handle this case. Currently we use C# Encoder.ColorDepth to change different color depth in tiff image.