@gooddata/react-components
Version:
GoodData.UI - A powerful JavaScript library for building analytical applications
59 lines (58 loc) • 2.72 kB
TypeScript
import * as React from "react";
import { WrappedComponentProps } from "react-intl";
import { ICommonChartProps } from "../base/BaseChart";
import { IColorPalette, IDataSourceProviderInjectedProps } from "../../..";
import { IGeoConfig, IGeoData, IGeoLngLat, IPushpinCategoryLegendItem } from "../../../interfaces/GeoChart";
import { IGeoChartRendererProps } from "./GeoChartRenderer";
import { IGeoChartLegendRendererProps } from "./GeoChartLegendRenderer";
import { ILoadingInjectedProps } from "../base/VisualizationLoadingHOC";
import { IColorStrategy } from "../../visualizations/chart/colorFactory";
import { IColorAssignment } from "../../../interfaces/Config";
export declare function renderChart(props: IGeoChartRendererProps): React.ReactElement;
export declare function renderLegend(props: IGeoChartLegendRendererProps): React.ReactElement;
export interface ICoreGeoChartProps extends ICommonChartProps, IDataSourceProviderInjectedProps {
config?: IGeoConfig;
documentObj?: Document;
chartRenderer?: (props: IGeoChartRendererProps) => React.ReactElement;
legendRenderer?: (props: IGeoChartLegendRendererProps) => React.ReactElement;
onCenterPositionChanged?: (center: IGeoLngLat) => void;
onZoomChanged?: (zoom: number) => void;
geoChartOptions?: IGeoChartInnerOptions;
}
export declare type IGeoChartInnerProps = ICoreGeoChartProps & ILoadingInjectedProps & IDataSourceProviderInjectedProps & WrappedComponentProps;
export interface IGeoChartInnerState {
enabledLegendItems: boolean[];
showFluidLegend: boolean;
colorAssignmentItem: IColorAssignment[];
}
export interface IGeoChartInnerOptions {
geoData: IGeoData;
categoryItems: IPushpinCategoryLegendItem[];
colorStrategy: IColorStrategy;
colorPalette: IColorPalette;
}
/**
* Geo Chart react component
*/
export declare class GeoChartInner extends React.PureComponent<IGeoChartInnerProps, IGeoChartInnerState> {
static defaultProps: Partial<IGeoChartInnerProps>;
static getDerivedStateFromProps(nextProps: IGeoChartInnerProps, prevState: IGeoChartInnerState): Partial<IGeoChartInnerState>;
private readonly throttledOnWindowResize;
constructor(props: IGeoChartInnerProps);
componentDidMount(): void;
componentDidUpdate(): void;
componentWillUnmount(): void;
render(): React.ReactElement;
private renderVisualizationContent;
private syncWithLegendItemStates;
private getContainerClassName;
private getFlexDirection;
private onLegendItemClick;
private getLegendPosition;
private getLegendProps;
private getChartProps;
private renderChart;
private renderLegend;
private onWindowResize;
private updateConfigurationPanel;
}