@@ -428,6 +428,30 @@ describe('Pie traces', function() {
428428 . then ( done ) ;
429429 } ) ;
430430
431+ it ( 'should be able to restyle title position' , function ( done ) {
432+ Plotly . newPlot ( gd , [ {
433+ values : [ 3 , 2 , 1 ] ,
434+ title : 'Test<BR>Title' ,
435+ titleposition : 'top left' ,
436+ titlefont : {
437+ size : 12
438+ } ,
439+ type : 'pie' ,
440+ textinfo : 'none'
441+ } ] , { height : 300 , width : 300 } )
442+ . then ( _verifyTitle ( true , false , true , false , false ) )
443+ . then ( function ( ) { return Plotly . restyle ( gd , 'titleposition' , 'top right' ) ; } )
444+ . then ( _verifyTitle ( false , true , true , false , false ) )
445+ . then ( function ( ) { return Plotly . restyle ( gd , 'titleposition' , 'bottom left' ) ; } )
446+ . then ( _verifyTitle ( true , false , false , true , false ) )
447+ . then ( function ( ) { return Plotly . restyle ( gd , 'titleposition' , 'bottom center' ) ; } )
448+ . then ( _verifyTitle ( false , false , false , true , true ) )
449+ . then ( function ( ) { return Plotly . restyle ( gd , 'titleposition' , 'bottom right' ) ; } )
450+ . then ( _verifyTitle ( false , true , false , true , false ) )
451+ . catch ( failTest )
452+ . then ( done ) ;
453+ } ) ;
454+
431455 it ( 'does not intersect pulled slices' , function ( done ) {
432456 Plotly . newPlot ( gd , [ {
433457 values : [ 2 , 2 , 2 , 2 ] ,
0 commit comments