test for world, graph border, legend label (#378)

* test for world, graph border, legend label

* typo
This commit is contained in:
Colin Megill
2018-10-25 12:16:55 -04:00
committed by GitHub
parent 94f95d6565
commit d221d76be6
4 changed files with 49 additions and 24 deletions
+10 -10
View File
@@ -6,7 +6,7 @@ import { interpolateViridis } from "d3-scale-chromatic";
// create continuous color legend
// http://bl.ocks.org/syntagmatic/e8ccca52559796be775553b467593a9f
const continuous = (selectorId, colorscale) => {
const continuous = (selectorId, colorscale, colorAccessor) => {
const legendheight = 200;
const legendwidth = 80;
const margin = { top: 10, right: 60, bottom: 10, left: 2 };
@@ -86,15 +86,15 @@ const continuous = (selectorId, colorscale) => {
.call(legendaxis);
// text label for the y axis
// svg
// .append("text")
// .attr("transform", "rotate(-90)")
// .attr("y", 3)
// .attr("x", 0 - legendheight / 2)
// .attr("dy", "1em")
// .style("text-anchor", "middle")
// .style("fill", "white")
// .text(colorAccessor);
svg
.append("text")
.attr("transform", "rotate(-90)")
.attr("y", 2)
.attr("x", 0 - legendheight / 2)
.attr("dy", "1em")
.style("text-anchor", "middle")
.style("fill", "white")
.text(colorAccessor);
};
@connect(state => ({