Chart annotations only worked when the chart plots a single data
series. If the chart used the “Group By” option, the calculation of
which point on the X-axis to render the annotation at was incorrect,
causing the selector for the chart element to return undefined.
There doesn’t seem to be away to access the chart options, so I had to
add a group_by option to the chartAnnotations() function, which
should mirror the Group By setting of the chart. If there is a way to access the chart options, I'd be more than happy to use that instead, but I can't find any API documentation.
Chart annotations only worked when the chart plots a single data series. If the chart used the “Group By” option, the calculation of which point on the X-axis to render the annotation at was incorrect, causing the selector for the chart element to return
undefined
.There doesn’t seem to be away to access the chart options, so I had to add a
group_by
option to thechartAnnotations()
function, which should mirror the Group By setting of the chart. If there is a way to access the chart options, I'd be more than happy to use that instead, but I can't find any API documentation.This fixes #2 .