@@ -142,7 +142,7 @@ describe('heatmap calc / setPositions', function() {
142
142
assertPtField ( out , 'p' , [ [ 0 , 1 , 2 ] , [ 0 , 1 , 2 ] , [ 0 , 1 , 2 ] ] ) ;
143
143
assertTraceField ( out , 't.barwidth' , [ 0.8 , 0.8 , 0.8 ] ) ;
144
144
assertTraceField ( out , 't.poffset' , [ - 0.4 , - 0.4 , - 0.4 ] ) ;
145
- assertTraceField ( out , 't.dbar ' , [ 1 , 1 , 1 ] ) ;
145
+ assertTraceField ( out , 't.bargroupwidth ' , [ 0.8 , 0.8 , 0.8 ] ) ;
146
146
} ) ;
147
147
148
148
it ( 'should fill in calc pt fields (overlay case)' , function ( ) {
@@ -161,7 +161,7 @@ describe('heatmap calc / setPositions', function() {
161
161
assertPtField ( out , 'p' , [ [ 0 , 1 , 2 ] , [ 0 , 1 , 2 ] ] ) ;
162
162
assertTraceField ( out , 't.barwidth' , [ 0.8 , 0.8 ] ) ;
163
163
assertTraceField ( out , 't.poffset' , [ - 0.4 , - 0.4 ] ) ;
164
- assertTraceField ( out , 't.dbar ' , [ 1 , 1 ] ) ;
164
+ assertTraceField ( out , 't.bargroupwidth ' , [ 0.8 , 0.8 ] ) ;
165
165
} ) ;
166
166
167
167
it ( 'should fill in calc pt fields (group case)' , function ( ) {
@@ -170,17 +170,19 @@ describe('heatmap calc / setPositions', function() {
170
170
} , {
171
171
y : [ 3 , 1 , 2 ]
172
172
} ] , {
173
- barmode : 'group'
173
+ barmode : 'group' ,
174
+ // asumming default bargap is 0.2
175
+ bargroupgap : 0.1
174
176
} ) ;
175
177
176
178
assertPtField ( out , 'x' , [ [ - 0.2 , 0.8 , 1.8 ] , [ 0.2 , 1.2 , 2.2 ] ] ) ;
177
179
assertPtField ( out , 'y' , [ [ 2 , 1 , 2 ] , [ 3 , 1 , 2 ] ] ) ;
178
180
assertPtField ( out , 'b' , [ [ 0 , 0 , 0 ] , [ 0 , 0 , 0 ] ] ) ;
179
181
assertPtField ( out , 's' , [ [ 2 , 1 , 2 ] , [ 3 , 1 , 2 ] ] ) ;
180
182
assertPtField ( out , 'p' , [ [ 0 , 1 , 2 ] , [ 0 , 1 , 2 ] ] ) ;
181
- assertTraceField ( out , 't.barwidth' , [ 0.4 , 0.4 ] ) ;
182
- assertTraceField ( out , 't.poffset' , [ - 0.4 , 0 ] ) ;
183
- assertTraceField ( out , 't.dbar ' , [ 1 , 1 ] ) ;
183
+ assertTraceField ( out , 't.barwidth' , [ 0.36 , 0.36 ] ) ;
184
+ assertTraceField ( out , 't.poffset' , [ - 0.38 , 0.02 ] ) ;
185
+ assertTraceField ( out , 't.bargroupwidth ' , [ 0.8 , 0.8 ] ) ;
184
186
} ) ;
185
187
186
188
it ( 'should fill in calc pt fields (relative case)' , function ( ) {
@@ -199,7 +201,7 @@ describe('heatmap calc / setPositions', function() {
199
201
assertPtField ( out , 'p' , [ [ 0 , 1 , 2 ] , [ 0 , 1 , 2 ] ] ) ;
200
202
assertTraceField ( out , 't.barwidth' , [ 0.8 , 0.8 ] ) ;
201
203
assertTraceField ( out , 't.poffset' , [ - 0.4 , - 0.4 ] ) ;
202
- assertTraceField ( out , 't.dbar ' , [ 1 , 1 ] ) ;
204
+ assertTraceField ( out , 't.bargroupwidth ' , [ 0.8 , 0.8 ] ) ;
203
205
} ) ;
204
206
205
207
it ( 'should fill in calc pt fields (relative / percent case)' , function ( ) {
@@ -221,6 +223,6 @@ describe('heatmap calc / setPositions', function() {
221
223
assertPtField ( out , 'p' , [ [ 0 , 1 , 2 , 3 ] , [ 0 , 1 , 2 , 3 ] ] ) ;
222
224
assertTraceField ( out , 't.barwidth' , [ 0.8 , 0.8 ] ) ;
223
225
assertTraceField ( out , 't.poffset' , [ - 0.4 , - 0.4 ] ) ;
224
- assertTraceField ( out , 't.dbar ' , [ 1 , 1 ] ) ;
226
+ assertTraceField ( out , 't.bargroupwidth ' , [ 0.8 , 0.8 ] ) ;
225
227
} ) ;
226
228
} ) ;
0 commit comments