Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use icons as labels in vue-chartist? #42

Open
stiofanoriain opened this issue Jul 26, 2019 · 0 comments
Open

How to use icons as labels in vue-chartist? #42

stiofanoriain opened this issue Jul 26, 2019 · 0 comments

Comments

@stiofanoriain
Copy link

It's possible to get this to work in regular chartist. You add something like this:

    .on('draw', function(data) {
        if (data.type === 'label' && data.axis.units.pos === 'y') {
            var group = new Chartist.Svg('g');
            group.append(
                new Chartist.Svg('image', {
                        'xlink:href': data.text.image,
                        y: data.y,
                        width: '23px',
                        height:data.height
                    })
            );
            data.element.replace(group);
        }
    });

But how to get this to work with vue-chartist?

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant