![]() |
Set the size of a chart object
Hi,
I want to set the width of an chart (with legend inside) to 3600 pixels. I try to set it with Worksheets(1).ChartObjects(1).Width = 3600 The problem is: When I do the Export function afterwards to save the chart to a PNG file, the file width is 4800 pixels! Can anyone see the error? How can I export the chart in the size I want it to? Thanks, Thomas |
Set the size of a chart object
Hi Thomas;
The unit used by Excel is the point. 3600 points in pixels = 3600 * 4/3 = 4800 MP "Thomas Wieser" <wernze.nospam@gmx_net a écrit dans le message de y.telekom.at... Hi, I want to set the width of an chart (with legend inside) to 3600 pixels. I try to set it with Worksheets(1).ChartObjects(1).Width = 3600 The problem is: When I do the Export function afterwards to save the chart to a PNG file, the file width is 4800 pixels! Can anyone see the error? How can I export the chart in the size I want it to? Thanks, Thomas |
Set the size of a chart object
Hi Thomas;
If you want 3600 pixels: 3600 * 3/4 =2700 points Worksheets(1).ChartObjects(1).Width = 2700 Mp "Thomas Wieser" <wernze.nospam@gmx_net a écrit dans le message de y.telekom.at... Hi, I want to set the width of an chart (with legend inside) to 3600 pixels. I try to set it with Worksheets(1).ChartObjects(1).Width = 3600 The problem is: When I do the Export function afterwards to save the chart to a PNG file, the file width is 4800 pixels! Can anyone see the error? How can I export the chart in the size I want it to? Thanks, Thomas |
Set the size of a chart object
Hi Michel,
I see, thanks. Yes, I found out yesterday evening after my posting that the factor must have to be 1.3 periodically - 4/3, as you mentioned. Now I am sure - thank you! Greetings from Austria, Thomas Michel Pierron schrieb: Hi Thomas; If you want 3600 pixels: 3600 * 3/4 =2700 points Worksheets(1).ChartObjects(1).Width = 2700 Mp |
All times are GMT +1. The time now is 08:33 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com