Areas and ranges
An area fills the space down to zero. A band fills the space between two series.
Code
ts
createChart(host, {
type: "xy",
categories: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
series: [
{
name: "Revenue",
kind: "area",
data: [800, 935, 1035, 1070, 1040, 960, 870, 800, 790, 850, 965, 1105],
curve: "smooth",
dots: false
}
]
});Range
ts
createChart(host, {
type: "xy",
categories: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
legend: true,
grid: "dashed",
series: [
{
name: "Range",
kind: "band",
low: [60, 70, 77, 80, 78, 72, 65, 60, 59, 63, 72, 83],
data: [100, 115, 126, 130, 126, 117, 108, 100, 99, 105, 118, 133],
color: "#2a9d8f"
},
{
name: "Median",
data: [80, 92, 101, 104, 102, 94, 86, 80, 79, 84, 95, 107],
color: "#2a9d8f",
dots: false,
width: 2.5
}
]
});Sparkline
ts
createChart(host, {
type: "xy",
bare: true,
categories: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
series: [
{
name: "Trend",
kind: "area",
data: [30, 38, 44, 46, 44, 40, 35, 31, 31, 34, 41, 48],
curve: "smooth",
dots: false
}
]
});Every field is in the API. Change this chart in the playground.