data2viz / data2viz Goto Github PK
View Code? Open in Web Editor NEWAn Android, JavaFx, JS multiplatform datavisualization library with comprehensive DSL
Home Page: https://data2viz.io/
An Android, JavaFx, JS multiplatform datavisualization library with comprehensive DSL
Home Page: https://data2viz.io/
there should be an option or a described code to clean tiles out of scope for example when dragging large tilemaps around (creating tiles way out of screen)
Currently artefact are available by adding the url of the repo:
repositories {
maven { url "http://dl.bintray.com/data2viz/data2viz" }
}
It would be better to just indicate jcenter or maven central.
I'd like to try it out, but adding
compile 'io.data2viz:d2v-axis-common:0.3.1'
to build.gradle
just doesn't work.
It can't download certain pom's from bintray.com, which is solved by saving security certificate in the browser and then importing it on the Security tab of the Java Control Panel:
Then there is another authentication issue downloading d2v-axis-common-0.3.1.pom
from https://maven.oracle.com, which I had created an Oracle account for and added the credentials
section to the build.gradle
:
maven {
url "https://maven.oracle.com"
credentials {
username "****"
password "****"
}
}
And now I get:
Could not resolve all files for configuration ':compileClasspath'.
Caused by: org.gradle.internal.resolve.ModuleVersionResolveException: Could not resolve io.data2viz:d2v-axis-common:0.3.1.
Required by:
project :
Caused by: org.gradle.internal.resolve.ModuleVersionResolveException: Could not resolve io.data2viz:d2v-axis-common:0.3.1.
Caused by: org.gradle.api.resources.ResourceException: Could not get resource 'https://maven.oracle.com/io/data2viz/d2v-axis-common/0.3.1/d2v-axis-common-0.3.1.pom'.
Caused by: org.gradle.internal.resource.transport.http.HttpRequestException: Could not GET 'https://maven.oracle.com/io/data2viz/d2v-axis-common/0.3.1/d2v-axis-common-0.3.1.pom'.
Caused by: org.apache.http.client.ClientProtocolException: null
Caused by: org.apache.http.client.CircularRedirectException: Circular redirect to 'https://www.oracle.com/content/secure/maven/content/io/data2viz/d2v-axis-common/0.3.1/d2v-axis-common-0.3.1.pom'</i>
Am I doing something wrong?
OK on linear
var scale = scales.continuous.linear {
domain = listOf(1.0, 200.0)
range = listOf(0.0, 1.0)
}
Not possible on pow:
var scale = scales.continuous.pow(3.0) {
domain = listOf(1.0, 200.0)
range = listOf(0.0, 1.0)
}
Current workaround:
var scale = scales.continuous.pow(3.0).apply {
domain = listOf(1.0, 200.0)
range = listOf(0.0, 1.0)
}
Due to the new rendering engine, shape tests (JS part) are not working anymore, move them to common and put them in the new test pipeline.
rect {
width = 10.0
height = width
fill = colors.grey
transitionTo {
x = 100.0
} thenTransitionTo {
y = 100.0
} thenTransitionTo {
x = 0.0
} thenTransitionTo {
y = 0.0
}
}
See https://discuss.kotlinlang.org/t/kotlin-1-3-m2-new-multiplatform-projects-model/9264
This new model should clean up the modules.
The current version creates a gradle project for every platform even if there is no specific platform code. After the migration we should keep only one project per module.
Need kotlin 1.3 #35
and check if geoAreaTests.geoarea_of_a_tiny_polygon_LEGACY() is OK with .0 value (actually report a 4.890516e-13 value....)
Path can manage the rectangle and circle elements. Does that make sense to give access to these concepts with two different ways?
Is there any performance difference?
Due to the differences in arc API on each platform, all cases should be tested on all platforms with a comparison of the rendered images.
start; end; counterclocwise;
0; 0.25PI; false
0; 0.25PI; true
0; 2.0PI; true
0; 2.0PI; false
.25PI; 2.25PI; true
.25PI; 2.25PI; false
...
The README of your repository contains two links to examples:
http://data2viz.io/dist/chart.html
http://data2viz.io/dist/svgperfs.html
both are not working for me neither in Firefox nor in Chrome.
The original code is changing the speed on the source as well
https://github.com/d3/d3-force/blob/84d033544347dc2aa3c9e9152c0e91c2eb5e0303/src/link.js#L41-L44
Check the performance difference between d3js and data2viz (/2.5).
actually tickvalues can just be setted to override computed tick values, and isn't used if setted to empty (default).
actually we should have something like get = setted value (if not empty) or computed value
when applying a transform (rotate+translate) the canvas is partially cleaned see this example.
import io.data2viz.viz.*
import io.data2viz.color.*
import io.data2viz.scale.scales
fun main(args:Array<String>){
viz {
var angle = .0
val g = group {
rect {
width = 50.0
height = 50.0
fill = colors.blue
}
}
onFrame {
angle += .1
g.apply {
transform {
rotate(angle)
translate(.1, .1)
}
}
}
}.bindRendererOnNewCanvas()
}
Current implementation is more a prototype than the definitive version of it. It generate only a linear gradient using points. It should handle direction.
Also, it can be interesting to provide nice typesafe builders.
I know it's prerelaese at the moment, but is there any chance you provide public artifacts for prerelaese builds?
The project looks really promising, pls keep going😀
Implement transition from color to LinearGradient using all points of LinearGradient and the same color.
A configuration may have some generic parameters that apply on all platform and some that only make sense on a specific platform. It should be possible to provide access to these parameters using the same API but having different params depending on the platform.
viz {
configure { // on common code
resizable = false
}
}
viz {
configure { // on android
minimumBatteryMinimumForAnimations = 40.pct
}
}
check with world-30-percent.geojson file, mercator projection fails and send an "infinity"
Currently, inside each module, the source code and the test code are in same directory. This is a temporary workaround due to this bug : https://youtrack.jetbrains.com/issue/KT-16979
Test code will be separated as soon as KT-16979 will be released.
tilesCount shouldbe an Int
the link between tilescount and zoom should be easier to understand
area creation should be more easy to understand and have a default behavior.
maybe x and y should be var instead of fun to be more easy to understand
Why of all the class and singleton names these particular ones should start with a lowercase letter?
scales.continuous.linear { }
instead of
Scales.Continuous.linear { }
This strikes me as a very odd and arbitrary decision.
Simplify the stack & pie layout use, maybe using objects that are more easy to use/understand.
In order to help the development, it is sometimes easier to have some logs (timer issues, ...).
This logging system shouldn't have any cost in terms of performance. Existing multiplatform solutions seems to be overkill.
The prototype of testing by pixel comparison should be integrated in the project.
The javascript version is the target (the API sticks to it). Each platform project should compare its image generation with target.
On JS, use of puppeeter to copy the generated image from canvas.
On Android, save the file in the emulator and the pull it with adb.
Allow to use transformations in transitions:
rect {
x = 10.0
y = 10.0
width = 10.0
height = 10.0
transition {
transform {
translate(x = 10.0 * index, y = 20.0)
}
}
}
sunday returns mondays
monday returns tuesdays...
when fixed, check for test still open in scaleTime : time_ticks_count_can_generate_1_week_ticks_LEGACY()
in svg a allows to pass the color parameters to its inner elements that can use it.
it's an easy way to skin multiple elements.
does this behavior should be allowed in a multiplatform library ?
investigate GeoAreaTests.geoarea_of_a_zero_area_polygon_LEGACY()
may be resolved by #39
Travis CI fails on android configuration:
* What went wrong:
A problem occurred evaluating project ':app'.
> The SDK directory '/Users/gaetan/Library/Android/sdk' does not exist.
See https://stackoverflow.com/questions/27644586/how-to-set-up-travis-ci-with-multiple-languages
and https://docs.travis-ci.com/user/languages/android/
This was an early scaling method, check what could be kept in API and remove the class.
Quite similar mechanism as LinearGradient
Angle appears to be a nice target for an inline class. It should provide a much more interesting API with some abstractions and no performance cost.
It should also simplify some algorithms like the various implementation of Path.arc.
API:
Number.deg
Number.rad
Angle.cos
Angle.sin
...
angle + angle
angle * Number
angle / Number
To facilitate the use of the library by client application (demo, samples, documentation) it should be available on npm.
I got a graph to work in Chrome, Firefox, Edge, but not in Iexplorer. I can see the online JS examples are also not working in IExplorer.
I think it may be because IExplorer does not accept the append method on dom elements, these calls could be probably replaced with "appendChild".
Provide a simple way of rendering or not elements. The property is accessible on each node of a hierarchy, from layers to leaf nodes.
If visible
is set to false
the node and its children are not rendered.
Now that kotlin DSL documentation exists, it should be more easy to do.
tileLayout.wrap = true allows to repeat tiles in longitude
This class contains the common renderings tests for js, jfx and android.
Before the creation of rendering-app, it was in test sources. But the integration of this new app to do the tests seems impossible with a dependency on test sources. As a temporairy workaround this class has been moved in main sources.
It takes time during development workflow. Should only be launched for bundle task.
A default style should be provided and defined in a lambda:
viz {
defaultStyle {
fill = colors.red
stroke = colors.black
strokeWidth = 2.0
}
}
Viz element should not use the style
property (which should be internal) but instead access to style properties through direct getters and setters. It would allow to avoid the creation of a Style object for the element if only getters are called. The Style object would be created for the node only in case of setter calls. This convention would allow to reuse the same Paint instance for a group of elements sharing the same style.
See http://paperjs.org/reference/style/
It is an interesting way of grouping styling properties. The style can be defined at different level of the hierarchy: on a node or on on of its parents. If a style is not defined at a lower level, its parent one could be used (this is not included in this issue)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.