agiliq / django-graphos

Django charting made *really* easy.
http://agiliq.com/demo/graphos
BSD 2-Clause "Simplified" License
441 stars 98 forks source link

Setting Chart size to width of page? #124

Open jonesg504 opened 7 years ago

jonesg504 commented 7 years ago

Is there a way to set the width of a chart to the width of the screen (ie. 100%) I can only find way to change the actual pixel value.

mitjanikolaus commented 5 years ago

Make sure you are setting the width when instantiating the chart element, not inside the options for the chart (see the example in the README). There you can also set a percentage, e.g.:

chart = gchart.LineChart(simple_data_source, width="100%")