@sensecare/multi-bar-chart
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

多系列柱状图

/**
 * 名称:多系列柱状图
 * @param {*} id 当前选中容器
 * @param {*} seriesData 当前数据
 * @param {*} xData 当前x轴数据
 * @param {*} chartMap 当前图表实例组合
 * @param {*} color 自定义bar颜色集合
 **/

 import { initMultiBarCharts } from 'xxx'

    const chartMap = new Map();
    const seriesData = [
    {
      name: 'Forest',
      data: [320, 332, 301, 334, 390]
    },
    {
      name: 'Steppe',
      data: [220, 182, 191, 234, 290]
    },
    {
      name: 'Desert',
      data: [150, 232, 201, 154, 190]
    },
    {
      name: 'Wetland',
      data: [98, 77, 101, 99, 40]
    }
  ]
  const xData = ['2012', '2013', '2014', '2015', '2016']
  // 生成多系列柱状图实例 
  initMultiBarCharts({
    seriesData,
    xData,
    id: 'multiBarChart',
    chartMap,
    color: ['#2777EC', '#2EACFF', 'red', 'yellow']
  })

Readme

Keywords

Package Sidebar

Install

npm i @sensecare/multi-bar-chart

Weekly Downloads

0

Version

1.0.3

License

ISC

Unpacked Size

8.89 kB

Total Files

9

Last publish

Collaborators

  • sensecare