SheetXL - v1.0.2
    Preparing search index...

    Interface IElement

    A part of a chart: its title, an axis, a series, a point, a trendline… Every part is one, and each is the same object however often it is asked for, across edits that do not remove it.

    Each part's own interface says what it sets; this says where it is. Its type flag (isISeries, isIAxis, isITitle…) narrows it to that interface.

    interface IElement {
        getChart(): IChart;
        getElementType(): IChart.ElementType;
        getParent(): IElement | null;
        getPath(): string;
        getStyle?(): IShapeStyle;
    }

    Hierarchy (View Summary)

    Index
    • Returns the chart the element is part of.

      Returns IChart

    • Returns what the element is. A series' marker and a point's are both 'marker', and the major and minor gridlines both 'gridlines'; their paths tell them apart.

      Returns IChart.ElementType

    • Returns the element this one is part of: a point's series, a gridline's axis, a legend entry's legend. The parts at the top (the title, the legend, the plot area, an axis, a series, a group) are the chart area's; the chart area has none.

      Returns IElement | null

    • Returns where the element is in its chart, as IChart.getElement takes it.

      Returns string

      A path is its parts' names joined by /, and does not change while the part is there:

      • chartArea, title, legend, legend/entries/<n>, plotArea, dataTable, and dataLabels (every series' at once);
      • axes/<primary|secondary>/<category|value|series>, and an axis's …/title, …/majorGridlines and …/minorGridlines;
      • series/<key>, and a series' …/marker, …/dataLabels, …/errorBars/<x|y>, …/trendlines/<n>, …/trendlines/<n>/label, …/points/<n>, …/points/<n>/marker and …/points/<n>/dataLabel;
      • groups/<n>, and a group's …/upDownBars, …/hiLoLines, …/dropLines and …/seriesLines.

      A series' key is its index in the file (c:idx), which an edit does not change; its place in the plot order can change. A point, a trendline, a legend entry and a group are named by their place, from 0: when one before it is removed, the path names the one that took its place.

    • Returns what the element is drawn with, where it is drawn with a fill or a line. An element with text answers an ITextBoxStyle, which holds its font too.

      Returns IShapeStyle