-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Description
In this codepen the first pie
graph (i.e. on the left) does not look right!
The graphs reversed and the text is presented outside
as a result of bad input data where domain.x
[1] is not greater than domain.x
[0].
We shouldn't allow that here:
Lines 111 to 132 in 99fc02f
exports.defaults = function(containerOut, layout, coerce, dfltDomains) { | |
var dfltX = (dfltDomains && dfltDomains.x) || [0, 1]; | |
var dfltY = (dfltDomains && dfltDomains.y) || [0, 1]; | |
var grid = layout.grid; | |
if(grid) { | |
var column = coerce('domain.column'); | |
if(column !== undefined) { | |
if(column < grid.columns) dfltX = grid._domains.x[column]; | |
else delete containerOut.domain.column; | |
} | |
var row = coerce('domain.row'); | |
if(row !== undefined) { | |
if(row < grid.rows) dfltY = grid._domains.y[row]; | |
else delete containerOut.domain.row; | |
} | |
} | |
coerce('domain.x', dfltX); | |
coerce('domain.y', dfltY); | |
}; |
Metadata
Metadata
Assignees
Labels
bugsomething brokensomething broken