thysultan / cssCharts.js

jquery plugin to create donut and bar charts with css
http://thysultan.com/projects/cssCharts/
45 stars 11 forks source link

Responsive #3

Closed SuggeElson closed 9 years ago

SuggeElson commented 9 years ago

Great start but can you make it responsive i.e 100% width.

thysultan commented 9 years ago

update: made line chart responsive. @SuggeElson

SuggeElson commented 9 years ago

How this work ? i see your plugin define the with to .chart class class="chart line" style="width: 640px; height: 220px

thysultan commented 9 years ago

@SuggeElson For example if you where to add this to your stylesheet

.chart{width:400px;} 
  or
 #chartId{width:400px;}

it will scale with it respectively

SuggeElson commented 9 years ago

I know but when try to resize it dynamic plugin redraw the lines correct but not the points.

thysultan commented 9 years ago

If you where to do for example:

$(window).resize(function(){
    $('.line-chart').cssCharts({type:"line"});
});

You would see it update/redraw when you resize the window.