mirror of
https://github.com/PostHog/posthog.git
synced 2024-12-01 12:21:02 +01:00
Fix SI units less than 1 on time to convert (#5403)
This commit is contained in:
parent
e245cfbd93
commit
105f99f5ef
@ -63,13 +63,11 @@ export function Histogram({
|
||||
})
|
||||
|
||||
// y-axis scale
|
||||
const y = d3
|
||||
.scaleLinear()
|
||||
.domain([0, d3.max(data, (d: HistogramDatum) => d.count) as number])
|
||||
.range(config.ranges.y)
|
||||
.nice()
|
||||
const yMax = d3.max(data, (d: HistogramDatum) => d.count) as number
|
||||
const y = d3.scaleLinear().domain([0, yMax]).range(config.ranges.y).nice()
|
||||
const yAxis = config.axisFn
|
||||
.y(y)
|
||||
.tickValues(y.ticks().filter((tick) => Number.isInteger(tick)))
|
||||
.tickSize(0)
|
||||
.tickFormat((v: number) => {
|
||||
const count = formatYTickLabel(v)
|
||||
|
Loading…
Reference in New Issue
Block a user