Hello!
I am using the ScatterPlot to display 70K points.
The plot shows up fine using SVG, but when I use the option
useCanvas(true) the data points disappear, and all the SVG components (Axis, grid lines, etc) are shown normally.
In the debug I can see that all the data is being drawn to the canvas.
I could also see that in my case the canvas is not aligned with the SVG, as it is in the examples in the dc webpage.
I am using dc.js 4.2.7 with Vue.
Any suggestions?
The code I am using is this one:
var Chart = new dc.ScatterPlot("#prodIrrad-chart")
Chart
.height(200)
.margins(margins)
.useCanvas(true)
.dimension(Dim)
.group(Group)
.keyAccessor (function (d) { return d.key[0] })
.valueAccessor(function (d) { return d.key[1] })
.colorAccessor(function (d) { return d.key[2] })
.colors(function(colorKey) { return plotColorMap[colorKey]; })
.x(d3.scaleLinear().domain([0, this.max_val]))
.symbolSize(1.5)
.brushOn(false)
.renderHorizontalGridLines(true)
.excludedOpacity(0.5)
.excludedColor(
'#ddd'
)
.highlightedSize(4)
.title(function(d) { return 'Flag: ' + d.key[2] + '\n' +
'Value: ' + d.key[1] })
Thank you!