| Name | Type | Default |
|---|---|---|
| allowValueChangeOnClick | boolean | true |
|
Sets or gets whether the jqxKnob's value can be changed on click. /* CSSStylesheet.css */
text.jqx-knob-label {
font-size: 20px;
}
/* End CSSStylesheet.css */
/* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import './CSSStylesheet.css';
import JqxKnob, { IKnobProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxknob';
class App extends React.PureComponent<{}, IKnobProps> {
private myKnob = React.createRef<JqxKnob>();
constructor(props: {}) {
super(props);
this.state = {
styles: {
stroke: '#dfe3e9', strokeWidth: 3,
fill: {
color: '#fefefe', gradientType: "linear",
gradientStops: [[0, 1], [50, 0.9], [100, 1]]
}
},
marks: {
colorRemaining: { color: 'grey', border: 'grey' },
colorProgress: { color: '#00a4e1', border: '#00a4e1' },
type: 'line',
offset: '71%',
thickness: 3,
size: '6%',
majorSize: '9%',
majorInterval: 10,
minorInterval: 2
},
labels: {
offset: '88%',
step: 10,
visible: true
},
progressBar: {
style: { fill: '#00a4e1', stroke: 'grey' },
size: '9%',
offset: '60%',
background: { fill: 'grey', stroke: 'grey' }
},
pointer: {
type: 'circle',
style: { fill: { color: '#a4a3a3', gradientType: "linear", gradientStops: [[0, 0.5], [50, 0.6], [100, 1]] }, stroke: '#333' },
size: '10%',
offset: '50%'
}
}
}
public componentDidMount(): void {
this.myKnob.current!.styles = this.styles;
}
public render() {
return (
<JqxKnob ref={this.myKnob}
value={60} min={0} max={100} startAngle={120} endAngle={420} snapToStep={true}
rotation={'clockwise'} pointer={this.state.pointer} progressBar={this.state.progressBar}
marks={this.state.marks} labels={this.state.labels} allowValueChangeOnClick={false}
allowValueChangeOnDrag={false}
/>
);
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
| allowValueChangeOnDrag | boolean | true |
|
Sets or gets whether the jqxKnob's value can be changed by dragging the pointer. /* CSSStylesheet.css */
text.jqx-knob-label {
font-size: 20px;
}
/* End CSSStylesheet.css */
/* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import './CSSStylesheet.css';
import JqxKnob, { IKnobProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxknob';
class App extends React.PureComponent<{}, IKnobProps> {
private myKnob = React.createRef<JqxKnob>();
constructor(props: {}) {
super(props);
this.state = {
styles: {
stroke: '#dfe3e9', strokeWidth: 3,
fill: {
color: '#fefefe', gradientType: "linear",
gradientStops: [[0, 1], [50, 0.9], [100, 1]]
}
},
marks: {
colorRemaining: { color: 'grey', border: 'grey' },
colorProgress: { color: '#00a4e1', border: '#00a4e1' },
type: 'line',
offset: '71%',
thickness: 3,
size: '6%',
majorSize: '9%',
majorInterval: 10,
minorInterval: 2
},
labels: {
offset: '88%',
step: 10,
visible: true
},
progressBar: {
style: { fill: '#00a4e1', stroke: 'grey' },
size: '9%',
offset: '60%',
background: { fill: 'grey', stroke: 'grey' }
},
pointer: {
type: 'circle',
style: { fill: { color: '#a4a3a3', gradientType: "linear", gradientStops: [[0, 0.5], [50, 0.6], [100, 1]] }, stroke: '#333' },
size: '10%',
offset: '50%'
}
}
}
public componentDidMount(): void {
this.myKnob.current!.styles = this.styles;
}
public render() {
return (
<JqxKnob ref={this.myKnob}
value={60} min={0} max={100} startAngle={120} endAngle={420} snapToStep={true}
rotation={'clockwise'} pointer={this.state.pointer} progressBar={this.state.progressBar}
marks={this.state.marks} labels={this.state.labels} allowValueChangeOnClick={false}
allowValueChangeOnDrag={true}
/>
);
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
| allowValueChangeOnMouseWheel | boolean | true |
|
Sets or gets whether the jqxKnob's value can be changed on mouse wheel. /* CSSStylesheet.css */
text.jqx-knob-label {
font-size: 20px;
}
/* End CSSStylesheet.css */
/* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import './CSSStylesheet.css';
import JqxKnob, { IKnobProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxknob';
class App extends React.PureComponent<{}, IKnobProps> {
private myKnob = React.createRef<JqxKnob>();
constructor(props: {}) {
super(props);
this.state = {
styles: {
stroke: '#dfe3e9', strokeWidth: 3,
fill: {
color: '#fefefe', gradientType: "linear",
gradientStops: [[0, 1], [50, 0.9], [100, 1]]
}
},
marks: {
colorRemaining: { color: 'grey', border: 'grey' },
colorProgress: { color: '#00a4e1', border: '#00a4e1' },
type: 'line',
offset: '71%',
thickness: 3,
size: '6%',
majorSize: '9%',
majorInterval: 10,
minorInterval: 2
},
labels: {
offset: '88%',
step: 10,
visible: true
},
progressBar: {
style: { fill: '#00a4e1', stroke: 'grey' },
size: '9%',
offset: '60%',
background: { fill: 'grey', stroke: 'grey' }
},
pointer: {
type: 'circle',
style: { fill: { color: '#a4a3a3', gradientType: "linear", gradientStops: [[0, 0.5], [50, 0.6], [100, 1]] }, stroke: '#333' },
size: '10%',
offset: '50%'
}
}
}
public componentDidMount(): void {
this.myKnob.current!.styles = this.styles;
}
public render() {
return (
<JqxKnob ref={this.myKnob}
value={60} min={0} max={100} startAngle={120} endAngle={420} snapToStep={true}
rotation={'clockwise'} pointer={this.state.pointer} progressBar={this.state.progressBar}
marks={this.state.marks} labels={this.state.labels} allowValueChangeOnMouseWheel={false}
/>
);
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
| changing | (oldValue: KnobChanging['oldValue'], newValue: KnobChanging['newValue']) => boolean | null |
|
Interface KnobChanging {
oldValue?: number; newValue?: number; } Sets or gets a function called when the user drags the pointer. The function is called before the pointer is moved and the passed arguments are 2 - oldValue and newValue. If the function returns false, the value will not be changed. /* CSSStylesheet.css */
text.jqx-knob-label {
font-size: 20px;
}
/* End CSSStylesheet.css */
/* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import './CSSStylesheet.css';
import JqxKnob, { IKnobProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxknob';
class App extends React.PureComponent<{}, IKnobProps> {
private myKnob = React.createRef<JqxKnob>();
constructor(props: {}) {
super(props);
this.state = {
changing: (oldValue: number, newValue: number): any => {
alert('changing');
},
styles: {
stroke: '#dfe3e9', strokeWidth: 3,
fill: {
color: '#fefefe', gradientType: "linear",
gradientStops: [[0, 1], [50, 0.9], [100, 1]]
}
},
marks: {
colorRemaining: { color: 'grey', border: 'grey' },
colorProgress: { color: '#00a4e1', border: '#00a4e1' },
type: 'line',
offset: '71%',
thickness: 3,
size: '6%',
majorSize: '9%',
majorInterval: 10,
minorInterval: 2
},
labels: {
offset: '88%',
step: 10,
visible: true
},
progressBar: {
style: { fill: '#00a4e1', stroke: 'grey' },
size: '9%',
offset: '60%',
background: { fill: 'grey', stroke: 'grey' }
},
pointer: {
type: 'circle',
style: { fill: { color: '#a4a3a3', gradientType: "linear", gradientStops: [[0, 0.5], [50, 0.6], [100, 1]] }, stroke: '#333' },
size: '10%',
offset: '50%'
}
}
}
public componentDidMount(): void {
this.myKnob.current!.styles = this.styles;
}
public render() {
return (
<JqxKnob ref={this.myKnob}
value={60} min={0} max={100} startAngle={120} endAngle={420} snapToStep={true}
rotation={'clockwise'} pointer={this.state.pointer} progressBar={this.state.progressBar}
marks={this.state.marks} labels={this.state.labels} changing={this.state.changing}
/>
);
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
| dragEndAngle | number | 0 |
|
Sets or gets the Knob's angle where dragging the pointer will end. /* CSSStylesheet.css */
text.jqx-knob-label {
font-size: 20px;
}
/* End CSSStylesheet.css */
/* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import './CSSStylesheet.css';
import JqxKnob, { IKnobProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxknob';
class App extends React.PureComponent<{}, IKnobProps> {
private myKnob = React.createRef<JqxKnob>();
constructor(props: {}) {
super(props);
this.state = {
styles: {
stroke: '#dfe3e9', strokeWidth: 3,
fill: {
color: '#fefefe', gradientType: "linear",
gradientStops: [[0, 1], [50, 0.9], [100, 1]]
}
},
marks: {
colorRemaining: { color: 'grey', border: 'grey' },
colorProgress: { color: '#00a4e1', border: '#00a4e1' },
type: 'line',
offset: '71%',
thickness: 3,
size: '6%',
majorSize: '9%',
majorInterval: 10,
minorInterval: 2
},
labels: {
offset: '88%',
step: 10,
visible: true
},
progressBar: {
style: { fill: '#00a4e1', stroke: 'grey' },
size: '9%',
offset: '60%',
background: { fill: 'grey', stroke: 'grey' }
},
pointer: {
type: 'circle',
style: { fill: { color: '#a4a3a3', gradientType: "linear", gradientStops: [[0, 0.5], [50, 0.6], [100, 1]] }, stroke: '#333' },
size: '10%',
offset: '50%'
}
}
}
public componentDidMount(): void {
this.myKnob.current!.styles = this.styles;
}
public render() {
return (
<JqxKnob ref={this.myKnob}
value={60} min={0} max={100} startAngle={120} endAngle={420} snapToStep={true}
rotation={'clockwise'} pointer={this.state.pointer} progressBar={this.state.progressBar}
marks={this.state.marks} labels={this.state.labels} dragEndAngle={420}
/>
);
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
| dragStartAngle | number | 360 |
|
Sets or gets the Knob's degrees where dragging the pointer can start. /* CSSStylesheet.css */
text.jqx-knob-label {
font-size: 20px;
}
/* End CSSStylesheet.css */
/* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import './CSSStylesheet.css';
import JqxKnob, { IKnobProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxknob';
class App extends React.PureComponent<{}, IKnobProps> {
private myKnob = React.createRef<JqxKnob>();
constructor(props: {}) {
super(props);
this.state = {
styles: {
stroke: '#dfe3e9', strokeWidth: 3,
fill: {
color: '#fefefe', gradientType: "linear",
gradientStops: [[0, 1], [50, 0.9], [100, 1]]
}
},
marks: {
colorRemaining: { color: 'grey', border: 'grey' },
colorProgress: { color: '#00a4e1', border: '#00a4e1' },
type: 'line',
offset: '71%',
thickness: 3,
size: '6%',
majorSize: '9%',
majorInterval: 10,
minorInterval: 2
},
labels: {
offset: '88%',
step: 10,
visible: true
},
progressBar: {
style: { fill: '#00a4e1', stroke: 'grey' },
size: '9%',
offset: '60%',
background: { fill: 'grey', stroke: 'grey' }
},
pointer: {
type: 'circle',
style: { fill: { color: '#a4a3a3', gradientType: "linear", gradientStops: [[0, 0.5], [50, 0.6], [100, 1]] }, stroke: '#333' },
size: '10%',
offset: '50%'
}
}
}
public componentDidMount(): void {
this.myKnob.current!.styles = this.styles;
}
public render() {
return (
<JqxKnob ref={this.myKnob}
value={60} min={0} max={100} startAngle={120} endAngle={420} snapToStep={true}
rotation={'clockwise'} pointer={this.state.pointer} progressBar={this.state.progressBar}
marks={this.state.marks} labels={this.state.labels} dragStartAngle={120}
/>
);
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
| disabled | boolean | false |
|
Sets or gets whether the Knob is disabled. /* CSSStylesheet.css */
text.jqx-knob-label {
font-size: 20px;
}
/* End CSSStylesheet.css */
/* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import './CSSStylesheet.css';
import JqxKnob, { IKnobProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxknob';
class App extends React.PureComponent<{}, IKnobProps> {
private myKnob = React.createRef<JqxKnob>();
constructor(props: {}) {
super(props);
this.state = {
styles: {
stroke: '#dfe3e9', strokeWidth: 3,
fill: {
color: '#fefefe', gradientType: "linear",
gradientStops: [[0, 1], [50, 0.9], [100, 1]]
}
},
marks: {
colorRemaining: { color: 'grey', border: 'grey' },
colorProgress: { color: '#00a4e1', border: '#00a4e1' },
type: 'line',
offset: '71%',
thickness: 3,
size: '6%',
majorSize: '9%',
majorInterval: 10,
minorInterval: 2
},
labels: {
offset: '88%',
step: 10,
visible: true
},
progressBar: {
style: { fill: '#00a4e1', stroke: 'grey' },
size: '9%',
offset: '60%',
background: { fill: 'grey', stroke: 'grey' }
},
pointer: {
type: 'circle',
style: { fill: { color: '#a4a3a3', gradientType: "linear", gradientStops: [[0, 0.5], [50, 0.6], [100, 1]] }, stroke: '#333' },
size: '10%',
offset: '50%'
}
}
}
public componentDidMount(): void {
this.myKnob.current!.styles = this.styles;
}
public render() {
return (
<JqxKnob ref={this.myKnob}
value={60} min={0} max={100} startAngle={120} endAngle={420} snapToStep={true}
rotation={'clockwise'} pointer={this.state.pointer} progressBar={this.state.progressBar}
marks={this.state.marks} labels={this.state.labels} disabled={true}
/>
);
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
| dial | KnobDial | null |
|
Interface KnobDial {
innerRadius?: any; outerRadius?: any; style?: any; startAngle?: number; endAngle?: number; } Sets or gets the Knob's dial.
/* CSSStylesheet.css */
text.jqx-knob-label {
font-size: 20px;
}
/* End CSSStylesheet.css */
/* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import './CSSStylesheet.css';
import JqxKnob, { IKnobProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxknob';
class App extends React.PureComponent<{}, IKnobProps> {
private myKnob = React.createRef<JqxKnob>();
constructor(props: {}) {
super(props);
this.state = {
dial: {
innerRadius: '0%', /*specifies the inner Radius of the dial*/
outerRadius: '65%', /*specifies the outer Radius of the dial*/
style: {
stroke: '#ff0000', strokeWidth: 1, fill: { color: '#66707e', gradientType: "linear", gradientStops: [[0, 1], [50, 0.4], [100, 1]] }
}
},
styles: {
stroke: '#dfe3e9', strokeWidth: 3,
fill: {
color: '#fefefe', gradientType: "linear",
gradientStops: [[0, 1], [50, 0.9], [100, 1]]
}
},
marks: {
colorRemaining: { color: 'grey', border: 'grey' },
colorProgress: { color: '#00a4e1', border: '#00a4e1' },
type: 'line',
offset: '71%',
thickness: 3,
size: '6%',
majorSize: '9%',
majorInterval: 10,
minorInterval: 2
},
labels: {
offset: '88%',
step: 10,
visible: true
},
progressBar: {
style: { fill: '#00a4e1', stroke: 'grey' },
size: '9%',
offset: '60%',
background: { fill: 'grey', stroke: 'grey' }
},
pointer: {
type: 'circle',
style: { fill: { color: '#a4a3a3', gradientType: "linear", gradientStops: [[0, 0.5], [50, 0.6], [100, 1]] }, stroke: '#333' },
size: '10%',
offset: '50%'
}
}
}
public componentDidMount(): void {
this.myKnob.current!.styles = this.styles;
}
public render() {
return (
<JqxKnob ref={this.myKnob}
value={60} min={0} max={100} startAngle={120} endAngle={420} snapToStep={true}
rotation={'clockwise'} pointer={this.state.pointer} progressBar={this.state.progressBar}
marks={this.state.marks} labels={this.state.labels} dial={this.state.dial}
/>
);
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
| endAngle | number | 360 |
|
Sets or gets the Knob's degrees offset for the 360 location. /* CSSStylesheet.css */
text.jqx-knob-label {
font-size: 20px;
}
/* End CSSStylesheet.css */
/* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import './CSSStylesheet.css';
import JqxKnob, { IKnobProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxknob';
class App extends React.PureComponent<{}, IKnobProps> {
private myKnob = React.createRef<JqxKnob>();
constructor(props: {}) {
super(props);
this.state = {
styles: {
stroke: '#dfe3e9', strokeWidth: 3,
fill: {
color: '#fefefe', gradientType: "linear",
gradientStops: [[0, 1], [50, 0.9], [100, 1]]
}
},
marks: {
colorRemaining: { color: 'grey', border: 'grey' },
colorProgress: { color: '#00a4e1', border: '#00a4e1' },
type: 'line',
offset: '71%',
thickness: 3,
size: '6%',
majorSize: '9%',
majorInterval: 10,
minorInterval: 2
},
labels: {
offset: '88%',
step: 10,
visible: true
},
progressBar: {
style: { fill: '#00a4e1', stroke: 'grey' },
size: '9%',
offset: '60%',
background: { fill: 'grey', stroke: 'grey' }
},
pointer: {
type: 'circle',
style: { fill: { color: '#a4a3a3', gradientType: "linear", gradientStops: [[0, 0.5], [50, 0.6], [100, 1]] }, stroke: '#333' },
size: '10%',
offset: '50%'
}
}
}
public componentDidMount(): void {
this.myKnob.current!.styles = this.styles;
}
public render() {
return (
<JqxKnob ref={this.myKnob}
value={60} min={0} max={100} startAngle={120} endAngle={420} snapToStep={true}
rotation={'clockwise'} pointer={this.state.pointer} progressBar={this.state.progressBar}
marks={this.state.marks} labels={this.state.labels}
/>
);
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
| height | number | string | 400 |
|
Sets or gets the Knob's height. /* CSSStylesheet.css */
text.jqx-knob-label {
font-size: 20px;
}
/* End CSSStylesheet.css */
/* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import './CSSStylesheet.css';
import JqxKnob, { IKnobProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxknob';
class App extends React.PureComponent<{}, IKnobProps> {
private myKnob = React.createRef<JqxKnob>();
constructor(props: {}) {
super(props);
this.state = {
styles: {
stroke: '#dfe3e9', strokeWidth: 3,
fill: {
color: '#fefefe', gradientType: "linear",
gradientStops: [[0, 1], [50, 0.9], [100, 1]]
}
},
marks: {
colorRemaining: { color: 'grey', border: 'grey' },
colorProgress: { color: '#00a4e1', border: '#00a4e1' },
type: 'line',
offset: '71%',
thickness: 3,
size: '6%',
majorSize: '9%',
majorInterval: 10,
minorInterval: 2
},
labels: {
offset: '88%',
step: 10,
visible: true
},
progressBar: {
style: { fill: '#00a4e1', stroke: 'grey' },
size: '9%',
offset: '60%',
background: { fill: 'grey', stroke: 'grey' }
},
pointer: {
type: 'circle',
style: { fill: { color: '#a4a3a3', gradientType: "linear", gradientStops: [[0, 0.5], [50, 0.6], [100, 1]] }, stroke: '#333' },
size: '10%',
offset: '50%'
}
}
}
public componentDidMount(): void {
this.myKnob.current!.styles = this.styles;
}
public render() {
return (
<JqxKnob ref={this.myKnob}
value={60} min={0} max={100} startAngle={120} endAngle={420} snapToStep={true}
rotation={'clockwise'} pointer={this.state.pointer} progressBar={this.state.progressBar}
marks={this.state.marks} labels={this.state.labels} height={400}
/>
);
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
| labels | KnobLabels | null |
|
Interface KnobLabelsFormatFunction {
formatFunction?: (label: string | number) => string | number; } Interface KnobLabels { rotate?: any; offset?: number | string; visible?: boolean; step?: number; style?: any; formatFunction?: KnobLabelsFormatFunction['formatFunction']; } Sets or gets the Knob's labels.
/* CSSStylesheet.css */
text.jqx-knob-label {
font-size: 20px;
}
/* End CSSStylesheet.css */
/* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import './CSSStylesheet.css';
import JqxKnob, { IKnobProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxknob';
class App extends React.PureComponent<{}, IKnobProps> {
private myKnob = React.createRef<JqxKnob>();
constructor(props: {}) {
super(props);
this.state = {
styles: {
stroke: '#dfe3e9', strokeWidth: 3,
fill: {
color: '#fefefe', gradientType: "linear",
gradientStops: [[0, 1], [50, 0.9], [100, 1]]
}
},
marks: {
colorRemaining: { color: 'grey', border: 'grey' },
colorProgress: { color: '#00a4e1', border: '#00a4e1' },
type: 'line',
offset: '71%',
thickness: 3,
size: '6%',
majorSize: '9%',
majorInterval: 10,
minorInterval: 2
},
labels: {
offset: '88%',
step: 10,
visible: true
},
progressBar: {
style: { fill: '#00a4e1', stroke: 'grey' },
size: '9%',
offset: '60%',
background: { fill: 'grey', stroke: 'grey' }
},
pointer: {
type: 'circle',
style: { fill: { color: '#a4a3a3', gradientType: "linear", gradientStops: [[0, 0.5], [50, 0.6], [100, 1]] }, stroke: '#333' },
size: '10%',
offset: '50%'
}
}
}
public componentDidMount(): void {
this.myKnob.current!.styles = this.styles;
}
public render() {
return (
<JqxKnob ref={this.myKnob}
value={60} min={0} max={100} startAngle={120} endAngle={420} snapToStep={true}
rotation={'clockwise'} pointer={this.state.pointer} progressBar={this.state.progressBar}
marks={this.state.marks} labels={this.state.labels}
/>
);
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
| marks | KnobMarks | null |
|
KnobSpinnerMarksType: "circle" | "line"
Interface KnobMarks { colorProgress?: any; colorRemaining?: any; drawAboveProgressBar?: boolean; minorInterval?: number; majorInterval?: number; majorSize?: number | string; offset?: string; rotate?: boolean; size?: number | string; type?: KnobSpinnerMarksType; thickness?: number; visible?: boolean; } Sets or gets the Knob's marks.
/* CSSStylesheet.css */
text.jqx-knob-label {
font-size: 20px;
}
/* End CSSStylesheet.css */
/* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import './CSSStylesheet.css';
import JqxKnob, { IKnobProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxknob';
class App extends React.PureComponent<{}, IKnobProps> {
private myKnob = React.createRef<JqxKnob>();
constructor(props: {}) {
super(props);
this.state = {
styles: {
stroke: '#dfe3e9', strokeWidth: 3,
fill: {
color: '#fefefe', gradientType: "linear",
gradientStops: [[0, 1], [50, 0.9], [100, 1]]
}
},
marks: {
colorRemaining: { color: 'grey', border: 'grey' },
colorProgress: { color: '#00a4e1', border: '#00a4e1' },
type: 'line',
offset: '71%',
thickness: 3,
size: '6%',
majorSize: '9%',
majorInterval: 10,
minorInterval: 2
},
labels: {
offset: '88%',
step: 10,
visible: true
},
progressBar: {
style: { fill: '#00a4e1', stroke: 'grey' },
size: '9%',
offset: '60%',
background: { fill: 'grey', stroke: 'grey' }
},
pointer: {
type: 'circle',
style: { fill: { color: '#a4a3a3', gradientType: "linear", gradientStops: [[0, 0.5], [50, 0.6], [100, 1]] }, stroke: '#333' },
size: '10%',
offset: '50%'
}
}
}
public componentDidMount(): void {
this.myKnob.current!.styles = this.styles;
}
public render() {
return (
<JqxKnob ref={this.myKnob}
value={60} min={0} max={100} startAngle={120} endAngle={420} snapToStep={true}
rotation={'clockwise'} pointer={this.state.pointer} progressBar={this.state.progressBar}
marks={this.state.marks} labels={this.state.labels}
/>
);
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
| min | number | 0 |
|
Sets or gets the Knob's min property. /* CSSStylesheet.css */
text.jqx-knob-label {
font-size: 20px;
}
/* End CSSStylesheet.css */
/* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import './CSSStylesheet.css';
import JqxKnob, { IKnobProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxknob';
class App extends React.PureComponent<{}, IKnobProps> {
private myKnob = React.createRef<JqxKnob>();
constructor(props: {}) {
super(props);
this.state = {
styles: {
stroke: '#dfe3e9', strokeWidth: 3,
fill: {
color: '#fefefe', gradientType: "linear",
gradientStops: [[0, 1], [50, 0.9], [100, 1]]
}
},
marks: {
colorRemaining: { color: 'grey', border: 'grey' },
colorProgress: { color: '#00a4e1', border: '#00a4e1' },
type: 'line',
offset: '71%',
thickness: 3,
size: '6%',
majorSize: '9%',
majorInterval: 10,
minorInterval: 2
},
labels: {
offset: '88%',
step: 10,
visible: true
},
progressBar: {
style: { fill: '#00a4e1', stroke: 'grey' },
size: '9%',
offset: '60%',
background: { fill: 'grey', stroke: 'grey' }
},
pointer: {
type: 'circle',
style: { fill: { color: '#a4a3a3', gradientType: "linear", gradientStops: [[0, 0.5], [50, 0.6], [100, 1]] }, stroke: '#333' },
size: '10%',
offset: '50%'
}
}
}
public componentDidMount(): void {
this.myKnob.current!.styles = this.styles;
}
public render() {
return (
<JqxKnob ref={this.myKnob}
value={60} min={0} max={100} startAngle={120} endAngle={420} snapToStep={true}
rotation={'clockwise'} pointer={this.state.pointer} progressBar={this.state.progressBar}
marks={this.state.marks} labels={this.state.labels}
/>
);
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
| max | number | 100 |
|
Sets or gets the Knob's max property. /* CSSStylesheet.css */
text.jqx-knob-label {
font-size: 20px;
}
/* End CSSStylesheet.css */
/* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import './CSSStylesheet.css';
import JqxKnob, { IKnobProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxknob';
class App extends React.PureComponent<{}, IKnobProps> {
private myKnob = React.createRef<JqxKnob>();
constructor(props: {}) {
super(props);
this.state = {
styles: {
stroke: '#dfe3e9', strokeWidth: 3,
fill: {
color: '#fefefe', gradientType: "linear",
gradientStops: [[0, 1], [50, 0.9], [100, 1]]
}
},
marks: {
colorRemaining: { color: 'grey', border: 'grey' },
colorProgress: { color: '#00a4e1', border: '#00a4e1' },
type: 'line',
offset: '71%',
thickness: 3,
size: '6%',
majorSize: '9%',
majorInterval: 10,
minorInterval: 2
},
labels: {
offset: '88%',
step: 10,
visible: true
},
progressBar: {
style: { fill: '#00a4e1', stroke: 'grey' },
size: '9%',
offset: '60%',
background: { fill: 'grey', stroke: 'grey' }
},
pointer: {
type: 'circle',
style: { fill: { color: '#a4a3a3', gradientType: "linear", gradientStops: [[0, 0.5], [50, 0.6], [100, 1]] }, stroke: '#333' },
size: '10%',
offset: '50%'
}
}
}
public componentDidMount(): void {
this.myKnob.current!.styles = this.styles;
}
public render() {
return (
<JqxKnob ref={this.myKnob}
value={60} min={0} max={100} startAngle={120} endAngle={420} snapToStep={true}
rotation={'clockwise'} pointer={this.state.pointer} progressBar={this.state.progressBar}
marks={this.state.marks} labels={this.state.labels}
/>
);
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
| progressBar | KnobProgressBar | null |
|
Interface KnobProgressBar {
offset?: number | string; style?: any; size?: number | string; background?: any; ranges?: Array<any>; } Sets or gets the Knob's progressBar property.
/* CSSStylesheet.css */
text.jqx-knob-label {
font-size: 20px;
}
/* End CSSStylesheet.css */
/* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import './CSSStylesheet.css';
import JqxKnob, { IKnobProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxknob';
class App extends React.PureComponent<{}, IKnobProps> {
private myKnob = React.createRef<JqxKnob>();
constructor(props: {}) {
super(props);
this.state = {
styles: {
stroke: '#dfe3e9', strokeWidth: 3,
fill: {
color: '#fefefe', gradientType: "linear",
gradientStops: [[0, 1], [50, 0.9], [100, 1]]
}
},
marks: {
colorRemaining: { color: 'grey', border: 'grey' },
colorProgress: { color: '#00a4e1', border: '#00a4e1' },
type: 'line',
offset: '71%',
thickness: 3,
size: '6%',
majorSize: '9%',
majorInterval: 10,
minorInterval: 2
},
labels: {
offset: '88%',
step: 10,
visible: true
},
progressBar: {
style: { fill: '#00a4e1', stroke: 'grey' },
size: '9%',
offset: '60%',
background: { fill: 'grey', stroke: 'grey' }
},
pointer: {
type: 'circle',
style: { fill: { color: '#a4a3a3', gradientType: "linear", gradientStops: [[0, 0.5], [50, 0.6], [100, 1]] }, stroke: '#333' },
size: '10%',
offset: '50%'
}
}
}
public componentDidMount(): void {
this.myKnob.current!.styles = this.styles;
}
public render() {
return (
<JqxKnob ref={this.myKnob}
value={60} min={0} max={100} startAngle={120} endAngle={420} snapToStep={true}
rotation={'clockwise'} pointer={this.state.pointer} progressBar={this.state.progressBar}
marks={this.state.marks} labels={this.state.labels}
/>
);
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
| pointer | KnobPointer | null |
|
Interface KnobPointer {
offset?: number | string; type?: string; style?: any; size?: number | string; thickness?: number; visible?: boolean; } Sets or gets the Knob's pointer property.
/* CSSStylesheet.css */
text.jqx-knob-label {
font-size: 20px;
}
/* End CSSStylesheet.css */
/* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import './CSSStylesheet.css';
import JqxKnob, { IKnobProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxknob';
class App extends React.PureComponent<{}, IKnobProps> {
private myKnob = React.createRef<JqxKnob>();
constructor(props: {}) {
super(props);
this.state = {
styles: {
stroke: '#dfe3e9', strokeWidth: 3,
fill: {
color: '#fefefe', gradientType: "linear",
gradientStops: [[0, 1], [50, 0.9], [100, 1]]
}
},
marks: {
colorRemaining: { color: 'grey', border: 'grey' },
colorProgress: { color: '#00a4e1', border: '#00a4e1' },
type: 'line',
offset: '71%',
thickness: 3,
size: '6%',
majorSize: '9%',
majorInterval: 10,
minorInterval: 2
},
labels: {
offset: '88%',
step: 10,
visible: true
},
progressBar: {
style: { fill: '#00a4e1', stroke: 'grey' },
size: '9%',
offset: '60%',
background: { fill: 'grey', stroke: 'grey' }
},
pointer: {
type: 'circle',
style: { fill: { color: '#a4a3a3', gradientType: "linear", gradientStops: [[0, 0.5], [50, 0.6], [100, 1]] }, stroke: '#333' },
size: '10%',
offset: '50%'
}
}
}
public componentDidMount(): void {
this.myKnob.current!.styles = this.styles;
}
public render() {
return (
<JqxKnob ref={this.myKnob}
value={60} min={0} max={100} startAngle={120} endAngle={420} snapToStep={true}
rotation={'clockwise'} pointer={this.state.pointer} progressBar={this.state.progressBar}
marks={this.state.marks} labels={this.state.labels}
/>
);
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
| pointerGrabAction | KnobPointerGrabAction | "normal" |
|
KnobPointerGrabAction: "normal" | "progressBar" | "pointer"
Sets or gets the Knob's pointerGrabAction property("normal", "progressBar", "pointer"). /* CSSStylesheet.css */
text.jqx-knob-label {
font-size: 20px;
}
/* End CSSStylesheet.css */
/* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import './CSSStylesheet.css';
import JqxKnob, { IKnobProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxknob';
class App extends React.PureComponent<{}, IKnobProps> {
private myKnob = React.createRef<JqxKnob>();
constructor(props: {}) {
super(props);
this.state = {
styles: {
stroke: '#dfe3e9', strokeWidth: 3,
fill: {
color: '#fefefe', gradientType: "linear",
gradientStops: [[0, 1], [50, 0.9], [100, 1]]
}
},
marks: {
colorRemaining: { color: 'grey', border: 'grey' },
colorProgress: { color: '#00a4e1', border: '#00a4e1' },
type: 'line',
offset: '71%',
thickness: 3,
size: '6%',
majorSize: '9%',
majorInterval: 10,
minorInterval: 2
},
labels: {
offset: '88%',
step: 10,
visible: true
},
progressBar: {
style: { fill: '#00a4e1', stroke: 'grey' },
size: '9%',
offset: '60%',
background: { fill: 'grey', stroke: 'grey' }
},
pointer: {
type: 'circle',
style: { fill: { color: '#a4a3a3', gradientType: "linear", gradientStops: [[0, 0.5], [50, 0.6], [100, 1]] }, stroke: '#333' },
size: '10%',
offset: '50%'
}
}
}
public componentDidMount(): void {
this.myKnob.current!.styles = this.styles;
}
public render() {
return (
<JqxKnob ref={this.myKnob}
value={60} min={0} max={100} startAngle={120} endAngle={420} snapToStep={true}
rotation={'clockwise'} pointer={this.state.pointer} progressBar={this.state.progressBar}
marks={this.state.marks} labels={this.state.labels} pointerGrabAction={'pointer'}
/>
);
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
| rotation | KnobRotation | "clockwise" |
|
KnobRotation: "clockwise" | "counterclockwise"
Sets or gets the Knob's rotation("clockwise" or "counterclockwise"). /* CSSStylesheet.css */
text.jqx-knob-label {
font-size: 20px;
}
/* End CSSStylesheet.css */
/* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import './CSSStylesheet.css';
import JqxKnob, { IKnobProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxknob';
class App extends React.PureComponent<{}, IKnobProps> {
private myKnob = React.createRef<JqxKnob>();
constructor(props: {}) {
super(props);
this.state = {
styles: {
stroke: '#dfe3e9', strokeWidth: 3,
fill: {
color: '#fefefe', gradientType: "linear",
gradientStops: [[0, 1], [50, 0.9], [100, 1]]
}
},
marks: {
colorRemaining: { color: 'grey', border: 'grey' },
colorProgress: { color: '#00a4e1', border: '#00a4e1' },
type: 'line',
offset: '71%',
thickness: 3,
size: '6%',
majorSize: '9%',
majorInterval: 10,
minorInterval: 2
},
labels: {
offset: '88%',
step: 10,
visible: true
},
progressBar: {
style: { fill: '#00a4e1', stroke: 'grey' },
size: '9%',
offset: '60%',
background: { fill: 'grey', stroke: 'grey' }
},
pointer: {
type: 'circle',
style: { fill: { color: '#a4a3a3', gradientType: "linear", gradientStops: [[0, 0.5], [50, 0.6], [100, 1]] }, stroke: '#333' },
size: '10%',
offset: '50%'
}
}
}
public componentDidMount(): void {
this.myKnob.current!.styles = this.styles;
}
public render() {
return (
<JqxKnob ref={this.myKnob}
value={60} min={0} max={100} startAngle={120} endAngle={420} snapToStep={true}
rotation={'counterclockwise'} pointer={this.state.pointer} progressBar={this.state.progressBar}
marks={this.state.marks} labels={this.state.labels}
/>
);
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
| startAngle | number | 0 |
|
Sets or gets the Knob's degrees offset for the 0 location. /* CSSStylesheet.css */
text.jqx-knob-label {
font-size: 20px;
}
/* End CSSStylesheet.css */
/* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import './CSSStylesheet.css';
import JqxKnob, { IKnobProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxknob';
class App extends React.PureComponent<{}, IKnobProps> {
private myKnob = React.createRef<JqxKnob>();
constructor(props: {}) {
super(props);
this.state = {
styles: {
stroke: '#dfe3e9', strokeWidth: 3,
fill: {
color: '#fefefe', gradientType: "linear",
gradientStops: [[0, 1], [50, 0.9], [100, 1]]
}
},
marks: {
colorRemaining: { color: 'grey', border: 'grey' },
colorProgress: { color: '#00a4e1', border: '#00a4e1' },
type: 'line',
offset: '71%',
thickness: 3,
size: '6%',
majorSize: '9%',
majorInterval: 10,
minorInterval: 2
},
labels: {
offset: '88%',
step: 10,
visible: true
},
progressBar: {
style: { fill: '#00a4e1', stroke: 'grey' },
size: '9%',
offset: '60%',
background: { fill: 'grey', stroke: 'grey' }
},
pointer: {
type: 'circle',
style: { fill: { color: '#a4a3a3', gradientType: "linear", gradientStops: [[0, 0.5], [50, 0.6], [100, 1]] }, stroke: '#333' },
size: '10%',
offset: '50%'
}
}
}
public componentDidMount(): void {
this.myKnob.current!.styles = this.styles;
}
public render() {
return (
<JqxKnob ref={this.myKnob}
value={60} min={0} max={100} startAngle={120} endAngle={420} snapToStep={true}
rotation={'clockwise'} pointer={this.state.pointer} progressBar={this.state.progressBar}
marks={this.state.marks} labels={this.state.labels}
/>
);
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
| spinner | KnobSpinner | null |
|
Interface KnobMarks {
colorProgress?: any; colorRemaining?: any; drawAboveProgressBar?: boolean; minorInterval?: number; majorInterval?: number; majorSize?: number | string; offset?: string; rotate?: boolean; size?: number | string; type?: KnobSpinnerMarksType; thickness?: number; visible?: boolean; } Interface KnobSpinner { innerRadius?: any; outerRadius?: any; style?: any; marks?: KnobMarks; } Sets or gets Knob's spinner.
/* CSSStylesheet.css */
text.jqx-knob-label {
font-size: 20px;
}
/* End CSSStylesheet.css */
/* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import './CSSStylesheet.css';
import JqxKnob, { IKnobProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxknob';
class App extends React.PureComponent<{}, IKnobProps> {
private myKnob = React.createRef<JqxKnob>();
constructor(props: {}) {
super(props);
this.state = {
spinner: {
style: { fill: { color: '#a2da39', gradientType: "linear", gradientStops: [[0, 1], [50, 0.9], [100, 1]] }, stroke: '#00a4e1' },
innerRadius: '45%', /*specifies the inner Radius of the dial*/
outerRadius: '60%', /*specifies the outer Radius of the dial*/
marks: {
colorRemaining: '#fff',
colorProgress: '#fff',
type: 'line',
offset: '46%',
thickness: 2,
size: '14%',
majorSize: '14%',
majorInterval: 10,
minorInterval: 10
},
},
styles: {
stroke: '#dfe3e9', strokeWidth: 3,
fill: {
color: '#fefefe', gradientType: "linear",
gradientStops: [[0, 1], [50, 0.9], [100, 1]]
}
},
marks: {
colorRemaining: { color: 'grey', border: 'grey' },
colorProgress: { color: '#00a4e1', border: '#00a4e1' },
type: 'line',
offset: '71%',
thickness: 3,
size: '6%',
majorSize: '9%',
majorInterval: 10,
minorInterval: 2
},
labels: {
offset: '88%',
step: 10,
visible: true
},
progressBar: {
style: { fill: '#00a4e1', stroke: 'grey' },
size: '9%',
offset: '60%',
background: { fill: 'grey', stroke: 'grey' }
},
pointer: {
type: 'circle',
style: { fill: { color: '#a4a3a3', gradientType: "linear", gradientStops: [[0, 0.5], [50, 0.6], [100, 1]] }, stroke: '#333' },
size: '10%',
offset: '50%'
}
}
}
public componentDidMount(): void {
this.myKnob.current!.styles = this.styles;
}
public render() {
return (
<JqxKnob ref={this.myKnob}
value={60} min={0} max={100} startAngle={120} endAngle={420} snapToStep={true}
rotation={'clockwise'} pointer={this.state.pointer} progressBar={this.state.progressBar}
marks={this.state.marks} labels={this.state.labels} spinner={this.state.spinner}
/>
);
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
| styles | KnobStyle | null |
|
Interface KnobStyle {
fill?: any; stroke?: string; strokeWidth?: number; } Sets or gets the Knob's background style.
/* CSSStylesheet.css */
text.jqx-knob-label {
font-size: 20px;
}
/* End CSSStylesheet.css */
/* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import './CSSStylesheet.css';
import JqxKnob, { IKnobProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxknob';
class App extends React.PureComponent<{}, IKnobProps> {
private myKnob = React.createRef<JqxKnob>();
constructor(props: {}) {
super(props);
this.state = {
styles: {
stroke: '#dfe3e9', strokeWidth: 3,
fill: {
color: '#fefefe', gradientType: "linear",
gradientStops: [[0, 1], [50, 0.9], [100, 1]]
}
},
marks: {
colorRemaining: { color: 'grey', border: 'grey' },
colorProgress: { color: '#00a4e1', border: '#00a4e1' },
type: 'line',
offset: '71%',
thickness: 3,
size: '6%',
majorSize: '9%',
majorInterval: 10,
minorInterval: 2
},
labels: {
offset: '88%',
step: 10,
visible: true
},
progressBar: {
style: { fill: '#00a4e1', stroke: 'grey' },
size: '9%',
offset: '60%',
background: { fill: 'grey', stroke: 'grey' }
},
pointer: {
type: 'circle',
style: { fill: { color: '#a4a3a3', gradientType: "linear", gradientStops: [[0, 0.5], [50, 0.6], [100, 1]] }, stroke: '#333' },
size: '10%',
offset: '50%'
}
}
}
public componentDidMount(): void {
this.myKnob.current!.styles = this.styles;
}
public render() {
return (
<JqxKnob ref={this.myKnob}
value={60} min={0} max={100} startAngle={120} endAngle={420} snapToStep={true}
rotation={'clockwise'} pointer={this.state.pointer} progressBar={this.state.progressBar}
marks={this.state.marks} labels={this.state.labels}
/>
);
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
| step | number | string | 1 |
|
Sets or gets the Knob's step property. Specifies the increase/decrease step. /* CSSStylesheet.css */
text.jqx-knob-label {
font-size: 20px;
}
/* End CSSStylesheet.css */
/* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import './CSSStylesheet.css';
import JqxKnob, { IKnobProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxknob';
class App extends React.PureComponent<{}, IKnobProps> {
private myKnob = React.createRef<JqxKnob>();
constructor(props: {}) {
super(props);
this.state = {
styles: {
stroke: '#dfe3e9', strokeWidth: 3,
fill: {
color: '#fefefe', gradientType: "linear",
gradientStops: [[0, 1], [50, 0.9], [100, 1]]
}
},
marks: {
colorRemaining: { color: 'grey', border: 'grey' },
colorProgress: { color: '#00a4e1', border: '#00a4e1' },
type: 'line',
offset: '71%',
thickness: 3,
size: '6%',
majorSize: '9%',
majorInterval: 10,
minorInterval: 2
},
labels: {
offset: '88%',
step: 10,
visible: true
},
progressBar: {
style: { fill: '#00a4e1', stroke: 'grey' },
size: '9%',
offset: '60%',
background: { fill: 'grey', stroke: 'grey' }
},
pointer: {
type: 'circle',
style: { fill: { color: '#a4a3a3', gradientType: "linear", gradientStops: [[0, 0.5], [50, 0.6], [100, 1]] }, stroke: '#333' },
size: '10%',
offset: '50%'
}
}
}
public componentDidMount(): void {
this.myKnob.current!.styles = this.styles;
}
public render() {
return (
<JqxKnob ref={this.myKnob}
value={60} min={0} max={100} startAngle={120} endAngle={420} snapToStep={true}
rotation={'clockwise'} pointer={this.state.pointer} progressBar={this.state.progressBar}
marks={this.state.marks} labels={this.state.labels} step={10}
/>
);
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
| snapToStep | boolean | true |
|
Sets or gets the Knob's snapToStep property. Specifies whether setting the knob value will snap to the closest step true/false. /* CSSStylesheet.css */
text.jqx-knob-label {
font-size: 20px;
}
/* End CSSStylesheet.css */
/* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import './CSSStylesheet.css';
import JqxKnob, { IKnobProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxknob';
class App extends React.PureComponent<{}, IKnobProps> {
private myKnob = React.createRef<JqxKnob>();
constructor(props: {}) {
super(props);
this.state = {
styles: {
stroke: '#dfe3e9', strokeWidth: 3,
fill: {
color: '#fefefe', gradientType: "linear",
gradientStops: [[0, 1], [50, 0.9], [100, 1]]
}
},
marks: {
colorRemaining: { color: 'grey', border: 'grey' },
colorProgress: { color: '#00a4e1', border: '#00a4e1' },
type: 'line',
offset: '71%',
thickness: 3,
size: '6%',
majorSize: '9%',
majorInterval: 10,
minorInterval: 2
},
labels: {
offset: '88%',
step: 10,
visible: true
},
progressBar: {
style: { fill: '#00a4e1', stroke: 'grey' },
size: '9%',
offset: '60%',
background: { fill: 'grey', stroke: 'grey' }
},
pointer: {
type: 'circle',
style: { fill: { color: '#a4a3a3', gradientType: "linear", gradientStops: [[0, 0.5], [50, 0.6], [100, 1]] }, stroke: '#333' },
size: '10%',
offset: '50%'
}
}
}
public componentDidMount(): void {
this.myKnob.current!.styles = this.styles;
}
public render() {
return (
<JqxKnob ref={this.myKnob}
value={60} min={0} max={100} startAngle={120} endAngle={420} snapToStep={false}
rotation={'clockwise'} pointer={this.state.pointer} progressBar={this.state.progressBar}
marks={this.state.marks} labels={this.state.labels}
/>
);
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
| value | any | 0 |
|
Sets or gets the Knob's value. /* CSSStylesheet.css */
text.jqx-knob-label {
font-size: 20px;
}
/* End CSSStylesheet.css */
/* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import './CSSStylesheet.css';
import JqxKnob, { IKnobProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxknob';
class App extends React.PureComponent<{}, IKnobProps> {
private myKnob = React.createRef<JqxKnob>();
constructor(props: {}) {
super(props);
this.state = {
styles: {
stroke: '#dfe3e9', strokeWidth: 3,
fill: {
color: '#fefefe', gradientType: "linear",
gradientStops: [[0, 1], [50, 0.9], [100, 1]]
}
},
marks: {
colorRemaining: { color: 'grey', border: 'grey' },
colorProgress: { color: '#00a4e1', border: '#00a4e1' },
type: 'line',
offset: '71%',
thickness: 3,
size: '6%',
majorSize: '9%',
majorInterval: 10,
minorInterval: 2
},
labels: {
offset: '88%',
step: 10,
visible: true
},
progressBar: {
style: { fill: '#00a4e1', stroke: 'grey' },
size: '9%',
offset: '60%',
background: { fill: 'grey', stroke: 'grey' }
},
pointer: {
type: 'circle',
style: { fill: { color: '#a4a3a3', gradientType: "linear", gradientStops: [[0, 0.5], [50, 0.6], [100, 1]] }, stroke: '#333' },
size: '10%',
offset: '50%'
}
}
}
public componentDidMount(): void {
this.myKnob.current!.styles = this.styles;
}
public render() {
return (
<JqxKnob ref={this.myKnob}
value={60} min={0} max={100} startAngle={120} endAngle={420} snapToStep={true}
rotation={'clockwise'} pointer={this.state.pointer} progressBar={this.state.progressBar}
marks={this.state.marks} labels={this.state.labels}
/>
);
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
| width | number | string | 400 |
|
Sets or gets the Knob's width. /* CSSStylesheet.css */
text.jqx-knob-label {
font-size: 20px;
}
/* End CSSStylesheet.css */
/* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import './CSSStylesheet.css';
import JqxKnob, { IKnobProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxknob';
class App extends React.PureComponent<{}, IKnobProps> {
private myKnob = React.createRef<JqxKnob>();
constructor(props: {}) {
super(props);
this.state = {
styles: {
stroke: '#dfe3e9', strokeWidth: 3,
fill: {
color: '#fefefe', gradientType: "linear",
gradientStops: [[0, 1], [50, 0.9], [100, 1]]
}
},
marks: {
colorRemaining: { color: 'grey', border: 'grey' },
colorProgress: { color: '#00a4e1', border: '#00a4e1' },
type: 'line',
offset: '71%',
thickness: 3,
size: '6%',
majorSize: '9%',
majorInterval: 10,
minorInterval: 2
},
labels: {
offset: '88%',
step: 10,
visible: true
},
progressBar: {
style: { fill: '#00a4e1', stroke: 'grey' },
size: '9%',
offset: '60%',
background: { fill: 'grey', stroke: 'grey' }
},
pointer: {
type: 'circle',
style: { fill: { color: '#a4a3a3', gradientType: "linear", gradientStops: [[0, 0.5], [50, 0.6], [100, 1]] }, stroke: '#333' },
size: '10%',
offset: '50%'
}
}
}
public componentDidMount(): void {
this.myKnob.current!.styles = this.styles;
}
public render() {
return (
<JqxKnob ref={this.myKnob}
value={60} min={0} max={100} startAngle={120} endAngle={420} snapToStep={true}
rotation={'clockwise'} pointer={this.state.pointer} progressBar={this.state.progressBar}
marks={this.state.marks} labels={this.state.labels} width={500}
/>
);
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
Events |
||
| change | Event | |
|
This event is triggered when the value is changed. Code examples
Bind to the
/* CSSStylesheet.css */
text.jqx-knob-label {
font-size: 20px;
}
/* End CSSStylesheet.css */
/* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import './CSSStylesheet.css';
import JqxKnob, { IKnobProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxknob';
class App extends React.PureComponent<{}, IKnobProps> {
private myKnob = React.createRef<JqxKnob>();
constructor(props: {}) {
super(props);
this.state = {
styles: {
stroke: '#dfe3e9', strokeWidth: 3,
fill: {
color: '#fefefe', gradientType: "linear",
gradientStops: [[0, 1], [50, 0.9], [100, 1]]
}
},
marks: {
colorRemaining: { color: 'grey', border: 'grey' },
colorProgress: { color: '#00a4e1', border: '#00a4e1' },
type: 'line',
offset: '71%',
thickness: 3,
size: '6%',
majorSize: '9%',
majorInterval: 10,
minorInterval: 2
},
labels: {
offset: '88%',
step: 10,
visible: true
},
progressBar: {
style: { fill: '#00a4e1', stroke: 'grey' },
size: '9%',
offset: '60%',
background: { fill: 'grey', stroke: 'grey' }
},
pointer: {
type: 'circle',
style: { fill: { color: '#a4a3a3', gradientType: "linear", gradientStops: [[0, 0.5], [50, 0.6], [100, 1]] }, stroke: '#333' },
size: '10%',
offset: '50%'
}
}
}
public componentDidMount(): void {
this.myKnob.current!.styles = this.styles;
}
public render() {
return (
<JqxKnob ref={this.myKnob} onChange={this.onChange}
value={60} min={0} max={100} startAngle={120} endAngle={420} snapToStep={true}
rotation={'clockwise'} pointer={this.state.pointer} progressBar={this.state.progressBar}
marks={this.state.marks} labels={this.state.labels}
/>
);
}
private onChange(e: Event): void {
alert('do something...');
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
Methods |
||
| Name | Arguments | Return Type |
| destroy | None | |
|
Destroys the widget. /* CSSStylesheet.css */
text.jqx-knob-label {
font-size: 20px;
}
/* End CSSStylesheet.css */
/* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import './CSSStylesheet.css';
import JqxKnob, { IKnobProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxknob';
class App extends React.PureComponent<{}, IKnobProps> {
private myKnob = React.createRef<JqxKnob>();
constructor(props: {}) {
super(props);
this.state = {
styles: {
stroke: '#dfe3e9', strokeWidth: 3,
fill: {
color: '#fefefe', gradientType: "linear",
gradientStops: [[0, 1], [50, 0.9], [100, 1]]
}
},
marks: {
colorRemaining: { color: 'grey', border: 'grey' },
colorProgress: { color: '#00a4e1', border: '#00a4e1' },
type: 'line',
offset: '71%',
thickness: 3,
size: '6%',
majorSize: '9%',
majorInterval: 10,
minorInterval: 2
},
labels: {
offset: '88%',
step: 10,
visible: true
},
progressBar: {
style: { fill: '#00a4e1', stroke: 'grey' },
size: '9%',
offset: '60%',
background: { fill: 'grey', stroke: 'grey' }
},
pointer: {
type: 'circle',
style: { fill: { color: '#a4a3a3', gradientType: "linear", gradientStops: [[0, 0.5], [50, 0.6], [100, 1]] }, stroke: '#333' },
size: '10%',
offset: '50%'
}
}
}
public componentDidMount(): void {
this.myKnob.current!.styles = this.styles;
this.myKnob.current!.destroy();
}
public render() {
return (
<JqxKnob ref={this.myKnob}
value={60} min={0} max={100} startAngle={120} endAngle={420} snapToStep={true}
rotation={'clockwise'} pointer={this.state.pointer} progressBar={this.state.progressBar}
marks={this.state.marks} labels={this.state.labels}
/>
);
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
| val | value | |
|
Sets or gets the value. |
||