@@ -54,7 +54,10 @@ function renderAxisWithOptions(position: Position, seriesGroup: string, show: bo
5454
5555storiesOf ( 'Axis' , module )
5656 . add ( 'basic' , ( ) => {
57- const tickLabelPadding = number ( 'Tick Label Padding' , 0 ) ;
57+ const customStyle = {
58+ tickLabelPadding : number ( 'Tick Label Padding' , 0 ) ,
59+ } ;
60+
5861 return (
5962 < Chart className = { 'story-chart' } >
6063 < Settings debug = { boolean ( 'debug' , false ) } />
@@ -63,14 +66,14 @@ storiesOf('Axis', module)
6366 position = { Position . Bottom }
6467 title = { 'Bottom axis' }
6568 showOverlappingTicks = { true }
66- tickLabelPadding = { tickLabelPadding }
69+ style = { customStyle }
6770 />
6871 < Axis
6972 id = { getAxisId ( 'left2' ) }
7073 title = { 'Left axis' }
7174 position = { Position . Left }
7275 tickFormat = { ( d ) => Number ( d ) . toFixed ( 2 ) }
73- tickLabelPadding = { tickLabelPadding }
76+ style = { customStyle }
7477 />
7578
7679 < AreaSeries
@@ -85,7 +88,10 @@ storiesOf('Axis', module)
8588 ) ;
8689 } )
8790 . add ( 'tick label rotation' , ( ) => {
88- const tickLabelPadding = number ( 'Axis Tick Label Padding' , 0 ) ;
91+ const customStyle = {
92+ tickLabelPadding : number ( 'Tick Label Padding' , 0 ) ,
93+ } ;
94+
8995 return (
9096 < Chart className = { 'story-chart' } >
9197 < Axis
@@ -99,7 +105,7 @@ storiesOf('Axis', module)
99105 max : 90 ,
100106 step : 1 ,
101107 } ) }
102- tickLabelPadding = { tickLabelPadding }
108+ style = { customStyle }
103109 />
104110 < Axis
105111 id = { getAxisId ( 'left' ) }
@@ -112,7 +118,7 @@ storiesOf('Axis', module)
112118 step : 1 ,
113119 } ) }
114120 tickFormat = { ( d ) => Number ( d ) . toFixed ( 2 ) }
115- tickLabelPadding = { tickLabelPadding }
121+ style = { customStyle }
116122 />
117123 < Axis
118124 id = { getAxisId ( 'top' ) }
@@ -125,7 +131,7 @@ storiesOf('Axis', module)
125131 step : 1 ,
126132 } ) }
127133 tickFormat = { ( d ) => Number ( d ) . toFixed ( 2 ) }
128- tickLabelPadding = { tickLabelPadding }
134+ style = { customStyle }
129135 />
130136 < Axis
131137 id = { getAxisId ( 'right' ) }
@@ -138,7 +144,7 @@ storiesOf('Axis', module)
138144 step : 1 ,
139145 } ) }
140146 tickFormat = { ( d ) => Number ( d ) . toFixed ( 2 ) }
141- tickLabelPadding = { tickLabelPadding }
147+ style = { customStyle }
142148 />
143149 < AreaSeries
144150 id = { getSpecId ( 'lines' ) }
@@ -323,7 +329,10 @@ storiesOf('Axis', module)
323329 . add ( 'w many tick labels' , ( ) => {
324330 const dg = new DataGenerator ( ) ;
325331 const data = dg . generateSimpleSeries ( 31 ) ;
326- const tickLabelPadding = number ( 'Axis Tick Label Padding' , 0 ) ;
332+ const customStyle = {
333+ tickLabelPadding : number ( 'Tick Label Padding' , 0 ) ,
334+ } ;
335+
327336 return (
328337 < Chart className = { 'story-chart' } >
329338 < Settings debug = { true } />
@@ -332,7 +341,7 @@ storiesOf('Axis', module)
332341 position = { Position . Bottom }
333342 title = { 'Bottom axis' }
334343 showOverlappingTicks = { true }
335- tickLabelPadding = { tickLabelPadding }
344+ style = { customStyle }
336345 />
337346 < AreaSeries
338347 id = { getSpecId ( 'lines' ) }
0 commit comments