Using d3.svg.axis instead of custom axis implementation on heatmap #919
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is probably the more desired change to the heatmap (instead of #908), which is to use
d3.svg.axis
instead of a one off implementation. I imagine our original heatmap implementation was borrowed from: http://bl.ocks.org/tjdecke/5558084which also doesn't use d3.svg.axis.
The domain line and ticks have been set to
opacity: 0
for consistency of look and feel.Also as a one off, this properly uses the ordinal scales
rangeBand()
function to give the correct width/height of a heatmap box.Working fiddle to show off the changes:
http://jsfiddle.net/dybtxu3s/
Broke some tests though :( Will fix them first thing tomorrow.