<script>
import { Line } from 'vue-chartjs'
import ChartMixin from '../../mixins/chartMixin'

export default {
  name: 'WaveChart',
  extends: Line,
  mixins: [ChartMixin],
  props: ['labels', 'data'],
  mounted() {
    this.preProcess()
    this.renderChart(
      {
        labels: this.$props.labels,
        datasets: this.processColors(this.$props.data),
      },
      this.chartOptions()
    )
    this.postProcess()
  },
}
</script>
