Wijmo 5 - RadialGauge

by Joel Parks

HTML

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdn.grapecity.com/wijmo/5.latest/styles/wijmo.min.css">
<script src="https://cdn.grapecity.com/wijmo/5.latest/controls/wijmo.min.js"></script>
<script src="https://cdn.grapecity.com/wijmo/5.latest/controls/wijmo.gauge.min.js"></script>
<script src="https://cdn.grapecity.com/wijmo/5.latest/interop/angular/wijmo.angular.min.js"></script>
<!-- mark this as an Angular application and give it a controller -->
<div ng-app="app" ng-controller="appCtrl" class="container">
    
<h1>RadialGauge Demo</h1>
    
    <p>The isReadOnly property is set to false, so you can change the value by clicking on the gauge.</p>
    
    <wj-radial-gauge
        value="value"
        min="{{min}}"
        max="{{max}}" 
        start-angle="-30"
        sweep-angle="240"
        is-read-only="false"
        show-ranges="true">
        <wj-range wj-property="pointer" thickness="0.5"></wj-range>
        <wj-range min="0" max="{{max*.33}}" color="rgba(100,255,100,.2)"></wj-range>
        <wj-range min="{{max*.33}}" max="{{max*.66}}" color="rgba(255,255,100,.2)"></wj-range>
            <wj-range min="{{max*.66}}" max="{{max}}" color="rgba(255,100,100,.2)"></wj-range>
    </wj-radial-gauge>
    
    <p>The current value is {{value}}.</p>
        
</div>

CSS

.wj-radialgauge {
    padding:4px;
    width:100%;
    height:200px;
}

JavaScript

// define app, include Wijmo 5 directives
var app = angular.module('app', ['wj']);

// controller
app.controller('appCtrl', function ($scope) {
    $scope.min = 0;
    $scope.max = 100;
    $scope.value = 50;
});