Christoph Cullmann 2024-04-28 17:33:09 +02:00
parent 4b35583782
commit e77051ccc4
1987 changed files with 1147290 additions and 5648 deletions

View file

@ -0,0 +1 @@
export {};

View file

@ -0,0 +1,6 @@
import type { PieFields, PieDB } from './pieTypes.js';
import type { RequiredDeep } from 'type-fest';
import type { PieDiagramConfig } from '../../config.type.js';
export declare const DEFAULT_PIE_CONFIG: Required<PieDiagramConfig>;
export declare const DEFAULT_PIE_DB: RequiredDeep<PieFields>;
export declare const db: PieDB;

View file

@ -0,0 +1,2 @@
import type { ExternalDiagramDefinition } from '../../diagram-api/types.js';
export declare const pie: ExternalDiagramDefinition;

View file

@ -0,0 +1,2 @@
import type { DiagramDefinition } from '../../diagram-api/types.js';
export declare const diagram: DiagramDefinition;

View file

@ -0,0 +1,13 @@
import type { DrawDefinition } from '../../diagram-api/types.js';
/**
* Draws a Pie Chart with the data given in text.
*
* @param text - pie chart code
* @param id - diagram id
* @param _version - MermaidJS version from package.json.
* @param diagObj - A standard diagram containing the DB and the text and type etc of the diagram.
*/
export declare const draw: DrawDefinition;
export declare const renderer: {
draw: DrawDefinition;
};

View file

@ -0,0 +1,3 @@
import type { DiagramStylesProvider } from '../../diagram-api/types.js';
declare const getStyles: DiagramStylesProvider;
export default getStyles;

View file

@ -0,0 +1,53 @@
import type { PieDiagramConfig } from '../../config.type.js';
import type { DiagramDB } from '../../diagram-api/types.js';
export interface PieFields {
sections: Sections;
showData: boolean;
config: PieDiagramConfig;
}
export interface PieStyleOptions {
fontFamily: string;
pie1: string;
pie2: string;
pie3: string;
pie4: string;
pie5: string;
pie6: string;
pie7: string;
pie8: string;
pie9: string;
pie10: string;
pie11: string;
pie12: string;
pieTitleTextSize: string;
pieTitleTextColor: string;
pieSectionTextSize: string;
pieSectionTextColor: string;
pieLegendTextSize: string;
pieLegendTextColor: string;
pieStrokeColor: string;
pieStrokeWidth: string;
pieOuterStrokeWidth: string;
pieOuterStrokeColor: string;
pieOpacity: string;
}
export type Sections = Record<string, number>;
export interface D3Sections {
label: string;
value: number;
}
export interface PieDB extends DiagramDB {
getConfig: () => Required<PieDiagramConfig>;
clear: () => void;
setDiagramTitle: (title: string) => void;
getDiagramTitle: () => string;
setAccTitle: (title: string) => void;
getAccTitle: () => string;
setAccDescription: (description: string) => void;
getAccDescription: () => string;
addSection: (label: string, value: number) => void;
getSections: () => Sections;
cleanupValue: (value: string) => number;
setShowData: (toggle: boolean) => void;
getShowData: () => boolean;
}

View file

@ -0,0 +1,2 @@
export default getStyles;
declare function getStyles(options: any): string;