1.0.0 • Published 7 years ago

vue-nvd3 v1.0.0

Weekly downloads
269
License
-
Repository
github
Last release
7 years ago

vue-nvd3

The NVD3 chart library for Vue.

This library is just in beta version. It's only using in my project i will add the tests and examples in the future versions.

Install

$ npm install vue-nvd3

Live Demo

Components in this library

TagComponent
<vn-bar>BarChart
<vn-bubble>BubbleChart
<vn-hgrouped-bar>HBarChart
<vn-line-bar>LineBarChart
<vn-line>LineChart
<vn-pie>PieChart
<vn-stacked-area>StackedAreaChart

Dependencies

  • vue: "^2.1.0"
  • nvd3: "^1.8.5",
  • d3: "^3.5.17"

How to use

import Vue from 'Vue'
import VueNVD3 from 'vue-nvd3'
Vue.use(VueNVD3)

References

<vn-bar> - BarChart

attributetypedefaultdescription
modelArray[]The data to show on the chart
heightString'300px'The chart height
textFieldString'label'Specify which field should be show as axis label text of the data model
valueFieldString'value'Specify which field should be use as axis values of the data model
staggerLabelsBooleantrue-
tooltipsBooleanfalseWhether show the tooltips when mouse on the bars
showValuesBooleantrueIdentity whether show the values on the chart
colorsArray['#82DFD6', '#ddd']The bar colors

<vn-bubble> - BubbleChart

attributetypedefaultdescription
modelArray[]The data to show on the chart
heightString300pxThe chart height
xFormatFunction, Stringundefined
yFormatFunction Stringundefined
showDistXBooleantrue
showDistYBooleantrue
colorsArray['#82DFD6', '#ddd']

<vn-hgrouped-bar> - HBarChart

attributetypedefaultdescription
modelArray[]The data to show on the chart
heightString300pxThe chart height
textFieldString'label'Specify which field should be show as axis label text of the data model
valueFieldString'value'Specify which field should be use as axis values of the data model
heightNumbernull
yFormatFunction,Stringundefined
showControlsBooleantrue
colorsArray['#82DFD6', '#ddd']

<vn-line-bar> - LineBarChart

attributetypedefaultdescription
modelArray[]The data to show on the chart
heightString300pxThe chart height
xFormatFunction, Stringundefined
y1FormatFunction, Stringundefined
y2FormatFunction, Stringundefined
colorsArray['#82DFD6', '#ddd']

<vn-line> - LineChart

attributetypedefaultdescription
modelArray[]The data to show on the chart
heightString300pxThe chart height
xFormatFunction, Stringundefined
yFormatFunction, Stringundefined
colorsArray['#82DFD6', '#ddd']

<vn-pie> - PieChart

attributetypedefaultdescription
modelArray[]The data to show on the chart
heightString300pxThe chart height
showLabelsBooleantrue
marginObject{top: 30, right: 20, bottom: 20, left: 20},
widthNumbernull
heightNumbernull
showTooltipPercentBooleanfalse
showLegendBooleantrue
legendPositionString'top'
labelThresholdNumber0.05
labelTypeString'percent'
donutBooleanfalse
donutRatioNumber0.35
textFieldString'label'Specify which field should be show as axis label text of the data model
valueFieldString'value'Specify which field should be use as axis values of the data model
colorsArray['#82DFD6', '#ddd']

<vn-stacked-area> - StackedAreaChart

attributetypedefaultdescription
modelArray[]The data to show on the chart
heightString300pxThe chart height
xFormatFunction, Stringundefined
yFormatFunction, Stringundefined
rightAlignYAxisBooleantrue
showControlsBooleantrue
clipEdgeBooleantrue
colorsArray['#82DFD6', '#ddd']