Comments (14)
There is no stupid question! It requires the Color type because I wanted the users to be able to set the various color properties (node/edge color/background...) using a .NET type (converted to hex format in the compiled dot file). But since it can cause problems in some environments I might create my own color type based on the System.Drawing's one.
from dotnetgraph.
yes, sorry, been hiking the last couple of days ;) works, thx a lot :D
from dotnetgraph.
What OS are you using? If you are not using Windows this might the problem: https://learn.microsoft.com/en-us/dotnet/api/system.drawing?view=net-6.0#remarks
You could try to resolve it by installing this nuget package: https://www.nuget.org/packages/System.Drawing.Common/
from dotnetgraph.
I am using Win11 latest versions to compile and run the dll.
I also tried referring the System.Drawing.Common and also repacked it into the target dll, but that does not change the program to later fail on missing this dependency
from dotnetgraph.
Is this maybe due to using .NETFramework v4.6.2 ? I am not a specialist in dotnet, but the page you linked I also found before and it mentions on .net 5 and .net 6, right?
from dotnetgraph.
Hum, not sure it could be because of the framework version, there is no reason .NET 4.6.2 doesn't include the Color type. Could you try to create a console application with the same framework version please? (but outside unity) so we could determine if the problem is coming from Unity.
from dotnetgraph.
I have just tested on a Windows machine and it works fine outside Unity, so the problem is coming from Unity.
Have you tried this already? https://stackoverflow.com/a/70217835
from dotnetgraph.
Thanks for the answers. What I did now is to copy the System.Drawing.dll into my project and let it, together with Syste.Drawing.Common.dll get repacked to the target .dll - but this still does not change the issue I am facing...
Maybe bit stupid question: why does the DotNetGraph require colors if it will just write text files that I later will import into GraphViz or similar? The text file would not require things like a color, would it?
Can I somehow work around this need for the extra libraries to just assemble the text file?
from dotnetgraph.
for what I am trying to do (drawing graphs of in-game objects) colorless would also be fine. Any ideas on when you might have time to do a change that does not require System.Drawing?
from dotnetgraph.
I've just pushed a beta version with my own color type DotColor
, it is available here: https://www.nuget.org/packages/DotNetGraph/3.0.0-beta3
This is version 3.0 so it will require some changes on your side, creating graph/node/edge is a bit different and using fluent extension methods. You can check the readme file on master for some examples, it shouldn't be difficult!
from dotnetgraph.
Very nice :)
Are you using a special StringWriter lib that supports async? I get this error copying the code from README:
Type 'System.IO.StringWriter' used in a 'await using' declaration must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method. Did you mean to use 'using' instead of 'await using'?
from dotnetgraph.
btw I am not sure if you really need to use the async writer, do you?
calling like this did also work (at least for a small example
var writer = new StringWriter();
directedGraph.CompileAsync(new CompilationContext(writer, new CompilationOptions()));
var result = writer.GetStringBuilder().ToString();
from dotnetgraph.
You don't need the await using on the string writer, this is a new feature of .net that is not in .net framework.
But you still need to await the CompileAsync method.
from dotnetgraph.
@FelixReuthlinger Is it all good? Can I close the issue?
from dotnetgraph.
Related Issues (20)
- Missing node identifier produces invalid dot file HOT 7
- Character escaping issue HOT 5
- Restore minification as an option HOT 2
- Properties with real type instead of *Attribute for better autocompletion HOT 1
- Missing Attribute Pos HOT 2
- DotArrow should output -- in undirected graphs HOT 2
- Label question HOT 8
- Add support for layouts HOT 2
- Possible missing features HOT 5
- How to specify `rankdir` graph attribute HOT 3
- Make a simple logo out of a free icon
- Create a parser
- Readme vs class - DotSubGraph vs DotSubgraph HOT 2
- DotGraph.getNode(string identifier) or DotEdge.From(string identifier).To(string identifier) HOT 2
- Feature Request: Add support for subgraphs/clusters HOT 2
- Please provide a signed assembly
- doesn't support records? HOT 1
- Edges from port to port
- Question: Default Styles (or theme)? 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 dotnetgraph.