Commit 4f57e2ec authored by Roberto Minelli's avatar Roberto Minelli
Browse files

Fixing the color gradient

parent 5c942916
......@@ -125,7 +125,8 @@ class Voronoi extends React.Component {
let baseColor = rootColors[archiveLevel];
let nodeColor = nestingLevel <= 1 ? baseColor : baseColor.brighter(0.25 * nestingLevel);
let nodeColor =
nestingLevel <= 1 ? baseColor : baseColor.brighter(0.2 * Math.min(nestingLevel, 10));
colors[node.name] = nodeColor;
});
......@@ -161,7 +162,7 @@ class Voronoi extends React.Component {
}),
);
const strokeScale = scaleLinear().range([5, 1]).domain([0, maxNesting]);
const strokeScale = scaleLinear().range([7, 2]).domain([0, maxNesting]);
const scales = {
xScale,
yScale,
......@@ -205,7 +206,7 @@ class Voronoi extends React.Component {
})
.join(' ');
})
.attr('stroke', '#888')
.attr('stroke', '#c1c1c1')
.attr('stroke-width', function (d) {
return strokeScale(d.level);
})
......@@ -379,7 +380,7 @@ class Voronoi extends React.Component {
})
.join(' ');
})
.attr('stroke', '#888')
.attr('stroke', '#c1c1c1')
.attr('name', function (d) {
return d.name;
})
......@@ -510,7 +511,7 @@ class Voronoi extends React.Component {
render() {
const { width, height } = this.props;
return (
<div className="pt-sm-2 pb-sm-5">
<div className='pt-sm-5 pb-sm-5'>
<Container>
<Row>
<Col xs={7}>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment