print out high resolution

140 views
Skip to first unread message

denise ammons

unread,
Feb 8, 2013, 10:10:43 AM2/8/13
to Google Visualization API
I need to print out a google chart high resolution for a poster is
there a way to do that??

asgallant

unread,
Feb 8, 2013, 10:38:49 AM2/8/13
to google-visua...@googlegroups.com
Draw the chart in whatever resolution you want; as far as I am aware, there is no upper bound to the dimensions.  You can then save the chart as an image using this: http://jsfiddle.net/SCjm8/1/ (note that this code works best in Chrome or Firefox, anmd will not work at all in older versions of IE).

Yehonathan Sharvit

unread,
Aug 20, 2014, 7:34:49 AM8/20/14
to google-visua...@googlegroups.com
How can I draw a chart with a high resolution?

The only way I found is to increase the dimension of the chart. But this will also increase the size of the chart on the screen which is undesired.

Is there a way ton increase the resolution of the chart without increasing its size on the screen?
The purpose is to create a high resolution png image.

Andrew Gallant

unread,
Aug 20, 2014, 8:50:16 AM8/20/14
to google-visua...@googlegroups.com
Resolution translates directly into image size, as pixels in a browser have fixed physical dimensions for any given screen size, resolution, and scaling (browser pixels do not necessarily map 1:1 to screen pixels).  The Visualization API is not aware of (and cannot be made aware of) the difference between a browser pixel and a screen pixel.  Fortunately, the difference does not matter, as the charts are drawn as vector graphics, which the browser should render at the screen's native resolution; thus, you cannot get a "higher resolution" chart than your specified dimensions.

I am not certain how this works when the SVG is converted to an image/octet stream; either you will have a native pixel resolution image (which is the highest it could be, given the dimensions you specified), or you will get a browser-pixel resolution image, in which case you will need to draw a larger version of the chart to get the higher resolution that you want.

Yehonathan Sharvit

unread,
Aug 20, 2014, 9:01:51 AM8/20/14
to google-visua...@googlegroups.com
I see.

1. The solution I found is to scale the svg like this: http://jsfiddle.net/viebel/vwc8dh8k/10/ before to convert it to an image/octet stream.


2. Is there a way to create a big chart without affecting what is display on the screen?


--
You received this message because you are subscribed to a topic in the Google Groups "Google Visualization API" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-visualization-api/I52qUPmuFu8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-visualizati...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.

Yehonathan Sharvit

unread,
Aug 20, 2014, 9:02:01 AM8/20/14
to google-visua...@googlegroups.com

I see.

1. The solution I found is to scale the svg like this: http://jsfiddle.net/viebel/vwc8dh8k/10/ before to convert it to an image/octet stream.

2. Is there a way to create a big chart without affecting what is display on the screen?

--
You received this message because you are subscribed to a topic in the Google Groups "Google Visualization API" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-visualization-api/I52qUPmuFu8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-visualizati...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.



--
"Are we what we become or do we become what we are?" - Prof. Beno Gross

Andrew Gallant

unread,
Aug 20, 2014, 7:18:20 PM8/20/14
to google-visua...@googlegroups.com
The chart has to render in a visible div to draw correctly, but you can use CSS to move the container div off-screen.


On Wednesday, August 20, 2014 9:02:01 AM UTC-4, Yehonathan Sharvit wrote:

I see.

1. The solution I found is to scale the svg like this: http://jsfiddle.net/viebel/vwc8dh8k/10/ before to convert it to an image/octet stream.

2. Is there a way to create a big chart without affecting what is display on the screen?

On Wed, Aug 20, 2014 at 3:50 PM, Andrew Gallant <agal...@google.com> wrote:
Resolution translates directly into image size, as pixels in a browser have fixed physical dimensions for any given screen size, resolution, and scaling (browser pixels do not necessarily map 1:1 to screen pixels).  The Visualization API is not aware of (and cannot be made aware of) the difference between a browser pixel and a screen pixel.  Fortunately, the difference does not matter, as the charts are drawn as vector graphics, which the browser should render at the screen's native resolution; thus, you cannot get a "higher resolution" chart than your specified dimensions.

I am not certain how this works when the SVG is converted to an image/octet stream; either you will have a native pixel resolution image (which is the highest it could be, given the dimensions you specified), or you will get a browser-pixel resolution image, in which case you will need to draw a larger version of the chart to get the higher resolution that you want.


On Wednesday, August 20, 2014 7:34:49 AM UTC-4, Yehonathan Sharvit wrote:
How can I draw a chart with a high resolution?

The only way I found is to increase the dimension of the chart. But this will also increase the size of the chart on the screen which is undesired.

Is there a way ton increase the resolution of the chart without increasing its size on the screen?
The purpose is to create a high resolution png image.

On Friday, 8 February 2013 17:38:49 UTC+2, asgallant wrote:
Draw the chart in whatever resolution you want; as far as I am aware, there is no upper bound to the dimensions.  You can then save the chart as an image using this: http://jsfiddle.net/SCjm8/1/ (note that this code works best in Chrome or Firefox, anmd will not work at all in older versions of IE).

On Friday, February 8, 2013 10:10:43 AM UTC-5, denise ammons wrote:
I need to print out a google chart high resolution for a poster is
there a way to do that??

--
You received this message because you are subscribed to a topic in the Google Groups "Google Visualization API" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-visualization-api/I52qUPmuFu8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-visualization-api+unsub...@googlegroups.com.

To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages