File tree Expand file tree Collapse file tree 5 files changed +42
-0
lines changed Expand file tree Collapse file tree 5 files changed +42
-0
lines changed Original file line number Diff line number Diff line change
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports [` VennChart should render without crashed 1` ] = ` <div />` ;
Original file line number Diff line number Diff line change
1
+ import React from 'react'
2
+ import { create } from 'react-test-renderer'
3
+ import VennChart from '../../src/plots/venn'
4
+
5
+ describe ( 'VennChart' , ( ) => {
6
+ test ( 'should render without crashed' , ( ) => {
7
+ const renderer = create ( < VennChart data = { [ ] } /> )
8
+
9
+ expect ( renderer . toJSON ( ) ) . toMatchSnapshot ( )
10
+ } )
11
+ } )
Original file line number Diff line number Diff line change
1
+ # VennChart
2
+
3
+ ## Usage
4
+
5
+ ``` tsx | pure
6
+ import { VennChart } from ' @opd/g2plot-react'
7
+ ```
8
+
9
+ <API src =" ../../src/plots/venn/index.tsx " />
Original file line number Diff line number Diff line change @@ -52,6 +52,8 @@ import { FacetChartProps as _FacetChartProps } from './plots/facet'
52
52
53
53
import { CirclePackingChartProps as _CirclePackingChartProps } from './plots/circle-packing'
54
54
55
+ import { VennChartProps as _VennChartProps } from './plots/venn'
56
+
55
57
export { default as BaseChart } from './components/base'
56
58
export type BaseChartProps < T = any > = _BaseChartProps < T >
57
59
@@ -160,3 +162,6 @@ export type FacetChartProps = _FacetChartProps
160
162
161
163
export { default as CirclePackingChart } from './plots/circle-packing'
162
164
export type CirclePackingChartProps = _CirclePackingChartProps
165
+
166
+ export { default as VennChart } from './plots/venn'
167
+ export type VennChartProps = _VennChartProps
Original file line number Diff line number Diff line change
1
+ import React , { forwardRef } from 'react'
2
+ import { Venn , VennOptions } from '@antv/g2plot'
3
+ import BaseChart , { BaseChartProps } from '../../components/base'
4
+
5
+ export type VennChartProps = Omit < BaseChartProps < VennOptions > , 'chart' > &
6
+ VennOptions
7
+
8
+ const VennChart = forwardRef < HTMLDivElement | null , VennChartProps > (
9
+ ( props , ref ) => {
10
+ return < BaseChart chart = { Venn } ref = { ref } { ...props } />
11
+ }
12
+ )
13
+
14
+ export default VennChart
You can’t perform that action at this time.
0 commit comments