Skip to content

Commit

Permalink
Fixed Issue #19 - Drop Lines
Browse files Browse the repository at this point in the history
  • Loading branch information
johnkiernander committed Nov 8, 2013
1 parent 1f29fff commit d3ae295
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
10 changes: 8 additions & 2 deletions dist/dimple.v1.1.2.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Loading

0 comments on commit d3ae295

Please sign in to comment.