mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-09-25 11:08:11 +08:00
test for world, graph border, legend label (#378)
* test for world, graph border, legend label * typo
This commit is contained in:
@@ -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 => ({
|
||||
|
||||
Reference in New Issue
Block a user