File tree Expand file tree Collapse file tree 1 file changed +3
-19
lines changed Expand file tree Collapse file tree 1 file changed +3
-19
lines changed Original file line number Diff line number Diff line change 1+ import { BulletOptions } from '@antv/g2plot'
12import { mount } from '@vue/test-utils'
23import BulletChart from '../../src/plots/bullet'
34
4- const props : any = {
5+ const props : BulletOptions = {
56 data : [
67 {
78 title : '满意度' ,
@@ -29,27 +30,10 @@ const props: any = {
2930 line : null ,
3031 } ,
3132 yAxis : false ,
32- // 自定义 legend
33- legend : {
34- custom : true ,
35- position : 'left' ,
36- items : [
37- {
38- value : '实际值' ,
39- name : '实际值' ,
40- marker : { symbol : 'square' , style : { fill : '#5B8FF9' , r : 5 } } ,
41- } ,
42- {
43- value : '目标值' ,
44- name : '目标值' ,
45- marker : { symbol : 'line' , style : { stroke : '#5B8FF9' , r : 5 } } ,
46- } ,
47- ] ,
48- } ,
4933}
5034
5135describe ( 'BulletChart' , ( ) => {
5236 test ( 'should render without crashed' , ( ) => {
53- mount ( ( ) => < BulletChart { ...props } /> )
37+ mount ( ( ) => < BulletChart { ...( props as any ) } /> )
5438 } )
5539} )
You can’t perform that action at this time.
0 commit comments