---
title: 组件示例
order: 2
---

## 基础用法

```jsx
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import { DemoWrapper, MiniLineChart, config } from '@linkdesign/screen';

const { _cssPrefix } = config;

class App extends Component {
  render() {
    return (
      <DemoWrapper id="demo-Chart">
        <MiniLineChart
            universalStyle={{
                height: '240px'
            }}
            title="标题"
            dataSource={
              [
                {value: 1, name: '类别1'},
                {value: 2, name: '类别2'},
                {value: 6, name: '类别1'},
                {value: 2, name: '类别2'},
                {value: 8, name: '类别1'},
                {value: 2, name: '类别2'},
              ]
            }
        />
      </DemoWrapper>
    );
  }
}

ReactDOM.render((
  <App />
), mountNode);
```
