Skip to content
  • Projects
  • Groups
  • Snippets
  • Help

glsx-business / aiot-develop-platform

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 0
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Settings
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Branches
  • Tags
  • Contributors
  • Graph
  • Compare
  • Charts
Switch branch/tag
  • aiot-develop-platform
  • src
  • views
  • index
  • lineOptions.js
  • 胡悦's avatar
    所有页面及接口 · 06d31f84
    胡悦 committed Dec 22, 2020
    06d31f84
lineOptions.js 482 Bytes
RawBlameHistoryPermalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
import _ from 'lodash'
function setOptions ({ title, xAxisData, yAxisData }) {
  var options = {
    title: {
      text: title || '',
      x: '5%',
      textAlign: 'left'
    },
    xAxis: {
      type: 'category',
      data: xAxisData
    },
    yAxis: {
      type: 'value'
    },
    series: [{
      data: yAxisData,
      type: 'line'
    }],
    grid: {
      x: 50,
      y: 50,
      x2: 30,
      y2: 50
    }
  }
  return _.cloneDeep(options)
}

export { setOptions }