vue和vuejs区别_D3vue-VueJS的D3插件

D3vue是VueJS 2的一个插件,用于将Vue实例中的数据绑定到D3 v4的数据可视化。它使用v4的合并语法,使您能够在生命周期事件中调用相同的功能来创建图表。此插件提供了配置选项,如选择器、度量、分类依据、图表宽高,以定制数据可视化。

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

翻译自: https://vuejsexamples.com/d3vue-a-d3-plugin-for-vuejs/

vue和vuejs区别

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值