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;

Hierarchy

Hierarchy

Implements

  • OnDestroy

Constructors

Properties

container: Element
ngAcceptInputType_isFinancial: string | boolean
ngAcceptInputType_isItemwise: string | boolean
ngAcceptInputType_orientation: string | LegendOrientation
ɵcmp: unknown
ɵfac: unknown

Accessors

  • get i(): Legend
  • Returns Legend

  • get isFinancial(): boolean
  • Gets if the legend is a financial legend.

    Returns boolean

  • get isItemwise(): boolean
  • Gets if the legend is item-wise.

    Returns boolean

  • get orientation(): LegendOrientation
  • Gets or sets the current Legend object's orientation.

    Returns LegendOrientation

  • set orientation(v: LegendOrientation): void
  • Parameters

    Returns void

  • get textColor(): string
  • Gets or sets color of text

    Returns string

  • set textColor(v: string): void
  • Parameters

    • v: string

    Returns void

  • get textStyle(): string
  • Gets or sets style of text.

    Returns string

  • set textStyle(v: string): void
  • Parameters

    • v: string

    Returns void

Methods

  • Returns the legend visuals expressed as a serialized string.

    Returns string

  • Parameters

    • name: string

    Returns any

  • Returns void