bernii / gauge.js

100% native and cool looking JavaScript gauge
MIT License
1.42k stars 391 forks source link

Added responsive option: canvas is sized to fit in parent DOM node #64

Open eelcobrolman opened 9 years ago

eelcobrolman commented 9 years ago

If options.responsive is set to true, the initial size of the canvas (before scaling) is set to that of the parent DOM node. The height is set to at most half of the width, in order to prevent the Gauge to render outside the parent container.

This feature is useful when using the Gauge in a resizable context, i.e. gridster.

Note: the gauge.js file is generated with CoffeeScript 1.8.0, hence the various small changes.

browndp08 commented 9 years ago

This would be a great feature to pull!

dshamis317 commented 9 years ago

(thumbsup) this would be huge

incleaf commented 9 years ago

Good! i'm really want this function thank you :D

EmilMoe commented 8 years ago

Does the author still works on this?

nermin99 commented 4 years ago

Please pull this feature, it is greatly needed.

EmilMoe commented 4 years ago

Please pull this feature, it is greatly needed.

I think this repo is way outdated. You should take a look at Apex Charts instead:

https://apexcharts.com/javascript-chart-demos/radialbar-charts/