# chart-combination-chart

> Multi-series combination chart with spline area, column series, and custom legend with April promotion strip line.

**Framework:** angular  **Component:** Chart  **Variant:** combination-chart

## 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/angular/chart-combination-chart.json
```

**Install Package(s)**

```bash
npm install @syncfusion/ej2-angular-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-combination-chart/combination-chart.component.html

```html
<div class="business-performance">
    <div class="business-chart-title">
        Business Revenue, Profit and Order Performance
    </div>

    <div class="business-chart-subtitle">
        Monthly performance analysis | January – June 2024
    </div>

    <ejs-chart id="business-performance-chart" height="500px" width="100%" background="transparent"
        [primaryXAxis]="primaryXAxis" [primaryYAxis]="primaryYAxis"
        [tooltip]="tooltip" [crosshair]="crosshair" [legendSettings]="legendSettings"
        [chartArea]="chartArea" (legendRender)="legendRender($event)">
        <e-axes>
            <e-axis name="ordersAxis" [opposedPosition]="true" [minimum]="0" [maximum]="600" [interval]="100"
                title="Orders (Count)" [majorGridLines]="zeroLine" [majorTickLines]="zeroLine"
                [lineStyle]="zeroLine"></e-axis>
        </e-axes>

        <e-series-collection>
            <!-- Revenue - Spline -->
            <e-series [dataSource]="businessData" xName="month" yName="revenue" name="Revenue" type="Spline"
                [width]="2.5" fill="#1683ed" [marker]="revenueMarker"></e-series>

            <!-- Profit - Spline Area -->
            <e-series [dataSource]="businessData" xName="month" yName="profit" name="Profit" type="SplineArea"
                [width]="2" fill="#16a765" [opacity]="0.20" [border]="profitBorder"
                [marker]="profitMarker"></e-series>

            <!-- Orders - Column -->
            <e-series [dataSource]="businessData" xName="month" yName="orders" name="Orders" type="Column"
                yAxisName="ordersAxis" fill="#9747ff" [columnWidth]="0.5" [columnSpacing]="0.2"></e-series>
        </e-series-collection>
    </ejs-chart>

    <div style="text-align: center; color: #64748b; font-size: 11px; margin-top: 4px;">
        April represents the promotional campaign period.
        The orange strip line indicates the $80K revenue target.
    </div>
</div>

```

### src/components/chart-combination-chart/combination-chart.component.ts

```typescript
import { Component, ViewEncapsulation } from '@angular/core';
import {
    ChartModule,
    CategoryService,
    SplineSeriesService,
    SplineAreaSeriesService,
    ColumnSeriesService,
    LegendService,
    TooltipService,
    CrosshairService,
    StripLineService,
    DataLabelService,
    type AxisModel,
    type LegendSettingsModel,
    type MarkerSettingsModel,
    type TooltipSettingsModel,
    type CrosshairSettingsModel,
    type ChartAreaModel,
    type BorderModel,
    type ILegendRenderEventArgs
} from '@syncfusion/ej2-angular-charts';

interface BusinessData {
    month: string;
    revenue: number;
    profit: number;
    orders: number;
    revenueLabel: string;
    profitLabel: string;
}

// Custom legend template.
// Avoid fixed widths so the legend layout can calculate item spacing naturally.
const legendTemplate: string =
    '<div style="display:inline-flex;align-items:center;gap:12px;padding:10px 16px;min-height:68px;box-sizing:border-box;border:1px solid #e2e8f0;border-radius:10px;background:#ffffff;white-space:nowrap;cursor:pointer;">' +
        '<span style="display:flex;align-items:center;justify-content:center;min-width:28px;font-size:25px;font-weight:600;color:{{color}};">{{icon}}</span>' +
        '<div style="display:flex;flex-direction:column;gap:3px;">' +
            '<span style="font-size:16px;font-weight:600;color:#1e293b;">{{title}}</span>' +
            '<span style="font-size:12px;color:#64748b;">{{description}}</span>' +
        '</div>' +
    '</div>';

@Component({
    selector: 'app-combination-chart',
    standalone: true,
    imports: [ChartModule],
    providers: [
        CategoryService, SplineSeriesService, SplineAreaSeriesService, ColumnSeriesService,
        LegendService, TooltipService, CrosshairService, StripLineService, DataLabelService
    ],
    templateUrl: './combination-chart.component.html',
    styleUrls: ['../styles/combination-chart.component.css'],
    encapsulation: ViewEncapsulation.None
})
export class CombinationChartComponent {
    public businessData: BusinessData[] = [
        { month: 'Jan', revenue: 65000, profit: 18000, orders: 240, revenueLabel: '$65K', profitLabel: '$18K' },
        { month: 'Feb', revenue: 72000, profit: 22000, orders: 270, revenueLabel: '$72K', profitLabel: '$22K' },
        { month: 'Mar', revenue: 81000, profit: 25000, orders: 340, revenueLabel: '$81K', profitLabel: '$25K' },
        { month: 'Apr', revenue: 76000, profit: 21000, orders: 310, revenueLabel: '$76K', profitLabel: '$21K' },
        { month: 'May', revenue: 94000, profit: 31000, orders: 390, revenueLabel: '$94K', profitLabel: '$31K' },
        { month: 'Jun', revenue: 102000, profit: 34000, orders: 420, revenueLabel: '$102K', profitLabel: '$34K' }
    ];

    public legendSettings: LegendSettingsModel = {
        visible: true,
        position: 'Top',
        alignment: 'Center',
        layout: 'Horizontal',
        width: '100%',
        height: '95px',
        itemPadding: 15,
        enablePages: false,
        template: legendTemplate
    };

    // X-axis with April promotional campaign strip line.
    public primaryXAxis: AxisModel = {
        valueType: 'Category',
        majorGridLines: { width: 0 },
        majorTickLines: { width: 0 },
        lineStyle: { color: '#cbd5e1', width: 1 },
        labelStyle: { color: '#64748b', size: '12px' },
        stripLines: [
            {
                start: 3,
                end: 4,
                color: '#a855f7',
                opacity: 0.14,
                visible: true,
                text: 'April Promotion',
                horizontalAlignment: 'Middle',
                verticalAlignment: 'Middle',
                rotation: -90,
                zIndex: 'Behind',
                textStyle: { color: '#7e22ce', size: '11px', fontWeight: '600' }
            }
        ]
    };

    // Primary Y-axis with $80K revenue target.
    public primaryYAxis: AxisModel = {
        minimum: 0,
        maximum: 120000,
        interval: 20000,
        title: 'Amount ($ in Thousands)',
        labelFormat: '${value}',
        majorGridLines: { width: 1, color: '#e2e8f0', dashArray: '3,3' },
        majorTickLines: { width: 0 },
        lineStyle: { width: 0 },
        labelStyle: { color: '#64748b', size: '11px' },
        stripLines: [
            {
                start: 80000,
                end: 80500,
                color: '#f59e0b',
                opacity: 0.12,
                visible: true,
                text: 'Revenue Target: $80K',
                horizontalAlignment: 'End',
                verticalAlignment: 'Start',
                rotation: 0,
                zIndex: 'Over',
                textStyle: { color: '#b45309', size: '11px', fontWeight: '600' },
                border: { color: '#f59e0b', width: 1 }
            }
        ]
    };

    public tooltip: TooltipSettingsModel = { enable: true, shared: true };

    public crosshair: CrosshairSettingsModel = {
        enable: true,
        lineType: 'Vertical',
        line: { color: '#94a3b8', width: 1, dashArray: '4,4' }
    };

    public chartArea: ChartAreaModel = { border: { width: 0 } };

    public zeroLine: { width: number } = { width: 0 };

    // Revenue data labels: name maps revenueLabel to point.text.
    public revenueMarker: MarkerSettingsModel = {
        visible: true,
        width: 7,
        height: 7,
        shape: 'Circle',
        fill: '#ffffff',
        border: { color: '#1683ed', width: 2 },
        dataLabel: {
            visible: true,
            name: 'revenueLabel',
            template:
                '<div style="padding:4px 7px;border:1px solid #1683ed;border-radius:5px;background:#ffffff;color:#1683ed;font-size:11px;font-weight:600;white-space:nowrap;">${point.text}</div>',
            position: 'Top'
        }
    };

    // Profit markers.
    public profitMarker: MarkerSettingsModel = {
        visible: true,
        width: 6,
        height: 6,
        shape: 'Circle',
        fill: '#ffffff',
        border: { color: '#16a765', width: 2 }
    };

    public profitBorder: BorderModel = { color: '#16a765', width: 2 };

    // Customize legend content for each series.
    public legendRender(args: ILegendRenderEventArgs): void {
        const legendDetails: Record<string, { icon: string; description: string }> = {
            Revenue: { icon: '↗', description: '($ in Thousands)' },
            Profit: { icon: '⌁', description: '($ in Thousands)' },
            Orders: { icon: '▮', description: '(Count)' }
        };

        const details: { icon: string; description: string } = legendDetails[args.text];

        if (!details) {
            return;
        }

        args.template = legendTemplate
            .replace('{{color}}', args.fill)
            .replace('{{icon}}', details.icon)
            .replace('{{title}}', args.text)
            .replace('{{description}}', details.description);
    }
}

```
