@ -1188,7 +1188,7 @@
axis _y _label : { } ,
axis _y _label : { } ,
axis _y _tick _format : undefined ,
axis _y _tick _format : undefined ,
axis _y _tick _outer : true ,
axis _y _tick _outer : true ,
axis _y _tick _values : null ,
axis _y _tick _values : null ,
axis _y _tick _rotate : 0 ,
axis _y _tick _rotate : 0 ,
axis _y _tick _count : undefined ,
axis _y _tick _count : undefined ,
axis _y _tick _time _value : undefined ,
axis _y _tick _time _value : undefined ,
@ -2100,9 +2100,17 @@
return data ;
return data ;
} ;
} ;
c3 _chart _internal _fn . findValueInJson = function ( object , path ) {
c3 _chart _internal _fn . findValueInJson = function ( object , path ) {
if ( path in object ) {
// if object has a key that contains . or [], return the key's value
// instead of searching for an inner object
return object [ path ] ;
}
path = path . replace ( /\[(\w+)\]/g , '.$1' ) ; // convert indexes to properties (replace [] with .)
path = path . replace ( /\[(\w+)\]/g , '.$1' ) ; // convert indexes to properties (replace [] with .)
path = path . replace ( /^\./ , '' ) ; // strip a leading dot
path = path . replace ( /^\./ , '' ) ; // strip a leading dot
var pathArray = path . split ( '.' ) ;
var pathArray = path . split ( '.' ) ;
// search for any inner objects or arrays denoted by the path
for ( var i = 0 ; i < pathArray . length ; ++ i ) {
for ( var i = 0 ; i < pathArray . length ; ++ i ) {
var k = pathArray [ i ] ;
var k = pathArray [ i ] ;
if ( k in object ) {
if ( k in object ) {
@ -2694,7 +2702,7 @@
c3 _chart _internal _fn . getCurrentHeight = function ( ) {
c3 _chart _internal _fn . getCurrentHeight = function ( ) {
var $$ = this , config = $$ . config ,
var $$ = this , config = $$ . config ,
h = config . size _height ? config . size _height : $$ . getParentHeight ( ) ;
h = config . size _height ? config . size _height : $$ . getParentHeight ( ) ;
return h > 0 ? h : 320 / ( $$ . hasType ( 'gauge' ) && ! config . gauge _fullCircle ? 2 : 1 ) ;
return h > 0 ? h : 320 / ( $$ . hasType ( 'gauge' ) && ! config . gauge _fullCircle ? 2 : 1 ) ;
} ;
} ;
c3 _chart _internal _fn . getCurrentPaddingTop = function ( ) {
c3 _chart _internal _fn . getCurrentPaddingTop = function ( ) {
var $$ = this ,
var $$ = this ,
@ -2784,8 +2792,8 @@
var $$ = this , config = $$ . config , h = 30 ;
var $$ = this , config = $$ . config , h = 30 ;
if ( axisId === 'x' && ! config . axis _x _show ) { return 8 ; }
if ( axisId === 'x' && ! config . axis _x _show ) { return 8 ; }
if ( axisId === 'x' && config . axis _x _height ) { return config . axis _x _height ; }
if ( axisId === 'x' && config . axis _x _height ) { return config . axis _x _height ; }
if ( axisId === 'y' && ! config . axis _y _show ) {
if ( axisId === 'y' && ! config . axis _y _show ) {
return config . legend _show && ! $$ . isLegendRight && ! $$ . isLegendInset ? 10 : 1 ;
return config . legend _show && ! $$ . isLegendRight && ! $$ . isLegendInset ? 10 : 1 ;
}
}
if ( axisId === 'y2' && ! config . axis _y2 _show ) { return $$ . rotated _padding _top ; }
if ( axisId === 'y2' && ! config . axis _y2 _show ) { return $$ . rotated _padding _top ; }
// Calculate x axis height when tick rotated
// Calculate x axis height when tick rotated