def test_label_rotation(Chart):
 chart = Chart(x_label_rotation=28, y_label_rotation=76)
 chart.add('1', [4, (-5), 123, 59, 38])
 chart.add('2', [89, 0, 8, 0.12, 8])
 if (not chart._dual):
  chart.x_labels = ['one', 'twoooooooooooooooooooooo', 'three', '4']
 q = chart.render_pyquery()
 if (Chart in (Line, Bar)):
  assert (len(q('.axis.x text[transform^="rotate(28"]')) == 4)
  assert (len(q('.axis.y text[transform^="rotate(76"]')) == 13)

def test_label_rotation ( Chart ) : chart = Chart ( x_label_rotation = 28 , y_label_rotation = 76 ) chart . add ( '1' , [ 4 , ( - 5 ) , 123 , 59 , 38 ] ) chart . add ( '2' , [ 89 , 0 , 8 , 0.12 , 8 ] ) if ( not chart . _dual ) : chart . x_labels = [ 'one' , 'twoooooooooooooooooooooo' , 'three' , '4' ] q = chart . render_pyquery ( ) if ( Chart in ( Line , Bar ) ) : assert ( len ( q ( '.axis.x text[transform^="rotate(28"]' ) ) == 4 ) assert ( len ( q ( '.axis.y text[transform^="rotate(76"]' ) ) == 13 )
test label rotation option .