Comments (4)
Hi @KameshRajandran,
- Create 10000 nodes initially.
This is a very large number of nodes. The library tries to make large numbers of nodes possible by virtualization, but whether that's sufficient depends on usage. If all nodes are simulatenously visible, the library can't help you. You might be better off drawing such large diagrams as a canvas, e.g. with Excubo.Blazor.Canvas.
- Add 10 nodes dynamically.
The documentation shows you how you can let the user add nodes. Have a look at the demo and corresponding source file.
- How to update the fill colors for selected shapes?
The Fill
and Stroke
parameters of a node can be used to customize style. If style needs to change on selection, you can do that by listening to the SelectionChanged
event and processing selected nodes. You are also free to design your own custom nodes, which then can behave any way you'd like on select. Sample code can be found here.
BR
Stefan
from blazor.diagrams.
#Hi Stefan,
We have tried with 1000 nodes in your Performance sample. It's getting very slow while dragging a node.
Already we have tried this sample in the server-side application and hosted that application with 1000 nodes, the performance of interaction is very low. If we render the sample locally, the performance of interaction was ok, but when we host in remote machine(hosted in other regions) it seems the performance was too slow. Is this a maximum performance for blazor in server application?
Here we have attached video link for performance issue in your sample after rendering around 1000 nodes.
Excubo.Blazor.Diagrams demo (Blazor ServerSide) - Google Chrome 2020-08-14 16-07-14.zip
Regards,
Naganathan K G
from blazor.diagrams.
Hi @Naganathan,
the issue is fundamental to Blazor: many times an application renders, it's actually not necessary. Avoiding it is not always straight-forward. In this particular instance, the issue is with bind-X
on the nodes. The bind causes a re-render of the entire component that contains the diagram, which of course includes the diagram. Since the diagram contains a large number of nodes, the delay of rendering even though nothing changed on that large number of nodes becomes noticable. This issue is tracked in Blazor here: dotnet/aspnetcore#18919. Sadly it doesn't seem to get enough attention.
In this particular case, I think I was able to work around the issue. Please update to version 1.6.6 and please let us know whether this performs better in your scenario.
BR
Stefan
from blazor.diagrams.
Closed due to no activity for several months
from blazor.diagrams.
Related Issues (20)
- Creating custom link HOT 6
- Diagram Does Not Display HOT 3
- Property Hidden HOT 2
- Questions HOT 2
- Disabling Custom Links HOT 3
- NodeLibrary with Code generated Nodes HOT 7
- additional arrow styles? HOT 2
- Is it possible to disable the function that lets you click on an object and link it to another? HOT 5
- Diagram LinkModified LinkBase param doesnt provide correct positions on source and node HOT 5
- Capture Drag Event of Node causes render to fail HOT 5
- Is there a way to make lines not lap over nodes during auto layout HOT 2
- Auto Layout after render HOT 1
- Panning on mobile HOT 2
- Allow custom middle point and link direction of AngleLink component HOT 6
- Callback after graph is rendered? HOT 8
- Adding container element/nesting of nodes HOT 1
- AutoLayout HOT 6
- Auto-Center after ZoomToFit HOT 7
- Improve documentation about how to change size of nodes.
- Add the ability to prevent remove node or link
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 blazor.diagrams.