From b91c0570e68397ad3ca66251ef1b118603be84b4 Mon Sep 17 00:00:00 2001 From: plouc Date: Wed, 23 Dec 2020 17:16:24 +0900 Subject: [PATCH] feat(circle-packing): update website descriptions --- .../tests/CirclePacking.test.tsx | 22 --------- .../data/components/circle-packing/meta.yml | 45 +++++++++---------- 2 files changed, 22 insertions(+), 45 deletions(-) diff --git a/packages/circle-packing/tests/CirclePacking.test.tsx b/packages/circle-packing/tests/CirclePacking.test.tsx index 80f754faa4..8bfb56db09 100644 --- a/packages/circle-packing/tests/CirclePacking.test.tsx +++ b/packages/circle-packing/tests/CirclePacking.test.tsx @@ -127,25 +127,3 @@ testCases.forEach(testCase => { }) }) }) - -xit(`should send node data to onClick when 'isZoomable' is false`, () => { - const onClickHandler = jest.fn(node => node.data) - const wrapper = mount( - - width={600} - height={600} - data={sampleData} - enableLabels={true} - labelsSkipRadius={24} - onClick={onClickHandler} - /> - ) - - wrapper - .find('circle') - .at(0) //click the first (the root) - .simulate('click') - - expect(onClickHandler.mock.calls.length).toBe(1) - expect(onClickHandler.mock.results[0].value).toEqual(sampleData) -}) diff --git a/website/src/data/components/circle-packing/meta.yml b/website/src/data/components/circle-packing/meta.yml index 8ade3ad1ae..467efe8398 100644 --- a/website/src/data/components/circle-packing/meta.yml +++ b/website/src/data/components/circle-packing/meta.yml @@ -23,24 +23,23 @@ CirclePacking: - label: Using custom tooltip link: circlepacking--custom-tooltip description: | - CirclePacking chart with zooming ability. - You can fully customize it using `nodeComponent` property - to define your own node component, - if you wish to do so you should have a look at - [native SVG node component](https://github.com/plouc/nivo/blob/master/src/components/charts/bubble/BubbleNode.js) - for available properties. + Hierarchical CirclePacking chart with zooming ability. + + You can fully customize it using the `circleComponent` property + to define your own, if you wish to do so you should have a look at + [the default SVG component](https://github.com/plouc/nivo/blob/master/packages/circle-packing/src/CircleSvg.tsx) + to get started. The responsive alternative of this component is `ResponsiveCirclePacking`. - It also offers various implementations, see - [CirclePackingHtml](self:/circle-packing/html) and - [CirclePackingCanvas](self:/circle-packing/canvas). + It also offers other implementations, see [CirclePackingHtml](self:/circle-packing/html) + and [CirclePackingCanvas](self:/circle-packing/canvas). + + You can also see more example usages in [storybook](storybook:circlepacking--default). # Disabled until the API is fixed # This component is available in the `@nivo/api`, # see [sample](api:/samples/circle-packing.svg) # or [try it using the API client](self:/circle-packing/api). - # You can also see more example usages in - # [the storybook](storybook:circle-packing--default). CirclePackingHtml: package: '@nivo/circle-packing' @@ -56,19 +55,18 @@ CirclePackingHtml: - label: Using custom tooltip link: circlepackinghtml--custom-tooltip description: | - CirclePacking chart with zooming ability. - You can fully customize it using `nodeComponent` property - to define your own node component, if you wish to do so you should - have a look at - [the native HTML node component](https://github.com/plouc/nivo/blob/master/src/components/charts/bubble/BubbleHtmlNode.js) - for available properties. + Hierarchical CirclePacking chart with zooming ability. + + You can fully customize it using the `circleComponent` property + to define your own, if you wish to do so you should have a look at + [the default HTML component](https://github.com/plouc/nivo/blob/master/packages/circle-packing/src/CircleHtml.tsx) + to get started. The responsive alternative of this component is `ResponsiveCirclePackingHtml`. - It also offers various implementations, - see [CirclePacking](self:/circle-packing) and [CirclePackingCanvas](self:/circle-packing/canvas). + It also offers other implementations, see [CirclePacking](self:/circle-packing) + and [CirclePackingCanvas](self:/circle-packing/canvas). - You can also see more example usages in - [the storybook](storybook:circlepackinghtml--default). + You can also see more example usages in [storybook](storybook:circlepackinghtml--default). CirclePackingCanvas: package: '@nivo/circle-packing' @@ -77,9 +75,10 @@ CirclePackingCanvas: - canvas description: | A variation around the [CirclePacking](self:/circle-packing) component. + Well suited for large data sets as it does not impact DOM tree depth, however you lose the isomorphic ability and transitions. The responsive alternative of this component is `ResponsiveCirclePackingCanvas`. - It also offers various implementations, see - [CirclePacking](self:/circle-packing) and [CirclePackingHtml](self:/circle-packing/html). + It also offers other implementations, see [CirclePacking](self:/circle-packing) + and [CirclePackingHtml](self:/circle-packing/html).