struct EE::UI::Charts::ChartStyle

Overview

View appearance. More…

#include <uichart.hpp>

struct ChartStyle {
    // fields

    Font* font { nullptr };
    Float fontSize { 12.f };
    Float tickLength { 4.f };
    Float tickLabelGap { 6.f };
    Float axisLabelGap { 25.f };
    Float axisLabelInset { 2.f };
    Float leftMargin { 50.f };
    Float rightMargin { 14.f };
    Float topMargin { 12.f };
    Float topMarginWithLabel { 26.f };
    Float bottomMargin { 34.f };
    Float bottomMarginWithLabel { 52.f };
    Float minimumAxisMargin { 42.f };
    Float axisLabelPadding { 12.f };
    Float rightAxisLabelPadding { 16.f };
    Float xTickSpacing { 80.f };
    Float xTickLabelAngle {       0.f };
    ChartTickLabelAnchor xTickLabelAnchor {        ChartTickLabelAnchor::Center };
    Float yTickSpacing { 50.f };
    Float hoverDistance { 10.f };
    Float axisWidth { 1.f };
    std::optional<Color> axisColor;
    std::optional<Color> tickColor;
    std::optional<Color> tickLabelColor;
    std::optional<Color> axisLabelColor;
    std::optional<Color> hoverColor;
    std::optional<Color> seriesColor;
    ChartGridStyle verticalGrid { ChartGridMode::Disabled, 80.0 };
    ChartGridStyle horizontalGrid { ChartGridMode::Disabled, 50.0 };
};

Detailed Documentation

View appearance. Linear measurements use device-independent pixels (dp), including grid spacing in screen mode. Tick spacing is a target: the axis chooses readable intervals near that distance. Colors left unset follow the UI theme. The style does not own its optional font or grid axes.

Fields

Font* font { nullptr }

Non-owning; null uses the current UI theme font.

Float xTickLabelAngle {      0.f }

Clockwise degrees, clamped to [-90, 90]; -90 reads bottom-to-top.

ChartTickLabelAnchor xTickLabelAnchor {       ChartTickLabelAnchor::Center }

Label position attached to the X tick after rotation.