graphql2chartjs
graphql2chartjs copied to clipboard
graphql2chartjs implementation for VueJs
<ApolloQuery :query="query">
<template slot-scope="{ result: { loading, error, data } }">
<span v-if="loading">Loading...</span>
<span v-else-if="error">An error occured</span>
<section v-if="data">
<ul v-if="data">
<li :key="data.data" v-for="data in data.expenses">{{data.data}}{{data.label}}</li>
</ul>
</section>
</template>
</ApolloQuery>
Reading from your React implementation I was able to do this much, but when trying to execute
g2c.add(data,'bar');
data is not defined error is shown. Can you please post some sample code implementing graphql2chartjs in Vue