@progress/kendo-angular-charts
Version:
Kendo UI Charts for Angular - A comprehensive package for creating beautiful and interactive data visualization. Every chart type, stock charts, and sparklines are included.
130 lines (129 loc) • 5.51 kB
JavaScript
/**-----------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the project root for more information
*-------------------------------------------------------------------------------------------*/
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
import { ConfigurationService } from '../common/configuration.service';
import { SettingsComponent } from '../common/settings.component';
import * as i0 from "@angular/core";
import * as i1 from "../common/configuration.service";
/**
* The configuration options of the Sankey legend
* ([see example]({% slug legend_sankey %})).
*/
export class SankeyLegendComponent extends SettingsComponent {
configurationService;
/**
* The legend is horizontally aligned when [`legend.position`]({% slug api_charts_sankeylegend %}#toc-position) is set to `"top"` or `"bottom"`.
* The legend is vertically aligned when [`legend.position`]({% slug api_charts_sankeylegend %}#toc-position) is set to `"left"` or `"right"`.
* @default 'center'
*/
align;
/**
* The background color of the legend. Accepts a valid CSS color string, including hex and rgb.
* @default 'white'
*/
background;
border;
height;
labels;
/**
* The margin of the Sankey legend. A numeric value sets all paddings.
* @default 5
*/
margin;
/**
* The X offset of the Sankey legend. The offset is relative to the default position of the legend.
* For example, a value of `20` moves the legend 20 pixels to the right of its initial position.
* Negative values move the legend to the left of its current position.
* @default 0
*/
offsetX;
/**
* The Y offset of the Sankey legend. The offset is relative to the current position of the legend.
* For example, a value of `20` moves the legend 20 pixels down from its initial position.
* Negative values move the legend upwards from its current position.
* @default 0
*/
offsetY;
/**
* The orientation of the legend items.
* @default 'vertical'
*/
orientation;
/**
* The padding of the Sankey legend. A numeric value sets all paddings.
* @default 5
*/
padding;
/**
* The position of the Sankey legend.
* Setting the legend position to `custom` allows you to position the legend using the [`legend.offsetX`](slug:api_charts_sankeylegend#toc-offsetx) and [`legend.offsetY`](slug:api_charts_sankeylegend#toc-offsety) options.
* @default 'right'
*/
position;
/**
* If set to `true`, the legend items are reversed.
* @default false
*/
reverse;
/**
* If set to `true`, the Sankey displays the legend. By default, the Sankey legend is visible.
* @default true
*/
visible;
width;
markers;
spacing;
title;
constructor(configurationService) {
super('legend', configurationService);
this.configurationService = configurationService;
this.markAsVisible();
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SankeyLegendComponent, deps: [{ token: i1.ConfigurationService }], target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: SankeyLegendComponent, isStandalone: true, selector: "kendo-sankey-legend", inputs: { align: "align", background: "background", border: "border", height: "height", labels: "labels", margin: "margin", offsetX: "offsetX", offsetY: "offsetY", orientation: "orientation", padding: "padding", position: "position", reverse: "reverse", visible: "visible", width: "width", markers: "markers", spacing: "spacing", title: "title" }, usesInheritance: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SankeyLegendComponent, decorators: [{
type: Component,
args: [{
changeDetection: ChangeDetectionStrategy.OnPush,
selector: 'kendo-sankey-legend',
template: '',
standalone: true
}]
}], ctorParameters: function () { return [{ type: i1.ConfigurationService }]; }, propDecorators: { align: [{
type: Input
}], background: [{
type: Input
}], border: [{
type: Input
}], height: [{
type: Input
}], labels: [{
type: Input
}], margin: [{
type: Input
}], offsetX: [{
type: Input
}], offsetY: [{
type: Input
}], orientation: [{
type: Input
}], padding: [{
type: Input
}], position: [{
type: Input
}], reverse: [{
type: Input
}], visible: [{
type: Input
}], width: [{
type: Input
}], markers: [{
type: Input
}], spacing: [{
type: Input
}], title: [{
type: Input
}] } });