Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hudsonb/kubed
https://github.com/hudsonb/kubed
2d-graphics d3 data-visualization dsl javafx kotlin visualization
Last synced: 25 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/hudsonb/kubed
- Owner: hudsonb
- License: bsd-3-clause
- Created: 2017-01-21T12:52:05.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2020-02-19T02:59:11.000Z (almost 5 years ago)
- Last Synced: 2024-02-12T17:04:31.813Z (10 months ago)
- Topics: 2d-graphics, d3, data-visualization, dsl, javafx, kotlin, visualization
- Language: Kotlin
- Size: 4.18 MB
- Stars: 71
- Watchers: 7
- Forks: 4
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- AwesomeJavaFX - Kubed - A port of the popular Javascript library D3.js to Kotlin/JavaFX. (Libraries, Tools and Projects)
README
# Kubed: A Kotlin DSL for data visualization
Kubed is a data visualization DSL embedded within the Kotlin programming language. Kubed facilitates the creation of interactive visualizations through data-driven transformations of the JavaFX scenegraph. With Kubed, developers can construct complex data visualizations through the composition of geometric primitives, such as rectangles, lines and text, whose visual properties are defined by functions over the underlying data.
Kubed is *heavily* inspired by [D3.js](https://d3js.org/), and supports many of the features found in D3, including: selections, transitions, scales, colorspaces, easing, and interpolators. Additional features coming soon!
## Example
Below is an example of the Kubed DSL; a simple bar chart is constructed.
```kotlin
val values = listOf(4.0, 8.0, 15.0, 16.0, 23.0, 28.0)val width = 420.0
val barHeight = 20.0val x = scaleLinear {
domain(0.0, values.max!!)
range(0.0, width)
}val chart = Group()
val rect = rect {
width { d, _ -> x(d) } height(barHeight - 1)
translateY { _, i, _ -> i * barHeight}
}chart.selectAll()
.data(values)
.enter()
.append { d, i, _ -> rect(d, i) }
```
---This is an experimental API and is subject to breaking changes until a first major release.
---
## Documentation
* Selection
* Transitions
* Scales
* Colorspaces
* Easing
* Interpolators
* Chord Diagrams## Roadmap
### Upcoming Features
* Geospatials support, derived from (d3-geo)[https://github.com/d3/d3-geo]
### Miscellanous
* Adopting Kotlin-style builders rather than call chaining throughout the entire API.
* Rework of the entire transition system.