UNPKG

igniteui-react-charts

Version:

Ignite UI React charting components for building rich data visualizations using TypeScript APIs.

565 lines (559 loc) 19.4 kB
import * as React from 'react'; import { Visibility } from "igniteui-react-core"; import { XamSparkline } from './XamSparkline'; import { SparklineVisualData } from './SparklineVisualData'; import { IChartTooltipProps } from "igniteui-react-core"; import { TrendLineType } from "igniteui-react-core"; import { SparklineDisplayType } from './SparklineDisplayType'; import { UnknownValuePlotting } from "igniteui-react-core"; export declare class IgrSparkline extends React.Component<IIgrSparklineProps> { private _height; private _width; set height(value: string); get height(): string; set width(value: string); get width(): string; private _elRef; private _container; render(): React.DetailedReactHTMLElement<{ className: string; ref: (div: HTMLDivElement) => void; children: any[]; }, HTMLDivElement>; protected _tooltipRef(t: any): void; componentDidMount(): void; shouldComponentUpdate(nextProps: any, nextState: any): boolean; private _dataSource; set dataSource(value: any); get dataSource(): any; private _renderer; private _getMainRef; constructor(props: IIgrSparklineProps); private _initialized; destroy(): void; private _wrapper; protected createImplementation(): XamSparkline; private _sparkline; initializeContent(): void; componentWillUnmount(): void; protected initializeProperties(): void; private _tooltipTemplate; private _tooltipContent; set tooltipTemplate(value: React.FunctionComponent<IChartTooltipProps> | React.Component<IChartTooltipProps>); get tooltipTemplate(): React.FunctionComponent<IChartTooltipProps> | React.Component<IChartTooltipProps>; private createWrapper; private _defaultTooltips; private _ensureDefaultTooltip; private _onDefaultTooltipsReady; private _updateTooltipState; private _activeTooltips; private _activeTooltipElements; private _currentTooltips; private _uniqueTooltipId; private createTooltip; private _ensureTooltipCreated; protected _implementation: any; protected mounted: boolean; get nativeElement(): HTMLElement; /** * @hidden */ get i(): XamSparkline; /** * @hidden */ static _createFromInternal(internal: any): IgrSparkline; /** * Gets or sets the sparkline brush. */ get brush(): string; set brush(v: string); /** * Gets or sets the negative brush of the sparkline. */ get negativeBrush(): string; set negativeBrush(v: string); /** * Gets or sets the marker brush of the sparkline. */ get markerBrush(): string; set markerBrush(v: string); /** * Gets or sets the negative marker brush of the sparkline. */ get negativeMarkerBrush(): string; set negativeMarkerBrush(v: string); /** * Gets or sets the first marker brush of the sparkline. */ get firstMarkerBrush(): string; set firstMarkerBrush(v: string); /** * Gets or sets the last marker brush of the sparkline. */ get lastMarkerBrush(): string; set lastMarkerBrush(v: string); /** * Gets or sets the high marker brush of the sparkline. */ get highMarkerBrush(): string; set highMarkerBrush(v: string); /** * Gets or sets the low marker brush of the sparkline. */ get lowMarkerBrush(): string; set lowMarkerBrush(v: string); /** * Gets or sets the trendline brush of the sparkline. */ get trendLineBrush(): string; set trendLineBrush(v: string); /** * Gets or sets the horizontal axis line brush of the sparkline. */ get horizontalAxisBrush(): string; set horizontalAxisBrush(v: string); /** * Gets or sets the vertical axis line brush of the sparkline. */ get verticalAxisBrush(): string; set verticalAxisBrush(v: string); /** * Gets or sets the normal range brush of the sparkline. */ get normalRangeFill(): string; set normalRangeFill(v: string); /** * Gets or sets the display state of the horizontal axis. */ get horizontalAxisVisibility(): Visibility; set horizontalAxisVisibility(v: Visibility); /** * Gets or sets the display state of the vertical axis. */ get verticalAxisVisibility(): Visibility; set verticalAxisVisibility(v: Visibility); /** * Gets or sets the marker visibility of the sparkline. */ get markerVisibility(): Visibility; set markerVisibility(v: Visibility); /** * Gets or sets the negative marker visibility of the sparkline. */ get negativeMarkerVisibility(): Visibility; set negativeMarkerVisibility(v: Visibility); /** * Gets or sets the first marker visibility of the sparkline. */ get firstMarkerVisibility(): Visibility; set firstMarkerVisibility(v: Visibility); /** * Gets or sets the last marker visibility of the sparkline. */ get lastMarkerVisibility(): Visibility; set lastMarkerVisibility(v: Visibility); /** * Gets or sets the low marker visibility of the sparkline. */ get lowMarkerVisibility(): Visibility; set lowMarkerVisibility(v: Visibility); /** * Gets or sets the high marker visibility of the sparkline. */ get highMarkerVisibility(): Visibility; set highMarkerVisibility(v: Visibility); /** * Gets or sets the normal range visibility of the sparkline. */ get normalRangeVisibility(): Visibility; set normalRangeVisibility(v: Visibility); /** * Gets or sets the position of the normal range on the sparkline. */ get displayNormalRangeInFront(): boolean; set displayNormalRangeInFront(v: boolean); /** * Gets or sets the marker size of the sparkline. */ get markerSize(): number; set markerSize(v: number); /** * Gets or sets the first marker size of the sparkline. */ get firstMarkerSize(): number; set firstMarkerSize(v: number); /** * Gets or sets the last marker size of the sparkline. */ get lastMarkerSize(): number; set lastMarkerSize(v: number); /** * Gets or sets the high marker size of the sparkline. */ get highMarkerSize(): number; set highMarkerSize(v: number); /** * Gets or sets the low marker size of the sparkline. */ get lowMarkerSize(): number; set lowMarkerSize(v: number); /** * Gets or sets the negative marker size of the sparkline. */ get negativeMarkerSize(): number; set negativeMarkerSize(v: number); /** * Gets or sets the line thickness of the sparkline. */ get lineThickness(): number; set lineThickness(v: number); /** * Gets or sets the minimum value of the y axis. */ get minimum(): number; set minimum(v: number); /** * Gets or sets the maximum value of the y axis. */ get maximum(): number; set maximum(v: number); /** * Gets or sets the string path to the value column. */ get valueMemberPath(): string; set valueMemberPath(v: string); /** * String identifier of a column or property name to get labels from on each item in the data source. These labels will be retrieved from the first and last item, and displayed by the horizontal axis. */ get labelMemberPath(): string; set labelMemberPath(v: string); /** * Gets or sets the type of trendline used by the sparkline. */ get trendLineType(): TrendLineType; set trendLineType(v: TrendLineType); /** * Gets or sets the trendline period used by the sparkline. */ get trendLinePeriod(): number; set trendLinePeriod(v: number); /** * Gets or sets the thickness of the sparkline's trendline. */ get trendLineThickness(): number; set trendLineThickness(v: number); /** * Gets or sets the minimum value of the normal range. */ get normalRangeMinimum(): number; set normalRangeMinimum(v: number); /** * Gets or sets the maximum value of the normal range. */ get normalRangeMaximum(): number; set normalRangeMaximum(v: number); /** * Gets or sets the display type of the sparkline. */ get displayType(): SparklineDisplayType; set displayType(v: SparklineDisplayType); /** * Gets or sets the way null values are interpreted. */ get unknownValuePlotting(): UnknownValuePlotting; set unknownValuePlotting(v: UnknownValuePlotting); /** * The value or content to display on the vertical axis. * This can be set to a formatted string, such as "{0:n}", or it can be set to a DataTemplate. */ get verticalAxisLabel(): any; set verticalAxisLabel(v: any); /** * The value or content to display on the horizontal axis. * This can be set to a formatted string, such as "{0}", or it can be set to a DataTemplate. */ get horizontalAxisLabel(): any; set horizontalAxisLabel(v: any); /** * Sets or gets a function which takes an object that produces a formatted label for displaying in the chart. */ get formatLabel(): (arg1: any) => string; set formatLabel(v: (arg1: any) => string); /** * Gets or sets the label composite format used when creating label values. */ get horizontalLabelFormat(): string; set horizontalLabelFormat(v: string); /** * Gets or sets the format specifiers to use with the HorizontalLabelFormat string. */ get horizontalLabelFormatSpecifiers(): any[]; set horizontalLabelFormatSpecifiers(v: any[]); /** * Gets or sets the label composite format used when creating label values. */ get verticalLabelFormat(): string; set verticalLabelFormat(v: string); /** * Gets or sets the format specifiers to use with the VerticalLabelFormat string. */ get verticalLabelFormatSpecifiers(): any[]; set verticalLabelFormatSpecifiers(v: any[]); /** * Gets or sets the scaling value used to affect the pixel density of the control. * A higher scaling ratio will produce crisper visuals at the expense of memory. Lower values will cause the control * to appear blurry. */ get pixelScalingRatio(): number; set pixelScalingRatio(v: number); /** * Gets the actual scaling value used by the component to affect the pixel density of the control. * A higher scaling ratio will produce crisper visuals at the expense of memory. Lower values will cause the control * to appear blurry. */ get actualPixelScalingRatio(): number; set actualPixelScalingRatio(v: number); findByName(name: string): any; protected __p: string; protected _hasUserValues: Set<string>; protected get hasUserValues(): Set<string>; protected __m(propertyName: string): void; protected _stylingContainer: any; protected _stylingParent: any; protected _inStyling: boolean; protected _styling(container: any, component: any, parent?: any): void; /** * Provides a container to the sparkline control. * @param container * The container. */ provideContainer(container: any): void; /** * Notify that the control has resized. */ notifyResized(): void; notifySetItem(source_: any, index: number, oldItem: any, newItem: any): void; /** * Used to manually notify the IgxSparklineComponent that the data source has reset or cleared its items. Invoking this method is only necessary if that datasource is not observable. * @param source_ * The data source which was cleared or reset. */ notifyClearItems(source_: any): void; notifyInsertItem(source_: any, index: number, newItem: any): void; notifyRemoveItem(source_: any, index: number, oldItem: any): void; /** * Returns the sparkline visuals expressed as a SparklineVisualData object. */ exportVisualData(): SparklineVisualData; /** * Returns visuals as a serialized string. */ exportSerializedVisualData(): string; } export interface IIgrSparklineProps { width?: string; height?: string; dataSource?: any; tooltipTemplate?: React.FunctionComponent<IChartTooltipProps> | React.Component<IChartTooltipProps>; children?: React.ReactNode; /** * Gets or sets the sparkline brush. */ brush?: string; /** * Gets or sets the negative brush of the sparkline. */ negativeBrush?: string; /** * Gets or sets the marker brush of the sparkline. */ markerBrush?: string; /** * Gets or sets the negative marker brush of the sparkline. */ negativeMarkerBrush?: string; /** * Gets or sets the first marker brush of the sparkline. */ firstMarkerBrush?: string; /** * Gets or sets the last marker brush of the sparkline. */ lastMarkerBrush?: string; /** * Gets or sets the high marker brush of the sparkline. */ highMarkerBrush?: string; /** * Gets or sets the low marker brush of the sparkline. */ lowMarkerBrush?: string; /** * Gets or sets the trendline brush of the sparkline. */ trendLineBrush?: string; /** * Gets or sets the horizontal axis line brush of the sparkline. */ horizontalAxisBrush?: string; /** * Gets or sets the vertical axis line brush of the sparkline. */ verticalAxisBrush?: string; /** * Gets or sets the normal range brush of the sparkline. */ normalRangeFill?: string; /** * Gets or sets the display state of the horizontal axis. */ horizontalAxisVisibility?: Visibility | string; /** * Gets or sets the display state of the vertical axis. */ verticalAxisVisibility?: Visibility | string; /** * Gets or sets the marker visibility of the sparkline. */ markerVisibility?: Visibility | string; /** * Gets or sets the negative marker visibility of the sparkline. */ negativeMarkerVisibility?: Visibility | string; /** * Gets or sets the first marker visibility of the sparkline. */ firstMarkerVisibility?: Visibility | string; /** * Gets or sets the last marker visibility of the sparkline. */ lastMarkerVisibility?: Visibility | string; /** * Gets or sets the low marker visibility of the sparkline. */ lowMarkerVisibility?: Visibility | string; /** * Gets or sets the high marker visibility of the sparkline. */ highMarkerVisibility?: Visibility | string; /** * Gets or sets the normal range visibility of the sparkline. */ normalRangeVisibility?: Visibility | string; /** * Gets or sets the position of the normal range on the sparkline. */ displayNormalRangeInFront?: boolean | string; /** * Gets or sets the marker size of the sparkline. */ markerSize?: number | string; /** * Gets or sets the first marker size of the sparkline. */ firstMarkerSize?: number | string; /** * Gets or sets the last marker size of the sparkline. */ lastMarkerSize?: number | string; /** * Gets or sets the high marker size of the sparkline. */ highMarkerSize?: number | string; /** * Gets or sets the low marker size of the sparkline. */ lowMarkerSize?: number | string; /** * Gets or sets the negative marker size of the sparkline. */ negativeMarkerSize?: number | string; /** * Gets or sets the line thickness of the sparkline. */ lineThickness?: number | string; /** * Gets or sets the minimum value of the y axis. */ minimum?: number | string; /** * Gets or sets the maximum value of the y axis. */ maximum?: number | string; /** * Gets or sets the string path to the value column. */ valueMemberPath?: string; /** * String identifier of a column or property name to get labels from on each item in the data source. These labels will be retrieved from the first and last item, and displayed by the horizontal axis. */ labelMemberPath?: string; /** * Gets or sets the type of trendline used by the sparkline. */ trendLineType?: TrendLineType | string; /** * Gets or sets the trendline period used by the sparkline. */ trendLinePeriod?: number | string; /** * Gets or sets the thickness of the sparkline's trendline. */ trendLineThickness?: number | string; /** * Gets or sets the minimum value of the normal range. */ normalRangeMinimum?: number | string; /** * Gets or sets the maximum value of the normal range. */ normalRangeMaximum?: number | string; /** * Gets or sets the display type of the sparkline. */ displayType?: SparklineDisplayType | string; /** * Gets or sets the way null values are interpreted. */ unknownValuePlotting?: UnknownValuePlotting | string; /** * The value or content to display on the vertical axis. * This can be set to a formatted string, such as "{0:n}", or it can be set to a DataTemplate. */ verticalAxisLabel?: any; /** * The value or content to display on the horizontal axis. * This can be set to a formatted string, such as "{0}", or it can be set to a DataTemplate. */ horizontalAxisLabel?: any; /** * Sets or gets a function which takes an object that produces a formatted label for displaying in the chart. */ formatLabel?: (arg1: any) => string; /** * Gets or sets the label composite format used when creating label values. */ horizontalLabelFormat?: string; /** * Gets or sets the format specifiers to use with the HorizontalLabelFormat string. */ horizontalLabelFormatSpecifiers?: any[]; /** * Gets or sets the label composite format used when creating label values. */ verticalLabelFormat?: string; /** * Gets or sets the format specifiers to use with the VerticalLabelFormat string. */ verticalLabelFormatSpecifiers?: any[]; /** * Gets or sets the scaling value used to affect the pixel density of the control. * A higher scaling ratio will produce crisper visuals at the expense of memory. Lower values will cause the control * to appear blurry. */ pixelScalingRatio?: number | string; /** * Gets the actual scaling value used by the component to affect the pixel density of the control. * A higher scaling ratio will produce crisper visuals at the expense of memory. Lower values will cause the control * to appear blurry. */ actualPixelScalingRatio?: number | string; }