chart_treemap_only_topics_dual = {if (data_github_treemap_only_topics_dual.length != 0) {
const chart_treemap_only_topics_dual = Treemap(data_github_treemap_only_topics_dual, {
path: d => d.topic,
value: d => d?.freq,
group: d => d.topic,
label: (d) => `${d["topic"]}\n${Math.round(d["freq"]*100)}%`,
title: (d, n) => `${d["topic"]}\n${Math.round(d["freq"]*100)}%`,
tile: d3.treemapBinary,
sort: d => d?.topic,
width: 1280,
height: 750,
round: true,
fillOpacity: 1.0,
colors: data_github_treemap_only_topics_dual.map(d=> colors_topics[d.topic])
});
return chart_treemap_only_topics_dual;
} else {
return html`<p>No Data available</p>`;
}
}