Skip to content
Vega-Lite templates

Chemistry — Chart: Bond Lengths

Typical covalent bond lengths.

Template previewVega-Lite
Rendering…

Make it your own.

{
  "$schema": "https://vega.github.io/schema/vega-lite/v5.json",
  "description": "Average bond lengths",
  "data": {"values": [
    {"bond": "C-C", "pm": 154},
    {"bond": "C=C", "pm": 134},
    {"bond": "C#C", "pm": 120},
    {"bond": "C-H", "pm": 109},
    {"bond": "O-H", "pm": 96},
    {"bond": "C=O", "pm": 122}
  ]},
  "mark": "bar",
  "encoding": {
    "x": {"field": "bond", "type": "nominal", "sort": "-y", "title": "Bond"},
    "y": {"field": "pm", "type": "quantitative", "title": "length (pm)"},
    "color": {"field": "bond", "type": "nominal", "legend": null}
  }
}