<template>
<chart class="xp-line" :options="options" ref="line" auto-resize></chart>
</template>

<script>
import { setOptions } from './options'

export default {
  name: 'XpLine',

  data() {
    return {
      options: {},
    }
  },

  props: {
    settings: {
      type: Object,
      default: () => {}
    },
  },

  watch: {
    settings(newVal) {
      this.options = setOptions(this.settings)
    },
  },

  mounted() {
    this.options = setOptions(this.settings)
  },
}
</script>
