Skip to content
Vega-Lite templates

Chemistry — Chart: Acid Strength (Ka)

Acid dissociation constants on a log scale.

Template previewVega-Lite
Rendering…

Make it your own.

{
  "$schema": "https://vega.github.io/schema/vega-lite/v5.json",
  "description": "Ka of common acids",
  "data": {"values": [
    {"acid": "Hydrochloric", "Ka": 1000000},
    {"acid": "Sulfuric (1st)", "Ka": 1000},
    {"acid": "Phosphoric", "Ka": 0.0071},
    {"acid": "Ethanoic", "Ka": 0.0000175},
    {"acid": "Carbonic", "Ka": 0.0000004},
    {"acid": "Boric", "Ka": 0.00000000058}
  ]},
  "mark": "bar",
  "encoding": {
    "y": {"field": "acid", "type": "nominal", "sort": "-x", "title": "Acid"},
    "x": {"field": "Ka", "type": "quantitative", "scale": {"type": "log"}, "title": "Ka (log)"},
    "color": {"field": "acid", "type": "nominal", "legend": null}
  }
}