DEV Community

Jay Hodges
Jay Hodges

Posted on

2

An Easy, Effective Instrument Cluster-Style Gauge Chart using Angular8, CSS3 and SVG

An interesting dynamic take on instrument-panel style / tachometer gauges using SVG.

It's not as dynamic as it could be and you may see that I'll update it to do some things automatically.

The idea was to create a gauge chart with progressive segments. That means the portion of the chart up to 100% comprises 70% of the chart itself. From 100-500% is about 20% and from 500%-5000%+ is 10%.

At the initial development, I was feeding this directly from an API, but it made more sense to make it a component and feed it the title and numbers (GIT REPO coming soon).

Anyhow, this is my first swing at it.

The current size is a little large, but since this is SVG, you can just change the scaling of the container with a css transform and watch the magic. It's working nicely in current Edge, Chrome and FF. Have not tested with MSIE11.

Enjoy and thanks for any respectful feedback.

https://stackblitz.com/edit/svg-guage-chart

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay