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

Failed to mount component #162

Closed
BenWaNH opened this issue Jan 30, 2019 · 3 comments
Closed

Failed to mount component #162

BenWaNH opened this issue Jan 30, 2019 · 3 comments
Assignees

Comments

@BenWaNH
Copy link

BenWaNH commented Jan 30, 2019

Hi!

i can't use this plugin and i don't understand why
this is my vue file component :

<template>
    <v-chart v-bind:chartData="chartData"></v-chart>
</template>


<script>
    import Chart from 'v-chart-plugin'

    export default {
        components: {
          'v-chart': Chart,
        },
        data () {
            return {
                chartData: {
                    chartType: "bubbleChart",
                    selector: "chart",
                    title: "Important Data",
                    width: 400,
                    height: 200,
                    metric: ['count', 'pyCount', 'revenue'],
                    data: [
                        {'count': 120,
                            'pyCount': 115,
                            'revenue': 170,
                            'fruit': 'apples'},
                        {'count': 250,
                            'pyCount': 255,
                            'revenue': 325,
                            'fruit': 'oranges'}
                    ]
                }
            }
        }
    }
</script>

But i've this message when compiling

[Vue warn]: Failed to mount component: template or render function not defined.

Someone can help me?!
Thanks.

@ignoreintuition
Copy link
Owner

This is a plug-in. Since you are loading it as a component it is not going to work. This article will show you step by step how to add it in as a plugin. https://link.medium.com/CQ1TaMjJTT.

@BenWaNH
Copy link
Author

BenWaNH commented Jan 30, 2019

Ok, indeed, it works better... I didn't understood that is not a component
Thanks again for your help

@ignoreintuition
Copy link
Owner

Excellent. Don’t hesitate to reach out if you have any more issues

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

2 participants