@mui/x-charts
Version:
The community edition of MUI X Charts components.
13 lines • 505 B
TypeScript
/**
* Solution of the equations
* W = barWidth * N + offset * (N-1)
* offset / (offset + barWidth) = r
* @param bandWidth (W) The width available to place bars.
* @param groupCount (N) The number of bars to place in that space.
* @param gapRatio (r) The ratio of the gap between bars over the bar width.
* @returns The bar width and the offset between bars.
*/
export declare function getBandSize(bandWidth: number, groupCount: number, gapRatio: number): {
barWidth: number;
offset: number;
};