s5260822 2025-03-23 22:46:09 +01:00
commit f5cbbb8197
2 changed files with 4 additions and 2 deletions

View file

@ -15,6 +15,8 @@
sentimentData.push({ pos: 0, neu: 0, neg: 0 });
</#if>
console.log("Sentiment Data:", sentimentData);
var tooltip = d3.select("#tooltip");
var width = 1000, height = 1000;
@ -102,9 +104,9 @@
});
// Legend
var legend = svg.append("g").attr("transform", "translate(" + (width - 200) + ",50)");
var legend = svg.append("g").attr("transform", "translate(" + (width - 300) + ",50)");
sentimentData.forEach((sent, i) => {
var col = Math.floor(i/30), row = i%30;
var col = Math.floor(i/25), row = i%25;
var entry = legend.append("g")
.attr("transform", "translate(" + (col*100) + "," + (row*20) + ")")
.on("mouseover", (event) => {

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

Before After
Before After