Commit da14d737 authored by Markus Scheidgen's avatar Markus Scheidgen
Browse files

Switched to square root scale for bar charts.

parent 4c928a87
Pipeline #45216 passed with stages
in 25 minutes and 28 seconds
......@@ -2,7 +2,7 @@ import React from 'react'
import PropTypes from 'prop-types'
import { withStyles, Typography } from '@material-ui/core'
import * as d3 from 'd3'
import { scaleBand, scaleLinear } from 'd3-scale'
import { scaleBand, scalePow } from 'd3-scale'
import chroma from 'chroma-js'
import repoColor from '@material-ui/core/colors/deepPurple'
......@@ -68,7 +68,7 @@ class QuantityHistogram extends React.Component {
}))
const y = scaleBand().rangeRound([0, height]).padding(0.1)
const x = scaleLinear().range([0, width])
const x = scalePow().range([0, width]).exponent(0.5)
const heatmapScale = chroma.scale(['#ffcdd2', '#d50000'])
x.domain([0, d3.max(data, d => d.value)])
......
Supports Markdown
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