anychart.onDocumentReady(function () {
header: ['#', '2006', '2009', '2012', '2015', '2018', '2021'],
['18–29', 41, 70, 81, 90, 88, 84],
['30–49', 6, 42, 64, 77, 78, 81],
['50–64', 3, 20, 39, 51, 64, 73],
['65+', 0, 5, 16, 35, 37, 45]
let chart = anychart.mosaic();
anychart.theme("pastel");
.format("<span style='font-size:12px; font-weight:700; color: #786b61;'>{%value}%</span>");
.text("<span style = 'font-size:16px; font-weight:600;'>Social Media Use in U.S. by Age</span><br><span style = 'font-size:14px;'>Share of U.S. adults saying they use at least one social media platform</span>");
let tooltip = chart.tooltip();
.titleFormat("<b><span style='font-size:15px;'>{%SeriesName}</b>")
.format("<span style='font-size:13px;'><b>{%value}%</b> of people aged <b>{%x}</b> said they<br> used at least one social media platform</span>");
chart.container('container');