I'm updating some old website code for some charts in D3.
I've added a new category to the chart and the value of that category far exceeds the values of the other existing categories, which presents a problem for the Y axis since some of the categories are no longer visible.
Are there easy ways to solve this problem? The bar chart is showing the count of features in the associated map with each value.
I haven't found a way to use a log axis (see code below), I'm unable to change the input data since it's coming from a third party. Resizing the chart would cause issues since it's one of several charts on the page.
original:
new:
here's the code creating the chart currently:
existingBikewayChart
.width(300)
.height(200)
.dimension(existingBikewayDimension)
.group(existingBikewayDimensionGroup)
.x(d3.scaleBand())
.xUnits(dc.units.ordinal)
.elasticY(true)
.title(function (p) {
return p.key + ': ' + numberWithCommas(p.value.toFixed(1)) + ' Miles'
})
.ordinalColors(bluesList);
I've tried adding .y(d3.scaleLog()) but it blanks the chart out entirely.

