UNPKG

@synergy-design-system/angular

Version:
93 lines (83 loc) 4.24 kB
import * as i0 from '@angular/core'; import { Input, Component } from '@angular/core'; import '@synergy-design-system/components/components/chart/chart.js'; // --------------------------------------------------------------------- // 🔒 AUTOGENERATED @synergy-design-system/angular wrappers for @synergy-design-system/components // Please do not edit this file directly! // It will get recreated when running pnpm build. // --------------------------------------------------------------------- /** * @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) * * @documentation https://synergy-design-system.github.io/?path=/docs/charting-syn-chart--docs * @status experimental * @since 3.15.0 * * @csspart base - The component's base wrapper. */ class SynChartComponent { nativeElement; _ngZone; constructor(e, ngZone) { this.nativeElement = e.nativeElement; this._ngZone = ngZone; } /** * The color palette to apply to chart series. - `categorical` (default) — 12 distinct colors for comparing unrelated data series - `sequential-01` … `sequential-07` — 10-step single-hue ramps: `01`=primary, `02`=accent, `03`=muted, `04`=purple, `05`=teal, `06`=magenta, `07`=neutral - `sequential-status-critical`, `sequential-status-error`, `sequential-status-info`, `sequential-status-success`, `sequential-status-warning` — 10-step status ramps The palette sets the ECharts `color` array. * If `config.color` is explicitly provided, it takes precedence over the palette. */ set palette(v) { this._ngZone.runOutsideAngular(() => (this.nativeElement.palette = v)); } get palette() { return this.nativeElement.palette; } /** * The ECharts configuration input. This property accepts either: - a plain `ECConfig` object, or - a callback that receives a typed preset handle and applies chart presets. The resolved result maps 1:1 to the ECharts `option` parameter passed to `setOption()`. Consult the [ECharts option documentation](https://echarts.apache.org/en/option.html) and assign either the object directly or build it through the handle. > **Note:** Currently only **line charts** (`series[].type: 'line'`) are supported. > Support for additional chart types (bar, pie, etc.) will be added in future releases or can be requested. Assigning a new config input completely replaces the previous chart configuration (`notMerge: true`). To update only parts of the chart, access the underlying ECharts instance directly and call `setOption()` with custom merge options. */ set config(v) { this._ngZone.runOutsideAngular(() => (this.nativeElement.config = v)); } get config() { return this.nativeElement.config; } static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: SynChartComponent, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component }); static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.6", type: SynChartComponent, isStandalone: true, selector: "syn-chart", inputs: { palette: "palette", config: "config" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true }); } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: SynChartComponent, decorators: [{ type: Component, args: [{ selector: 'syn-chart', standalone: true, template: '<ng-content></ng-content>', }] }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.NgZone }], propDecorators: { palette: [{ type: Input }], config: [{ type: Input }] } }); /** * Generated bundle index. Do not edit. */ export { SynChartComponent }; //# sourceMappingURL=synergy-design-system-angular-components-chart.mjs.map