igniteui-react-charts
Version:
Ignite UI React charting components for building rich data visualizations using TypeScript APIs.
76 lines (75 loc) • 2.25 kB
TypeScript
import * as React from 'react';
import { IgrLegendBase, IIgrLegendBaseProps } from './igr-legend-base';
import { ItemLegend } from "./ItemLegend";
import { LegendOrientation } from './LegendOrientation';
/**
* Represents a legend that displays an item for each point in the series.
*
* You can use the `ItemLegend` to display a legend item for each data member bound to the `BubbleSeries`
*
* ```ts
* <IgrItemLegend ref={this.onLegendRef} />
* ```
*
* ```ts
* this.onLegendRef = this.onLegendRef.bind(this);
* public onLegendRef(legend: IgrItemLegend) {
* this.legend = legend;
* if (this.chart) {
* this.chart.actualSeries[0].legend = this.legend;
* }
* }
* ```
*/
export declare class IgrItemLegend extends IgrLegendBase<IIgrItemLegendProps> {
private container;
private _elRef;
render(): React.DetailedReactHTMLElement<{
className: string;
ref: (div: HTMLDivElement) => void;
}, HTMLDivElement>;
private _getMainRef;
componentDidMount(): void;
private initializeContent;
constructor(props: IIgrItemLegendProps);
private _wrapper;
destroy(): void;
protected createImplementation(): ItemLegend;
get i(): ItemLegend;
createItemwiseLegendItems(legendItems: any, series: any): void;
exportVisualData(): any;
exportSerializedVisualData(): any;
/**
* Gets whether or not this legend supports itemwise visuals
*/
get isItemwise(): boolean;
/**
* Gets or sets the current Legend object's orientation.
*/
get orientation(): LegendOrientation;
set orientation(v: LegendOrientation);
/**
* Gets or sets color of text
*/
get textColor(): string;
set textColor(v: string);
/**
* Gets or sets style of text.
*/
get textStyle(): string;
set textStyle(v: string);
}
export interface IIgrItemLegendProps extends IIgrLegendBaseProps {
/**
* Gets or sets the current Legend object's orientation.
*/
orientation?: LegendOrientation | string;
/**
* Gets or sets color of text
*/
textColor?: string;
/**
* Gets or sets style of text.
*/
textStyle?: string;
}