Comments (10)
For others seeing this post, I had this problem (items not showing up). It's because the size is the font size, not an arbitrary number. Try normalising your size
values to sensible font sizes.
I think this issue is covered in issue #53
from wordcloud2.js.
Looks like you need to give the div with the id 'my_canvas' a defined dimensions (w + h). Could you please add this into your usage? It's obvious but not to everyone. Also, can you have more usages/examples? From the demo i'm not able to see how you did it in code. Thanks.
from wordcloud2.js.
Looks like you need to give the div with the id 'my_canvas' a defined dimensions (w + h). Could you please add this into your usage? It's obvious but not to everyone. Also, can you have more usages/examples? From the demo i'm not able to see how you did it in code. Thanks.
Sounds reasonable. Would you like to submit a pull request to patch README for that? Thanks!
from wordcloud2.js.
Sure. Thanks.
from wordcloud2.js.
Btw, i tested with the array below and only HTTP shows up on the rendering. Why not 'foo' and 'bar'? It's a good size display 100%x500px.
this.list = [['foo', 868], ['bar', 832], ['HTTP', 77]];
@timdream Any ideas? Thanks.
from wordcloud2.js.
This element div.#my_canvas must have height and width
from wordcloud2.js.
i have the same issue, at the first time, the whole page is blank, and i modify the num in list to sensible font sizes. it does work. but there are still some words lost..
from wordcloud2.js.
I have the same issue, even i gives the same attributes with the official website. I have not find out the reason.someone can help?
let option = {
list: [['Les Misérables', '20'], ['Victor Hugo', '20']],
gridSize: 18,
weightFactor: 3,
fontFamily: 'Average, Times, serif',
backgroundColor: '#333'
};
wordcloud(containerEl, option);
from wordcloud2.js.
I have found out the reason why nothing has shown.We need to set weightFactor: 1.If weightFactor is too big ,we need to set the attribute drawOutOfBound for true.
from wordcloud2.js.
Having a defined width and height makes everything unscalable. i.e. With a response page that changes the size of elements with window size, the word cloud will eventually draw out of bounds. Rather than scale with the space. Using canvas, if you don't specify height, the canvas will scale nicely and the wrapping element height will fit the canvas.
from wordcloud2.js.
Related Issues (20)
- Text is truncated HOT 1
- Uncaught TypeError: ..... Value is not of type 'long'. HOT 1
- No type for version 1.2.2
- First words aligned
- How to randomize the filling order? HOT 3
- How do I change Device pixel density (dppx)? HOT 1
- Canvas not filled on Chromium
- can you please add example for how to add mouse events
- How can we rotate the text to specific angle?
- How we can add background color to the masked image HOT 1
- Keep getting many null is not an object errors
- Semver Dependency Issue
- Demo pages fails to 'run' on Chrome
- Where can we find the code of the demo page? HOT 1
- Next 14
- treat words as a single rectangle to avoid overlapping?
- How to render correct sizes based on order instead of count?
- Fix low font quality rendering
- Fill the whole canvas
- Add data to DOM
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 wordcloud2.js.