Comments (4)
Hi @thomasd3 , sorry for the late reply.
I guess then all the other display functions such as Chart.Show
dont work either?
The error seems to be related to your OS as Process.start seems only able to open executables on macOS, while on windows using a file opens it with the default program. Seems like we need to adjust this behaviour on runtime based on the OS. I dont have a mac though, so testing this could prove hard. I will push some changes and release a preview package on nuget, would be cool if you could test it when its done.
from plotly.net.
Take a look at this pull in XPlot. I fixed it a while ago to work with different OS.
fslaborg/XPlot@19c9251#diff-b135992486db43681541285661efff96
from plotly.net.
Thanks @zyzhu , this is exacty what i am trying now. However it seems like that xdg-open is not installed on every unix machine. I was testing that with the ubuntu wsl app for windows:
root@Surface:/mnt/c/Users/kevin/source/repos/muehlhaus/FSharp.Plotly/bin/FSharp.Plotly/netstandard2.0# cd /tmp
root@Surface:/tmp# URL="./7fd73ea4-eaa0-4ae0-8381-e15d337a4d5b.html"; xdg-open $URL
Command 'xdg-open' not found, but can be installed with:
apt install xdg-utils
root@Surface:/tmp#
There seem to be a few command line methods around to open the standard browser on a unix system. Currently i am trying to emulate this command:
URL="./7fd73ea4-eaa0-4ae0-8381-e15d337a4d5b.html"; xdg-open $URL || sensible-browser $URL || x-www-browser $URL || gnome-open $URL
which tries the most common ones with fallback. In my case, the third command works:
root@Surface:/tmp# URL="./7fd73ea4-eaa0-4ae0-8381-e15d337a4d5b.html"; xdg-open $URL || sensible-browser $URL || x-www-browser $URL || gnome-open $URL
Command 'xdg-open' not found, but can be installed with:
apt install xdg-utils
Couldn't find a suitable web browser!
Set the BROWSER environment variable to your desired browser.
root@Surface:/tmp#
Any thoughts on that?
Edit: I guess for starters, your solution is perfectly okay and it seems reasonable to require the installation of that package. Could be worth to revisit in the future
from plotly.net.
I adopted@zyzhu 's code snippet. @thomasd3, the changes are available in v1.2.2 if you want to have a look.
from plotly.net.
Related Issues (20)
- Generate C# bindings via code generation based on the core F# API
- Chart descriptions do not work if Cytoscape.NET.Interactive is referenced simultaneously HOT 4
- Contours should be accessible for PointDensity charts HOT 1
- How to create polar plots with Csharp HOT 3
- Suggestion: Documentation / Examples / Extensions for working with DataFrame objects HOT 1
- Exception when using .NET Polyglot Notebook due to strong naming HOT 3
- Add `WithTraceStyle` extension member to Plotly.NET.CSharp
- Plotly.Net.ImageExport ToBase64JPGString hangs in Blazor Server Application HOT 4
- load a custom font from file (ttf, woff, ...others) HOT 9
- With lastest plotly.net version (4.2), when plotting a Bubble3D chart ( or Scatter3D), x/y axis cannot be renamed HOT 4
- Unable to change the legend font size when global font size is defined in layout HOT 1
- plotly.js v2.28.0 compatibility needs huge rework of core API HOT 1
- Rework docs to use polyglot notebooks HOT 5
- Pie Chart's background doesnt change HOT 7
- No way to add guidelines (plotly.js has them) HOT 3
- Update documentation to dotnet interactive to 4.2.1 HOT 1
- `StyleParam.HoverInfo` is missing enum bindings
- Charts marked as `Responsive = true` are not responsive HOT 9
- Annotation not showing in C# HOT 2
- LinearAxis CategoryOrder not working as expected 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 plotly.net.