Two axes
Bars on the left axis and lines on the right one, each with its own scale.
Code
ts
createChart(host, {
type: "xy",
legend: true,
categories: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
axes: [
{
side: "left",
title: "Revenue"
},
{
side: "right",
title: "People"
}
],
series: [
{
name: "Revenue",
kind: "bar",
data: [900, 1035, 1135, 1170, 1140, 1060, 970, 900, 890, 950, 1065, 1205],
color: "#b8b4ad"
},
{
name: "Visits",
data: [40, 47, 52, 53, 52, 48, 43, 40, 40, 42, 48, 55],
axis: 1,
dots: false
},
{
name: "Sign-ups",
data: [22, 26, 29, 30, 29, 27, 24, 22, 22, 23, 27, 31],
axis: 1,
dots: false
}
]
});Every field is in the API. Change this chart in the playground.