Skip to content
commit-766c8d6756a1

Interactive word cloud

Relative prominence across a bounded vocabulary of weighted terms.

Purpose
Compare relative prominence across a bounded set of weighted terms.
Use when
A quick impression of a small vocabulary is useful.
Avoid when
Exact ranking, close weights, or complete reading order matters; use a sorted list or bars.
Equivalent data
Each variant includes an exact word, value, and semantic-class list.
Exact word values
WordValueClass
Sam S Club10000retail
Macys6181retail
Amy Schumer4386
Jurassic World4055
Charter Communications2467
Chick Fil A2244
Planet Fitness1898
Pitch Perfect1484
Express1689
Home1112
Johnny Depp985
Lena Dunham847
Lewis Hamilton582
KXAN555
Mary Ellen Mark550
Farrah Abraham462
Rita Ora366
Serena Williams282
NCAA baseball tournament273
Point Break265
Exact word values
WordValueClass
Sam S Club10000retail
Macys6181retail
Amy Schumer4386
Jurassic World4055
Charter Communications2467
Chick Fil A2244
Planet Fitness1898
Pitch Perfect1484
Express1689
Home1112
Johnny Depp985
Lena Dunham847
Lewis Hamilton582
KXAN555
Mary Ellen Mark550
Farrah Abraham462
Rita Ora366
Serena Williams282
NCAA baseball tournament273
Point Break265
Exact word values
WordValueClass
Sam S Club10000retail
Macys6181retail
Amy Schumer4386
Jurassic World4055
Charter Communications2467
Chick Fil A2244
Planet Fitness1898
Pitch Perfect1484
Express1689
Home1112
Johnny Depp985
Lena Dunham847
Lewis Hamilton582
KXAN555
Mary Ellen Mark550
Farrah Abraham462
Rita Ora366
Serena Williams282
NCAA baseball tournament273
Point Break265
Usage Example
@interactivewordcloud.WordCloud(interactivewordcloud.Config{
  Label: "star shape",
  Series: interactivewordcloud.Series{
    Name: "wordcloud",
    Words: []interactivewordcloud.Word{
      {Name: "Sam S Club", Value: 10000, Class: "retail"},
      {Name: "Macys", Value: 6181, Color: "#ff8a3d"},
    },
    Options: interactivewordcloud.SeriesOptions{
      Shape: interactivewordcloud.ShapeStar,
      SizeRange: &interactivewordcloud.SizeRange{Min: 14, Max: 80},
    },
  },
})

Shapes

Shapes alter layout only. The exact weighted list remains the reliable comparison surface.

Go API

v0.0.1

The examples above cover behavior and composition. pkg.go.dev is the canonical reference for exported types, functions, methods, and Go documentation.

github.com/araihu/goshtoso-charts/components/interactive/wordcloud

Enabled, disabled, hidden, and omitted wrapper behavior, controls, export, and client transitions are shared by every chart. Review chart controls, then compare static/vector and interactive capabilities.

Open v0.0.1 API