0.1.22 • Published 2 months ago

vue-dcjs v0.1.22

Weekly downloads
-
License
-
Repository
github
Last release
2 months ago

vue-dcjs

A custom built binding for dc in vue. Comes with built in Vue component charts as well as bindings for dc d3 and crossfilter for you to customize and create your own charts as necessary.

Check out the DEMO PAGE or follow the api reference links below.

cli

npm install --save vue-dcjs

main.js

import { VueDc } from 'vue-dcjs'
Vue.use(VueDc)

Vue.use option

NameTypeDefaultDescription
registerComponentsbooleantrueAutomatically register all vue-dcjs charts with Vue.component(everything). Charts will be kebab-case as shown below in the components list.
defaultColorsstring[]d3.schemeCategory20cthis sets dc's defaultColors for ordinal charts
useWindowResizebooleantrueadd an event listener to the window which watches for resize events. when the window is resized: re-render all the charts to resize them automatically.
resizeTimeoutnumber100to avoid re-rendering too much, there is a timeout on the resize handler. how long should the wait be. too short may re-render too much. too long may feel delayed
useResetListenerbooleantrueautomatically attach a dom element(s) using resetSelector. the button will only be visible when the connected chart has filters. the button is clickable and will clear all filters on the chart.
resetSelector(chart) => element(s)chart => document.querySelector(chart.anchor()).closest('.example-container').querySelectorAll('.example-reset-button')define how we retrieve the reset button to connect our chart to. This should be the result of querySelector or querySelectorAll

anywhere in vue instance

available components

mixins

Project setup

npm ci

Compiles and hot-reloads for development

npm run serve
or
npm run dev

how to build npm bundle

  • bump npm package version in package.json
npm run bundle
  • commit your changes
npm npm publish

how to build demo for github pages

  • commit changes
npm run publish-pages

how to build both demo and github pages

  • commit all changes before building
  • bump the package version (you can probably just commit that with the build that you're gonna do next)
npm run build-all
  • commit the build with a meaningful message
npm run publish-all

boom, you're done

  • if you're feeling really brave
npm run release-all --message "Your commit message"
0.1.22

2 months ago

0.1.21

5 months ago

0.1.20

2 years ago

0.1.14

2 years ago

0.1.15

2 years ago

0.1.16

2 years ago

0.1.17

2 years ago

0.1.18

2 years ago

0.1.19

2 years ago

0.1.13

2 years ago

0.1.12

2 years ago

0.1.11

2 years ago

0.1.10

2 years ago

0.1.9

2 years ago

0.1.8

2 years ago

0.1.7

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago