data2viz / data2viz

An Android, JavaFx, JS multiplatform datavisualization library with comprehensive DSL
https://data2viz.io/
414 stars 30 forks source link

Documentation should show how to use the library on any platform #147

Open natanfudge opened 5 years ago

natanfudge commented 5 years ago

https://play.data2viz.io/tutorials/getting-started/ and https://github.com/data2viz/data2viz/blob/master/README.md only show how to use the library on the Javascript platform.
Adding documentation for a setup that works on any platform would help out immensely for any person that wants to try Data2Viz on the JVM or Android (and to a lesser extent: in native).

gzoritchak commented 5 years ago

You are perfectly right. It took us some time to understand how we should structure the documentation.

We are now working on it. It will have the following sections:

What you ask will probably be in both tutorial and how-to sections.

gzoritchak commented 5 years ago

@natanfudge I started a new project to hold data2viz documentation. This is a Work In Progress of what you ask: https://github.com/data2viz/data2viz-docs/blob/master/tutorials/javafx-bar-chart/javafx-bar-chart.md

Does it fulfill your needs?

natanfudge commented 5 years ago

Yes that would let me understand how to start using the library.

gzoritchak commented 5 years ago

@natanfudge please look at this first tutorials:

abangkis commented 5 years ago

I followed the Kotlin/JS bar chart guide but it just didn't work out for me. Somehow the only package that is detected is import io.data2viz.geom.size. Althought I inlcude the viz and core package in my build.gradle:

dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-js:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8" implementation "io.data2viz:d2v-core-js:0.8.0-RC1" implementation "io.data2viz:d2v-viz-common:0.8.0-RC1" }

I tried to check out the example directory as a base, but you need to check out the whole repo to get the examples? Maybe the example directory can be separated from the main repo for lighter check out.

data2viz

gzoritchak commented 5 years ago

@abangkis Thanks for the feedback.

This is the correct dependencies:

dependencies {
    implementation "org.jetbrains.kotlin:kotlin-stdlib-js:$kotlin_version"
    implementation "io.data2viz:d2v-data2viz-js:0.8.0-RC1"
}

I fixed this in the tutorial.

You can see the tutorial in a dedicated project: https://github.com/data2viz/data2viz-examples/tree/master/tutorials/barchart-js

abangkis commented 5 years ago

Thanks for the quick response. Finally I'm able to complete the tutorial. 👍