Comments (7)
😉 No problem! I think you can leave the issue open, it would be a nice addition to have an overload that accepts DateTimeOffset[]
and then convert to DateTime
internally
from feliz.plotly.
Thanks, I've tested this and it works as expected.
from feliz.plotly.
I probably can convert my DateTimeOffset to a DateTime, though I'm not really sure how to proceed there.
You can get the DateTime
component using the DateTime
property
let timestamp = DateTimeOffset.Now;
let date = timestamp.DateTime;
In Fable, both DateTimeOffset
and DateTime
are Date
instances so you could even unbox<DateTime>
. The only difference is that DateTimeOffset
attaches a property to the Date
instance to maintain the offset
from feliz.plotly.
You lose the time information when calling timestamp.DateTime;
.
https://fable.io/repl/#?code=PTAEHUCcEsBcFNQGMD2ATRLKgDYoIZqj6gDO+AtgA46IBmkKFZ0GARvpALABQKV8AHagAygE9SCCr14ARfAgAq0CvADydOqXiwAdAAVO2gBQAiAEwAGAIwBOALSWAzPesBWUJYDsALjfmfABZrXSd3SwjTAEpdeQReAB8APlAqGEFYOmFTAFIAQVMgA&html=Q&css=Q
from feliz.plotly.
The REPL snippet is calling .Date
, not .DateTime
which only returns the date component
from feliz.plotly.
😮, ok my bad. Thanks for pointing this out Zaid!
from feliz.plotly.
I just pushed version 2.1.0 that adds support for DateTimeOffset
anywhere a DateTime
was previously allowed. Let me know if you have any issues, and feel free to re-open this if so!
from feliz.plotly.
Related Issues (20)
- Generated code HOT 15
- Dealing with multiple typed inputs HOT 2
- Cleanup Bindings that are used in events HOT 1
- Save plot to disk HOT 7
- Feliz.Plotly missing files HOT 3
- Question. Sorry about it HOT 3
- Getting error on build after adding Feliz.Plotly package HOT 3
- Array evaluation doesn't work HOT 1
- config.toImageButtonOptions has incorrect type signature
- Show how to use rangebreaks in documentation. HOT 2
- Did traces got renamed or moved? HOT 1
- Using the plotly.js binding without React? HOT 4
- open Feliz.Plotly overwrites built-in "box" function HOT 3
- Can we display a vertical line in the line graph? HOT 5
- Animation example
- seq<seq<'T option>> in Histogram2d,Heatmap,.. for x,y and z HOT 1
- Use consistent camelCase namings HOT 3
- Packaged nuget has no dependencies HOT 2
- Need to un-nest many properties HOT 2
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 feliz.plotly.