UNPKG

on-codemerge

Version:

A WYSIWYG editor for on-codemerge is a user-friendly interface that allows users to edit and view their code in real time, exactly as it will appear in the final product

30 lines (29 loc) 1.57 kB
import { ChartOptions } from '../types'; import { HTMLEditor } from '../../../core/HTMLEditor.ts'; export declare abstract class BaseChartRenderer { protected editor: HTMLEditor; protected colors: string[]; constructor(editor: HTMLEditor); abstract render(ctx: CanvasRenderingContext2D, data: any[], options: ChartOptions): void; protected colorWithOpacity(color: string | undefined, opacity: number): string; protected getDimensions(options: ChartOptions): { padding: number; width: number; height: number; }; protected getCircleDimensions(options: ChartOptions): { centerX: number; centerY: number; radius: number; }; protected drawNoDataMessage(ctx: CanvasRenderingContext2D, options: ChartOptions): void; protected drawGrid(ctx: CanvasRenderingContext2D, options: ChartOptions, maxValue: number, showXAxis?: boolean, xLabels?: string[], chartType?: string): void; protected drawLegend(ctx: CanvasRenderingContext2D, data: any[], options: ChartOptions): void; protected getColors(options: ChartOptions): string[]; protected getTextColor(options: ChartOptions): string; protected getBackgroundColor(options: ChartOptions): string; protected getGridColor(options: ChartOptions): string; protected drawTitle(ctx: CanvasRenderingContext2D, options: ChartOptions): void; protected drawAxisLabels(ctx: CanvasRenderingContext2D, options: ChartOptions): void; protected drawBackground(ctx: CanvasRenderingContext2D, options: ChartOptions): void; }