import React, { PureComponent } from 'react'; import type { dh as DhType } from '@deephaven/jsapi-types'; import './ChartBuilder.scss'; import type IrisGridModel from '../IrisGridModel'; export type ChartBuilderSettings = { type: DhType.plot.SeriesPlotStyle; series: string[]; xAxis: string; isLinked: boolean; }; export type SeriesItem = { id: string; value: string; }; interface ChartBuilderProps { model: IrisGridModel; onSubmit: (obj: ChartBuilderSettings) => void; onChange: (obj: ChartBuilderSettings) => void; } interface ChartBuilderState { /** The selected chart type */ type: DhType.plot.SeriesPlotStyle; /** Array of column names of the series to display */ seriesItems: readonly SeriesItem[]; /** The column name to use as the x-axis */ xAxis: string; /** Whether the newly created chart should be linked with the table (update when filters update) */ isLinked: boolean; } /** * Form for configuring all the settings when creating a console. */ declare class ChartBuilder extends PureComponent { static getMaxSeriesCount(dh: typeof DhType, type: DhType.plot.SeriesPlotStyle): number; static makeSeriesItem(value: string): SeriesItem; static makeDefaultSeriesItems(dh: typeof DhType, type: DhType.plot.SeriesPlotStyle, columns: readonly DhType.Column[]): SeriesItem[]; static getDefaultXAxis(type: DhType.plot.SeriesPlotStyle, columns: readonly DhType.Column[]): string | null; constructor(props: ChartBuilderProps); getTypes(): number[]; /** * Converts the provided chart type into a readable type. * Just replaces underscores with spaces and capitals the first letter of each word. */ getTypeName(type: number): string | number; getTypeIcon(type: DhType.plot.SeriesPlotStyle): React.ReactElement | null; getXAxisLabel(type: DhType.plot.SeriesPlotStyle): string; getSeriesLabel(type: DhType.plot.SeriesPlotStyle): string; handleAddSeries(): void; handleLinkStateChange(value: string): void; handleReset(): void; handleSeriesChange(eventTargetValue: string, index: number): void; handleSeriesDeleteClick(index: number): void; handleSubmit(event: React.FormEvent): void; handleTypeClick(index: number): void; handleXAxisChange(eventTargetValue: string): void; sendChange(): void; render(): JSX.Element; } export default ChartBuilder; //# sourceMappingURL=ChartBuilder.d.ts.map