oxyplot / oxyplot-fiddle

A simple fiddle for OxyPlot
https://oxyplot-fiddle.azurewebsites.net/
MIT License
2 stars 2 forks source link

Implement with Blazor #7

Open objorke opened 5 years ago

objorke commented 5 years ago

Add another implementation with Blazor

https://github.com/oxyplot/oxyplot/issues/1311

VisualMelon commented 5 years ago

Very basic implementation at https://github.com/VisualMelon/oxyplot-fiddle/tree/BasicBlazor using the SVG Exporter (no plot interactivity). Would be possible to add PNG export using the ImageSharp APIs (for now its using 2.0). (blazor fiddle at /blazor.html)

I can't seem to get the scripting APIs to work in Blazor, but the existing code (from https://github.com/Suchiman/Runny) should hopefully be modifiable to allow the scripting syntax.

belucha commented 4 years ago

I implement a sketch for a Blazor based Plotview that also handles some interactions. It's quite easy to use....

It's still not done, only mouse event interaction, but it's fantastic to use. Just add as Blazor Component to your Blazor Page

https://github.com/belucha/oxyplot.blazor/blob/0a87dd0f1d4975105383d0ea74ba95f768247788/oxyplot-blazor/Pages/Index.razor#L8

objorke commented 4 years ago

@belucha We would love to see a PR for OxyPlot.Razor in the core repository! Even if it is just a sketch and not feature complete.

belucha commented 4 years ago

@objorke I think OxyPlot and Blazor behave quite well together. I will try to find a place to load an online demo within the next couple of days.

I think it is not too much work left, to get a good start. The main things left to do is implementing all other interactions Keyboard and Wheel. Also I have to find a way to supress the default reaction of the browser (e.g. opening up the context menu). This will require some Clientside Javascript (event though I tried to avoid that where possible).

Besides that I integrated the OxyPlot Example project into the repo and most them seem to work out of the box.

belucha commented 4 years ago

.NET CORE 3.1 addresses the problem of default event propagation, so I will upgrade to 3.1.