Chart shapes shifted

Hi! I’ve created chart in excel and put a couple of oval shapes in it. When I render chart using latest version of Aspose cells (21.7), oval shapes are shifted and they are not in the same position in chart like in excel file. I attached images of excel and aspose look together with code example. You can find xlsx example file in .net core project under Examples folder. I have used Debian GNU Linux 10 (buster) 64 bit. Code example is written in .net core version 3.1 and it is dockerized to be similar as possible to environment that I use. Also, I’ve checked how it looks in Windows environment. Same problem occurs but shift is slightly different that in Linux OS.

excel_look.png (26.4 KB)
aspose_output.png (35.5 KB)
AsposeBug.zip (129.7 KB)

@ottap,
We have observed this issue and logged it in our database for further investigation. You will be notified here once any update is ready for sharing.

This issue is logged as:
CELLSNETCORE-139 - Chart shapes are shifted in the converted SVG

1 Like

Hi @ottap
Please use the latest patch version,
Aspose.Cells21.8.5 For .NetStandard20.Zip (5.6 MB)

As the performance offset in Docker is different from that in Windows, we try to optimize the effect to meet the situation of both sides as much as possible.

1 Like

Hi @leoluo,

I’ve tried with the latest patch version 21.8.5. It is slightly better but still it is not as expected. It is better in windows environment than in linux environment (which are we using) but still not well aligned. I attached images to see the difference.
docker container - linux environment.png (61.5 KB)
original look from excel.png (16.7 KB)
windows environment.png (56.0 KB)

@ottap,

Thanks for your feedback with screenshots.

We have logged your concerns against your issue “CELLSNETCORE-139” into our database. We will evaluate your issue further and try to enhance the rendering further.

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

1 Like

HI @ottap
We have further investigated this issue and have some findings to share with you:

Part of the drawing error under Docker is caused by the lack of fonts. In the picture you shared last time, the fonts of Excel Look and Windows are the same, while the fonts of Docker have changed (“Sales”,“90”,“January”,etc.).

So this is probably why Windows generated images look more like Excel.

Here I share 2 files generated by me, all of which are generated in Docker. It can be seen that the deviation of each circle is significantly smaller when the fonts are installed.
example_Unix 5.10.16.3_AddFont.png (9.4 KB)
example_Unix 5.10.16.3_NoFont.png (12.4 KB)

I copied the required font file into the Docker by inserting a command in the Dockerfile:
COPY fonts/* /usr/share/fonts

This is the new Dockerfile that just adds one line to yours.
Dockerfile.zip (688 Bytes)

Please try to install fonts first and tell us your feedback, thank you, and we will continue to optimize this issue in the environment with fonts.
We will let you know as soon as there is a new patch that optimizes this issue.

Hi @leoluo when I add your command I get docker error “/var/lib/docker/tmp/buildkit-mount497674320/fonts: no such file or directory”. But I’ve checked /usr/share/fonts directory and without that additional copy command fonts are already in place there.

@ottap,

Thanks for your feedback.

We have logged your error and we will look into the details. We will get back to you soon.

HI @ottap
My Directory Structure Looks like this:
…\CELLSNETCORE141\AsposeBug\AsposeBug\AsposeBug.csproj
…\CELLSNETCORE141\AsposeBug\AsposeBug\Dockerfile
…\CELLSNETCORE141\AsposeBug\AsposeBug.sln
…\CELLSNETCORE141\AsposeBug\fonts
…\CELLSNETCORE141\AsposeBug\fonts\arial.ttf

The “font” directory, which I created myself, then copied fonts from “C:\Windows\Fonts” to this font directory during testing, and then copied to Docker by dockerfile command.
Put the font file you need into the Font Directory, I put more than 400 in the test.

COPY fonts/* /usr/share/fonts
The format of this command is:
COPY [local font files] [docker font folder]

Please make sure the local directory exists and let me know your feedback. Thank you.

Hi @ottap
We did further investigation, one of the issue’s reasons is the margins of charts, which don’t have a fixed standard.
Please use Aspose.Cells 21.9.3, we optimized the margins of the chart to be better and to accommodate more situations.

Aspose.Cells21.9.3 For .NetStandard20.zip (5.5 MB)

Hi @leoluo,

It is looking better now but still there are situations where it is not fully aligned with excel look. Thank you for the update!

@ottap,

Thanks for your feedback.

We have noted your concerns. Also, as the issue is not resolved fully (the status of the issue/ticket is “In Progress”), so we will be continuously looking into it to improve it further.

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

Hi Amjad_Sahi,
can I ask you about the progress of this bug (ID CELLSNETCORE-139 ).
Were there any improvements in this direction after Aspose.Cells 21.11 and can we expect even more after Aspose.Cells 22.3 and further?

Thanks for reply.

Best Regards
Pavel OTTA

@ottap,

We are sorry but the issue is not resolved fully considering all the complexity involved. We did optimize as much as we could. We stopped working on the issue for the time being. Once we start working over it or have some other updates, we will let you know.