mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-10-03 23:18:11 +08:00
move graph scales, still hardcoded, into globals
This commit is contained in:
@@ -41,3 +41,21 @@ export const API = {
|
||||
export const accentFont = "Georgia,Times,Times New Roman,serif";
|
||||
export const maxParagraphWidth = 600;
|
||||
export const maxControlsWidth = 800;
|
||||
|
||||
export const graphMargin = {top: 20, right: 10, bottom: 30, left: 40};
|
||||
export const graphWidth = 960;
|
||||
export const graphHeight = 500;
|
||||
|
||||
export const graphXScale = d3.scaleLinear()
|
||||
.domain([0, 1]) /* while this is the default for d3, our data is normalized so better to be explicit */
|
||||
.range([
|
||||
0 + graphMargin.left,
|
||||
graphWidth - graphMargin.right
|
||||
]);
|
||||
|
||||
export const graphYScale = d3.scaleLinear()
|
||||
.domain([0, 1]) /* while this is the default for d3, our data is normalized so better to be explicit */
|
||||
.range([
|
||||
graphHeight - graphMargin.bottom,
|
||||
0 + graphMargin.top
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user