ag-charts-community
Version:
Advanced Charting / Charts supporting Javascript / Typescript / React / Angular / Vue
20 lines (19 loc) • 1.66 kB
TypeScript
import type { InternalAgColorType, InternalAgGradientColor, InternalAgPatternColor } from 'ag-charts-core';
import type { BBox } from '../../scene/bbox';
import { type GradientParams } from '../../scene/gradient/gradient';
import type { Shape, ShapeColor } from '../../scene/shape/shape';
export type ShapeStyle = Partial<Pick<Shape, 'fill' | 'fillOpacity' | 'stroke' | 'strokeOpacity' | 'strokeWidth' | 'lineDash' | 'lineDashOffset'>>;
export interface ShapeFillBBox {
series: BBox;
axis: BBox;
}
export declare function getShapeFill(fill: InternalAgColorType, defaultGradient: Required<InternalAgGradientColor>, defaultPattern: Required<InternalAgPatternColor>): Required<InternalAgColorType>;
export declare function getShapeFill(fill: InternalAgColorType | undefined, defaultGradient: Required<InternalAgGradientColor>, defaultPattern: Required<InternalAgPatternColor>): Required<InternalAgColorType> | undefined;
export declare function getShapeStyle<T extends {
fill?: InternalAgColorType;
}>(style: T, defaultGradient: Required<InternalAgGradientColor>, defaultPattern: Required<InternalAgPatternColor>): T;
export declare function getShapeStyle<T extends {
fill?: InternalAgColorType;
}>(style: T | undefined, defaultGradient: Required<InternalAgGradientColor>, defaultPattern: Required<InternalAgPatternColor>): T | undefined;
export declare function applyShapeFillBBox(shape: Shape, fill: ShapeColor | undefined, fillBBox?: ShapeFillBBox, fillParams?: GradientParams): void;
export declare function applyShapeStyle(shape: Shape, style: ShapeStyle, overrides?: ShapeStyle, fillBBox?: ShapeFillBBox, fillParams?: GradientParams): void;