ProductPromotion
Logo

Kotlin

made by https://0x3d.site

GitHub - data2viz/data2viz: An Android, JavaFx, JS multiplatform datavisualization library with comprehensive DSL
An Android, JavaFx, JS multiplatform datavisualization library with comprehensive DSL - data2viz/data2viz
Visit Site

GitHub - data2viz/data2viz: An Android, JavaFx, JS multiplatform datavisualization library with comprehensive DSL

GitHub - data2viz/data2viz: An Android, JavaFx, JS multiplatform datavisualization library with comprehensive DSL

Build Status GitHub License

Build JS Build JS Build JS Build JS

Isomorphic dataviz

Data2viz is a data visualization toolbox for Kotlin Multiplatform.

You can pick what you need in the different modules and use them independently in the following environments: Android, JavaScript(IR and Legacy), and JavaFX (iOS to come).

Your code produces the same results and rendering on each platform.

A lot of algorithms come from d3js modules.

core

This module exposes some basics elements like Circle, Rect, Path, and also some parts of DSL (percent, angles, etc.).

color

This module provides algorithms to create, modify, and convert colors through differents spaces (RGB, HCL, HSL, Lab). It also manage linear and radial color gradients. You can easily use it outside of data2viz.

shape

Algorithms to generate paths: symbols, curves, ...

scale

Different ways to convert data to sizes.

interpolate

Functions to perform interpolation of various elements (numbers, colors, points, curves)

random

Algorithms to generate random data.

axis

Helper module to create axis for charts, using scales.

delaunay

This module is a high performant algorithm to compute the Voronoi diagram. You should use it in many use cases to find the closest point of interest to the pointer position.

ease

This module contains a collection of easing functions to manage acceleration inside animations.

dsv

Minimal way of parsing CSV, TSV files using Kotlin.

force

Use physics to animate your visualizations.

format

Different ways of formating numbers and currencies.

time

Some multiplatform classes to manage time and dates in visualizations.

time-format

Extend formatting to time and dates.

quadtree

Separation of space through the quadtree algorithm.

voronoi

Fortune's algorithm implementation of the Voronoi diagram. You should probably use Delaunay instead.

geo

A collection of mechanisms and functions to project GeoJson elements (points, lines, polygons) on a screen using different implementations of projections.

hexbin

A useful way of aggregating data using hexagons. You can represent data through the fill color or the area.

sankey

A generator for sankey charts.

hierarchy

A generator for hierarchical charts.

tests

An internal module used to simplify multiplatform testing with a higher DSL.

timer

A multiplatform implementation to manage animations through shared frames.

viz

Multiplatorm API and implementation of rendering and events management.

Data2viz allows you to develop data visualizations through a fully typed DSL. It simplifies the creation of complex visualizations via the IDE’s context-based suggestions.

Where should I start?

Documentation

All data2viz documentation is located in a distinct documentation project. You should start there and follow the first JavaFX tutorial.

Data2viz Playground

You can also play with the API without installing anything. Data2viz playground is a website where you can browse existing sample, modify them online and immediately see the result.

Using in your projects

Note that the library is experimental, and the API is subject to change.

The library is published to data2viz space repository.

Gradle

  • In multiplatform projects, add a dependency to the commonMain source set dependencies
kotlin {
    sourceSets {
        commonMain {
             dependencies {
                 implementation("io.data2viz.d2v:d2v-axis:0.10.7")
                 implementation("io.data2viz.d2v:d2v-chord:0.10.7")
                 implementation("io.data2viz.d2v:d2v-color:0.10.7")
                 implementation("io.data2viz.d2v:d2v-contour:0.10.7")
                 implementation("io.data2viz.d2v:d2v-delaunay:0.10.7")
                 implementation("io.data2viz.d2v:d2v-dsv:0.10.7")
                 implementation("io.data2viz.d2v:d2v-ease:0.10.7")
                 implementation("io.data2viz.d2v:d2v-force:0.10.7")
                 implementation("io.data2viz.d2v:d2v-format:0.10.7")
                 implementation("io.data2viz.d2v:d2v-geo:0.10.7")
                 implementation("io.data2viz.d2v:d2v-hexbin:0.10.7")
                 implementation("io.data2viz.d2v:d2v-hierarchy:0.10.7")
                 implementation("io.data2viz.d2v:d2v-quadtree:0.10.7")
                 implementation("io.data2viz.d2v:d2v-random:0.10.7")
                 implementation("io.data2viz.d2v:d2v-scale:0.10.7")
                 implementation("io.data2viz.d2v:d2v-shape:0.10.7")
                 implementation("io.data2viz.d2v:d2v-tile:0.10.7")
                 implementation("io.data2viz.d2v:d2v-time:0.10.7")
                 implementation("io.data2viz.d2v:d2v-timer:0.10.7")
                 implementation("io.data2viz.d2v:d2v-viz:0.10.7")
             }
        }
    }
}
  • To use the library in a single-platform project, add a dependency to the dependencies block.
dependencies {
    implementation("io.data2viz.d2v:d2v-axis:0.10.7")
    implementation("io.data2viz.d2v:d2v-chord:0.10.7")
    implementation("io.data2viz.d2v:d2v-color:0.10.7")
    implementation("io.data2viz.d2v:d2v-contour:0.10.7")
    implementation("io.data2viz.d2v:d2v-delaunay:0.10.7")
    implementation("io.data2viz.d2v:d2v-dsv:0.10.7")
    implementation("io.data2viz.d2v:d2v-ease:0.10.7")
    implementation("io.data2viz.d2v:d2v-force:0.10.7")
    implementation("io.data2viz.d2v:d2v-format:0.10.7")
    implementation("io.data2viz.d2v:d2v-geo:0.10.7")
    implementation("io.data2viz.d2v:d2v-hexbin:0.10.7")
    implementation("io.data2viz.d2v:d2v-hierarchy:0.10.7")
    implementation("io.data2viz.d2v:d2v-quadtree:0.10.7")
    implementation("io.data2viz.d2v:d2v-random:0.10.7")
    implementation("io.data2viz.d2v:d2v-scale:0.10.7")
    implementation("io.data2viz.d2v:d2v-shape:0.10.7")
    implementation("io.data2viz.d2v:d2v-tile:0.10.7")
    implementation("io.data2viz.d2v:d2v-time:0.10.7")
    implementation("io.data2viz.d2v:d2v-timer:0.10.7")
    implementation("io.data2viz.d2v:d2v-viz:0.10.7")
}

Current status and roadmap

APIs are mostly stabilized now, but there may still be some breaking changes before v1.0.

Inspirations

  • d3js: a lot of modules and algorithms come from d3js.
  • paperjs: another source of inspiration for viz hierarchy and simple API.
  • chromajs: smart library for managing colors easily.
  • delaunator: a really fast JavaScript library for Delaunay triangulation of 2D points.
  • kotlinx.html: isomorphic html rendering.
  • kotlintest: nice DSL for testing (partly ported in test).

More Resources
to explore the angular.

mail [email protected] to add your project or resources here 🔥.

Related Articles
to learn about angular.

FAQ's
to learn more about Angular JS.

mail [email protected] to add more queries here 🔍.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory