Skip to content
Vega-Lite templates

Chemistry — Chart: Elemental Abundance

Abundance of elements in Earth's crust.

Template previewVega-Lite
Rendering…

Make it your own.

{
  "$schema": "https://vega.github.io/schema/vega-lite/v5.json",
  "description": "Elements in Earth's crust",
  "data": {"values": [
    {"element": "Oxygen", "percent": 46.6},
    {"element": "Silicon", "percent": 27.7},
    {"element": "Aluminium", "percent": 8.1},
    {"element": "Iron", "percent": 5.0},
    {"element": "Calcium", "percent": 3.6},
    {"element": "Sodium", "percent": 2.8},
    {"element": "Other", "percent": 6.2}
  ]},
  "mark": "bar",
  "encoding": {
    "y": {"field": "element", "type": "nominal", "sort": "-x", "title": "Element"},
    "x": {"field": "percent", "type": "quantitative", "title": "% by mass"},
    "color": {"field": "element", "type": "nominal", "legend": null}
  }
}