This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//------- DYNAMIC FORMATTING ---------\\ | |
------------------------------ | |
var _selectedMeasure = SELECTEDMEASURE() | |
var _digitCount = | |
IFERROR( | |
LEN( | |
CONVERT( | |
INT( _selectedMeasure ), | |
STRING ) | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://vega.github.io/schema/vega-lite/v5.json", | |
"data": {"url": "data/penguins.json"}, | |
"transform": [ | |
{ | |
"window": [ | |
{ | |
"op": "row_number", | |
"as": "row_num" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://vega.github.io/schema/vega-lite/v5.json", | |
"name": "best_number_formatting", | |
"description": "A simple bar chart with conditional coloring for the highest and lowest values and data labels.", | |
"width": 450, | |
"height": 350, | |
"data": { | |
"values": [ | |
{"item": "A", "value": 0.8}, | |
{"item": "AA", "value": 98}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://vega.github.io/schema/vega-lite/v5.json", | |
"description": "A ranged dot plot that uses 'layer' to convey changing life expectancy for the five most populous countries (between 1955 and 2000).", | |
"data": { | |
"values": [ | |
{"country": "China", "year": 1955, "life_expect": 41}, | |
{"country": "China", "year": 2000, "life_expect": 72}, | |
{"country": "India", "year": 1955, "life_expect": 37}, | |
{"country": "India", "year": 2000, "life_expect": 62}, | |
{"country": "United States", "year": 1955, "life_expect": 68}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://vega.github.io/schema/vega-lite/v5.json", | |
"description": "A folded bar chart with data labels showing the grand total of two Products for each category.", | |
"data": { | |
"values": [ | |
{"category": "A", "HotDrinks": 28, "ColdDrinks": 20}, | |
{"category": "B", "HotDrinks": 55, "ColdDrinks": 43}, | |
{"category": "C", "HotDrinks": 43, "ColdDrinks": 91}, | |
{"category": "D", "HotDrinks": 91, "ColdDrinks": 81}, | |
{"category": "E", "HotDrinks": 81, "ColdDrinks": 53}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://vega.github.io/schema/vega-lite/v5.json", | |
"description": "A folded bar chart with data labels showing the grand total of two measures for each category.", | |
"data": { | |
"values": [ | |
{"category": "A", "HotDrinks": 28, "ColdDrinks": 20}, | |
{"category": "B", "HotDrinks": 55, "ColdDrinks": 43}, | |
{"category": "C", "HotDrinks": 43, "ColdDrinks": 91}, | |
{"category": "D", "HotDrinks": 91, "ColdDrinks": 81}, | |
{"category": "E", "HotDrinks": 81, "ColdDrinks": 53}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://vega.github.io/schema/vega-lite/v5.json", | |
"description": "A simple radial chart with embedded data.", | |
"data": {"values": [12, 23, 47, 52, 19]}, | |
"layer": [ | |
{"mark": {"type": "arc", "innerRadius": 20, "stroke": "#fff"}}, | |
{ | |
"mark": { | |
"type": "text", | |
"radiusOffset": 10, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://vega.github.io/schema/vega-lite/v5.json", | |
"name": "vl_bar_minmax_avgline_labels_v1", | |
"description": "A simple bar chart with conditional coloring for the highest and lowest values and data labels.", | |
"width": 350, | |
"data": { | |
"values": [ | |
{"item": "A", "value": 2800000}, | |
{"item": "B", "value": 5500000}, | |
{"item": "C", "value": 4300000}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://vega.github.io/schema/vega-lite/v5.json", | |
"description": "Multi-series line chart with labels and highest point markers.", | |
"width": 400, | |
"height": 300, | |
"data": {"url": "data/stocks.csv"}, | |
"transform": [{"filter": "datum.symbol!=='IBM' && datum.symbol!=='GOOG'"}], | |
"encoding": { | |
"color": { | |
"field": "symbol", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://vega.github.io/schema/vega-lite/v5.json", | |
"name": "vl_bar_minmax_avgline_labels_v1", | |
"description": "A simple bar chart with conditional coloring for the highest and lowest values and data labels.", | |
"width": 350, | |
"data": { | |
"values": [ | |
{"a": "A", "b": 2800000}, | |
{"a": "B", "b": 5500000}, | |
{"a": "C", "b": 4300000}, |