diff --git a/packages/treemap/stories/treemap.stories.js b/packages/treemap/stories/treemap.stories.js index 9948b83f4..8b5d8bbf8 100644 --- a/packages/treemap/stories/treemap.stories.js +++ b/packages/treemap/stories/treemap.stories.js @@ -6,9 +6,10 @@ import { TreeMap } from '../src' const commonProperties = { width: 900, height: 400, - root: generateLibTree(), + data: generateLibTree(), identity: 'name', value: 'loc', + valueFormat: '.02s', label: 'name', labelSkipRadius: 16, } @@ -16,9 +17,9 @@ const commonProperties = { storiesOf('TreeMap', module).add('custom tooltip', () => ( ( - - {id}: {value} + tooltip={({ node }) => ( + + {node.pathComponents.join(' / ')}: {node.formattedValue} )} theme={{ diff --git a/packages/treemap/stories/treemapHtml.stories.js b/packages/treemap/stories/treemapHtml.stories.js index fb3e525a4..14675e76f 100644 --- a/packages/treemap/stories/treemapHtml.stories.js +++ b/packages/treemap/stories/treemapHtml.stories.js @@ -6,9 +6,10 @@ import { TreeMapHtml } from '../src' const commonProperties = { width: 900, height: 400, - root: generateLibTree(), + data: generateLibTree(), identity: 'name', value: 'loc', + valueFormat: '.02s', label: 'name', labelSkipRadius: 16, } @@ -16,9 +17,9 @@ const commonProperties = { storiesOf('TreeMapHtml', module).add('custom tooltip', () => ( ( - - {id}: {value} + tooltip={({ node }) => ( + + {node.pathComponents.join(' / ')}: {node.formattedValue} )} theme={{