UNPKG

synapse-react-client

Version:

[![npm version](https://badge.fury.io/js/synapse-react-client.svg)](https://badge.fury.io/js/synapse-react-client) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettie

38 lines 1.44 kB
import Plotly from 'plotly.js-basic-dist'; import { CSSProperties } from 'react'; import { Dictionary, GraphItem, PlotStyle } from './types'; export type DotPlotProps = { plotData: GraphItem[]; layoutConfig: Partial<Plotly.Layout>; optionsConfig: Partial<Plotly.Config>; label?: string; style?: CSSProperties; id: string; isLegend?: boolean; isXAxis?: boolean; xMax?: number; plotStyle?: PlotStyle; markerSymbols?: Dictionary; onClick?: (e: Readonly<Plotly.PlotMouseEvent>) => void; }; /** * Generates a sequence of n numbers centered around 0 * * Examples: * if n is 4, the result would be [-1.5, -0.5, 0.5, 1.5] * if n is 5 the result would be [-2, -1, 0, 1, 2] * @param n */ export declare function generateCenteredSequence(n: number): number[]; /** * Returns a set of y values where * - if an x value is unique, the y value is 0 * - if an x value is repeated, the y value is an offset from 0 * * This has the effect of preventing overlapping points in a dot plot * @param xDataByGroup */ export declare function getYDataForDotPlotOffset(xDataByGroup: Record<string, number[]>): Record<string, number[]>; declare function DotPlot({ plotData, optionsConfig, layoutConfig, label, id, xMax, style, markerSymbols, plotStyle, onClick, isLegend, isXAxis, }: DotPlotProps): import("react/jsx-runtime").JSX.Element; export default DotPlot; //# sourceMappingURL=DotPlot.d.ts.map