ゲージ

ゲージは単一の値を表示するために使用されます。ゲージはダッシュボードでよく使用され、セグメント化や色分けを使用して、わかりやすく読みやすい方法で値を示します。

Wijmoには、円形ゲージ線形ゲージブレットグラフの3種類のゲージがあります。

import 'bootstrap.css'; import '@grapecity/wijmo.styles/wijmo.css'; import './styles.css'; import * as gauge from '@grapecity/wijmo.gauge'; // document.readyState === 'complete' ? init() : window.onload = init; // function init() { let theRadialGauge = new gauge.RadialGauge('#theRadialGauge', { min: 0, max: 100, value: 75, isReadOnly: false, step: 10 }); // let theLinearGauge = new gauge.LinearGauge('#theLinearGauge', { min: 0, max: 100, value: 75, isReadOnly: false, step: 10, showText: 'MinMax' }); // let theBulletGraph = new gauge.BulletGraph('#theBulletGraph', { min: 0, max: 100, value: 75, target: 60, bad: 50, good: 70, showText: 'MinMax' }); } <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>Wijmo Gauges</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="form-group"> <label>円形ゲージ:</label> <div id="theRadialGauge"></div> </div> <div class="form-group"> <label>線形ゲージ:</label> <div id="theLinearGauge"></div> </div> <div class="form-group"> <label>ブレットグラフ:</label> <div id="theBulletGraph"></div> </div> </div> </body> </html> .wj-gauge { padding:4px; width: 80%; margin: 6px auto 36px auto; } .wj-radialgauge { height: 200px; } label { width: 120px; text-align: right; margin-right: 3px; } body { margin-bottom: 24pt; } 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 { WjGaugeModule } from '@grapecity/wijmo.angular2.gauge'; // @Component({ selector: 'app-component', templateUrl: 'src/app.component.html' }) export class AppComponent { } // @NgModule({ imports: [WjGaugeModule, 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>Wijmo Gauges</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="form-group"> <label>円形ゲージ:</label> <wj-radial-gauge [min]="0" [max]="100" [value]="75" [isReadOnly]="false" [step]="10"></wj-radial-gauge> </div> <div class="form-group"> <label>線形ゲージ:</label> <wj-linear-gauge [min]="0" [max]="100" [value]="75" [isReadOnly]="false" [step]="10" [showText]="'MinMax'"> </wj-linear-gauge> </div> <div class="form-group"> <label>ブレットグラフ:</label> <wj-bullet-graph [min]="0" [max]="100" [value]="75" [target]="60" [bad]="50" [good]="70" [showText]="'MinMax'"> </wj-bullet-graph> </div> </div> .wj-gauge { padding:4px; width: 80%; margin: 6px auto 36px auto; } .wj-radialgauge { height: 200px; } label { width: 120px; text-align: right; margin-right: 3px; } body { margin-bottom: 24pt; } 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'; class App extends React.Component { constructor(props) { super(props); } render() { return (<div className="container-fluid"> <div className="form-group"> <label>円形ゲージ:</label> <wjGauge.RadialGauge min={0} max={100} value={75} isReadOnly={false} step={10}></wjGauge.RadialGauge> </div> <div className="form-group"> <label>線形ゲージ:</label> <wjGauge.LinearGauge min={0} max={100} value={75} isReadOnly={false} step={10} showText="MinMax"></wjGauge.LinearGauge> </div> <div className="form-group"> <label>ブレットグラフ:</label> <wjGauge.BulletGraph min={0} max={100} value={75} target={60} bad={50} good={70} showText="MinMax"></wjGauge.BulletGraph> </div> </div>); } } 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>Wijmo Gauges</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 { padding: 4px; width: 80%; margin: 6px auto 36px auto; } .container-fluid .wj-radialgauge { height: 200px; } label { width: 120px; text-align: right; } body { margin-bottom: 24pt; } <template> <div class="container-fluid"> <div class="form-group"> <label>円形ゲージ:</label> <wj-radial-gauge :min=0 :max=100 :value=75 :isReadOnly=false :step=10></wj-radial-gauge> </div> <div class="form-group"> <label>線形ゲージ:</label> <wj-linear-gauge :min=0 :max=100 :value=75 :isReadOnly=false :step=10 showText="MinMax"></wj-linear-gauge> </div> <div class="form-group"> <label>ブレットグラフ:</label> <wj-bullet-graph :min=0 :max=100 :value=75 :target=60 :bad=50 :good=70 showText="MinMax"></wj-bullet-graph> </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'; let App = Vue.extend({ name: 'app' }) 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>Wijmo Gauges</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>