All Projects → dulacp → Dpmeterview

dulacp / Dpmeterview

Licence: mit
Gravity-aware gauge-style meter view with delightful animations

Programming Languages

gravity
16 projects

Labels

Projects that are alternatives of or similar to Dpmeterview

MaxSoft-IntelliAPI
First-ever code-free and lightweight cross platform API and database test automation tool.
Stars: ✭ 14 (-97.62%)
Mutual labels:  gauge
ng2-gauge
⏲ Gauge component for Angular
Stars: ✭ 52 (-91.16%)
Mutual labels:  gauge
VHProgressBar
Vartical and Horizontal ProgressBar
Stars: ✭ 23 (-96.09%)
Mutual labels:  gauge
react-canvas-gauges
React Canvas Gauges Component based on Canvas gauges
Stars: ✭ 25 (-95.75%)
Mutual labels:  gauge
rockiot-ui
Webcomponent for IoT Dashboards, HTML Gauges and more
Stars: ✭ 42 (-92.86%)
Mutual labels:  gauge
react-gauge
ReactJS Gauge Component
Stars: ✭ 14 (-97.62%)
Mutual labels:  gauge
Svg Gauge
Minimalistic, animated SVG gauge. Zero dependencies
Stars: ✭ 188 (-68.03%)
Mutual labels:  gauge
Metric
Minimal metrics for Go (counter/gauge/histogram). No dependencies. Compatible with expvar. Web UI included.
Stars: ✭ 319 (-45.75%)
Mutual labels:  gauge
gauge-csharp
Csharp runner for Gauge
Stars: ✭ 34 (-94.22%)
Mutual labels:  gauge
gauge-ts
Typescript language plugin for Gauge
Stars: ✭ 20 (-96.6%)
Mutual labels:  gauge
gobench
A benchmark framework based on Golang
Stars: ✭ 50 (-91.5%)
Mutual labels:  gauge
ArduinoWeatherOS
Arduino Uno, 433MhzRx and OS WMR86 Weather Station
Stars: ✭ 69 (-88.27%)
Mutual labels:  gauge
LMGaugeViewSwift
LMGaugeViewSwift is a simple and customizable gauge control for iOS.
Stars: ✭ 111 (-81.12%)
Mutual labels:  gauge
awesome-testing
Software Testing for QA.
Stars: ✭ 48 (-91.84%)
Mutual labels:  gauge
vgauge
A wrapper library for GaugeJS
Stars: ✭ 45 (-92.35%)
Mutual labels:  gauge
Lmgaugeview
LMGaugeView is a simple and customizable gauge control for iOS.
Stars: ✭ 224 (-61.9%)
Mutual labels:  gauge
inspector-metrics
Typescript metrics / monitoring library
Stars: ✭ 19 (-96.77%)
Mutual labels:  gauge
Node Measured
A Node metrics library for measuring and reporting application-level metrics, inspired by Coda Hale, Yammer Inc's Dropwizard Metrics Libraries
Stars: ✭ 500 (-14.97%)
Mutual labels:  gauge
Hxcharts
📊 Chart for iOS 仪表盘、柱状图、圆形图、折线图、环形图
Stars: ✭ 301 (-48.81%)
Mutual labels:  gauge
GaugeMeter
An elegant and dynamic animated graphical gauge meter built with jQuery. GaugeMeter.js is highly customizable and includes full-radial, semi-radial & arch dials.
Stars: ✭ 30 (-94.9%)
Mutual labels:  gauge

DPMeterView

Presents values in a custom gauge-style meter view with delightful animations

Build Status

It should be easy to fill a shape with a color, to visually reflect a percentage.

There is plenty of examples where it can be useful:

  • simple progress bar view
  • stars rating view
  • emotion view
  • trend value view

iPhone portrait

Requirements

Minimal iOS Target: iOS 5

CocoaPods

Instead of adding the source files directly to your project, you may want to consider using CocoaPods to manage your dependencies. Follow the instructions on the CocoaPods site to install the gem, and specify DPMeterView as a dependency in your Podfile with

pod 'DPMeterView', '0.0.1'

Run the Demo

Clone the repo and install CocoaPods dependencies.

$ git clone https://github.com/dulacp/DPMeterView.git
$ cd DPMeterView/Example
$ pod install
$ open Example.xcworkspace

Then select the correct active scheme Example (if something else like Pod or Pod-DPMeterViewTests was selected). And your good to run the app on the Simulator or a Device.

Usage

#import "DPMeterView.h"
#import "UIBezierPath+BasicShapes.h"

DPMeterView *fiveStarsShape = [[DPMeterView alloc] init];
[fiveStarsShape setFrame:CGRectMake(0, 0, 200, 40)];
[fiveStarsShape setMeterType:DPMeterTypeLinearHorizontal];
[fiveStarsShape setShape:[UIBezierPath stars:5 shapeInFrame:fiveStarsShape.bounds].CGPath];

setProgress:animated:

[fiveStarsShape setProgress:0.6 animated:YES];

And a nice animation will update the view.

Custom shapes

Not a single image pixel !

In the example above I'm just using a UIBezierPath that is included in the category UIBezierPath+BasicShapes. Feel free to fork the project and add other shapes you think it'd be great to have.

You can use any shape you want, the class DPMeterView uses the CGPath as a mask.

Gravity aware

to try this feature you need to run the Example project on a device because the simulator doesn't provide CoreMotion acceleration data.

iPhone portrait

startGravity

[fiveStarsShape startGravity];

stopGravity

[fiveStarsShape stopGravity];

Minor known issues

  • The yaw obtained from the CoreMotion acceleration quaternion is restrained to the interval [-PI/2, PI/2], because of the definition of arcsin used to compute it. It would be even better if we find a way to extend it to the complete interval [-PI, PI]
  • There will be some boudary issues with gradients that have an oriented angle other that a vertical or an horizontal one. Especially, a DPMeterView shape can be entirely filled whereas it is not at a 100% progression, depends on the shape…

Roadmap / Evolutions

  • Have a progressTintColor that can evolve with the progress value, like in a heat map scale.
  • Use an image for the mask instead of a CGPath, but I don't know how to achieve that.
  • I'd like to add a little utility that enables developers to load shapes from a .svg file into a UIBezierPath directly, avoiding the burden of creating a UIBezierPath by hand. (the current work around is to use the great PaintCode application)

Contact

Pierre Dulac
@_dulacp

License

DPMeterView is available under the MIT license. See the LICENSE file for more info.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].