File tree Expand file tree Collapse file tree 5 files changed +42
-4
lines changed Expand file tree Collapse file tree 5 files changed +42
-4
lines changed Original file line number Diff line number Diff line change @@ -6,11 +6,9 @@ module.exports = {
66 extends : [
77 'plugin:vue/vue3-strongly-recommended' ,
88 'standard' ,
9+ 'prettier' ,
910 'plugin:prettier/recommended' ,
10- 'prettier/vue' ,
11- 'prettier/@typescript-eslint' ,
1211 'plugin:@typescript-eslint/recommended' ,
13- 'prettier/@typescript-eslint' ,
1412 ] ,
1513 plugins : [ 'prettier' , '@typescript-eslint' ] ,
1614 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'
4141
4242import { ChordChartProps as _ChordChartProps } from './plots/chord'
4343
44+ import { MultiViewChartProps as _MultiViewChartProps } from './plots/multi-view'
45+
4446export { default as AreaChart } from './plots/area'
4547export type AreaChartProps = _AreaChartProps
4648
@@ -121,3 +123,5 @@ export { default as SankeyChart } from './plots/sankey'
121123export type SankeyChartProps = _SankeyChartProps
122124export { default as ChordChart } from './plots/chord'
123125export 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 1515 // "sourceMap": true, /* Generates corresponding '.map' file. */
1616 // "outFile": "./", /* Concatenate and emit output to single file. */
1717 // "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. */,
1919 // "composite": true, /* Enable project compilation */
2020 // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */
2121 // "removeComments": true, /* Do not emit comments to output. */
You can’t perform that action at this time.
0 commit comments