Comments (7)
Hi @dcmohann thanks for reaching out.
The timeformat you highlighted is actually intentional, to provide a more contextual overview of the time range. Ticks on the first of the month will be labeled with only the month. At the start of each week (Sunday tick) you'll get the month-date format. Other days will be displayed as weekday-date. Beyond that you will get actual times. This is inspired by https://bl.ocks.org/mbostock/4149176.
If you prefer a different time formatting, you can provide your own using the .xTickFormat()
method. F.e. to display in plain unix timestamps:
myChart.xTickFormat(ts => ts.getTime())
from timelines-chart.
Thanks @vasturiano for your information. Can you provide some example, if the custom option is possible.
from timelines-chart.
@dcmohann there is a custom time format example here:
http://vasturiano.github.io/timelines-chart/example/custom-time-format/
[source]
I'd recommend looking into d3-time-format if you're looking for a different time format.
from timelines-chart.
Hi @vasturiano, One more requirement for me, i am not sure whether the current release have this option to do it.
I would like to display the below "note" value on the segment. Is it possible?
data: [ { timeRange: [<date>, <date>], val: <val: number (continuous dataScale) or string (ordinal dataScale)> note: <String> }
from timelines-chart.
@dcmohann you can use the tooltip content to add annotations to your segments, using the method zDataLabel
, which supports either plain text or html content. F.e:
myChart.zDataLabel('<div>Additional <b>data</b></div>')
from timelines-chart.
Hi @vasturiano, i think zDataLabel('data') shows as part of the tooltip, but i would like to display on the segment itself like
from timelines-chart.
I see. That's currently not supported in the current version. But, I think it's a useful feature, so I'll leave this issue open until I can dedicate some cycles to do it.
Or, I'd be happy to accept a PR for it if you have something working!
from timelines-chart.
Related Issues (20)
- Error: <rect> attribute width: A negative value is not valid. ("-190") HOT 1
- Duplicate labels HOT 1
- How to do Multiple Selection of Timeline Segments using Cursor Drag (click+Drag) and Handling the selection of those segments to store the info and update their UI based on our logic
- some entries appear in wrong group row HOT 2
- Feature Request for SortChrono
- Custom Tooltip with custom value. HOT 1
- Feature Request: onChartRendered
- How to use enableOverview() HOT 1
- Custom messages - changed from 2.11.5 to 2.11.8? HOT 1
- onScaleUnitClick HOT 2
- Series segments not being created on firefox HOT 3
- Coloring individual (overlapping) segments HOT 2
- "Fill" option for chart sizing HOT 1
- Set the timeline height HOT 2
- Text on Segments
- Line datetime from zero
- Blue tooltips do not disappear
- User defined group label width
- Mark the weekends on the chart
- Uncaught runtime errors; it happened sometimes (when I click for loading data quickly) HOT 3
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 timelines-chart.