# chart-multiple-pane

> Multiple-pane chart compares rainfall and temperature across the year.

**Framework:** react  **Component:** Chart  **Variant:** multiple-pane

## 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/ts/chart-multiple-pane.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-multiple-pane/Chart.tsx

```tsx

import * as React from 'react';
import {
    ChartComponent,
    SeriesCollectionDirective,
    SeriesDirective,
    Inject,
    ColumnSeries,
    SplineSeries,
    Category,
    Legend,
    Tooltip,
    DataLabel,
    AxesDirective,
    AxisDirective
} from '@syncfusion/ej2-react-charts';
import { weatherData } from '../datasource/chart-data';

const primaryYAxis = {
    title: 'Rainfall',
    minimum: 0,
    maximum: 200,
    interval: 50,
    labelFormat: '{value} mm',
    lineStyle: { width: 0 },
    majorTickLines: { width: 0 },
    majorGridLines: { color: '#e5e7eb', width: 1 },
    titleStyle: { color: '#f59e0b' },
    labelStyle: { color: '#f59e0b' }
};

const temperatureAxis = {
    name: 'temperature',
    opposedPosition: true,
    title: 'Temperature',
    minimum: 0,
    maximum: 35,
    interval: 5,
    labelFormat: '{value}°C',
    lineStyle: { width: 0 },
    majorTickLines: { width: 0 },
    majorGridLines: { width: 0 },
    titleStyle: { color: '#5687c8' },
    labelStyle: { color: '#5687c8' }
};

export default function App(): React.JSX.Element {
    return (
        <div className="control-pane">
            <div className="control-section">
                <div style={{ position: 'relative', width: '100%' }}>
                    <ChartComponent
                        id="weather-data-chart"
                        style={{ textAlign: 'center' }}
                        primaryXAxis={{
                            valueType: 'Category',
                            majorGridLines: { width: 0 },
                            majorTickLines: { width: 0 },
                            lineStyle: { color: '#9ca3af', width: 1 },
                            labelStyle: { color: '#374151' }
                        }}
                        primaryYAxis={primaryYAxis}
                        title="Average Monthly Weather Data for Texas"
                        subTitle="Source: WorldClimate (www.worldclimate.com)"
                        legendSettings={{ visible: true, position: 'Bottom' }}
                        tooltip={{ enable: true, shared: true }}
                        chartArea={{ border: { width: 0 } }}
                        width="100%"
                        height="500px"
                    >
                        <Inject services={[
                            ColumnSeries,
                            SplineSeries,
                            Category,
                            Legend,
                            Tooltip,
                            DataLabel
                        ]} />

                        <SeriesCollectionDirective>
                            <SeriesDirective
                                dataSource={weatherData}
                                xName="month"
                                yName="rainfall"
                                name="Rainfall"
                                type="Column"
                                fill="#f9a11b"
                                width={2}
                                columnSpacing={0.25}
                            />

                            <SeriesDirective
                                dataSource={weatherData}
                                xName="month"
                                yName="temperature"
                                name="Temperature"
                                type="Spline"
                                yAxisName="temperature"
                                fill="#5687c8"
                                width={2.5}
                                marker={{
                                    visible: true,
                                    width: 7,
                                    height: 7,
                                    fill: '#5687c8',
                                    border: {
                                        width: 1,
                                        color: '#5687c8'
                                    }
                                }}
                            />
                        </SeriesCollectionDirective>

                        <AxesDirective>
                            <AxisDirective {...temperatureAxis} />
                        </AxesDirective>
                    </ChartComponent>

                    {/* Rain cloud annotation above March */}
                    <div
                        aria-label="Rainy weather in March"
                        title="Rainy weather"
                        style={{
                            position: 'absolute',
                            left: '30%',
                            top: '59%',
                            transform: 'translate(-50%, -50%)',
                            width: 46,
                            height: 46,
                            pointerEvents: 'none',
                            zIndex: 2
                        }}
                    >
                        <svg viewBox="0 0 48 48" width="100%" height="100%">
                            <ellipse cx="23" cy="22" rx="14" ry="10" fill="#cbd5e1" />
                            <circle cx="15" cy="20" r="8" fill="#cbd5e1" />
                            <circle cx="25" cy="14" r="10" fill="#b8c4d6" />
                            <circle cx="34" cy="21" r="7" fill="#cbd5e1" />
                            <path
                                d="M13 34 L9 40 M24 34 L20 40 M35 34 L31 40"
                                stroke="#38bdf8"
                                strokeWidth="3"
                                strokeLinecap="round"
                            />
                        </svg>
                    </div>

                    {/* Sun annotation above August */}
                    <div
                        aria-label="Sunny weather in August"
                        title="Sunny weather"
                        style={{
                            position: 'absolute',
                            left: '58.5%',
                            top: '23%',
                            transform: 'translate(-50%, -50%)',
                            width: 42,
                            height: 42,
                            pointerEvents: 'none',
                            zIndex: 2
                        }}
                    >
                        <svg viewBox="0 0 48 48" width="100%" height="100%">
                            <g
                                stroke="#fbbf24"
                                strokeWidth="3"
                                strokeLinecap="round"
                            >
                                <path d="M24 3 V9 M24 39 V45 M3 24 H9 M39 24 H45" />
                                <path d="M9 9 L13 13 M35 35 L39 39 M39 9 L35 13 M13 35 L9 39" />
                            </g>
                            <circle cx="24" cy="24" r="11" fill="#facc15" />
                        </svg>
                    </div>
                </div>
            </div>
        </div>
    );
}

```
