1.1.4 • Published 2 years ago

@blackywkl/vuewordcloud v1.1.4

Weekly downloads
1
License
MIT
Repository
github
Last release
2 years ago

wordcloud for Vue

A wordcloud component for Vue.

Install

npm install @blackywkl/vuewordcloud

Example

Edit @blackywkl/vuewordcloud

<template>
	<div id="app">
      <wordcloud v-bind:texts="texts"></wordcloud>
  </div>
</template>

<script>
import Wordcloud from '@blackywkl/vuewordcloud';

export default {
  	name: 'app',
  	components: {
    	Wordcloud
  	},
  	data() {
    	return {
      		defaultWords: [{
          		text: 'Cat',
          		size: 26
        	}, {
          		text: 'fish',
          		size: 19
        	}, {
          		text: 'things',
          		size: 18
        	}, {
          		text: 'look',
          		size: 16
        	}, {
          		text: 'two',
          		size: 15
        	}, {
        	    text: 'fun',
        	    size: 9
        	}, {
        	    text: 'know',
        	    size: 9
        	}, {
        	    text: 'good',
        	    size: 9
        	}, {
        	    text: 'play',
        	    size: 6
        	}]
    	}
  	}
}
</script>

Props

namemeaningtypedefault value
textsarray contain each textArray[]
widthwidth(px) for entire componentNumber400
heightheight(px) for entire componentNumber400
mouseStopstop the word when the mouse is hoverBooleanfalse

properties for each item in texts

namemeaningtypedefault value
textword to showStringtest
sizefont size for the wordNumberrandom
fontFamilyfont family for the wordStringMicrosoft YaHei
colorcolor for the wordStringrgb(200,200,200)

Todos

  • Add github page
  • Add online demo(codesandbox)
  • Add test
  • Add callback for click
  • Add attribute to avoid collision
  • Add attribute to controll speed

License

MIT.

1.1.4

2 years ago

1.1.3

2 years ago

1.1.1

2 years ago

1.1.2

2 years ago

1.1.0

2 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

4 years ago

1.0.0

4 years ago