Navigation Menu

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

[Vue warn]: Error in nextTick: "TypeError: Cannot read property 'clear' of undefined" #6

Closed
Julian367 opened this issue Dec 6, 2017 · 4 comments
Labels

Comments

@Julian367
Copy link

Hello,
As title say I get this error and donut chart is not show

@bbonnin
Copy link
Owner

bbonnin commented Dec 6, 2017

Hello,
Could you provide more information about your context ? Version, code snippets, ...
Thanks !

@Julian367
Copy link
Author

Julian367 commented Dec 6, 2017

Hello,
Thank you for your fast replay. I'm using latest version 0.0.9. Here is my code

<template>
    <div>
        <donut-chart
                id="donut"
                :data="donutData"
                colors='[ "#1ab394", "#ff000a", "#867389"]'
                resize="true">
        </donut-chart>
    </div>
</template>

<script>
    import Raphael from 'raphael/raphael'
    global.Raphael = Raphael
    import {DonutChart} from 'vue-morris'
    export default {
        props: ["profileUserId"],
        components: {
            DonutChart,
        },
        data() {
            return {
                donutData: []
            }
        },
        mounted () {
            this.fetchAllUserStatistics()
        },
        methods: {
            fetchAllUserStatistics() {
                let vm = this
                axios.get('/api/user-statistics/' + this.profileUserId).then(
                    function (response) {
                        vm.donutData = response.data.chartData
                    }
                )
            }
        },
    }
</script>

chartData looks like this

[
{
"label": "Test1",
"value": 73
},
{
"label": "Test2",
"value": 71
},
{
"label": "Test3",
"value": 28
}
]

@bbonnin bbonnin added the bug label Dec 6, 2017
@bbonnin
Copy link
Owner

bbonnin commented Dec 6, 2017

Thanks for reporting this bug.

bbonnin added a commit that referenced this issue Dec 6, 2017
@bbonnin
Copy link
Owner

bbonnin commented Dec 6, 2017

Fix v0.0.10

@bbonnin bbonnin closed this as completed Dec 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants