demand-map
v1.0.0
Published
vue demand chart
Readme
demand-map
Quick Start
1. Import demand-map into your vue.js project.
npm install demand-map --Sin your component:
import DemandMap from 'demand-map';
components: { DemandMap }2. Now you have it. The simplest usage:
<div class="demand-chart">
<demand-map :center="center" :nodes="nodes" :nodeClick="nodeClick"></demand-map>
</div>export default {
name: 'App',
data(){
return {
center: '人民网', // 中心label
nodes: [
{
name: 'xxx1', // nodeName
value: 10, // nodeValue
color: '#4798e9' // nodeColor 非必选
},
... // max length 30
]
}
},
methods: {
nodeClick(n, v){
console.log(n, v)
}
}
}.demand-chart{
width: 1390px;
height: 370px;
}argument
| Param | Type | Describe | | :------: | :------: | :------: | | center | String | 中心label | | nodes | Array | 散点数据集合,max-length: 30 | | nodeClick | Function | nodes点击事件,参数name&value |
