@microsoft/windows-admin-center-sdk
Version:
Microsoft - Windows Admin Center Shell
37 lines (36 loc) • 1.22 kB
TypeScript
import { ChartData } from 'chart.js';
/**
* Extends ChartData by adding a (required) total field.
*/
export interface CustomHorizontalBarChartData extends ChartData {
total: number;
}
/**
* Pass an object with these propeties into the update function of a Capacity Bar Chart.
*/
export interface CapacityBarChartUpdateData {
totalCapacity: number;
capacityUsed: number;
freeLabel?: string;
usedLabel?: string;
totalLabel?: string;
}
export interface HorizontalBar {
/**
* Color should be one of the offical sme color names (e.g. 'red', or 'base', etc). Used for background fill or striped fill color.
*/
color?: string;
/**
* The value used to calculate width of the bar, expressed as a percent of total chart width.
* If chart has a total input value specified, then this will be divided by total before expressing as a percent.
*/
value: number;
/**
* Bars with right property will be stacked from the right instead of left
*/
right?: boolean;
/**
* Used to set background to be striped with color/alpha combo privided insetad of solid color fill
*/
stripeAlpha?: number;
}