data2viz is a multiplatform data visualization library based on kotlin. The rendering produces the same result on each platform.
A very important part of current version is a port of d3js modules.
The code is separated in modules that can be independently used. Some are specifically designed for visualization (d2v-axis, d2v-path, d2v-shape, d2v-viz) while others can be used outside of dataviz projects. For example, d2v-format can be used as a multiplatform kotlin format library outside of any dataviz project.
data2viz proposes to develop data visualizations through a fully typed DSL. It simplifies the creation of complex visualizations by helping developer with IDE’s suggestions based on the current context.
All examples are available in examples directory. Here is a first selection that shows you what you can do with data2viz. All example are running in the browser and as JavaFx applications. You can open each js version using the links below.
- Curves, stream grapth
- Animated circle, deployed inside JavaFx and Js
- Chord diagram,
- Arcs, Path
- Common Plot, deployed inside JavaFx and Js
- LogScale, ContinuousScale.
This code uses the geo module to show how to load a GeoJson file and render it using a projection.Open online js version.
Current status && Roadmap
The project is currently in a very active devlopment phase. APIs are expected to change and we don't encourage you to use it already in production.
Current version (v0.5):
The current version contains the following modules:
- core: some main elements like trigonometric functions, namespace constants.
- random: various randomize functions.
- test: an internal module used to simplify multiplatform testing with a higher DSL.
- colors: manage different color spaces (RGBA, HSLA, LAB), gradients, categories of colors, ...
- viz: multiplatform abstraction over visual elements (circle, rectangle, ...)
- path: abstraction over path generation.
- shape: provides some generators for curves, areas, lines, stack, symbols,...
- format: a multiplatform formatting library with a DSL
- selection: a way of selecting visual elements of a datavisualization in order to apply some modifications.
- time: a multiplatform module to simplify time management inside datavisualizations.
- time-format: formatting date and time.
- timer: multiplatform way of managing animations through shared frames.
- scale: manage the transformation between domain objects and visualizations.
- ease: a collection of functions used by transitions.
- axis: a module that display axis for scales.
- geo: mechanism and algorithms to project GeoJson objects on a visualization.
- dsv: parsing of CSV, TSV files.
- chord: generator for chord charts.
- sankey: generator for sankey charts.
- hierarchy: generator for hierarchical charts.
- tile: manage the loading, and display of tiles.
- voronoi: the voronoi algorithm
The modules that are currently in development or coming soon:
- transitions: modifying visual elements through animated transitions.
- zoom: zoom and pan management.
- force: collision and force algorithms.
- drag: manage the drag of elements.
- brush: selection of visual elements.
We plan to release a chart module inspired by vega-lite to enable very fast charting development.
We'll create all the necessary geographic projections.
Before the v1.0 release, we'll spend some time on polishing APIs and DSLs in order to provide a very consistent way of using our library.
Tests are executed through karma and mocha and included in the build.
How can I use it?
We plan to be near v1.0 in Q2 2018 but you can already play with it.
Artefacts are published on Bintray.
You can also clone this repo and have a look on the example directory.