Comments (4)
As I suppose you are not showing dates from the 1970s you are experiencing this with an uninitialized chart? This is probably why this didn't show up earlier, but of course this should be handled gracefully without throwing error messages.
If your time is not unix epoch timestamps, setTimeAxis(true) should not be called. Maybe date/epoch/timestamp Axis would be less ambigious names for this functionality. And documentation should definitely be improved. (see also: #22)
@RalphSteinhagen when looking at this, I realized that the TimeAxisSample also has some problems (in master and dev). It becomes unresponsive when zooming with the scroll wheel and zoom actions generally do not work as intended.
Edit: Did some git bisect and the commit introducing the zoom bug in the sample seems to be 9ef24ea.
from chart-fx.
I figured the time axis would be generally applicable to any time data. I'm often using relative time, e.g., time from whenever the first data point starts.
Aside from the (easy-to-fix) negative number issue, starting at 0 seconds works just fine in the current implementation. Is there any reason why it needs to be limited to absolute timestamps?
Edit: I'm currently using a local fix
Edit2: For my use case it'd be enough to not crash, so just returning an empty string would work as well
if (utcValueSeconds.doubleValue() < 0) {
return "";
}
from chart-fx.
I guess mostly because that was the assumption when the functionality was written, so you might run into cases that are wrong or at least not well tested.
One obvious (while maybe a bit constructed) example might be, that if you plot a data interval longer than the time from EPOCH to the first leap day afterwards, you will get wrong labels from this time on.
We try to make chart-fx output as independent of localization settings as possible, but there is a Timezone setting, which also could affect your output.
These are the potential problems i can think of on the spot.
Regarding your local fix, I see the problem that if you scroll out on a month timescale, you will get negative dates, which i now saw you probably also realized, returning an empty string is also what I would have proposed.
I will get some local feedback and get it merged if there are no objections.
from chart-fx.
That's a good point. It's ok to make this an unsupported feature that may run into corner cases. Most durations should be fairly short, so it's unlikely that users will hit this.
If someone uses a relative time with a time zone offset it's really their own fault :)
from chart-fx.
Related Issues (20)
- [10pt, 10pt]Restructure layout computations to make rendered output more consistent HOT 3
- If the dataset is round-trip, when i zoom the chart, the line will disapear. HOT 4
- Feature request (bug?) center handle position in HeatmapChart Pixels HOT 1
- Feature Request: allow explicit setting of axis' tick marks HOT 1
- Moving XYCharts to a new scene causes improper scaling between the axis and series/gridlines HOT 4
- DragResizerUtil dont resize on south HOT 1
- ShortTimeFourierTransform: Amplitude change with zero padding
- Customize color schema of XYChart HOT 2
- Axis display problem HOT 2
- Noob developer
- Change CachedDataPoints access modifier to public
- Notes for future work past 11.3 HOT 1
- Eclipse cannot handle 11.3.0 for some reason HOT 19
- Several questions about axis HOT 2
- The Zoomer plugin has some problems when using the mouse wheel HOT 2
- Fix usage of `renderer.getAxes` in `DataPointToolTip` and other plugins
- com.sun.javafx.application.PlatformImpl startup WARNING: Unsupported JavaFX configuration: classes were loaded from 'unnamed module @...' HOT 2
- (1) real time candlestick Chart with lines and points together (2) show at least two candlesticks together HOT 1
- Am I in the correct developer mode? developer mode for chartfx-chart/: An exception occurred while executing the Java class. Exception in Application start method HOT 1
- setTickUnit seems to be invalid and does not show the expected effect HOT 1
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 chart-fx.