Comments (3)
Hey @pkese, what you referenced is the python version of plotly, which similarly to this lib offer a plethora of high-level abstractions on top of plotly.js. While there seems to be no direct API we could bin this to (at least hline
or vline
lead to no results when searching the js reference)
However, the python functions seems to me like it is simply setting the respective reference (Xref
/ Yref
), so you can easiliy implement this using the base Shape
bindings:
open Plotly.NET
open Plotly.NET.LayoutObjects
Chart.Point([for i in 0..10 -> i, i])
|> Chart.withShapes [
Shape.init(
X0 = 1,
X1 = 2,
Y0 = 0,
Y1 = 1,
Yref = "y domain"
)
Shape.init(
X0 = 0,
X1 = 1,
Y0 = 0,
Y1 = 0,
Xref = "x domain"
)
]
What we should do though is add a type safe abstration for <axis id> domain
, most likely in StyleParam.SubPlotId
from plotly.net.
I think we could offer such an abstraction though. Keeping consistent e.g. with special axes type creation, this would mean there would be a Shape.initVerticalLine
, Shape.initVerticalRect
etc., what do you think about this @pkese ?
from plotly.net.
Sounds great.
Note: I'm just learning plotly, so my comments may not be most relevant.
I do have a lot of experience with Highcharts and they have a nice way to put extra lines directly on axis object. Maybe that's also something worth considering. https://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/highcharts/xaxis/plotlines-color/
from plotly.net.
Related Issues (20)
- 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
- 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
- Giraffe.ViewEngine.StrongName breaks compatability with Giraffe server 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 plotly.net.