d3fc-webgl-hathi-explorer icon indicating copy to clipboard operation
d3fc-webgl-hathi-explorer copied to clipboard

SeriesSVGAnnotation wrapper for a d3.scaleTime

Open johncardiologs opened this issue 2 years ago • 0 comments

Hi Colin,

Thanks for this great project first off.

I'm trying to understand what's happening in annotation-series.js. My use case is a scatterplot that uses a scaleTime for the X axis (Y axis is a scaleLinear). For context, my xScale requires converting the data passed to it into a Date object first, and that's been working fine. I'm now trying to slap some annotations on everything but am having trouble using this seriesSVGAnnotation module to correctly position my annotations.

What are the two scales being defined in annotation-series.js and what do they have to do with your plot's main scales?

Moreover, I don't understand what fc.rebindAll is doing and how that's interacting with d3Annotation, or why we're sometimes assigning the xScale to an argument (which gets passed in where anyways?), but that might be less important.

Any insight / resources are helpful. Thanks for the help.

johncardiologs avatar May 12 '22 20:05 johncardiologs