ng2-vizabi
v4.0.9
Published
angular2 vizabi component
Downloads
87
Readme
ng2-vizabi
Native Angular2 directive for Vizabi component.
Vizabi is a framework for building visual data exploration tools freely provided by Gapminder. WARNING: Vizabi is in alpha. Don't expect too much!
Quick start
- A recommended way to install ng2-vizabi is through npm package manager using the following command:
npm i ng2-vizabi --save
Alternatively, you can download it in a ZIP file.
- More information regarding using of ng2-vizabi is located in demo and demo sources.
To view the demo: clone the repo, run npm i
, npm run build
, npm start
API
Inputs (Properties)
order
(?number
) - tab order could be useful to indicate tab number in set of tabsreaderModuleObject
(?any
) - object (separate module that contains method to get reader's object); undefined by defaultreaderGetMethod
(?string
) - method name (to get reader's object) inreaderModuleObject
; undefined by defaultreaderPlugins
(?any[]
) - parameters forreaderGetMethod
as different kind of objects depending on reader functionalityreaderName
(?string
) - reader's name; undefined by defaultchartType
(string
) - chart type for currentVizabi
instancestopUrlRedirect (
?boolean) - prevents any
window.location` activitymodel
(any
) - model for currentVizabi
instancemodelHash
(?string
) - hash (url encoded) with extra data formodel
; undefined by defaultactive (
?boolean`) - this flag could be useful to indicate active tab of many tabslanguage (
?string) - current language, it might be passed to
Vizabi` as-isadditionalItems
(?any[]) - additional items that should be added asdata_...
section of model: it will be an additional csv file or DDF folderreloadTime
(?number
) - put reload time, after that current chart will be reloadedrestoreAfterReload
(?boolean
) - current chart state will be restored afterreloadTime
activity
Outputs (Events)
onCreated
- it fires during Vizabi based chart was created successfullyonChanged
- it fires during Vizabi based chart was changed (additional data was added, for example)onReadyOnce
- happens once on the load when both DOM and MODEL are readyonClick
- it fires during click was occurred on Vizabi based chartonError
- it fires during an error was occurred on Vizabi based chart
NPM Publishing
npm run build
cd dist
npm publish
Important note. Don't publish this project from root directory.
gh-pages
If you need to publish demo examples to gh-pages
you should follow next steps:
npm run build
npm run demo.build
cd demo/dist
Put content from demo/dist
to your gh-pages
branch.
Troubleshooting
Known problems:
npm run build
cp
is not recognized as an internal or external command, operable program or batch file.
You are using windows command prompt that sucks. Cygwin solves it. Or use git bash. Or use linux/mac.
npm run build
fails
try updating your node/npm. Last time i checked the app it was working and i had node v6.10.2, npm v3.10.10
Please follow this guidelines when reporting bugs and feature requests:
- Use GitHub Issues board to report bugs and feature requests (not our email address)
- Please always write steps to reproduce the error. That way we can focus on fixing the bug, not scratching our heads trying to reproduce it.
Thanks for understanding!