hvega-0.11.0.1: tests/specs/textformat/textFormat1.vl
{
"$schema": "https://vega.github.io/schema/vega-lite/v4.json",
"data": {
"values": [
{
"a": "1981",
"b": 2011
},
{
"a": "1982",
"b": 2010
},
{
"a": "1983",
"b": 2009
},
{
"a": "1984",
"b": 2008
},
{
"a": "1985",
"b": 2007
},
{
"a": "1986",
"b": 2006
},
{
"a": "1987",
"b": 2005
},
{
"a": "1988",
"b": 2004
},
{
"a": "1989",
"b": 2003
},
{
"a": "1990",
"b": 2002
},
{
"a": "1991",
"b": 2001
},
{
"a": "1992",
"b": 2000
},
{
"a": "1993",
"b": 1999
},
{
"a": "1994",
"b": 1998
},
{
"a": "1995",
"b": 1997
},
{
"a": "1996",
"b": 1996
},
{
"a": "1997",
"b": 1995
},
{
"a": "1998",
"b": 1994
},
{
"a": "1999",
"b": 1993
},
{
"a": "2000",
"b": 1992
},
{
"a": "2001",
"b": 1991
}
]
},
"height": 400,
"layer": [
{
"encoding": {
"x": {
"field": "a",
"type": "temporal"
},
"y": {
"field": "b",
"type": "quantitative"
}
},
"mark": "circle"
},
{
"encoding": {
"color": {
"field": "a",
"legend": {
"format": "%b %Y",
"formatType": "time"
},
"type": "temporal"
},
"text": {
"field": "a",
"format": "%b `%y",
"formatType": "time",
"type": "temporal"
},
"x": {
"axis": {
"format": "%y",
"formatType": "time"
},
"field": "a",
"type": "temporal"
},
"y": {
"axis": {
"format": ".2f",
"formatType": "number"
},
"field": "b",
"scale": {
"zero": false
},
"type": "quantitative"
}
},
"mark": {
"dx": 22,
"dy": 4,
"type": "text"
}
}
],
"width": 600
}