I would like to create bubbleChartusing dc.js with two ordinal axes. When I try to do this, all of my bubbles end at the top of the Y axis, and the Y axis does not seem to be in order from above.
Is there any way to do this right?
Here is my configuration for bubbleChart:
.dimension(dims.currencyinstrument)
.group(groups.currencyinstrument.pnlSum)
.keyAccessor(function(d) {
return d.key.split("~")[0]
})
.valueAccessor(function(d) {
return d.key.split("~")[1]
})
.radiusValueAccessor(function(d) {
return Math.abs(d.value)
})
.x(d3.scale.ordinal().domain(groups.currencyinstrument.pnlSum.all().map(function(d) {return(d.key.split("~")[0])}).unshift("")))
.y(d3.scale.ordinal().domain(groups.currencyinstrument.pnlSum.all().map(function(d) {return(d.key.split("~")[1])}).unshift("")))
.r(d3.scale.linear().domain([0,groups.currencyinstrument.pnlSum.all().map(function(d) {return(Math.abs(d.value))}).sort(function(a,b){return(b-a)})[0]]))
EDIT: here's a fiddle . Data is downloaded from GitHub (~ 1 min), but it all costs!
Chapo source
share