| Name | Type | Default |
|---|---|---|
| baseColor | string | '#C2EEFF' |
|
Sets or gets the default color used when the /* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxTreeMap, { ITreeMapProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreemap';
class App extends React.PureComponent<{}, ITreeMapProps> {
private myTreeMap = React.createRef<JqxTreeMap>();
constructor(props: {}) {
super(props);
this.state = {
source: [{ label: 'USA', value: 104 },
{ label: 'Republic of China', value: 88 },
{ label: 'Great Britain', value: 65 },
{ label: 'Russian Federation', value: 82 }]
}
}
public render() {
return (
<JqxTreeMap ref={this.myTreeMap}
source={this.state.source} colorRange={50} baseColor={'#C2EEAA'}
/>
);
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
| colorRanges | Array<TreeMapColorRanges> | [ { color: '#aa9988', min: 0, max: 10 }, { color: '#ccbbcc', min: 11, max: 50 }, { color: '#000', min: 50, max: 100 } ]; |
|
Interface TreeMapColorRanges {
color?: string; min?: number; max?: number; } Sets or gets the color ranges used when the /* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxTreeMap, { ITreeMapProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreemap';
class App extends React.PureComponent<{}, ITreeMapProps> {
private myTreeMap = React.createRef<JqxTreeMap>();
constructor(props: {}) {
super(props);
this.state = {
colorRanges: [
{ color: '#52CBFF', min: 0, max: 85 },
{ color: '#52CBAA', min: 86, max: 105 }
],
source: [{ label: 'USA', value: 104 },
{ label: 'Republic of China', value: 88 },
{ label: 'Great Britain', value: 65 },
{ label: 'Russian Federation', value: 82 }]
}
}
public render() {
return (
<JqxTreeMap ref={this.myTreeMap}
source={this.state.source} colorRange={50} colorRanges={this.state.colorRanges}
colorMode={'rangeColors'}
/>
);
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
| colorRange | number | 100 |
|
Sets or gets the range in which the base colors can vary. The value is expected to be from 0 to 255. /* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxTreeMap, { ITreeMapProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreemap';
class App extends React.PureComponent<{}, ITreeMapProps> {
private myTreeMap = React.createRef<JqxTreeMap>();
constructor(props: {}) {
super(props);
this.state = {
source: [{ label: 'USA', value: 104 },
{ label: 'Republic of China', value: 88 },
{ label: 'Great Britain', value: 65 },
{ label: 'Russian Federation', value: 82 }]
}
}
public render() {
return (
<JqxTreeMap ref={this.myTreeMap}
source={this.state.source} colorRange={100}
/>
);
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
| colorMode | TreeMapColorMode | 'parent' |
|
TreeMapColorMode: "parent" | "autoColors" | "rangeColors"
Sets or gets the sectors rendering behavior.
/* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxTreeMap, { ITreeMapProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreemap';
class App extends React.PureComponent<{}, ITreeMapProps> {
private myTreeMap = React.createRef<JqxTreeMap>();
constructor(props: {}) {
super(props);
this.state = {
source: [{ label: 'USA', value: 104 },
{ label: 'Republic of China', value: 88 },
{ label: 'Great Britain', value: 65 },
{ label: 'Russian Federation', value: 82 }]
}
}
public render() {
return (
<JqxTreeMap ref={this.myTreeMap}
source={this.state.source} colorRange={50} colorMode={'autoColors'}
/>
);
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
| displayMember | string | "" |
|
Sets or gets the /* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxTreeMap, { ITreeMapProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreemap';
class App extends React.PureComponent<{}, ITreeMapProps> {
private myTreeMap = React.createRef<JqxTreeMap>();
constructor(props: {}) {
super(props);
this.state = {
source: [{ label: 'USA', value: 104 },
{ label: 'Republic of China', value: 88 },
{ label: 'Great Britain', value: 65 },
{ label: 'Russian Federation', value: 82 }]
}
}
public render() {
return (
<JqxTreeMap ref={this.myTreeMap}
source={this.state.source} colorRange={50} displayMember={'label'}
/>
);
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
| height | string | number | 600 |
|
Sets or gets the jqxTreeMap's height. /* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxTreeMap, { ITreeMapProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreemap';
class App extends React.PureComponent<{}, ITreeMapProps> {
private myTreeMap = React.createRef<JqxTreeMap>();
constructor(props: {}) {
super(props);
this.state = {
source: [{ label: 'USA', value: 104 },
{ label: 'Republic of China', value: 88 },
{ label: 'Great Britain', value: 65 },
{ label: 'Russian Federation', value: 82 }]
}
}
public render() {
return (
<JqxTreeMap ref={this.myTreeMap}
source={this.state.source} colorRange={50} height={500}
/>
);
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
| hoverEnabled | boolean | false |
|
Sets or gets whether a sector will be outlined when the mouse cursor is over it. /* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxTreeMap, { ITreeMapProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreemap';
class App extends React.PureComponent<{}, ITreeMapProps> {
private myTreeMap = React.createRef<JqxTreeMap>();
constructor(props: {}) {
super(props);
this.state = {
source: [{ label: 'USA', value: 104 },
{ label: 'Republic of China', value: 88 },
{ label: 'Great Britain', value: 65 },
{ label: 'Russian Federation', value: 82 }]
}
}
public render() {
return (
<JqxTreeMap ref={this.myTreeMap}
source={this.state.source} colorRange={50} hoverEnabled={true}
/>
);
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
| headerHeight | number | 25 |
|
Sets or gets the height of the parent sector's header. |
||
| legendLabel | string | "Legend" |
|
Sets or gets the Legend's label. /* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxTreeMap, { ITreeMapProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreemap';
class App extends React.PureComponent<{}, ITreeMapProps> {
private myTreeMap = React.createRef<JqxTreeMap>();
constructor(props: {}) {
super(props);
this.state = {
source: [{ label: 'USA', value: 104 },
{ label: 'Republic of China', value: 88 },
{ label: 'Great Britain', value: 65 },
{ label: 'Russian Federation', value: 82 }]
}
}
public render() {
return (
<JqxTreeMap ref={this.myTreeMap}
source={this.state.source} colorRange={50} legendLabel={'Olympic medal count - London 2012'}
colorMode={'autoColors'}
/>
);
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
| legendPosition | TreeMapLegendPosition | { x: 0, y: -5 } |
|
Interface TreeMapLegendPosition {
x?: number | string; y?: number | string; } Sets or gets the Legend's position. The /* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxTreeMap, { ITreeMapProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreemap';
class App extends React.PureComponent<{}, ITreeMapProps> {
private myTreeMap = React.createRef<JqxTreeMap>();
constructor(props: {}) {
super(props);
this.state = {
source: [{ label: 'USA', value: 104 },
{ label: 'Republic of China', value: 88 },
{ label: 'Great Britain', value: 65 },
{ label: 'Russian Federation', value: 82 }]
}
}
public render() {
return (
<JqxTreeMap ref={this.myTreeMap}
source={this.state.source} colorRange={50} legendPosition={{x: 20, y: 0}}
colorMode={'autoColors'}
/>
);
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
| legendScaleCallback | (v: TreeMapLegendScaleCallback['v']) => string | number | null |
|
Interface TreeMapLegendScaleCallback {
v?: number; } Sets or gets a callback function which formats the values displayed in the jqxTreeMap's Legend. /* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxTreeMap, { ITreeMapProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreemap';
class App extends React.PureComponent<{}, ITreeMapProps> {
private myTreeMap = React.createRef<JqxTreeMap>();
constructor(props: {}) {
super(props);
this.state = {
legendScaleCallback: (v: number): any => {
v = v.toFixed(1);
return v;
},
source: [{ label: 'USA', value: 104 },
{ label: 'Republic of China', value: 88 },
{ label: 'Great Britain', value: 65 },
{ label: 'Russian Federation', value: 82 }]
}
}
public render() {
return (
<JqxTreeMap ref={this.myTreeMap}
source={this.state.source} colorRange={50} colorMode={'autoColors'} legendScaleCallback={this.state.legendScaleCallback}
/>
);
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
| renderCallbacks | any | null |
|
Sets or gets callback function(s) which enable you to customize the rendering of any sector in the jqxTreeMap. To define a callback function for all sectors, use the "*" : function(sectorHtmlElement, sectorData) syntax. To define a callback function for a specific element, use its /* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxTreeMap, { ITreeMapProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreemap';
class App extends React.PureComponent<{}, ITreeMapProps> {
private myTreeMap = React.createRef<JqxTreeMap>();
constructor(props: {}) {
super(props);
this.state = {
renderCallbacks: {
'*': function (element, data) {
element.css({
color: '#ffffff'
});
element.html('<span style="font-size: 11px;" class="jqx-treemap-label">' + data.label + ', ' + data.value + '</span>');
return true;
}
},
source: [{ label: 'USA', value: 104 },
{ label: 'Republic of China', value: 88 },
{ label: 'Great Britain', value: 65 },
{ label: 'Russian Federation', value: 82 }]
}
}
public render() {
return (
<JqxTreeMap ref={this.myTreeMap}
source={this.state.source} colorRange={50} renderCallbacks={this.state.renderCallbacks}
/>
);
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
| selectionEnabled | boolean | true |
|
Sets or gets whether a sector will be outlined when it is clicked.. /* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxTreeMap, { ITreeMapProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreemap';
class App extends React.PureComponent<{}, ITreeMapProps> {
private myTreeMap = React.createRef<JqxTreeMap>();
constructor(props: {}) {
super(props);
this.state = {
source: [{ label: 'USA', value: 104 },
{ label: 'Republic of China', value: 88 },
{ label: 'Great Britain', value: 65 },
{ label: 'Russian Federation', value: 82 }]
}
}
public render() {
return (
<JqxTreeMap ref={this.myTreeMap}
source={this.state.source} colorRange={50} selectionEnabled={false}
/>
);
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
| showLegend | boolean | true |
|
Determines whether the jqxTreeMap's Legend is displayed. Legend is possible to be displayed when the /* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxTreeMap, { ITreeMapProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreemap';
class App extends React.PureComponent<{}, ITreeMapProps> {
private myTreeMap = React.createRef<JqxTreeMap>();
constructor(props: {}) {
super(props);
this.state = {
source: [{ label: 'USA', value: 104 },
{ label: 'Republic of China', value: 88 },
{ label: 'Great Britain', value: 65 },
{ label: 'Russian Federation', value: 82 }]
}
}
public render() {
return (
<JqxTreeMap ref={this.myTreeMap}
source={this.state.source} colorRange={50} showLegend={false} colorMode={'autoColors'}
/>
);
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
| source | any | null |
|
Specifies the jqxTreeMap's data source. Use this property to populate the jqxTreeMap. /* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxTreeMap, { ITreeMapProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreemap';
class App extends React.PureComponent<{}, ITreeMapProps> {
private myTreeMap = React.createRef<JqxTreeMap>();
constructor(props: {}) {
super(props);
this.state = {
source: [{ label: 'USA', value: 104 },
{ label: 'Republic of China', value: 88 },
{ label: 'Great Britain', value: 65 },
{ label: 'Russian Federation', value: 82 }]
}
}
public render() {
return (
<JqxTreeMap ref={this.myTreeMap}
source={this.state.source} colorRange={50}
/>
);
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
| theme | string | '' |
/* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxTreeMap, { ITreeMapProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreemap';
class App extends React.PureComponent<{}, ITreeMapProps> {
private myTreeMap = React.createRef<JqxTreeMap>();
constructor(props: {}) {
super(props);
this.state = {
source: [{ label: 'USA', value: 104 },
{ label: 'Republic of China', value: 88 },
{ label: 'Great Britain', value: 65 },
{ label: 'Russian Federation', value: 82 }]
}
}
public render() {
return (
<JqxTreeMap ref={this.myTreeMap}
source={this.state.source} colorRange={50} theme={'material'}
/>
);
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
| valueMember | string | "" |
|
Sets or gets the /* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxTreeMap, { ITreeMapProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreemap';
class App extends React.PureComponent<{}, ITreeMapProps> {
private myTreeMap = React.createRef<JqxTreeMap>();
constructor(props: {}) {
super(props);
this.state = {
source: [{ label: 'USA', value: 104 },
{ label: 'Republic of China', value: 88 },
{ label: 'Great Britain', value: 65 },
{ label: 'Russian Federation', value: 82 }]
}
}
public render() {
return (
<JqxTreeMap ref={this.myTreeMap}
source={this.state.source} colorRange={50} valueMember={'value'}
/>
);
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
| width | string | number | 600 |
|
Sets or gets the jqxTreeMap's width. /* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxTreeMap, { ITreeMapProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreemap';
class App extends React.PureComponent<{}, ITreeMapProps> {
private myTreeMap = React.createRef<JqxTreeMap>();
constructor(props: {}) {
super(props);
this.state = {
source: [{ label: 'USA', value: 104 },
{ label: 'Republic of China', value: 88 },
{ label: 'Great Britain', value: 65 },
{ label: 'Russian Federation', value: 82 }]
}
}
public render() {
return (
<JqxTreeMap ref={this.myTreeMap}
source={this.state.source} colorRange={50} width={500}
/>
);
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
Events |
||
| bindingComplete | Event | |
|
This event is triggered when the jqxTreeMap's Code examples
Bind to the
|
||
Methods |
||
| Name | Arguments | Return Type |
| destroy | None | |
|
Destroy the jqxTreeMap widget. The destroy method removes the jqxTreeMap widget from the web page. /* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxTreeMap, { ITreeMapProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreemap';
class App extends React.PureComponent<{}, ITreeMapProps> {
private myTreeMap = React.createRef<JqxTreeMap>();
constructor(props: {}) {
super(props);
this.state = {
source: [{ label: 'USA', value: 104 },
{ label: 'Republic of China', value: 88 },
{ label: 'Great Britain', value: 65 },
{ label: 'Russian Federation', value: 82 }]
}
}
public componentDidMount(): void {
this.myTreeMap.current!.destroy();
}
public render() {
return (
<JqxTreeMap ref={this.myTreeMap}
source={this.state.source} colorRange={50}
/>
);
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
| render | None | |
|
Renders the jqxTreeMap widget. /* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxTreeMap, { ITreeMapProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreemap';
class App extends React.PureComponent<{}, ITreeMapProps> {
private myTreeMap = React.createRef<JqxTreeMap>();
constructor(props: {}) {
super(props);
this.state = {
source: [{ label: 'USA', value: 104 },
{ label: 'Republic of China', value: 88 },
{ label: 'Great Britain', value: 65 },
{ label: 'Russian Federation', value: 82 }]
}
}
public componentDidMount(): void {
this.myTreeMap.current!.render();
}
public render() {
return (
<JqxTreeMap ref={this.myTreeMap}
source={this.state.source} colorRange={50}
/>
);
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||