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

43 lines 1.6 kB
import { SynapseContext } from '@/utils/context/SynapseContext'; import { FilesCountStatistics, ProjectFilesStatisticsRequest, ProjectFilesStatisticsResponse } from '@sage-bionetworks/synapse-types'; import { Component, ContextType } from 'react'; export type StatisticsPlotProps = { request: ProjectFilesStatisticsRequest; title?: string; xtitle?: string; ytitle?: string; isHorizontal?: boolean; xaxistype?: string; showlegend?: boolean; }; type StatisticsPlotState = { isLoaded: boolean; plotData?: ProjectFilesStatisticsResponse; }; declare class StatisticsPlot extends Component<StatisticsPlotProps, StatisticsPlotState> { static contextType: import("react").Context<import("@/utils/context/SynapseContext").SynapseContextType>; context: NonNullable<ContextType<typeof SynapseContext>>; constructor(props: StatisticsPlotProps); componentDidMount(): void; /** * Get data for plotly * * @returns data corresponding to plotly widget */ fetchPlotlyData: () => Promise<void>; getTrace: (traceName: string, stats: FilesCountStatistics[], orientation: string, markerColor: string) => { orientation: string; x: string[]; y: number[]; name: string; type: string; marker: { color: string; }; hovertemplate: string; }; showPlot: () => import("react/jsx-runtime").JSX.Element | undefined; render(): import("react/jsx-runtime").JSX.Element | null | undefined; } export default StatisticsPlot; //# sourceMappingURL=StatisticsPlot.d.ts.map