UNPKG

@neo4j-ndl/react-charts

Version:

React implementation of charts from Neo4j Design System

77 lines 3.26 kB
/** * * Copyright (c) "Neo4j" * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. * * Neo4j is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ import { Chart } from '@neo4j-ndl/react-charts'; import { type Page } from '@playwright/test'; import { type ComponentProps } from 'react'; export declare const chartColorsAfterHighlighting: Record<number, string>; export declare const multiSeriesChartProps: { dataset: { dimensions: string[]; source: (string | number)[][]; }; xAxis: { type: "category"; }; yAxis: { type: "value"; }; series: { name: string; type: "line"; encode: { x: string; y: string; }; }[]; legend: { show: boolean; wrappingType: "wrapping"; }; option: {}; }; export declare const multiSeriesChart: ({ chartProps, width, height, }: { chartProps?: Partial<ComponentProps<typeof Chart>>; width?: string; height?: string; }) => import("react/jsx-runtime").JSX.Element; export declare const expectChartElementVisible: (page: Page) => Promise<void>; /** * Checks so a single series is not blurred. */ export declare const expectSingleSeriesNotToBeBlurred: (page: Page, seriesName: string) => Promise<void>; /** * Checks so that the seriesNamesToBeHighlighted are visible in the chart and that other series are blurred. */ export declare const expectLegendSeriesToBeHighlightedInChart: (page: Page, seriesNamesToBeHighlighted: string[]) => Promise<void>; /** * Identifies if the series are visible / not visible in the chart by checking for a path with the series color (lacks other unique identifiers) * Apache Echarts displays the path color in both hex, rgb and a slightly adjusted rgb when highlighted, therefor we need to check for all three when looking for the series in the chart. */ export declare const expectLegendSeriesToBeVisibleInChart: (page: Page, seriesNamesToBeVisible: string[]) => Promise<void>; export declare const expectLegendsSelected: (page: Page, seriesNames: string[]) => Promise<void>; export declare const expectLegendsDeselected: (page: Page, seriesNames: string[]) => Promise<void>; export declare const expectAllLegendsNeutral: (page: Page) => Promise<void>; /** * Clicks the series legend item and hover the chart to make sure no blur effect exists on other series in the chart. * This is needed to make sure the series has the correct color when looking for them in the chart in later steps. */ export declare const clickSeries: (page: Page, seriesName: string) => Promise<void>; //# sourceMappingURL=chart-test-utils.d.ts.map