svgchrt
Version:
A way to easily create SVG-based charts without having to worry about positioning of titles, subtitles or legends.
56 lines • 1.5 kB
TypeScript
import { LegendPosition, LegendOrientation } from './interfaces';
export interface Margin extends Record<string, number> {
top: number;
right: number;
bottom: number;
left: number;
}
export interface LegendItem extends Record<string, unknown> {
text: string;
colour?: string;
shape?: string;
cx?: string;
cy?: string;
d?: string;
height?: string;
r?: string;
rx?: string;
ry?: string;
width?: string;
x?: string;
y?: string;
}
export declare const buildSurround: () => {
(): void;
margin(_: Margin): any;
getMargin(): Margin;
title(_: string): any;
getTitle(): string;
subtitle(_: string): any;
getSubtitle(): string;
width(_: number): any;
getWidth(): number;
height(_: number): any;
getHeight(): number;
legendPosition(_: LegendPosition): any;
getLegendPosition(): LegendPosition;
legendDisplay(_: boolean): any;
getLegendDisplay(): boolean;
legendItems(_: LegendItem[]): any;
getLegendItems(): LegendItem[];
legendOrientation(_: LegendOrientation): any;
getLegendOrientation(): LegendOrientation;
legendDisplacesTitle(_: boolean): any;
getLegendDisplacesTitle(): boolean;
target(_: SVGElement): any;
getTarget(): SVGElement;
chartArea(): {
g: SVGGraphicsElement;
x1: number;
x2: number;
y1: number;
y2: number;
};
};
export default buildSurround;
//# sourceMappingURL=buildSurround.d.ts.map