Skip to content

xValue and yValue incorrectly computed for Bar chart #65

@eltonjude

Description

@eltonjude

Consider a Column chart and I want to draw a circle for [Europe, 0]. Works as expected - http://jsfiddle.net/a5h870wt/2/

But for a Bar chart, the circle is not at the correct place: http://jsfiddle.net/a5h870wt/3/

The solution is to swap the computed x and y if they were calculated from xValue and yValue after this line: https://github.com/blacklabel/annotations/blob/master/js/annotations.js#L602
Here's how it looks: http://jsfiddle.net/a5h870wt/4/

I have a commit here with the fix: eltonjude@d453f71

If you could suggest other properties that would have similar issue, I can include fixes for them in a PR with the above fix.

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions