Comments (5)
That’s because your client time zone setting is +1:00. baseTime
value 0 means UTC time 1970-1-1 0:00. This behavior is from d3-scale.
I haven’t investigated how to show relative time on X-axis. But it shouldn’t be hard.
from timechart.
@wujekbrezniew This is not as easy as I think. d3-scale
seems not providing a scale type for time spans. Maybe I need to roll my own.
I have added a new option xScaleType
in v0.5.0. Setting it to d3.scaleUtc
should make X-axis start from 00:00. But since values are still interpreted as date, you may see something strange, e.g. first tick shows 1970. You may also try d3.scaleLinear
, which displays just plain numbers.
from timechart.
I tested both scaleUtc and scaleLinear. With scaleUtc time on chart starts on 12:00 but scaleLinear is sufficient for my usecase. Thank you for help.
from timechart.
Same problem here. My data consist of 6 hours long ECGs and I need to display the time since the beginning of the recording.
Without scaleUTC, it starts at 1AM. With scaleUTC, it brings me back in the 70's :)
How could I change the x-labelling so that it displays relative HH:MM:SS and not absolute times ?
Thanks for this very good js library !
from timechart.
@citron The axis is rendered by D3. So anything accepted by d3-axis should work. Theoretically, you can write your own scaleRelativeTime
or similar, then pass it to TimeChart. I just don't get the time to implement it.
from timechart.
Related Issues (20)
- Stepped Line Chart HOT 6
- Alternative Zoom mode (click+drag selection) HOT 8
- Add optional Formatter function for x-value HOT 13
- Publish sourcemaps as to github pages distribution
- Chart rendering broken on Mac HOT 7
- Bug `TypeError: e is undefined` HOT 5
- Point position artifact on drag HOT 5
- Dynamic update series ? HOT 3
- Axis right Y2 to chart HOT 1
- Event on zoom applied HOT 2
- xRange/yRange: 'auto' issue HOT 1
- Line doesn't render HOT 1
- tickFormat for x Axis HOT 2
- Two Y axes and more HOT 2
- Question, render to texture HOT 2
- select zoom with Mouse Demo Left overflow HOT 1
- Can you guide me on how to add animation effects when appending data to render charts? HOT 2
- Problem of tooltip points offset like #60 HOT 18
- Add error margin to plot HOT 2
- Splitting data into multiple series leads to excessive CPU usage and browser crashes 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 timechart.