Thumb Element

The thumb is a circle shown at the end of the 'pointer' range. Use the 'thumbSize' property to set the size of the thumb element.

Linear gauges use the thumb to show the current value as text. In these cases, the minimum size of the thumb is determined by the size of the text element it contains.

By default, the thumb color is determined by the "pointer" color, but you can override that using CSS.

import 'bootstrap.css'; import '@grapecity/wijmo.styles/wijmo.css'; import './styles.css'; // import * as input from '@grapecity/wijmo.input'; import * as gauge from '@grapecity/wijmo.gauge'; // document.readyState === 'complete' ? init() : window.onload = init; // function init() { // create the gauge let theGauge = new gauge.RadialGauge('#theGauge', { isReadOnly: false, hasShadow: false, showText: 'All', startAngle: -30, sweepAngle: 240, value: 50, pointer: { thickness: 0.15, color: '#0085c7' }, thumbSize: 20 }); // let theColor = new input.InputColor('#theColor', { value: theGauge.pointer.color, valueChanged: (s) => { theGauge.pointer.color = s.value; } }); let theThumbSize = new input.InputNumber('#theThumbSize', { min: 0, max: 50, step: 5, format: 'n0', value: theGauge.thumbSize, valueChanged: (s) => { theGauge.thumbSize = s.value; } }); } <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>Thumb Element</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- SystemJS --> <script src="node_modules/systemjs/dist/system.src.js"></script> <script src="systemjs.config.js"></script> <script> System.import('./src/app'); </script> </head> <body> <div class="container-fluid"> <div class="row"> <div class="col-xs-6"> <div class="form-group"> <label for="theColor">Color:</label> <div id="theColor"></div> </div> <div class="form-group"> <label for="theThumbSize">Thumb Size:</label> <div id="theThumbSize"></div> </div> </div> <div class="col-xs-6"> <div id="theGauge"></div> </div> </div> </div> </body> </html> .wj-gauge { height: 150px; margin: 20px auto; padding: 12px; background: rgba(0, 0, 0, .02); box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23); } label { width: 120px; text-align: right; margin-right: 3px; } .wj-dropdown, .wj-inputnumber { width: 120px; } import 'bootstrap.css'; import '@grapecity/wijmo.styles/wijmo.css'; import './styles.css'; // import { Component, enableProdMode, NgModule } from '@angular/core'; import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; import { BrowserModule } from '@angular/platform-browser'; import { WjInputModule } from '@grapecity/wijmo.angular2.input'; import { WjGaugeModule } from '@grapecity/wijmo.angular2.gauge'; // @Component({ selector: 'app-component', templateUrl: 'src/app.component.html' }) export class AppComponent { thumbSize = 20; } // @NgModule({ imports: [WjGaugeModule, WjInputModule, BrowserModule], declarations: [AppComponent], bootstrap: [AppComponent] }) export class AppModule { } // enableProdMode(); // Bootstrap application with hash style navigation and global services. platformBrowserDynamic().bootstrapModule(AppModule); <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>Thumb Element</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- Polyfills --> <script src="node_modules/core-js/client/shim.min.js"></script> <script src="node_modules/zone.js/dist/zone.min.js"></script> <!-- SystemJS --> <script src="node_modules/systemjs/dist/system.js"></script> <script src="systemjs.config.js"></script> <script> // workaround to load 'rxjs/operators' from the rxjs bundle System.import('rxjs').then(function (m) { System.set(SystemJS.resolveSync('rxjs/operators'), System.newModule(m.operators)); System.import('./src/app.component'); }); </script> </head> <body> <app-component></app-component> </body> </html> <div class="container-fluid"> <div class="row"> <div class="col-xs-6"> <div class="form-group"> <label for="theColor">Color:</label> <wj-input-color id="theColor" [(value)]="theGauge.pointer.color"></wj-input-color> </div> <div class="form-group"> <label for="theThumbSize">Thumb Size:</label> <wj-input-number id="theThumbSize" [min]="0" [max]="50" [step]="5" [format]="'n0'" [(value)]="thumbSize"> </wj-input-number> </div> </div> <div class="col-xs-6"> <wj-radial-gauge #theGauge [isReadOnly]="false" [hasShadow]="false" [showText]="'All'" [startAngle]="-30" [sweepAngle]="240" [value]="50" [thumbSize]="thumbSize"> <wj-range [wjProperty]="'pointer'" [thickness]="0.15" [color]="'#0085c7'"></wj-range> </wj-radial-gauge> </div> </div> </div> .wj-gauge { height: 150px; margin: 20px auto; padding: 12px; background: rgba(0, 0, 0, .02); box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23); } label { width: 120px; text-align: right; margin-right: 3px; } .wj-dropdown, .wj-inputnumber { width: 120px; } <template> <div class="container-fluid"> <div class="row"> <div class="col-xs-6"> <div class="form-group"> <label for="color">Color:</label> <wj-input-color id="color" :value="theGauge.thumb.color" :valueChanged="onInputValueChanged"></wj-input-color> </div> <div class="form-group"> <label for="thumbSize">Thumb Size:</label> <wj-input-number id="thumbSize" :min=0 :max=50 :step=5 format="n0" :value="theGauge.thumb.thumbSize" :valueChanged="onInputValueChanged"> </wj-input-number> </div> </div> <div class="col-xs-6"> <wj-radial-gauge :isReadOnly=false :hasShadow=false showText="All" :startAngle=-30 :sweepAngle=240 :value=50 :thumbSize="theGauge.thumb.thumbSize"> <wj-range wjProperty="pointer" :thickness=0.15 :color="theGauge.thumb.color"></wj-range> </wj-radial-gauge> </div> </div> </div> </template> <script> import 'bootstrap.css'; import '@grapecity/wijmo.styles/wijmo.css'; import 'src/app.css'; import Vue from 'vue'; import '@grapecity/wijmo.vue2.gauge'; import '@grapecity/wijmo.vue2.input'; let App = Vue.extend({ name: 'app', data: function(){ return { theGauge: { thumb: { color: '#0085c7', thumbSize: 20 } } } }, methods: { onInputValueChanged: function(s,e) { this.theGauge.thumb[s.hostElement.id] = s.value; } } }) new Vue({ render: h => h(App) }).$mount('#app'); </script> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>Thumb Element</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- SystemJS --> <script src="node_modules/systemjs/dist/system.src.js"></script> <script src="systemjs.config.js"></script> <script> System.import('./src/app.vue'); </script> </head> <body> <div id="app"> </div> </body> </html> import './app.css'; import 'bootstrap.css'; import '@grapecity/wijmo.styles/wijmo.css'; // import * as React from 'react'; import * as ReactDOM from 'react-dom'; import * as wjGauge from '@grapecity/wijmo.react.gauge'; import * as wjInput from '@grapecity/wijmo.react.input'; class App extends React.Component { constructor(props) { super(props); this.state = { color: '#0085c7', thumbSize: 20, value: 50 }; } render() { return (<div className="container-fluid"> <div className="row"> <div className="col-xs-6"> <div className="form-group"> <label date-for="color">Color:</label> <wjInput.InputColor id="color" value={this.state.color} valueChanged={this._onColorChanged.bind(this)}> </wjInput.InputColor> </div> <div className="form-group"> <label date-for="thumbSize">Thumb Size:</label> <wjInput.InputNumber id="thumbSize" min={0} max={50} step={5} format="n0" value={this.state.thumbSize} valueChanged={this._onThumbSizeChanged.bind(this)}> </wjInput.InputNumber> </div> </div> <div className="col-xs-6"> <wjGauge.RadialGauge isReadOnly={false} hasShadow={false} showText="All" startAngle={-30} sweepAngle={240} value={this.state.value} thumbSize={this.state.thumbSize} valueChanged={this._onValueChanged.bind(this)}> <wjGauge.Range wjProperty="pointer" thickness={0.15} color={this.state.color}></wjGauge.Range> </wjGauge.RadialGauge> </div> </div> </div>); } _onColorChanged(sender) { this.setState({ color: sender.value }); } _onThumbSizeChanged(sender) { this.setState({ thumbSize: sender.value }); } _onValueChanged(sender) { this.setState({ value: sender.value }); } } ReactDOM.render(<App />, document.getElementById('app')); <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>Thumb Element</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- SystemJS --> <script src="node_modules/systemjs/dist/system.src.js"></script> <script src="systemjs.config.js"></script> <script> System.import('./src/app'); </script> </head> <body> <div id="app"></div> </body> </html> .container-fluid .wj-gauge { height: 150px; margin: 20px auto; padding: 12px; background: rgba(0, 0, 0, .02); box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23); } label { width: 120px; text-align: right; margin-right: 3px; } .wj-dropdown, .wj-inputnumber { width: 120px; }