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

## 基础用法

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

const { _cssPrefix } = config;

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

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