File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -75,14 +75,16 @@ function getSubplotNumber(axis) {
75
75
const splitSubplot = axis . _subplot
76
76
? axis . _subplot . split ( axis . _axisGroup )
77
77
: [ ] ;
78
- return splitSubplot [ 1 ] ? Number ( splitSubplot [ 1 ] ) : 0 ;
78
+ return splitSubplot [ 1 ]
79
+ ? Number ( splitSubplot [ 1 ] )
80
+ : axis . _name . split ( 'axis' ) [ 1 ] ;
79
81
}
80
82
81
83
export function getAxisTitle ( axis ) {
82
84
const axisType = capitalize ( axis . _name . split ( 'axis' ) [ 0 ] ) ;
83
- const subplotNb = getSubplotNumber ( axis ) ;
85
+ const subplotNb = getSubplotNumber ( axis ) || 1 ;
84
86
85
87
return axis . _input && axis . _input . title
86
88
? striptags ( `${ axisType } : ${ axis . _input . title } ` )
87
- : striptags ( `${ axisType } ${ subplotNb === 0 ? 1 : subplotNb } ` ) ;
89
+ : striptags ( `${ axisType } ${ subplotNb } ` ) ;
88
90
}
You can’t perform that action at this time.
0 commit comments