meo-canvas - v8.0.1
    Preparing search index...

    Interface BaseChartOptions<T>

    Options every chart type understands.

    interface BaseChartOptions<T extends ChartType> {
        labelColor?: string;
        labelFontSize?: number;
        legendPosition?: "left" | "right" | "bottom" | "top";
        renderLabelItem?: (
            props: { index: number; item: LabelItem<T> },
        ) => ChartItem;
        renderLegendItem?: (
            props: { color: string; index: number; item: LegendItem<T> },
        ) => ChartItem;
        showLabels?: boolean;
        showLegend?: boolean;
    }

    Type Parameters

    Index
    labelColor?: string

    Colour of the label text. Accepts standard CSS colour strings.

    labelFontSize?: number

    Size of the label text.

    Pixels.

    12
    
    legendPosition?: "left" | "right" | "bottom" | "top"

    Which side of the plot the legend sits on.

    'bottom'
    
    renderLabelItem?: (props: { index: number; item: LabelItem<T> }) => ChartItem

    Draws one axis or slice label in place of the built-in one. Return nothing to leave it out.

    renderLegendItem?: (
        props: { color: string; index: number; item: LegendItem<T> },
    ) => ChartItem

    Draws one legend entry in place of the built-in one. Return nothing to leave that entry out.

    ({ item, color }) => Row({ children: [Box({ width: 12, height: 12, backgroundColor: color }), Text(item.label)] })
    
    showLabels?: boolean

    Draw the label beside each value — the category name on a bar or line chart, the slice's own label on a pie or doughnut.

    true
    
    showLegend?: boolean

    Draw the legend.

    true