@synergy-design-system/angular
Version:
Angular wrappers for the Synergy Design System
1 lines • 4.94 kB
Source Map (JSON)
{"version":3,"file":"synergy-design-system-angular-components-chart.mjs","sources":["../../components/chart/chart.component.ts","../../components/chart/synergy-design-system-angular-components-chart.ts"],"sourcesContent":["// ---------------------------------------------------------------------\n// 🔒 AUTOGENERATED @synergy-design-system/angular wrappers for @synergy-design-system/components\n// Please do not edit this file directly!\n// It will get recreated when running pnpm build.\n// ---------------------------------------------------------------------\nimport {\n Component,\n ElementRef,\n NgZone,\n Input,\n Output,\n EventEmitter,\n AfterContentInit,\n} from '@angular/core';\nimport type SynChart from '@synergy-design-system/components/components/chart/chart.component.js';\n\nimport '@synergy-design-system/components/components/chart/chart.js';\n\n/**\n * @summary The `<syn-chart>` component is a container for displaying charts. It provides a structured layout and styling for chart elements, allowing for consistent presentation across different types of charts. The chart component is based on [Apache ECharts](https://echarts.apache.org)\n *\n * @documentation https://synergy-design-system.github.io/?path=/docs/charting-syn-chart--docs\n * @status experimental\n * @since 3.15.0\n *\n * @csspart base - The component's base wrapper.\n */\n@Component({\n selector: 'syn-chart',\n standalone: true,\n template: '<ng-content></ng-content>',\n})\nexport class SynChartComponent {\n public nativeElement: SynChart;\n private _ngZone: NgZone;\n\n constructor(e: ElementRef, ngZone: NgZone) {\n this.nativeElement = e.nativeElement;\n this._ngZone = ngZone;\n }\n\n /**\n* The color palette to apply to chart series.\n\n- `categorical` (default) — 12 distinct colors for comparing unrelated data series\n- `sequential-01` … `sequential-07` — 10-step single-hue ramps:\n `01`=primary, `02`=accent, `03`=muted, `04`=purple, `05`=teal, `06`=magenta, `07`=neutral\n- `sequential-status-critical`, `sequential-status-error`, `sequential-status-info`,\n `sequential-status-success`, `sequential-status-warning` — 10-step status ramps\n\nThe palette sets the ECharts `color` array.\n* If `config.color` is explicitly provided,\nit takes precedence over the palette.\n */\n @Input()\n set palette(v: SynChart['palette']) {\n this._ngZone.runOutsideAngular(() => (this.nativeElement.palette = v));\n }\n get palette(): SynChart['palette'] {\n return this.nativeElement.palette;\n }\n\n /**\n* The ECharts configuration input.\n\nThis property accepts either:\n- a plain `ECConfig` object, or\n- a callback that receives a typed preset handle and applies chart presets.\n\nThe resolved result maps 1:1 to the ECharts `option` parameter passed to\n`setOption()`.\nConsult the [ECharts option documentation](https://echarts.apache.org/en/option.html)\nand assign either the object directly or build it through the handle.\n\n> **Note:** Currently only **line charts** (`series[].type: 'line'`) are supported.\n> Support for additional chart types (bar, pie, etc.) will be added in future releases or can be requested.\n\nAssigning a new config input completely replaces the previous chart\nconfiguration (`notMerge: true`).\nTo update only parts of the chart, access the underlying ECharts instance directly and\ncall `setOption()` with custom merge options.\n */\n @Input()\n set config(v: SynChart['config']) {\n this._ngZone.runOutsideAngular(() => (this.nativeElement.config = v));\n }\n get config(): SynChart['config'] {\n return this.nativeElement.config;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './chart.component';\n"],"names":[],"mappings":";;;;AAAA;AACA;AACA;AACA;AACA;AAcA;;;;;;;;AAQG;MAMU,iBAAiB,CAAA;AACrB,IAAA,aAAa;AACZ,IAAA,OAAO;IAEf,WAAA,CAAY,CAAa,EAAE,MAAc,EAAA;AACvC,QAAA,IAAI,CAAC,aAAa,GAAG,CAAC,CAAC,aAAa;AACpC,QAAA,IAAI,CAAC,OAAO,GAAG,MAAM;IACvB;AAEA;;;;;;;;;;;;AAYC;IACD,IACI,OAAO,CAAC,CAAsB,EAAA;AAChC,QAAA,IAAI,CAAC,OAAO,CAAC,iBAAiB,CAAC,OAAO,IAAI,CAAC,aAAa,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC;IACxE;AACA,IAAA,IAAI,OAAO,GAAA;AACT,QAAA,OAAO,IAAI,CAAC,aAAa,CAAC,OAAO;IACnC;AAEA;;;;;;;;;;;;;;;;;;;AAmBC;IACD,IACI,MAAM,CAAC,CAAqB,EAAA;AAC9B,QAAA,IAAI,CAAC,OAAO,CAAC,iBAAiB,CAAC,OAAO,IAA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