[Vuejs]-Concat two scripts

1👍

✅

To merge the two scripts you would just simply:

<script>
import PieChart from "@/PieChart.js"
import GETUSER from "@/graphql/getUser.gql"

export default {
  name: "App",
  props: ["user"],
  components: {
    PieChart
  },
  data() {
    return {
      id: this.$route.params.id,
      panels:{
          'X': false,
          'Y': false
      },
      chartOptions: {
        hoverBorderWidth: 20
      },
      chartData: {
        hoverBackgroundColor: "red",
        hoverBorderWidth: 10,
        labels: ["Green", "Red", "Blue"],
        datasets: [
          {
            label: "Data One",
            backgroundColor: ["#41B883", "#E46651", "#00D8FF"],
            data: [1, 10, 5]
          }
        ]
      }
    }
  }
}
</script>

Note: you have imported GETUSER but don’t seem to be using it?

Leave a comment