Represents a legend in a IgxDataChartComponent control.
The Legend helps end-user identify visuals of chart series with contextual information related to the data plotted in the chart control.
<igx-data-chart
[dataSource]="data"
[legend]="legend">
<igx-category-x-axis
label="label"
#xAxis>
</igx-category-x-axis>
<igx-numeric-y-axis
#yAxis>
</igx-numeric-y-axis>
<igx-line-series
[xAxis]="xAxis"
[yAxis]="yAxis"
valueMemberPath="value">
</igx-line-series>
</igx-data-chart>
<igx-legend #legend></igx-legend>public legend : IgxLegendComponent; Constructors
Section titled "Constructors"IgxLegendComponent
new IgxLegendComponent(renderer: Renderer2, elRef: ElementRef, ngZone: NgZone): IgxLegendComponent Returns IgxLegendComponent
Properties
Section titled "Properties"container
Section titled "container"container: Element ngAcceptInputType_isFinancial
Section titled "ngAcceptInputType_isFinancial"Inherited from: IgxLegendBaseComponent
ngAcceptInputType_isFinancial: string | boolean ngAcceptInputType_isItemwise
Section titled "ngAcceptInputType_isItemwise"Inherited from: IgxLegendBaseComponent
ngAcceptInputType_isItemwise: string | boolean ngAcceptInputType_orientation
Section titled "ngAcceptInputType_orientation"ngAcceptInputType_orientation: string | LegendOrientation ɵcmp: ɵɵComponentDeclaration<IgxLegendComponent, "igx-legend", never, object, object, never, never, true, never> ɵfac: ɵɵFactoryDeclaration<IgxLegendComponent, never> Accessors
Section titled "Accessors"get i(): Legend
Returns Legend
isFinancial
Section titled "isFinancial"Inherited from: IgxLegendBaseComponent
Gets if the legend is a financial legend.
get isFinancial(): boolean
Returns boolean
isItemwise
Section titled "isItemwise"Inherited from: IgxLegendBaseComponent
Gets if the legend is item-wise.
get isItemwise(): boolean
Returns boolean
orientation
Section titled "orientation"Gets or sets the current Legend object's orientation.
get orientation(): LegendOrientation
Returns LegendOrientation
textColor
Section titled "textColor"Gets or sets color of text
get textColor(): string
Returns string
set textColor(v: string): void Parameters
- v:
string
Returns void
textStyle
Section titled "textStyle"Gets or sets style of text.
get textStyle(): string
Returns string
set textStyle(v: string): void Parameters
- v:
string
Returns void
Methods
Section titled "Methods"exportSerializedVisualData
Section titled "exportSerializedVisualData"Inherited from: IgxLegendBaseComponent
Returns the legend visuals expressed as a serialized string.
exportSerializedVisualData(): string Returns string
findByName
Section titled "findByName"Inherited from: IgxLegendBaseComponent
findByName(name: string): any Parameters
- name:
string
Returns any
flushTextContentChangedCheck
Section titled "flushTextContentChangedCheck"Inherited from: IgxLegendBaseComponent
Use to force the Legend to check for differences in text content.
flushTextContentChangedCheck(): void Returns void
ngOnDestroy
Section titled "ngOnDestroy"ngOnDestroy(): void Returns void
simulateClick
Section titled "simulateClick"Inherited from: IgxLegendBaseComponent
simulateClick(point: IgPoint): void Parameters
- point:
IgPoint
Returns void
simulateHover
Section titled "simulateHover"Inherited from: IgxLegendBaseComponent
simulateHover(point: IgPoint): void Parameters
- point:
IgPoint
Returns void
simulateMouseLeave
Section titled "simulateMouseLeave"Inherited from: IgxLegendBaseComponent
simulateMouseLeave(): void