Elm-Vega Configuration Tests

Default configuration

Colour and Font Configuration

Dark background, light axis and serif text

Mark Configuration

Outline marks
Solid scatter and bar, outline stream

Autosize

Autosize to fit with different padding on each side

View Backgrounds

Configuration sets default background to yellow and default plot area background to light brown, overridden with charts two and three charts having their own custom plot area backgrounds.

Axis Configuration

Italic serif axis title and labels flushed to end of axis.
Both axes red
x axis red
y axis red
bottom axis red
left axis red
top axis red
right axis red
band axis red
quantitative axis red
temporal axis red
discrete axis red
point axis red

Title Configuration

Multi-line title and multi-line subtitle with default configurations.
Title and subtitle appearance controlled directly with title parameters.
Title and subtitle appearance via config options (should be identical to previous chart.).

Scale Configuration

Configure x-scale to reverse (right to left).

Axis and Legend Disabling

Remove axis and legends by default.

Interaction configuration

Default to mouseover for point selection.

Configuration with parameters

Configure view with bound parameters and top-level config with static parameters.
Configure title with bound parameters.
Configure scale with bound parameters.
Configure axis with bound parameters.
Configure legend with bound parameters.
More legend configuration with bound parameters.

Number formatting

Configure default number appearance. Numbers should be displayed to 4 decimal places.
Configure number appearance with a custom formatter for displaying measurement units
Configure numbers to use German locale (comma separating decimals, point separating thousands and euro symbol as default currency)
Configure default date appearance. Text marks should be abbreviated years.
Custom metadata added to spec. View JSON spec to see usermeta object.

Source