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

Free Support Forum - aspose.com

Chart not look fine

HtmlSaveOptions o = new HtmlSaveOptions();
o.getImageOptions().setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
Workbook wb = new Workbook("C:/圆环图.xlsx");
wb.save("C:/圆环图2.html", o);



But the chart is not look very fine. It's anti-aliasing is not effect, and without shadow

But MS Excel save HTML is much better.

Hi,


Thanks for the template file and sample code.

After an initial test, I observed the issue as you mentioned. I found the issue regarding Chart’s quality - i.e., Anti-aliasing is not taken effect without shadow. I used the following sample code with your template file:
e.g
Sample code:

HtmlSaveOptions o = new HtmlSaveOptions();
o.getImageOptions().setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
Workbook wb = new Workbook(“C:/圆环图.xlsx”);
wb.save(“C:/圆环图2.html”, o);

I have logged a ticket with an id “CELLSJAVA-41468” for your issue. We will look into it to figure it out soon.

Thank you.

Hi,


We have evaluated your issue further.

Well, as the
doughnut chart is gradient filled, but we have to use java API Graphics.setClip(shape) to
rendering the doughnut.Setclip() method that makes the shape not anti-antialiasing. Also, now shadow is not
supported for doughnut chart.

Your issue is still open, so once we have made any progress, we will let you know here.

Thank you.

Well, setClip is not work.

Can aspose change to use drawImage like these code:

int width = 1000;
int height = 1000;
int sWidth = 500;
int sHeight = 500;
int iWidth = 400;
int iHeight = 400;
BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_4BYTE_ABGR);
Graphics2D g = image.createGraphics();
g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
g.setColor(Color.RED);
g.drawLine(0, 0, width, height);

BufferedImage s = g.getDeviceConfiguration().createCompatibleImage(width, height, Transparency.TRANSLUCENT);
Graphics2D tg = s.createGraphics();
tg.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
tg.setColor(Color.BLUE);
tg.fillOval((width - sWidth) / 2, (height - sHeight) / 2, sWidth, sHeight);

tg.setComposite(AlphaComposite.Clear);
tg.fillOval((width - iWidth) / 2, (height - iHeight) / 2, iWidth, iHeight);
g.drawImage(s, 0, 0, null);
ImageIO.write(image, “PNG”, new File(“C:/Users/admin/Desktop/s.png”));


This can make anti-aliasing work. (Only can a new sub image to draw)

This is important for me.

Can you move this post to Aspose.Priority.Support Forum so make this issue hight Priority

Hi,


Thanks for your suggestion on drawing image.

I have logged it to attach against your issue “CELLSJAVA-41468”. Our product team will first evaluate your suggestion to draw image and analyze the feasibility of your requested feature. Also, we will evaluate if your thread can be moved to Priority Support to be escalated, so you could avail it accordingly.

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

Thank you.

Hi,


We have evaluated your issue further.

We have set
anti-aliasing for drawing doughnut. The anti-aliasing is not effected as the
setClip method. Now we must use setClip for drawing gradient doughnut.<o:p></o:p>

In the source file you provided, the fill color of doughnut is gradient. If you want the border of doughnut is smooth, you may set the fill color of doughnut to solid fill.

Please find attached a
simple sample file on how to draw doughnut using setClip.


Thank you.

Hi Xiong,

This is to update you that we have fixed the problem logged earlier as CELLSJAVA-41468. We will shortly provide the fix here after ensuring the quality & incorporating other enhancements.

Hi,

Thanks for using Aspose.Cells.

Please download and try the latest fix: Aspose.Cells
for Java v8.6.3.2
and let us know your feedback.

The issues you have found earlier (filed as CELLSJAVA-41468) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.