{
  "$schema": "https://ai.syncfusion.com/schema/registry-item.json",
  "name": "spreadsheet-editor-chart",
  "framework": "react",
  "type": "registry:component",
  "component": "SpreadsheetEditor",
  "variant": "chart",
  "dependencies": [
    "@syncfusion/ej2-react-spreadsheet"
  ],
  "description": "Spreadsheet editor visualizing data using chart feature by comparing the GDP of different countries with various years.",
  "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": true,
    "platformIndex": "https://ai.syncfusion.com/react/llms.txt",
    "skillPack": "syncfusion/react-ui-components-skills",
    "docs": "https://ai.syncfusion.com/gallery/react/ts/spreadsheet-editor-chart.md"
  },
  "files": [
    {
      "target": "src/components/spreadsheet-editor-chart/SpreadSheetEditor.tsx",
      "content": "import React from 'react';\nimport { SpreadsheetComponent, SheetsDirective, SheetDirective, ColumnsDirective, type CellStyleModel, type ChartModel } from '@syncfusion/ej2-react-spreadsheet';\nimport { ColumnDirective, RowDirective, RowsDirective, CellsDirective, CellDirective } from '@syncfusion/ej2-react-spreadsheet';\nimport { RangeDirective } from '@syncfusion/ej2-react-spreadsheet';\nimport { RangesDirective } from '@syncfusion/ej2-react-spreadsheet';\nimport { GDPData } from '../datasource/spreadsheet-editor.data';\nimport '../spreadsheet-editor.css';\n\n/**\n * Chart sample\n */\n\nfunction Chart(): React.ReactElement {\n    let spreadsheet: SpreadsheetComponent;\n    const style: CellStyleModel = {\n        backgroundColor: '#e56590', color: '#fff',\n        fontWeight: 'bold', textAlign: 'center', verticalAlign: 'middle'\n    };\n    const chart: ChartModel[] = [{ type: 'Column', range: 'A3:E10' }];\n    function onCreated(): void {\n        // Formatting cells dynamically using cellFormat method\n        spreadsheet.cellFormat({ backgroundColor: '#e56590', color: '#fff', fontWeight: 'bold', textAlign: 'center' }, 'A3:E3');\n        // Applying currency format to the specified range.\n        spreadsheet.numberFormat('$#,##0.00', 'B4:E10');\n        // Merging the cells from A1 to E1\n        spreadsheet.merge('A1:E1');\n    }\n\n    return (\n        <div className='control-pane'>\n            <div className='control-section spreadsheet-control'>\n                <SpreadsheetComponent openUrl='https://document.syncfusion.com/web-services/spreadsheet-editor/api/spreadsheet/open'\n                    saveUrl='https://document.syncfusion.com/web-services/spreadsheet-editor/api/spreadsheet/save'\n                    ref={(ssObj: SpreadsheetComponent | null) => { if (ssObj) spreadsheet = ssObj }} created={onCreated}>\n                    <SheetsDirective>\n                        <SheetDirective name='GDP'>\n                            <RowsDirective>\n                                <RowDirective height={30}>\n                                    <CellsDirective>\n                                        <CellDirective value='Gross Domestic Product (in trillions)' style={style}></CellDirective>\n                                    </CellsDirective>\n                                </RowDirective>\n                                <RowDirective>\n                                    <CellsDirective>\n                                        <CellDirective index={6} chart={chart}></CellDirective>\n                                    </CellsDirective>\n                                </RowDirective>\n                            </RowsDirective>\n                            <RangesDirective>\n                                <RangeDirective dataSource={GDPData} startCell='A3' ></RangeDirective>\n                            </RangesDirective>\n                            <ColumnsDirective>\n                                <ColumnDirective width={80}></ColumnDirective>\n                                <ColumnDirective width={75}></ColumnDirective>\n                                <ColumnDirective width={75}></ColumnDirective>\n                                <ColumnDirective width={75}></ColumnDirective>\n                                <ColumnDirective width={75}></ColumnDirective>\n                            </ColumnsDirective>\n                        </SheetDirective>\n                    </SheetsDirective>\n                </SpreadsheetComponent>\n            </div>\n        </div>\n    )\n}\nexport default Chart;"
    }
  ]
}