UNPKG

synapse-react-client

Version:

[![Build Status](https://travis-ci.com/Sage-Bionetworks/Synapse-React-Client.svg?branch=main)](https://travis-ci.com/Sage-Bionetworks/Synapse-React-Client) [![npm version](https://badge.fury.io/js/synapse-react-client.svg)](https://badge.fury.io/js/synaps

41 lines (40 loc) 1.37 kB
import * as React from 'react'; import { ProjectFilesStatisticsRequest, ProjectFilesStatisticsResponse, FilesCountStatistics } from '../utils/synapseTypes/'; export declare type StatisticsPlotProps = { request: ProjectFilesStatisticsRequest; title?: string; xtitle?: string; ytitle?: string; isHorizontal?: boolean; xaxistype?: string; showlegend?: boolean; }; declare type StatisticsPlotState = { isLoaded: boolean; plotData?: ProjectFilesStatisticsResponse; }; declare class StatisticsPlot extends React.Component<StatisticsPlotProps, StatisticsPlotState> { static contextType: React.Context<import("../utils/SynapseContext").SynapseContextType | undefined>; 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: () => JSX.Element | undefined; render(): JSX.Element | null | undefined; } export default StatisticsPlot;