Question

I have created a desktop (winforms) and web based (asp.net) dashboard application that uses the Dundas circular and linear gauges.

e.g. enter image description here

I need to recreate these gauges using the xcode ui and objective c (or something that can be imported into a view based project)

Are there any frameworks available that can create these types of gauges? I had a look at core plot, but it doesn't have this type of functionality.

Was it helpful?

Solution

They are not as difficult as they seem. You simply need the graphic assets then distinguish the static vs animatable graphics assets.

The animation can be done fairly easily using Core animation. So let's say you have the first gadget (though Quartz2D will be much more performant - but it will be a good start to make it using simple UIViews).

The first gadget has just the needle that animates (or rotates based on a given value). rest of the image can be a simple UIImageView.

Do something like:

needleView.layer.anchorPoint = BOTTOM_RIGHT_POINT;//to not rotate at center but bottom right or whatever

...
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:1.0];
CGAffineTransform transform = CGAffineTransformMakeRotation(angle_in_radians);
needleView.transform = transform;
[UIView commitAnimations];

This will rotate the needle.

Similarly for the two needles in second gauge. For the horizontal bars, do the same but using FRAME to set the size of bars relative to min_value and max_value.

OTHER TIPS

There is nothing that I am aware that will do this "out-of-the-box".

You may find this question and MeterView project on GitHub of help.

There are some free controls, e.g. you can search in cocoacontrols.com. https://www.cocoacontrols.com/search?utf8=%E2%9C%93&q=gauge

Such a high level dashboard widgets, specific to BI as I presume do not exist on free market as far as I know.

But you definitely can make them with iOS (Cocoa) core library Quartz 2D.

http://en.wikipedia.org/wiki/Quartz_2D

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top