Comments (2)
Thanks for the response @pmariac ,
was able to resolve the issue by executing it asynchronously to be more specific using coroutines, also in the case of mine it was simple chart which represent 1 dimensional data with single line graph additional as was mentioned by you redrawing in the canvas seems to be super smooth in both higher and lower stream rate with reasonably lower resources usage(mem)
would also like to give a try to the ChartModel in the near future
here's the code in case
val p = Pane()
var x = 1.0
val viz = p.newVizContainer().apply {
size = Size(width, height)
}
scope { this: CoroutineScope
while(true) {
x++
values[1] = x
viz.chart(values) {
val values = quantitative({ domain })
line(values, values)
}
}
val scene = Scene(p, width, height)
jfxpanel.scene = scene
from data2viz.
It is actually impossible to update data in the current version of charts.
It will be available in a near future with the introduction of the ChartModel.
What you can do right now, if your chart is very light and draw fast, is to completely clean and redraw everything.
By the way, it is easier for us to track issues on the data2viz forum when it concerns the Charts-kt project: https://forum.data2viz.io/ just create a thread in the charts-kt section.
from data2viz.
Related Issues (20)
- Runtime exception due to wrong casting
- Add a copy() function to all scales
- [VIZ] Stroke properties should be called strokeColor ?
- Handling changing and/or real-time data HOT 4
- Use the latest KotlinX DateTime version HOT 1
- Android version does not support the dashedLine property of the HasStroke interface HOT 1
- Share Meta keys on KEvent
- [Feature request] Export as SVG HOT 8
- Upgrade JavaFX to version 11 HOT 1
- Manage multi line rich text
- Wrong measure text on Android and JS when the text starts or ends with whitespaces HOT 1
- Viz appears blurry on a HDPI screen, using Kotlin/JS IR compiler
- Introduce HeadlessVizContainer
- Wrong height of TextNode.measureText()
- Android: Handle view size/measurements better HOT 2
- Force Directed Graphs
- Scaling transformation is missing HOT 1
- Fatal Exception: java.lang.NoClassDefFoundError: Failed resolution of: Ljava/time/Instant; HOT 3
- Add Kotlin's wasm-js target
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from data2viz.