dce-charts
Version:
Harvard DCE's React Charting Wrapper
141 lines (124 loc) • 2.42 kB
TypeScript
import React from 'react';
/**
* Single color (rgb)
* @author Gabe Abrams
*/
declare type Color = {
r: number;
g: number;
b: number;
};
/**
* DoughnutChart, wrapper around the ChartJS Doughnut chart for DCE widgets
* @author Jackson Parsells
*/
declare type Props$3 = {
title: string;
showTitle?: boolean;
segments: {
value: number;
label: string;
color?: Color;
}[];
showLegend?: boolean;
};
declare const DoughnutChart: React.FC<Props$3>;
/**
* LineChart, wrapper around the ChartJS Line chart for DCE widgets
* @author Jackson Parsells
*/
declare type Props$2 = {
title: string;
showTitle?: boolean;
points: {
value: number;
label: string;
color?: Color;
}[];
};
declare const LineChart: React.FC<Props$2>;
/**
* HorizontalBarChart, wrapper around the ChartJS Horizontal Bar chart for DCE
* widgets
* @author Jackson Parsells
*/
declare type Props$1 = {
title: string;
showTitle?: boolean;
bars: {
value: number;
label: string;
color?: Color;
}[];
};
declare const HorizontalBarChart: React.FC<Props$1>;
/**
* VerticalBarChart, wrapper around the ChartJS Vertical Bar chart for DCE
* widgets
* @author Jackson Parsells
*/
declare type Props = {
title: string;
showTitle?: boolean;
bars: {
value: number;
label: string;
color?: Color;
}[];
};
declare const VerticalBarChart: React.FC<Props>;
/**
* Blue preset color
* @author Gabe Abrams
*/
declare const BlueColor: {
r: number;
g: number;
b: number;
};
/**
* Green preset color
* @author Gabe Abrams
*/
declare const GreenColor: {
r: number;
g: number;
b: number;
};
/**
* Orange preset color
* @author Gabe Abrams
*/
declare const OrangeColor: {
r: number;
g: number;
b: number;
};
/**
* Purple preset color
* @author Gabe Abrams
*/
declare const PurpleColor: {
r: number;
g: number;
b: number;
};
/**
* Red preset color
* @author Gabe Abrams
*/
declare const RedColor: {
r: number;
g: number;
b: number;
};
/**
* Yellow preset color
* @author Gabe Abrams
*/
declare const YellowColor: {
r: number;
g: number;
b: number;
};
export { BlueColor, DoughnutChart, GreenColor, HorizontalBarChart, LineChart, OrangeColor, PurpleColor, RedColor, VerticalBarChart, YellowColor };