alessandrotironi / unityguicharteditor Goto Github PK
View Code? Open in Web Editor NEWA Unity Editor utility that allows to draw custom charts inside the Inspector.
A Unity Editor utility that allows to draw custom charts inside the Inspector.
First off just want to say you did an amazing job on this asset. Works great and the code seems to be well commented and architected. Just really incredible stuff.
I'm curious how I might go about adding a value label as an (x,y) coordinate and or if that's even possible. It looks like I can hack it up a bit using the current system (GUIChartEditor.PushValueLabel(...)
) but as it stands now it doesn't look like it's possible.
Am I correct in my understanding?
Thanks in advance!
First of all, thanks for this little great library!
I found a small bug about the background color of the chart, is currently a fixed value Color.Black, the line is 289 on the GUIChartEditor script, currently is
GL.Color(Color.black);
and should be
GL.Color(CurrentChart.currentBgColor);
Thanks again fo this great graph drawer!
A simple Mathf.Abs or Mathf.Max on the input values of ShowGrid() would fix this.
This issue can be produced easily by changing the values in the inspector of the example scene.
EDIT: During this crash, unity will have a memory leak as well, until the process is ended manually.
If I take this base code:
GUIChartEditor.BeginChart(0, 400, 0, 200, Color.black,
GUIChartEditorOptions.ChartBounds(0, 10, 0, 10),
GUIChartEditorOptions.SetOrigin(ChartOrigins.BottomLeft),
GUIChartEditorOptions.ShowAxes(Color.white)
);
GUIChartEditor.PushPoint(new Vector2(0, 5), Color.red);
GUIChartEditor.PushPoint(new Vector2(5, 5), Color.red);
GUIChartEditor.PushPoint(new Vector2(10, 5), Color.red);
GUIChartEditor.EndChart();
Which is the expected result.
If I set a negative minimum X, like:
GUIChartEditorOptions.ChartBounds(-10, 10, 0, 10),
Also correct, expected result.
However, if I set a positive minimum value, like:
GUIChartEditorOptions.ChartBounds(5, 10, 0, 10),
I would expect to see a red dot on the left, and right in this case? Also I note the white y axis line is displaying on the right side of the image which is also unexpected?
"if (!float.TryParse(text, out float res))" (GUIChartEditorSprites.cs, line 74) failed to parse on my French language system.
Adding globalization parameters fixed the issue:
"if (!float.TryParse(text, System.Globalization.NumberStyles.Any, System.Globalization.CultureInfo.InvariantCulture, out float res))"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.