SheetXL - v1.0.2
    Preparing search index...

    Interface IChartElementSelection

    The elements of a chart that are selected: its title, an axis, a series, a point of one, a legend entry… (see IChart.IElement), as Excel selects them with a click inside a chart.

    A sheet's view holds one beside its movable selection (IWorksheetView.getChartElementSelection). Its elements are always of the one chart whose movable is the active selected movable: selecting an element of another chart selects that chart's movable first, alone, and the selection empties when the movable selection moves on. A chart outside a workbook (createChart) takes a selection of its own, made with its chart.

    Every selected element has the same container; the chart area is the root and is never selected here: with nothing selected, the chart itself is what the movable selection holds.

    Which element a press selects is the editor's: Excel selects a series on the first press and its point on the next (IChart.getElementAt answers the point).

    interface IChartElementSelection {
        isIChartElementSelection: true;
        addListeners(
            listeners: IChartElementSelection.IListeners,
            options?: IListener.Options,
        ): Remove;
        clear(): this;
        getActive(): IElement | null;
        getChart(): IChart | null;
        getContainer(): IElement | null;
        getItems(): readonly IElement[];
        isEmpty(): boolean;
        isEquals(other: IItemSelection<IElement>): boolean;
        isSelected(item: IElement): boolean;
        select(
            elements: readonly IElement[],
            options?: IChartElementSelection.SelectOptions,
        ): this;
        traverse(reverse?: boolean): this;
        unselect(items: readonly IElement[]): this;
    }

    Hierarchy (View Summary)

    Implemented by

    Index
    isIChartElementSelection: true

    For runtime type checking.

    • Returns the chart the selected elements are of, or null when the selection is empty.

      Returns IChart | null

    • Returns what every selected item shares as its parent: null for the root (the sheet, the chart), else the group or element they are in.

      Returns IElement | null

      null when the selection is empty.

    • Returns true if nothing is selected.

      Returns boolean

    • Selects elements, replacing the selection.

      Parameters

      Returns this

      If an element is of a chart this selection cannot reach (another sheet's, or not the selection's own chart), or the chart no longer has it.

    • Selects the next element the chart shows, alone, among IChart.getElements: what pressing an arrow key does with a chart selected.

      Parameters

      • Optionalreverse: boolean

        Selects the previous one instead.

      Returns this

      With nothing selected, starts from the chart's first element after the chart area. Does nothing without a chart to walk: one selected, or the selection's own.

    • Removes items from the selection. Items not selected are ignored.

      Parameters

      Returns this