File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -153,3 +153,18 @@ describe 'NVD3', ->
153
153
154
154
tick = builder .$ ' .nv-y.nv-axis .tick.zero'
155
155
tick .length .should .equal 1 , ' y axis zero'
156
+
157
+ it ' default tick format for max/min should be integer based' , ->
158
+ axis = builder .model .xAxis
159
+ builder .model .update ()
160
+ minAxisText = builder .$ (' .nv-axisMaxMin.nv-axisMaxMin-x.nv-axisMin-x text' )[0 ].textContent
161
+
162
+ minAxisText .should .equal (' -1' )
163
+
164
+ it ' tickFormatMaxMin should change tick format of max/min' , ->
165
+ axis = builder .model .xAxis
166
+ axis .tickFormatMaxMin (d3 .format (' ,.2f' ))
167
+ builder .model .update ()
168
+ minAxisText = builder .$ (' .nv-axisMaxMin.nv-axisMaxMin-x.nv-axisMin-x text' )[0 ].textContent
169
+
170
+ minAxisText .should .equal (' -1.00' )
You can’t perform that action at this time.
0 commit comments