Create Elegant Half Dial or Half Round Gauge Charts With SVG Code

@Koichi_Tsuji had already published a great tip long ago regarding the half dial or half round gauge charts using QuickCharts option.

Disclaimer

Summary

I also searched for any other tips / posts on half dial chart and could not come up with one. Apologies in advance if someone has already published a half dial chart using SVGs.

There is of course a tip post on full radial charts by Rich.

The Dial Gauge Sample app

The below referred sample app shows creation of half dial or half gauge charts using some SVG code. The added point in these charts is they have a moving needle that moves in 180 degrees based on the input value,

The app shows 3 different types of half dial charts created using some SVG code. The approach uses a look up table of values to get the X and Y coordinates of the needle based on the input angle value.

Here is an image and GIF from the app.

While using the app , please tap on the Set Dials action to change the chart values for all the three demo graphs. This action assigns some random values to the chart percentages to demonstrate the charts in working.

Here is the GIF that shows the app charts in action.

Dial Charts

Here is the sample app for reference

9 Likes

Very cool Suvrutt!

Can you please animate it so the dial swings slowly between each position?

No, just kidding!

I’ve found that I can ditch the lookup table in some instances and been able to use a SWITCH with 100 different cases in it, for instance to calculate the cosine of an angle, but no idea regarding the efficiency of doing that.

1 Like