Skip to content
Snippets Groups Projects
Commit a07ef936 authored by Manuel Spuhler's avatar Manuel Spuhler
Browse files

fix: linter cleanup

parent 61bbc864
No related branches found
No related tags found
No related merge requests found
......@@ -23,9 +23,10 @@ export default class HistogramHandler extends BaseHandler {
data: Exareme2HistogramData,
domain: Domain,
): BarChartResult {
const lookupVar = domain.variables.find((v) => v.id === data.var);
const categories = lookupVar.type === 'nominal'
? lookupVar.enumerations.map(e => e.value)
const lookupVar = domain.variables.find((v) => v.id === data.var);
const categories =
lookupVar.type === 'nominal'
? lookupVar.enumerations.map((e) => e.value)
: (data.bins as number[])
.filter((_, i) => i < data.bins.length - 1) // upper limit counts for 1 extra
.map(
......
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