redux-devtools/packages/d3-state-visualizer/examples/tree/index.js
Nathan Bierema 1a4e509b4b
chore(*): fix prettier (#557)
* Fix

* Test

* Changes

* Run prettier

* Remove single quote
2020-08-05 09:12:31 -04:00

36 lines
722 B
JavaScript

import { tree } from 'd3-state-visualizer';
const appState = {
todoStore: {
todos: [
{ title: 'd3' },
{ title: 'state' },
{ title: 'visualizer' },
{ title: 'tree' }
],
completedCount: 1,
alphabeticalOrder: true
},
someStore: {
someProperty: 0,
someObject: {
anotherProperty: 'value',
someArray: [0, 1, 2]
}
}
};
const render = tree(document.getElementById('root'), {
state: appState,
id: 'treeExample',
size: 1000,
aspectRatio: 0.5,
isSorted: false,
widthBetweenNodesCoeff: 1.5,
heightBetweenNodesCoeff: 2,
style: { border: '1px solid black' },
tooltipOptions: { offset: { left: 30, top: 10 }, indentationSize: 2 }
});
render();