mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-09-19 19:08:11 +08:00
modularize axes
This commit is contained in:
19
src/components/continuous/drawAxes.js
Normal file
19
src/components/continuous/drawAxes.js
Normal file
@@ -0,0 +1,19 @@
|
||||
import styles from './parallelCoordinates.css';
|
||||
|
||||
const drawAxes = (
|
||||
svg,
|
||||
dimensions,
|
||||
xscale
|
||||
) => {
|
||||
|
||||
var axes = svg.selectAll(".parcoords_axis")
|
||||
.data(dimensions)
|
||||
.enter().append("g")
|
||||
.attr("class", `${styles.axis} parcoords_axis`)
|
||||
.attr("transform", (d,i) => { return "translate(" + xscale(i) + ")"; });
|
||||
|
||||
return axes;
|
||||
|
||||
}
|
||||
|
||||
export default drawAxes;
|
||||
Reference in New Issue
Block a user