{"name":"d3-state-visualizer","version":"1.0.0-alpha","description":"Visualize your app state with a range of reusable charts","main":"lib/index.js","scripts":{"clean":"rimraf lib dist","build":"babel src --out-dir lib","build:umd":"webpack src/index.js dist/d3-state-visualizer.js && NODE_ENV=production webpack src/index.js dist/d3-state-visualizer.min.js","lint":"eslint src examples","prepublish":"npm run lint && npm run clean && npm run build && npm run build:umd"},"repository":{"type":"git","url":"git+https://github.com/romseguy/d3-state-visualizer.git"},"keywords":["d3","state","store","tree","visualization"],"author":{"name":"romseguy"},"license":"MIT","bugs":{"url":"https://github.com/romseguy/d3-state-visualizer/issues"},"homepage":"https://github.com/romseguy/d3-state-visualizer","devDependencies":{"babel-cli":"^6.3.15","babel-core":"^6.1.20","babel-eslint":"^5.0.0-beta4","babel-loader":"^6.2.0","babel-preset-es2015-loose":"^6.1.3","babel-preset-react":"^6.3.13","babel-preset-stage-0":"^6.3.13","eslint":"^0.23","eslint-config-airbnb":"0.0.6","eslint-plugin-react":"^3.6.3","rimraf":"^2.3.4","webpack":"^1.9.6","webpack-dev-server":"^1.8.2"},"peerDependencies":{},"dependencies":{"d3":"^3.5.6","d3tooltip":"^1.2.0","deepmerge":"^0.2.10","json-pretty":"0.0.1","map2tree":"^1.3.0","ramda":"^0.17.1"},"gitHead":"458fd5185fb7f0a91634ab4414def9f573f29a32","_id":"d3-state-visualizer@1.0.0-alpha","_shasum":"d7fb77cc57bbd2ccfe0df128c7bb394d91e21892","_from":".","_npmVersion":"3.5.3","_nodeVersion":"5.4.0","_npmUser":{"name":"romseguy","email":"rom.seguy@gmail.com"},"dist":{"shasum":"d7fb77cc57bbd2ccfe0df128c7bb394d91e21892","tarball":"http://registry-npm.ywwl.com/d3-state-visualizer/download/d3-state-visualizer-1.0.0-alpha.tgz","integrity":"sha512-n/m/jUZ08FCsAYP1xnBw9eEzs5rqdlm/fUgEr+qyeBcJoYjo1YTktx80ZYY1MFW2oyayUe5b6GqYeb6mPKPY0g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEMTHuHTarCglysIG6CYHrOZnfLz++aKu/Day4q4vLoWAiEAjFJZB46HrtRB0lEQiOKxSSM+7qAeeWIxgH/Rk858yRY="}],"size":221324,"noattachment":false,"key":"/d3-state-visualizer/-/d3-state-visualizer-1.0.0-alpha.tgz"},"maintainers":[{"name":"romseguy","email":"rom.seguy@gmail.com"}],"directories":{},"readme":"# d3-state-visualizer\n\nEnables real-time visualization of your application state.\n\nCreated by [@romseguy](https://github.com/romseguy) and merged from [`reduxjs/d3-state-visualizer`](https://github.com/reduxjs/d3-state-visualizer).\n\n[Demo](http://reduxjs.github.io/d3-state-visualizer)\n\n## Installation\n\n`yarn install d3-state-visualizer`\n\n## Usage\n\n```javascript\nimport { tree } from 'd3-state-visualizer';\n\nconst appState = {\n  todoStore: {\n    todos: [\n      { title: 'd3' },\n      { title: 'state' },\n      { title: 'visualizer' },\n      { title: 'tree' },\n    ],\n    completedCount: 1,\n  },\n};\n\nconst render = tree(document.getElementById('root'), {\n  state: appState,\n  id: 'treeExample',\n  size: 1000,\n  aspectRatio: 0.5,\n  isSorted: false,\n  widthBetweenNodesCoeff: 1.5,\n  heightBetweenNodesCoeff: 2,\n  chartStyles: { border: '1px solid black' },\n  tooltipOptions: { offset: { left: 30, top: 10 }, indentationSize: 2 },\n});\n\nrender();\n```\n\n## Charts API\n\nThe APIs are minimal and consists of a single function you provide with:\n\n- a DOM element\n- a plain old JS object for options.\n\n#### Tree\n\nThis chart is a bit special as it accepts either one of the two following options, but **not both**:\n\n- `tree`: a properly formed tree structure such as one generated by [map2tree](https://github.com/reduxjs/redux-devtools/tree/master/packages/map2tree) or [react2tree](https://github.com/romseguy/react2tree)\n- `state`: a plain javascript object mapping arbitrarily nested keys to values – which will be transformed into a tree structure, again using [map2tree](https://github.com/reduxjs/redux-devtools/tree/master/packages/map2tree).\n\nOther options are listed below and have reasonable default values if you want to omit them:\n\n| Option                    | Type    | Default                                                                          | Description                                                                                                                                                                                                                                                                                  |\n| ------------------------- | ------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `id`                      | String  | `'d3svg'`                                                                        | Sets the identifier of the SVG element —i.e your chart— that will be added to the DOM element you passed as first argument                                                                                                                                                                   |\n| `chartStyles`             | Object  | `{}`                                                                             | Sets the CSS style of the chart                                                                                                                                                                                                                                                              |\n| `size`                    | Number  | `500`                                                                            | Sets size of the chart in pixels                                                                                                                                                                                                                                                             |\n| `aspectRatio`             | Float   | `1.0`                                                                            | Sets the chart height to `size * aspectRatio` and [viewBox](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/viewBox) in order to preserve the aspect ratio of the chart. [Great video](https://www.youtube.com/watch?v=FCOeMy7HrBc) if you want to learn more about how SVG works |\n| `widthBetweenNodesCoeff`  | Float   | `1.0`                                                                            | Alters the horizontal space between each node                                                                                                                                                                                                                                                |\n| `heightBetweenNodesCoeff` | Float   | `1.0`                                                                            | Alters the vertical space between each node                                                                                                                                                                                                                                                  |\n| `isSorted`                | Boolean | `false`                                                                          | Sorts the chart in alphabetical order                                                                                                                                                                                                                                                        |\n| `transitionDuration`      | Number  | `750`                                                                            | Sets the duration of all the transitions used by the chart                                                                                                                                                                                                                                   |\n| `tooltipOptions`          | Object  | [here](https://github.com/reduxjs/redux-devtools/tree/master/packages/d3tooltip) | Sets the options for the [tooltip](https://github.com/reduxjs/redux-devtools/tree/master/packages/d3tooltip) that is showing up when you're hovering the nodes                                                                                                                               |\n| `rootKeyName`             | String  | `'state'`                                                                        | Sets the first node's name of the resulting tree structure. **Warning**: only works if you provide a `state` option                                                                                                                                                                          |\n| `pushMethod`              | String  | `'push'`                                                                         | Sets the method that shall be used to add array children to the tree. **Warning**: only works if you provide a `state` option                                                                                                                                                                |\n\nMore to come...\n\n## Roadmap\n\n- Threshold for large arrays so only a single node is displayed instead of all the children. That single node would be exclude from searching until selected.\n","publish_time":1452512213248,"_cnpm_publish_time":1452512213248,"dist-tags":{"latest":"3.0.1"}}