Trail
Edit this page{
"data": ... ,
"mark": "trail",
"encoding": ... ,
...
}
The trail
mark represents the data points stored in a field with a line connecting all of these points. Trail is similar to the line
mark but a trail can have variable widths determined by backing data. Unlike lines, trails do not support different interpolation methods and use fill
(not stroke
) for their color. Trail marks are useful if you want to draw lines with changing size to reflect the underlying data.
Documentation Overview
Trail Mark Properties
// Single View Specification
{
...
"mark": {
"type": "trail",
...
},
"encoding": ... ,
...
}
A trail mark definition can contain any standard mark properties and the following properties:
Property | Type | Description |
---|---|---|
orient | String |
The orientation of a non-stacked bar, tick, area, and line charts. The value is either horizontal (default) or vertical.
|
Examples
A Line Chart with varying size using trail
mark
Trail Config
// Top-level View Specification
{
...
"config": {
"trail": ...,
...
}
}
The trail
property of the top-level config
object sets the default properties for all trail marks. If mark property encoding channels are specified for marks, these config values will be overridden.
The trail config can contain any trail mark properties (except type
, style
, and clip
).