lineChat.js 743 Bytes
// packageEquity/pages/aiCheck/detail/components/lineChat/lineChat.js
import DrawLineChart from './DrawLine'
Component({

  /**
   * 组件的属性列表
   */
  properties: {
    title: String,
    lineData: Object,
    areaOptions: {
      type: Object,
      value: {
        min: 2,
        max: 4
      }
    },
    maxYNum: {
      type: Number,
      value: 10
    }
  },
  lifetimes: {
    ready() {
      const {
        lineData,
        maxYNum,
        areaOptions
      } = this.data
      new DrawLineChart('#line', {
        data: lineData.y,
        areaData: areaOptions,
        maxYNum
      }, this)
    }
  },
  /**
   * 组件的初始数据
   */
  data: {},

  /**
   * 组件的方法列表
   */
  methods: {

  }
})