Edit this page
// Single View Specification
  "data": ... ,
  "mark": "text",
  "encoding": ... ,

text mark represents each data point with a text instead of a point.

Documentation Overview

Text Table Heatmap


You can also use text marks as labels for other marks and set offset (dx or dy), align, and baseline properties of the mark definition.

Scatterplot with Text

Mapping a field to text channel of text mark sets the mark’s text value. For example, we can make a colored scatterplot with text marks showing the initial character of its origin, instead of point marks.

Text Config

// Top-level View Specification
  "config": {
    "text": ...,

The text property of the top-level config object sets the default properties for all text marks. If mark property encoding channels are specified for marks, these config values will be overridden.

Besides standard mark config properties, text config can contain shortTimeLabels.

Property Type Description
shortTimeLabels Boolean

Whether month names and weekday names should be abbreviated.