I'm working on a wordcloud for my personal website. I'm really happy with how it looks so far, but I want to force the biggest word to be horizontal. I have looked through the Wiki and haven't been able to find how to do it.
I have tried with both angles: tag as well as rotation: tag.
Does anyone know how to keep that one word fixed to horizontal in amchart 5 wordcloud?
Parts of the code:
var root = am5.Root.new("content-chart-frontpage-wordcloud-div");
root.setThemes([
am5themes_Animated.new(root)
]);
var container = root.container.children.push(am5.Container.new(root, {
width: am5.percent(100),
height: am5.percent(100),
layout: root.verticalLayout
}));
var series = container.children.push(am5wc. WordCloud.new(root, {
minFontSize:am5.percent(10),
maxFontSize:am5.percent(50),
categoryField: "tag",
valueField: "weight",
calculateAggregates: true
}));
series.set("heatRules", [{
target: series.labels.template,
dataField: "value",
min: am5.Color.fromString("#9f8155"),
max: am5.Color.fromString("#bda684"),
key: "fill"
}]);
series.labels.template.setAll({
paddingTop: 5,
paddingBottom: 5,
paddingLeft: 5,
paddingRight: 5,
fontFamily: "Norse",
cursorOverStyle: "pointer"
});
series.data.setAll([
//Most important word, horizontal
{ tag: "data", weight: 60 },
//Words scraped from the website
{ tag: "grafana", weight: 12 },
{ tag: "prometheus", weight: 10 },
{ tag: "export", weight: 8 },
{ tag: "dashboards", weight: 8 },
{ tag: "visualize", weight: 4 },
...
]);