vue和vuejs区别_D3vue-VueJS的D3插件
vue和vuejs区别 D3vue (D3vue)D3 integration with Vue.js.与Vue.js的D3集成。View demo查看演示 Download Source下载源d3vue is a plugin for VueJS 2 that allows you to take data from your Vue instance and bind ...
vue和vuejs区别
D3vue (D3vue)
D3 integration with Vue.js.
与Vue.js的D3集成。
d3vue is a plugin for VueJS 2 that allows you to take data from your Vue instance and bind that data to a D3 v4 data visualization. d3vue uses the v4 merge syntax so when you can call the same function in your lifecycle events (i.e. mounted, beforeUpdate). The function signature is:
d3vue是VueJS 2的插件,它允许您从Vue实例中获取数据并将该数据绑定到D3 v4数据可视化。 d3vue使用v4合并语法,因此当您可以在生命周期事件(即已挂载,beforeUpdate)中调用同一函数时。 函数签名为:
this.$helpers.chart.barChart(this.$d3, this.dataSet, this.options);
this.$d3 is a reference to the d3 instances
$ d3是对d3实例的引用
this.dataSet is an array of objects from your instances
this.dataSet是实例中的对象数组
this.options includes
this.options包括
- options.selector: selector name to place the graph. options.selector:用于放置图形的选择器名称。
- options.metric: value you are measuring. options.metric:您正在测量的值。
- options.dim: value you will be categorizing the data by. options.dim:值,您将根据其对数据进行分类。
- options.width: width of the chart. options.width:图表的宽度。
- options.height: height of the chart. options.height:图表的高度。
构建设置 (Build Setup)
# install dependencies
npm install
# serve with hot reload at localhost:8080
npm run dev
# build for production with minification
npm run build
# build for production and view the bundle analyzer report
npm run build --report
vue和vuejs区别
更多推荐
所有评论(0)