# chart-chart-galary

> Chart gallery combining line, spline, area, column, and stacked series in one sample.

**Framework:** react  **Component:** Chart  **Variant:** chart-galary

## Get this item

**If you are an agent, fetch the JSON.** Source is inlined, so one request is enough and no tooling is required:

```
GET https://ai.syncfusion.com/r/react/js/chart-chart-galary.json
```

**Install Package(s)**

```bash
npm install @syncfusion/ej2-react-charts
```

**Notes**

- Syncfusion release: 2026 Volume 3 (v35.1.37)
- The Syncfusion package is licensed. The composition in this file is source you own and edit. See https://ai.syncfusion.com/licensing.md

## Source files

### src/components/chart-chart-galary/Chart.jsx

```jsx
import { ChartComponent, SeriesCollectionDirective, SeriesDirective, Inject, LineSeries, SplineSeries, AreaSeries, ColumnSeries, StackingColumnSeries, BarSeries, BubbleSeries, Category, Legend, Tooltip, DataLabel, Zoom, Highlight } from '@syncfusion/ej2-react-charts';

const monthlyData = [
  { x: 'Jan', y: 28 }, { x: 'Feb', y: 35 }, { x: 'Mar', y: 31 },
  { x: 'Apr', y: 46 }, { x: 'May', y: 40 }, { x: 'Jun', y: 54 },
  { x: 'Jul', y: 48 }, { x: 'Aug', y: 63 }, { x: 'Sep', y: 57 },
  { x: 'Oct', y: 72 }, { x: 'Nov', y: 66 }, { x: 'Dec', y: 82 }
];

const secondLineData = [
  { x: 'Jan', y: 18 }, { x: 'Feb', y: 24 }, { x: 'Mar', y: 22 },
  { x: 'Apr', y: 30 }, { x: 'May', y: 27 }, { x: 'Jun', y: 38 },
  { x: 'Jul', y: 34 }, { x: 'Aug', y: 43 }, { x: 'Sep', y: 39 },
  { x: 'Oct', y: 49 }, { x: 'Nov', y: 45 }, { x: 'Dec', y: 56 }
];

const stackedA = [
  { x: 'Jan', y: 18 }, { x: 'Feb', y: 22 }, { x: 'Mar', y: 19 },
  { x: 'Apr', y: 26 }, { x: 'May', y: 24 }, { x: 'Jun', y: 30 }
];

const stackedB = [
  { x: 'Jan', y: 12 }, { x: 'Feb', y: 15 }, { x: 'Mar', y: 14 },
  { x: 'Apr', y: 18 }, { x: 'May', y: 17 }, { x: 'Jun', y: 21 }
];

const ChartGallery = () => (
  <div className='control-pane'>
    <div className='control-section'>
      <ChartComponent
        id='chart-gallery-sample'
        style={{ textAlign: 'center' }}
        primaryXAxis={{ valueType: 'Category', majorGridLines: { width: 0 } }}
        primaryYAxis={{ minimum: 0, maximum: 100, interval: 20, title: 'Value' }}
        tooltip={{ enable: true, shared: true }}
        legendSettings={{ visible: true, position: 'Bottom' }}
        width='100%'
        height='500px'
      >
        <Inject services={[LineSeries, SplineSeries, AreaSeries, ColumnSeries, StackingColumnSeries, BarSeries, BubbleSeries, Category, Legend, Tooltip, DataLabel, Zoom, Highlight]} />
        <SeriesCollectionDirective>
          <SeriesDirective dataSource={monthlyData} xName='x' yName='y' name='Monthly' type='Line' width={2} fill='#3B82F6' />
          <SeriesDirective dataSource={secondLineData} xName='x' yName='y' name='Secondary' type='Spline' width={2} fill='#10B981' />
          <SeriesDirective dataSource={stackedA} xName='x' yName='y' name='Stacked A' type='StackingColumn' fill='#F59E0B' />
          <SeriesDirective dataSource={stackedB} xName='x' yName='y' name='Stacked B' type='StackingColumn' fill='#F97316' />
        </SeriesCollectionDirective>
      </ChartComponent>
    </div>
  </div>
);

export default ChartGallery;

```
