0.2.0 • Published 5 years ago

vue-d3-cloud v0.2.0

Weekly downloads
95
License
MIT
Repository
-
Last release
5 years ago

vue-d3-cloud

A Vue implementation of react-d3-cloud

Installation

npm install vue-d3-cloud --save

Usage

//App.vue
<template>
  <div id="app">
    <cloud :data="words" :fontSizeMapper="fontSizeMapper" />
  </div>
</template>

<script>
import Cloud from 'vue-d3-cloud'

export default {
    name: 'app',
    data() {
        return {
            words: [
                { text: 'Vue', value: 1000 },
                { text: 'js', value: 200 },
                { text: 'is', value: 800 },
                { text: 'very cool', value: 1000000 },
                { text: 'lunch', value: 100 },
            ],
            fontSizeMapper: word => Math.log2(word.value) * 5,
        }
    },
    components: {
        Cloud,
    },
}
</script>
0.2.0

5 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago