Fixed Issue #19 - Drop Lines

master 1.1.2
John Kiernander 2013-11-08 23:01:52 +00:00
parent 1f29fff591
commit d3ae295c1d
3 changed files with 18 additions and 6 deletions

10
dist/dimple.v1.1.2.js vendored
View File

@ -381,8 +381,14 @@ var dimple = {
}
}
// Populate the origin
origin = this._scale.copy()(0);
// Populate the origin. Previously this incorrectly looked up 0 on the axis which only works
// for measure axes leading to Issue #19. This fix uses the first category value in cases where
// one is required.
if (distinctCats !== null && distinctCats !== undefined && distinctCats.length > 0) {
origin = this._scale.copy()(distinctCats[0]);
} else {
origin = this._scale.copy()(0);
}
if (this._origin !== origin) {
this._previousOrigin = (this._origin === null ? origin : this._origin);

File diff suppressed because one or more lines are too long

View File

@ -170,8 +170,14 @@
}
}
// Populate the origin
origin = this._scale.copy()(0);
// Populate the origin. Previously this incorrectly looked up 0 on the axis which only works
// for measure axes leading to Issue #19. This fix uses the first category value in cases where
// one is required.
if (distinctCats !== null && distinctCats !== undefined && distinctCats.length > 0) {
origin = this._scale.copy()(distinctCats[0]);
} else {
origin = this._scale.copy()(0);
}
if (this._origin !== origin) {
this._previousOrigin = (this._origin === null ? origin : this._origin);