chartist-plugin-pointlabels icon indicating copy to clipboard operation
chartist-plugin-pointlabels copied to clipboard

[object Object] instead of data

Open Neurodriver opened this issue 9 years ago • 8 comments

Plugin is showing just [object Object] instead of data from series. Problem is visible on demo page as well: https://gionkunz.github.io/chartist-js/plugins.html

Neurodriver avatar Jun 14 '15 20:06 Neurodriver

I'm seeing this too, I'll try and see what is wrong and submit a PR if I can work it out...

astanb avatar Jun 23 '15 13:06 astanb

+1

kaspar-allenbach avatar Jun 23 '15 15:06 kaspar-allenbach

Hi there. Unfortunately I can't look into this right now. The issue is that value objects are now two dimensional and the plugin needs to be updated. Instead of using value to create the label, this expression should be used instead: value.x === undefined ? value.y : value.x + ', ' + value.y. A PR would be much appreciated.

gionkunz avatar Jun 23 '15 21:06 gionkunz

Hi, I worked it out and have a PR ready to submit, I will send it over tomorrow morning with the fix.

astanb avatar Jun 23 '15 21:06 astanb

:+1:

gionkunz avatar Jun 23 '15 21:06 gionkunz

PR https://github.com/gionkunz/chartist-plugin-pointlabels/pull/4 submitted, hope I've done it properly - It's my first one ;)

astanb avatar Jun 24 '15 09:06 astanb

I've published 0.0.4 with your changes @alexstanbury

gionkunz avatar Jun 24 '15 10:06 gionkunz

@Neurodriver can you also verify if the issue is resolved on your side?

gionkunz avatar Jun 24 '15 10:06 gionkunz