import { CellRenderer, TextRenderer, GraphicsContext } from '@lumino/datagrid'; /** * A cell renderer which renders data values as bars. */ export declare class BarRenderer extends TextRenderer { /** * Construct a new bar renderer. * * @param options - The options for initializing the renderer. */ constructor(options?: BarRenderer.IOptions); /** * The CSS color for drawing the bar. */ readonly barColor: CellRenderer.ConfigOption; /** * The value of the bar, between 0. and 1. */ readonly barValue: CellRenderer.ConfigOption; /** * The orientation of the bar, can be horizontal or vertical. */ readonly orientation: CellRenderer.ConfigOption; /** * The horizontal alignment of the bar, default is 'bottom'. */ readonly barVerticalAlignment: CellRenderer.ConfigOption; /** * The vertical alignment of the bar, default is 'left'. */ readonly barHorizontalAlignment: CellRenderer.ConfigOption; /** * Whether to draw the text on the bar or not, default is true. */ readonly showText: CellRenderer.ConfigOption; /** * Paint the content for a cell. * * @param gc - The graphics context to use for drawing. * * @param config - The configuration data for the cell. */ paint(gc: GraphicsContext, config: CellRenderer.CellConfig): void; /** * Prepare the graphics context for drawing a column of cells. * * @param gc - The graphics context to prepare. * * @param row - The index of the first row to be rendered. * * @param col - The index of the column to be rendered. * * @param field - The field descriptor for the column, or `null`. */ prepare(gc: GraphicsContext, config: CellRenderer.CellConfig): void; /** * Draw the bar. * * @param gc - The graphics context to use for drawing. * * @param config - The configuration data for the cell. */ drawBar(gc: GraphicsContext, config: CellRenderer.CellConfig): void; } /** * The namespace for the `BarRenderer` class statics. */ export declare namespace BarRenderer { /** * A type alias for the supported orientation modes. */ type Orientation = 'horizontal' | 'vertical'; /** * An options object for initializing a bar renderer. */ interface IOptions extends TextRenderer.IOptions { /** * The background color for the cells. * * The default is `''`. */ barColor?: CellRenderer.ConfigOption; /** * The value of the bar, between 0. and 1.. * * The default is `0.`. */ barValue?: CellRenderer.ConfigOption; /** * The orientation of the bar, can be horizontal or vertical. * * The default is `horizontal`. */ orientation?: CellRenderer.ConfigOption; /** * The horizontal alignment of the bar, can be bottom, center or top. * * The default is `bottom`. */ barVerticalAlignment?: CellRenderer.ConfigOption; /** * The vertical alignment of the bar, can be left, center or right. * * The default is `left`. */ barHorizontalAlignment?: CellRenderer.ConfigOption; /** * Whether to draw the text on the bar or not. * * The default is true. */ showText?: CellRenderer.ConfigOption; } }