Comments (6)
I agree :p
from d3-cloud.
Is there a work-around to get an approximation of this feature ? (I can handle the cloud being re-arranged) i.e. in a way that acts like your word cloud generator. I can't seem to find a way to do so. Thanks.
from d3-cloud.
The word cloud generator knows all the words up-front, so this doesn’t apply. This issue addresses the case where you don’t know all the words in advance, and you want to position new words in a partially-filled region.
from d3-cloud.
Right, got that.
But I meant that the word cloud generator can re-use the same tagcloud instance, re-submit words with new words appended and have them integrated to the re-mixed tagcloud.
I can handle keeping the state out of the tagcloud instance (differs from original post, sorry) and I can handle re-calculating the cloud layout. I just can't figure from the source or the examples how to add new words without having to create a new instance for each new word arrival. Any hints?
Thanks!
from d3-cloud.
Perhaps I was nit-picking. :) The word cloud generator reuses a single layout instance. Every time you call layout.start()
, it starts with an empty canvas and lays out the words that you have given it via layout.words(…)
. So if you have an array of words, and you want to add a new word, you can simply push it onto the array, and call:
layout
.stop()
.words(words)
.start();
If you are reading words from some kind of stream, then that’s what this issue is about: there’s no way to reuse a partially-filled canvas for collision detection if a new word arrives. This probably wouldn’t give good results anyway, because the algorithm starts off by placing the largest words first.
from d3-cloud.
@jasondavies do you have any tips or pointers for someone interested in implementing dynamically placing tags in an already existing layout?
from d3-cloud.
Related Issues (20)
- D3 word cloud cannot show all words HOT 4
- Delay in loading react-wordcloud with fontSizes in options prop HOT 2
- feature: blink words to load more? HOT 2
- Generate the same word cloud for the same data HOT 1
- Allow CSV import HOT 2
- how to use it? HOT 4
- Link / Action for each word HOT 3
- Lot of space left unused HOT 2
- Not working anymore with recent versions of d3! HOT 1
- Need some instruction on how to get started HOT 1
- is there any way to port wordcloud svg to canvas. HOT 1
- Unreadable under D3 V7 HOT 4
- bug: fontSize not working on firefox
- Using d3 from Latex HOT 2
- How to fit chart to size given HOT 1
- Migrate to esm
- Allow changing the dominant baseline HOT 1
- Setting custom style on cloud throws an exception HOT 4
- How to use in a React environment?
- Is it possible to support 'multi line' words
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from d3-cloud.