Support for user-defined formatting of time values
See original GitHub issueHi,
By setting tick formatters in ‘values’ in an axis, I can show timestamps in 24h format. But the selected “Time” is always printed in 12h format with am/pm. I would like to print that in 24h format as well.
I added an option ‘timeSeriesVal’, by changing this line in Line.js:
const _timeSeriesVal = timeSeriesVal(tzDate);
to:
const _timeSeriesVal = opts.timeSeriesVal ? opts.timeSeriesVal(tzDate) : timeSeriesVal(tzDate);
and with this I can pass my own formatting function. I’m not sure this is the right way to do it though; specifically I’m not sure the name of this option is correct / descriptive.
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
Custom date and time formats for the Format function (Access ...
Learn how to control how a date or time is displayed by creating a custom formatting.
Read more >236-29: Building and Using User Defined Formats
Formats are created using PROC FORMAT. User defined formats can be used to: ! convert numeric variables into character values.
Read more >Formatting user-defined types with {fmt} library - [wgml.pl]
It claims to be faster than alternatives both in compile and run times, without bloating application code, too. It also supports formatting time...
Read more >Time formatting for charts | Looker - Google Cloud
Format Type Description Use This Expression
Time Milliseconds as a decimal number, i.e. 000 to 999 %L
Time Second as a two‑digit number, i.e. 00...
Read more >SimpleDateFormat (Java Platform SE 7 ) - Oracle Help Center
Date and Time Patterns · Text: For formatting, if the number of pattern letters is 4 or more, the full form is used;...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
ok,
series.value
can now be a template string and will respectopts.tzDate
.closing this issue in favor of #87 to stay on topic. i’ve added some more thoughts/concerns there. let me know what you think.