prodap-chatbot-domain
Version:
Classes utilizadas na resposta de todas as Intents do Assistente Virtual
50 lines (49 loc) • 1.52 kB
TypeScript
import ChartAbstract, { ChartAbstractProps, Legend } from './ChartAbstract';
import { StyleType } from '../../common/types';
export type LineStyle = {
stroke?: string;
strokeWidth?: number;
strokeDasharray?: number;
};
export type ScatterStyle = {
stroke?: string;
strokeWidth?: number;
fill?: string;
scatterSize?: number;
};
export type AreaStyle = {
areaColor?: string;
};
export type LineChartRow = ChartAbstractProps & {
dotLabel?: string[] | string;
xAxisBolders?: string[];
labelVisibility?: boolean;
dotLabelStyle?: StyleType[] | StyleType;
lineStyle?: LineStyle;
scatterStyle?: ScatterStyle;
areaStyle?: AreaStyle;
};
export type LineChartProps = ChartAbstractProps & {
chartProps?: ChartAbstractProps;
titleAxisX?: string;
titleAxisY?: string;
yMax?: number;
yMin?: number;
xAxisBolders?: string[];
interpolation?: 'linear' | 'natural' | 'step';
showTooltipLabels?: boolean;
};
export default class LineChart extends ChartAbstract {
data: LineChartRow[][];
legendList: Legend[];
titleAxisX?: string;
titleAxisY?: string;
yMin?: number;
yMax?: number;
xAxisBolders?: string[];
interpolation?: 'linear' | 'natural' | 'step';
showTooltipLabels?: boolean;
constructor({ chartProps, titleAxisX, titleAxisY, yMax, yMin, xAxisBolders, interpolation, showTooltipLabels, }: LineChartProps);
addData(...rows: LineChartRow[][]): LineChart;
addLegend(...legend: Legend[]): LineChart;
}