zz-chart
Version:
Alauda Chart components by Alauda Frontend Team
34 lines (33 loc) • 1.19 kB
TypeScript
/// <reference types="web" />
import UPlot from 'uplot';
import { StepType } from '../components/shape/line.js';
import { ShapeOption } from '../types/index.js';
import { ShapeType } from '../utils/component.js';
export declare function scaleGradient(u: UPlot, scaleKey: string, ori: number, scaleStops: Array<[number, string]>, discrete?: boolean): string | CanvasGradient;
export declare function getSeriesPathType(type: ShapeType, color: string, options: ShapeOption, stepType?: StepType): {
paths: UPlot.Series.PathBuilder;
width: number;
stroke: string;
} | {
stroke: string;
fill: (self: UPlot, seriesIdx: number) => CanvasGradient;
width: number;
paths: UPlot.Series.PathBuilder;
} | {
paths: UPlot.Series.PathBuilder;
fill: string;
width: number;
} | {
stroke: string;
paths: UPlot.Series.Points.PathBuilder;
width: number;
} | {
paths: UPlot.Series.PathBuilder;
width: number;
};
export declare const UPLOT_AXIS_FONT_SIZE = 12;
export declare function axesSpace(self: uPlot, axisIdx: number, scaleMin: number): number;
/**
* @beta
*/
export declare function measureText(text: string, fontSize?: number): TextMetrics;