@ -48,6 +48,7 @@
arcs : 'c3-arcs' ,
arcs : 'c3-arcs' ,
area : 'c3-area' ,
area : 'c3-area' ,
areas : 'c3-areas' ,
areas : 'c3-areas' ,
empty : 'c3-empty' ,
text : 'c3-text' ,
text : 'c3-text' ,
texts : 'c3-texts' ,
texts : 'c3-texts' ,
gaugeValue : 'c3-gauge-value' ,
gaugeValue : 'c3-gauge-value' ,
@ -167,6 +168,9 @@
_ _data _ondragstart = getConfig ( [ 'data' , 'ondragstart' ] , function ( ) { } ) ,
_ _data _ondragstart = getConfig ( [ 'data' , 'ondragstart' ] , function ( ) { } ) ,
_ _data _ondragend = getConfig ( [ 'data' , 'ondragend' ] , function ( ) { } ) ;
_ _data _ondragend = getConfig ( [ 'data' , 'ondragend' ] , function ( ) { } ) ;
// configuration for no plot-able data supplied.
var _ _data _empty _label _text = getConfig ( [ 'data' , 'empty' , 'label' , 'text' ] , "" ) ;
// subchart
// subchart
var _ _subchart _show = getConfig ( [ 'subchart' , 'show' ] , false ) ,
var _ _subchart _show = getConfig ( [ 'subchart' , 'show' ] , false ) ,
_ _subchart _size _height = getConfig ( [ 'subchart' , 'size' , 'height' ] , 60 ) ;
_ _subchart _size _height = getConfig ( [ 'subchart' , 'size' , 'height' ] , 60 ) ;
@ -2804,6 +2808,15 @@
updateLegend ( mapToIds ( c3 . data . targets ) , { withTransform : false , withTransitionForTransform : false } ) ;
updateLegend ( mapToIds ( c3 . data . targets ) , { withTransform : false , withTransitionForTransform : false } ) ;
/*-- Main Region --*/
/*-- Main Region --*/
if ( c3 . data . targets . length === 0 ) {
main . append ( "text" )
. attr ( "class" , CLASS . text + ' ' + CLASS . empty )
. attr ( "x" , ( getCurrentWidth ( ) - margin . left - margin . right ) / 2 )
. attr ( "y" , ( getCurrentHeight ( ) - margin . top - margin . bottom ) / 2 )
. attr ( "text-anchor" , "middle" ) // horizontal centering of text at x position in all browsers.
. attr ( "dominant-baseline" , "middle" ) // vertical centering of text at y position in all browsers, except IE.
. text ( _ _data _empty _label _text ) ;
}
// Grids
// Grids
grid = main . append ( 'g' )
grid = main . append ( 'g' )