mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2025-06-07 22:53:30 +03:00
* Update packages * Fix after update * Update some types * Remove attr * Finish d3tooltip * Update style option * Updates * Zoom * Update * Update * Update * Fix * Update * Update * Update * Update * Update * Fixes * Update id type * Fix enter + update selections * Use this * Fix stringifying * Remove InputOptions * Use data.value * Updates * Remove UMD builds * Fix exit * No need to re-assign * Simplify d3tooltip API * Update redux-devtools-chart-monitor * Update redux-devtools-app * Update * Update * Remove @types/prop-types * Update prop types * Update d3tooltip docs * Update d3-state-visualizer docs * Update chart-monitor docs * Create weak-kings-brake.md * Create spicy-olives-compete.md * Create friendly-coats-trade.md * Create slimy-elephants-flash.md * Fix empty arrays
36 lines
735 B
TypeScript
36 lines
735 B
TypeScript
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,
|
|
chartStyles: { border: '1px solid black' },
|
|
tooltipOptions: { offset: { left: 30, top: 10 }, indentationSize: 2 },
|
|
});
|
|
|
|
render();
|