mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-09-26 16:58:12 +08:00
* more lint * fix typo introduced in delinting * more lint * remove dead code * lint fixes * lint
26 lines
661 B
JavaScript
26 lines
661 B
JavaScript
// jshint esversion: 6
|
|
/*****************************************
|
|
******************************************
|
|
Setup SVG & Canvas elements
|
|
******************************************
|
|
******************************************/
|
|
|
|
import * as d3 from "d3";
|
|
|
|
const setupScatterplot = (width, height, margin) => {
|
|
const container = d3.select("#scatterplot");
|
|
|
|
const svg = container
|
|
.append("svg")
|
|
.attr("width", width + margin.left + margin.right)
|
|
.attr("height", height + margin.top + margin.bottom)
|
|
.append("g")
|
|
.attr("transform", `translate(${margin.left},${margin.top})`);
|
|
|
|
return {
|
|
svg
|
|
};
|
|
};
|
|
|
|
export default setupScatterplot;
|