To use percents, you have to style the container div instead of setting 
them in the chart's options.  You could add this to your CSS:

#line_div {
    width: 15%;
    height: 6%;
}

On Thursday, May 29, 2014 4:29:43 AM UTC-4, abdelkader didouh wrote:
>
> Hi all
> This must probably seem like a stupid question but how can i use % in 
> stead of px when dealing with a chart width and height? because using px 
> causes problems for different resolution.
> this doesnt seem to work:
>
> var chart = new google.visualization.ChartWrapper({
>         chartType: 'LineChart',
>         containerId: 'line_div',
>         dataTable: data,
>         options: {
> backgroundColor:{ fill:'transparent' },
>             title: 'The crime in your area by category',
>             width: '15%',
>             height:'6%'
>         }
>     });
>
> Kins regards 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.

Reply via email to