hasgeek/hasjob

Job pay graph Y axis shows fractions of jobs

jace opened this issue · 2 comments

jace commented

This should not happen as the count of jobs should be whole numbers:

Fractional jobs

We've solved for this in the job detail page by specifying a custom Y axis. The same approach can be used on the job pay graph.

axis: {
x: {
type: 'category',
height: 60
},
y: {
tick: {
format: d3.format('d'),
values: data['stats']['max']<10?(function (max) {for(var i,a=[i=0];i<=max;a[i]=i++); return a})(data['stats']['max']):undefined
}
}
}

jace commented

Specifying values may not actually work, as sometimes there are hundreds of jobs and we don't want a tick for each digit. We only want the floor to be integers instead of fractions. There may be another way to achieve that.

jace commented

Correction: specifying values does work, as this graph shows.

Hasjob candidate activity sample graph