File tree 5 files changed +42
-4
lines changed
5 files changed +42
-4
lines changed Original file line number Diff line number Diff line change @@ -6,11 +6,9 @@ module.exports = {
6
6
extends : [
7
7
'plugin:vue/vue3-strongly-recommended' ,
8
8
'standard' ,
9
+ 'prettier' ,
9
10
'plugin:prettier/recommended' ,
10
- 'prettier/vue' ,
11
- 'prettier/@typescript-eslint' ,
12
11
'plugin:@typescript-eslint/recommended' ,
13
- 'prettier/@typescript-eslint' ,
14
12
] ,
15
13
plugins : [ 'prettier' , '@typescript-eslint' ] ,
16
14
parser : 'vue-eslint-parser' ,
Original file line number Diff line number Diff line change
1
+ import { mount } from '@vue/test-utils'
2
+ import MultiViewChart from '../../src/plots/multi-view'
3
+
4
+ const config = {
5
+ data : [ ] ,
6
+ xField : 'a' ,
7
+ yField : 'b' ,
8
+ }
9
+
10
+ describe ( 'MultiViewChart' , ( ) => {
11
+ test ( 'should render without crashed' , ( ) => {
12
+ mount ( ( ) => < MultiViewChart { ...config } /> )
13
+ } )
14
+ } )
Original file line number Diff line number Diff line change @@ -41,6 +41,8 @@ import { SankeyChartProps as _SankeyChartProps } from './plots/sankey'
41
41
42
42
import { ChordChartProps as _ChordChartProps } from './plots/chord'
43
43
44
+ import { MultiViewChartProps as _MultiViewChartProps } from './plots/multi-view'
45
+
44
46
export { default as AreaChart } from './plots/area'
45
47
export type AreaChartProps = _AreaChartProps
46
48
@@ -121,3 +123,5 @@ export { default as SankeyChart } from './plots/sankey'
121
123
export type SankeyChartProps = _SankeyChartProps
122
124
export { default as ChordChart } from './plots/chord'
123
125
export type ChordChartProps = _ChordChartProps
126
+ export { default as MultiViewChart } from './plots/multi-view'
127
+ export type MultiViewChartProps = _MultiViewChartProps
Original file line number Diff line number Diff line change
1
+ import { App , defineComponent } from 'vue-demi'
2
+ import { MultiView , MultiViewOptions } from '@antv/g2plot'
3
+ import BaseChart , { BaseChartProps } from '../../components/base'
4
+ import { Writeable } from '../../types'
5
+
6
+ export type MultiViewChartProps = Writeable <
7
+ Omit < BaseChartProps < MultiViewOptions > , 'chart' > & MultiViewOptions
8
+ >
9
+
10
+ const MultiViewChart = defineComponent < MultiViewChartProps > ( {
11
+ name : 'MultiViewChart' ,
12
+ setup ( props , ctx ) {
13
+ return ( ) => < BaseChart chart = { MultiView } { ...ctx . attrs } { ...props } />
14
+ } ,
15
+ } )
16
+
17
+ /* istanbul ignore next */
18
+ MultiViewChart . install = ( app : App ) => {
19
+ app . component ( MultiViewChart . name , MultiViewChart )
20
+ }
21
+
22
+ export default MultiViewChart
Original file line number Diff line number Diff line change 15
15
// "sourceMap": true, /* Generates corresponding '.map' file. */
16
16
// "outFile": "./", /* Concatenate and emit output to single file. */
17
17
// "outDir": "./lib" /* Redirect output structure to the directory. */,
18
- "rootDir" : " ./src " /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */,
18
+ "rootDir" : " ." /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */,
19
19
// "composite": true, /* Enable project compilation */
20
20
// "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */
21
21
// "removeComments": true, /* Do not emit comments to output. */
You can’t perform that action at this time.
0 commit comments