0.0.2 • Published 1 year ago

@zsqcli/lchart v0.0.2

Weekly downloads
-
License
-
Repository
-
Last release
1 year ago

一:说明: 基础折线图组件

二:使用: npm i @zsqcli/lchart

import React from 'react'; import Lchart from '@zsqcli/lchart';

const MyComponent = () => { return ( <Lchart draggable={true} configer={ x: 0, y: 0, clazz : '', params : {}, url: , method: 'get', data: [3,1,0,0,4,0,0,2,3,4,0,1,0,0], xdata: '4-1','4-2','4-3','4-4','4-5','4-6','4-7', width: '400px', height: '200px', lineWidth: 2,

    color: ['#3AECF6', '#FDDD7B'],
    colorLs: [
      ['rgba(58, 236, 246, 0.7)',
      'rgba(58, 236, 246, 0.2)'],
      ['rgba(253, 221, 123, 0.7)',
      'rgba(253, 221, 123, 0.2)']
    ],
    legendData: ['加分项目', '减分项目'],
    options: {}
  }
/>

) }

三:字段说明 x: y: clazz: 可添加的组件的className params: 请求的传参参数 url: 请求的url地址 method: 请求方式 width: 组件的整体宽度 height: 组件的整体高度 data:数据 xdata:x轴数据 lineWidth:线条宽度 color:线条颜色 colorLs:折线覆盖面颜色 legendData:图例数据 options:饼图option选项