Horizontal box plot
Page load time per page type, horizontal.
Open the chart without page chrome ↗
const options = {
chart: {
height: 380,
fontFamily: "Inter, Geist, \"IBM Plex Sans\", system-ui, sans-serif",
type: "boxPlot",
toolbar: {
show: false
}
},
series: [
{
data: [
{
x: "Home",
y: [0.29, 1, 1.2, 1.4, 1.81]
},
{
x: "Search",
y: [0.66, 1.3, 1.5, 1.7, 2.04]
},
{
x: "Product",
y: [1.38, 1.6, 1.9, 2.1, 2.46]
},
{
x: "Cart",
y: [1.57, 1.9, 2.1, 2.3, 2.7]
},
{
x: "Checkout",
y: [1.79, 2.2, 2.4, 2.6, 3.14]
},
{
x: "Account",
y: [2.05, 2.5, 2.7, 2.9, 3.4]
}
]
}
],
plotOptions: {
bar: {
horizontal: true,
barHeight: "50%"
},
boxPlot: {
colors: {
upper: "#0d9488",
lower: "#5eead4"
}
}
},
title: {
text: "Page load time (s)"
},
theme: {
mode: "light",
preset: "coastal"
}
}
const chart = new WestCoastCharts(document.querySelector('#chart'), options)
chart.render()import WestCoastCharts from 'west-coast-charts'
const options = {
chart: {
height: 380,
fontFamily: "Inter, Geist, \"IBM Plex Sans\", system-ui, sans-serif",
type: "boxPlot",
toolbar: {
show: false
}
},
series: [
{
data: [
{
x: "Home",
y: [0.29, 1, 1.2, 1.4, 1.81]
},
{
x: "Search",
y: [0.66, 1.3, 1.5, 1.7, 2.04]
},
{
x: "Product",
y: [1.38, 1.6, 1.9, 2.1, 2.46]
},
{
x: "Cart",
y: [1.57, 1.9, 2.1, 2.3, 2.7]
},
{
x: "Checkout",
y: [1.79, 2.2, 2.4, 2.6, 3.14]
},
{
x: "Account",
y: [2.05, 2.5, 2.7, 2.9, 3.4]
}
]
}
],
plotOptions: {
bar: {
horizontal: true,
barHeight: "50%"
},
boxPlot: {
colors: {
upper: "#0d9488",
lower: "#5eead4"
}
}
},
title: {
text: "Page load time (s)"
},
theme: {
mode: "light",
preset: "coastal"
}
}
const chart = new WestCoastCharts(document.querySelector('#chart'), options)
await chart.render() Waiting for the chart.
Open Data & agent view to read this chart through chart.describe().
Read from the running library through its optional agent/describe module. Text, table and JSON share the same snapshot. Demo data only.
$ wcc chart export boxplot-horizontal-boxplot.json --out boxplot-horizontal-boxplot.svg --with-table Public agent tools 0.2.3, tested with Library 1.1.5; available from the versioned GitHub release and npm. Save a JSON spec first and check the loaded runtime and supported modules before rendering. Command reference
Loading /gallery/boxplot/horizontal-boxplot/index.md …