HotXLS Docs

TXLSXChartAxis class

Unit: lxHandleX
Chart axis descriptor (orientation, log base, gridlines, min/max, major/minor units, cross point, tick-label position, display units)

Description

Chart axis descriptor (orientation, log base, gridlines, min/max, major/minor units, cross point, tick-label position, display units) The class is part of the XLSX facade (lxHandleX) and is reached through the owning workbook or worksheet; instances are not normally created directly by application code.

Declaration

type
  TXLSXChartAxis = class
    property Kind: TXLSXChartAxisKind;
    property Position: TXLSXChartAxisPosition;
    property AxisId: Integer;
    property CrossAxisId: Integer;
    property Visible: Boolean;
    property Title: WideString;
    property LogBase: Double;
    property Orientation: TXLSXChartAxisOrientation;
    property MajorGridlines: Boolean;
    property MinorGridlines: Boolean;
    property MinValue: Double;
    property MaxValue: Double;
    property MajorUnit: Double;
    property MinorUnit: Double;
    property MajorUnitSet: Boolean;
    property MinorUnitSet: Boolean;
    property CrossesAt: Double;
    property TickLblPos: WideString;
    property Crosses: TXLSXChartCrosses;
    property CrossesSet: Boolean;
    property MajorTickMark: TXLSXChartTickMark;
    property MinorTickMark: TXLSXChartTickMark;
    property DispUnits: Double;
    property ShowDispUnitsLabel: Boolean;
    property BaseTimeUnit: TXLSXChartTimeUnit;
    property MajorTimeUnit: TXLSXChartTimeUnit;
    property MinorTimeUnit: TXLSXChartTimeUnit;
    property BaseTimeUnitSet: Boolean;
    property MajorTimeUnitSet: Boolean;
    property MinorTimeUnitSet: Boolean;
    property AutoDateAxis: Boolean;
    property AutoDateAxisSet: Boolean;
    property NumberFormat: WideString;
    property NumberFormatSourceLinked: Boolean;
    property NumberFormatSet: Boolean;
    property LabelInterval: Integer;
    property TickMarkInterval: Integer;
    property NoMultiLevelLabels: Boolean;
    property TextStyle: TXLSXChartTextStyle;
    property TitleTextStyle: TXLSXChartTextStyle;
    property TitleLayout: TXLSXChartLayout;
    procedure Assign(Source: TXLSXChartAxis);
    procedure AssignClassicDateAxis(Source: TXLSChartAxis);
  end;

Properties

KindAxis type — automatic, category, value, date or series
PositionAxis position within the plot area — normal, low or high
AxisIdStable axis identifier retained across save cycles
CrossAxisIdIdentifier of the axis the crossing axis intersects
VisibleWhether the axis is rendered
TitleAxis title text
LogBaseBase of a logarithmic scale; zero selects linear
OrientationAxis direction — normal or reversed
MajorGridlinesShow major gridlines at the major unit spacing
MinorGridlinesShow minor gridlines at the minor unit spacing
MinValueFixed minimum value; NaN selects automatic
MaxValueFixed maximum value; NaN selects automatic
MajorUnitSpacing of the major gridlines; zero selects automatic
MinorUnitSpacing of the minor gridlines; zero selects automatic
MajorUnitSetWhether a positive major-unit value is explicitly present
MinorUnitSetWhether a positive minor-unit value is explicitly present
CrossesAtValue at which the crossing axis intersects; NaN selects automatic
TickLblPosTick-label position — 'nextTo', 'low', 'high' or 'none'
CrossesAxis crossing mode. Assigning Crosses emits <c:crosses val="..."/> instead of the automatic crossing; an explicit CrossesAt still wins when set (setting both is invalid OOXML and CrossesAt takes precedence)
CrossesSetWhether the crossing mode has been explicitly set
MajorTickMarkStyle of the major tick mark, drawn at the major gridline intersections
MinorTickMarkStyle of the minor tick mark, drawn at the minor gridline intersections
DispUnitsDisplay-unit scaling factor (10, 100, 1000 ...) or a built-in unit; zero disables
ShowDispUnitsLabelShow the display-unit label ('Thousands', 'Millions', ...) beside the axis
BaseTimeUnitBase time unit of a date axis; assigning it marks the value explicit even when it is xlsxChartTimeDays
MajorTimeUnitMajor time unit of a date axis; assigning it marks the value explicit
MinorTimeUnitMinor time unit of a date axis; assigning it marks the value explicit
BaseTimeUnitSetControls whether baseTimeUnit is emitted; False preserves an omitted source element instead of writing an explicit day unit
MajorTimeUnitSetControls whether majorTimeUnit is emitted independently of MajorUnit
MinorTimeUnitSetControls whether minorTimeUnit is emitted independently of MinorUnit
AutoDateAxisExplicit date-axis automatic-category detection value
AutoDateAxisSetControls whether the date-axis auto element is emitted
NumberFormatNumber format applied to axis labels; assigning it marks the format explicit
NumberFormatSourceLinkedWhether the axis label format follows its source data; assigning it marks the format explicit
NumberFormatSetControls whether the ChartML numFmt element is emitted
LabelIntervalInterval between category labels
TickMarkIntervalInterval between tick marks on a category axis
NoMultiLevelLabelsTrue displays only the leaf category level and writes the category-axis noMultiLvlLbl switch
TextStyleText style of the tick labels
TitleTextStyleText style of the axis title
TitleLayoutPosition and size of the axis title

Axis selection

xlsxAxisAutomatic selects a category axis for ordinary chart groups and a value axis for scatter or bubble groups Use xlsxAxisDate together with the time-unit properties for calendar scaling and xlsxAxisSeries for a three-dimensional depth axis
Date-axis unit values and their presence flags are independent Imported files therefore retain omitted elements, whilst assigning a unit writes that value explicitly AssignClassicDateAxis maps active Classic date-axis settings and leaves masked or invalid raw fields in the source model for lossless Classic round trips
When units or intervals are omitted, rendering inspects all visible series once, infers day, month, or year scaling, and chooses a bounded label density from the visible range, axis width, measured text, number format, and rotation Major and minor labels, coordinates, ticks, and gridlines consume the resulting shared collections
NumberFormat and NumberFormatSourceLinked retain ChartML label-format state Date axes use that format for rendered tick labels, and Orientation reverses both tick and data coordinates without collapsing duplicate dates or evenly spacing sparse dates
Category axes render hierarchical series caches from the leaf level nearest the axis to successive parent levels NoMultiLevelLabels suppresses parent levels and maps the equivalent Classic chart flag when models are converted

Text and title layout

TextStyle formats tick labels, whilst TitleTextStyle formats the axis title Both expose typed name, size, colour, emphasis and rotation settings ChartML positive rotation values are clockwise and are converted to each output backend's native convention
TitleLayout positions and sizes the axis title with normalised ChartML coordinates Use SetPositionAndSize to enable and set all four values as one Office-compatible group

Methods

procedure Assign

See also