{
  "$schema": "https://ai.syncfusion.com/schema/registry-item.json",
  "name": "chart-combination-chart",
  "framework": "react",
  "type": "registry:component",
  "component": "Chart",
  "variant": "combination-chart",
  "dependencies": [
    "@syncfusion/ej2-react-charts"
  ],
  "description": "Combination chart blends columns and a trend line to compare performance metrics.",
  "meta": {
    "essentialStudioRelease": "2026 Volume 3 (v35.1.37)",
    "license": "commercial-or-community",
    "licenseNote": "The Syncfusion package is licensed. The composition in this file is source you own and edit. See https://ai.syncfusion.com/licensing.md",
    "requiresLicenseKey": true,
    "requiresServerEndpoint": false,
    "platformIndex": "https://ai.syncfusion.com/react/llms.txt",
    "skillPack": "syncfusion/react-ui-components-skills",
    "docs": "https://ai.syncfusion.com/gallery/react/ts/chart-combination-chart.md"
  },
  "files": [
    {
      "target": "src/components/chart-combination-chart/Chart.tsx",
      "content": "\n\nimport {\n    ChartComponent,\n    SeriesCollectionDirective,\n    SeriesDirective,\n    AxesDirective,\n    AxisDirective,\n    Inject,\n    Category,\n    SplineSeries,\n    SplineAreaSeries,\n    ColumnSeries,\n    Legend,\n    Tooltip,\n    Crosshair,\n    StripLine,\n    DataLabel,\n    type AxisModel,\n    type LegendSettingsModel,\n   type  ILegendRenderEventArgs\n} from '@syncfusion/ej2-react-charts';\n\ninterface BusinessData {\n    month: string;\n    revenue: number;\n    profit: number;\n    orders: number;\n    revenueLabel: string;\n    profitLabel: string;\n}\n\nconst businessData: BusinessData[] = [\n    { month: 'Jan', revenue: 65000, profit: 18000, orders: 240, revenueLabel: '$65K', profitLabel: '$18K' },\n    { month: 'Feb', revenue: 72000, profit: 22000, orders: 270, revenueLabel: '$72K', profitLabel: '$22K' },\n    { month: 'Mar', revenue: 81000, profit: 25000, orders: 340, revenueLabel: '$81K', profitLabel: '$25K' },\n    { month: 'Apr', revenue: 76000, profit: 21000, orders: 310, revenueLabel: '$76K', profitLabel: '$21K' },\n    { month: 'May', revenue: 94000, profit: 31000, orders: 390, revenueLabel: '$94K', profitLabel: '$31K' },\n    { month: 'Jun', revenue: 102000, profit: 34000, orders: 420, revenueLabel: '$102K', profitLabel: '$34K' }\n];\n\n// Custom legend template.\n// Avoid fixed widths so the legend layout can calculate item spacing naturally.\nconst legendTemplate =\n    '<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;\">' +\n        '<span style=\"display:flex;align-items:center;justify-content:center;min-width:28px;font-size:25px;font-weight:600;color:{{color}};\">{{icon}}</span>' +\n        '<div style=\"display:flex;flex-direction:column;gap:3px;\">' +\n            '<span style=\"font-size:16px;font-weight:600;color:#1e293b;\">{{title}}</span>' +\n            '<span style=\"font-size:12px;color:#64748b;\">{{description}}</span>' +\n        '</div>' +\n    '</div>';\n\nconst legendSettings: LegendSettingsModel = {\n    visible: true,\n    position: 'Top',\n    alignment: 'Center',\n    layout: 'Horizontal',\n    width: '100%',\n    height: '95px',\n    itemPadding: 15,\n    enablePages: false,\n    template: legendTemplate\n};\n\n// Customize legend content for each series.\nconst handleLegendRender = (args: ILegendRenderEventArgs): void => {\n    const legendDetails: Record<string, { icon: string; description: string }> = {\n        Revenue: {\n            icon: '↗',\n            description: '($ in Thousands)'\n        },\n        Profit: {\n            icon: '⌁',\n            description: '($ in Thousands)'\n        },\n        Orders: {\n            icon: '▮',\n            description: '(Count)'\n        }\n    };\n\n    const details = legendDetails[args.text];\n\n    if (!details) {\n        return;\n    }\n\n    args.template = legendTemplate\n        .replace('{{color}}', args.fill)\n        .replace('{{icon}}', details.icon)\n        .replace('{{title}}', args.text)\n        .replace('{{description}}', details.description);\n};\n\n// X-axis with April promotional campaign strip line.\nconst primaryXAxis: AxisModel = {\n    valueType: 'Category',\n    majorGridLines: { width: 0 },\n    majorTickLines: { width: 0 },\n    lineStyle: {\n        color: '#cbd5e1',\n        width: 1\n    },\n    labelStyle: {\n        color: '#64748b',\n        size: '12px'\n    },\n    stripLines: [\n        {\n            start: 3,\n            end: 4,\n            color: '#a855f7',\n            opacity: 0.14,\n            visible: true,\n            text: 'April Promotion',\n            horizontalAlignment: 'Middle',\n            verticalAlignment: 'Middle',\n            rotation: -90,\n            zIndex: 'Behind',\n            textStyle: {\n                color: '#7e22ce',\n                size: '11px',\n                fontWeight: '600'\n            }\n        }\n    ]\n};\n\n// Primary Y-axis with $80K revenue target.\nconst primaryYAxis: AxisModel = {\n    minimum: 0,\n    maximum: 120000,\n    interval: 20000,\n    title: 'Amount ($ in Thousands)',\n    labelFormat: '${value}',\n    majorGridLines: {\n        width: 1,\n        color: '#e2e8f0',\n        dashArray: '3,3'\n    },\n    majorTickLines: { width: 0 },\n    lineStyle: { width: 0 },\n    labelStyle: {\n        color: '#64748b',\n        size: '11px'\n    },\n    stripLines: [\n        {\n            start: 80000,\n            end: 80500,\n            color: '#f59e0b',\n            opacity: 0.12,\n            visible: true,\n            text: 'Revenue Target: $80K',\n            horizontalAlignment: 'End',\n            verticalAlignment: 'Start',\n            rotation: 0,\n            zIndex: 'Over',\n            textStyle: {\n                color: '#b45309',\n                size: '11px',\n                fontWeight: '600'\n            },\n            border: {\n                color: '#f59e0b',\n                width: 1\n            }\n        }\n    ]\n};\n\n\n\n// Revenue data labels: name maps revenueLabel to point.text.\nconst revenueMarker = {\n    visible: true,\n    width: 7,\n    height: 7,\n    shape: 'Circle' as const,\n    fill: '#ffffff',\n    border: {\n        color: '#1683ed',\n        width: 2\n    },\n    dataLabel: {\n        visible: true,\n        name: 'revenueLabel',\n        template:\n            '<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>',\n        position: 'Top' as const\n    }\n};\n\n// Profit data labels: name maps profitLabel to point.text.\nconst profitMarker = {\n    visible: true,\n    width: 6,\n    height: 6,\n    shape: 'Circle' as const,\n    fill: '#ffffff',\n    border: {\n        color: '#16a765',\n        width: 2\n    },\n  \n};\n\nfunction App() {\n    return (\n        <div className=\"business-performance\">\n            <style>{`\n                .business-performance {\n                    width: 100%;\n                    padding: 16px;\n                    box-sizing: border-box;\n                    background: #ffffff;\n                    border: 1px solid #e2e8f0;\n                    border-radius: 12px;\n                    font-family: Arial, sans-serif;\n                }\n\n                .business-chart-title {\n                    text-align: center;\n                    color: #1e293b;\n                    font-size: 24px;\n                    font-weight: 600;\n                    margin: 8px 0 4px;\n                }\n\n                .business-chart-subtitle {\n                    text-align: center;\n                    color: #64748b;\n                    font-size: 14px;\n                    margin-bottom: 4px;\n                }\n\n                .business-performance .e-legend-item {\n                    cursor: pointer;\n                }\n\n                .business-performance .e-legend-item:hover {\n                    opacity: 0.88;\n                }\n\n                @media (max-width: 850px) {\n                    .business-chart-title {\n                        font-size: 20px;\n                    }\n\n                    .business-performance .e-legend {\n                        height: auto !important;\n                    }\n                }\n\n                @media (max-width: 600px) {\n                    .business-performance {\n                        padding: 8px;\n                    }\n\n                    .business-chart-title {\n                        font-size: 18px;\n                    }\n\n                    .business-chart-subtitle {\n                        font-size: 12px;\n                    }\n                }\n            `}</style>\n\n            <div className=\"business-chart-title\">\n                Business Revenue, Profit and Order Performance\n            </div>\n\n            <div className=\"business-chart-subtitle\">\n                Monthly performance analysis | January – June 2024\n            </div>\n\n            <ChartComponent\n                id=\"business-performance-chart\"\n                height=\"500px\"\n                width=\"100%\"\n                primaryXAxis={primaryXAxis}\n                primaryYAxis={primaryYAxis}\n                tooltip={{\n                    enable: true,\n                    shared: true\n                }}\n                crosshair={{\n                    enable: true,\n                    lineType: 'Vertical',\n                    line: {\n                        color: '#94a3b8',\n                        width: 1,\n                        dashArray: '4,4'\n                    }\n                }}\n                legendSettings={legendSettings}\n                legendRender={handleLegendRender}\n                chartArea={{\n                    border: { width: 0 }\n                }}\n                background=\"transparent\"\n            >\n                <Inject services={[\n                    Category,\n                    SplineSeries,\n                    SplineAreaSeries,\n                    ColumnSeries,\n                    Legend,\n                    Tooltip,\n                    Crosshair,\n                    StripLine,\n                    DataLabel\n                ]} />\n\n                <AxesDirective>\n                    <AxisDirective\n                        name=\"ordersAxis\"\n                        opposedPosition={true}\n                        minimum={0}\n                        maximum={600}\n                        interval={100}\n                        title=\"Orders (Count)\"\n                        majorGridLines={{ width: 0 }}\n                        majorTickLines={{ width: 0 }}\n                        lineStyle={{ width: 0 }}\n                    />\n                </AxesDirective>\n\n                <SeriesCollectionDirective>\n                    {/* Revenue - Spline */}\n                    <SeriesDirective\n                        dataSource={businessData}\n                        xName=\"month\"\n                        yName=\"revenue\"\n                        name=\"Revenue\"\n                        type=\"Spline\"\n                        width={2.5}\n                        fill=\"#1683ed\"\n                        marker={revenueMarker}\n                    />\n\n                    {/* Profit - Spline Area */}\n                    <SeriesDirective\n                        dataSource={businessData}\n                        xName=\"month\"\n                        yName=\"profit\"\n                        name=\"Profit\"\n                        type=\"SplineArea\"\n                        width={2}\n                        fill=\"#16a765\"\n                        opacity={0.20}\n                        border={{\n                            color: '#16a765',\n                            width: 2\n                        }}\n                        marker={profitMarker}\n                    />\n\n                    {/* Orders - Column */}\n                    <SeriesDirective\n                        dataSource={businessData}\n                        xName=\"month\"\n                        yName=\"orders\"\n                        name=\"Orders\"\n                        type=\"Column\"\n                        yAxisName=\"ordersAxis\"\n                        fill=\"#9747ff\"\n                        columnWidth={0.5}\n                        columnSpacing={0.2}\n                    />\n                </SeriesCollectionDirective>\n            </ChartComponent>\n\n            <div style={{\n                textAlign: 'center',\n                color: '#64748b',\n                fontSize: '11px',\n                marginTop: '4px'\n            }}>\n                April represents the promotional campaign period.\n                The orange strip line indicates the $80K revenue target.\n            </div>\n        </div>\n    );\n}\n\nexport default App;\n"
    }
  ]
}