If you have questions, bugs, feature requests, etc that you don’t want to share with the thread, please send them to rorakin3@gmail.com
This package makes it easy to drag and drop prefabs for various graph based GUIs into your game.
Graph Maker is quite flexible, and can also be used to create various types of graphs that are not your typical line and bar graphs. For example, skill trees and world maps can be created using the package.
Note that the example scenes below are good examples of things that you can do with Graph Maker, but are not available with Graph Maker and the standard Unity GUI system (UGUI) because these examples were created about 2 years ago when Graph Maker was only for the NGUI system.
Go into full-screen and right click to create nodes and left click to pan or select objects. Right click to move objects or pan. Hold control and/or shift to use the link angle and step features when creating a node from an existing node. https://dl.dropboxusercontent.com/s/zgp1pvamxilm07y/Editor.html
This is an example randomly generated world map meant to show what can be created using Graph Maker API. Right click to pan, middle scroll wheel to zoom, left click nodes to find new nodes, hover over a node different from your current node indicated by green brackets to highlight the path between the nodes. The pathfinding is done with a public function available for any Graph Maker graph. It uses the breadth first search (BFS) algorithm, and works on graphs with multiple possible paths between 2 nodes. https://dl.dropboxusercontent.com/s/3m0k8f7kwwzn8jx/World_Map.html
Thanks to those that have already taken the leap and purchased it I really appreciate it! Now let’s see if I can answer some questions
So currently mostly everything is in the form of prefabs. Each graph type generally has its own specific Graph Maker specific script(s). There are some public functions you can call, as well as dozens of public variables for each of the graph types, all of which can be used to change just about everything I could think of that you might want to change at run-time for each graph. The number of floats in a list of floats, for example determines how many pie slices or how many bars / points a graph will display, and of course is editable at run-time. By default, all graphs update every frame, so if you know ahead of time your graphs will be static based on data you load initially for example, you can set the graph to not update every frame. If the graph will be mostly static, but change occasionally, you can also call a public “refresh” function in all of the graphs in your own code whenever you want to, and you will probably want to do this for mobile (though I haven’t done tests to see how big a difference it will be). Regardless though, performance should be fine on mobile because it’s NGUI and because of public refresh graph functions for every graph type.
Good question So, initially I wanted to create lots of animations for every graph type, but it was turning out to be a ridiculous amount of code, and also I wasn’t certain that the animations I was implementing would be what people would actually want. So, in the end (the current product), I decided to just implement animations for the pie graph, since it would be pretty difficult for someone else to implement in their own code, mostly because of the way sorting works, the top X ‘Include Others’ mechanic, and the way rotations and sprite fill amounts are calculated. In short, there are animations for the Pie graph only, so currently I largely leave animation implementation up to the end-user. The example world-map scene and skill tree scenes have animation implementations, I will probably create test scenes for animating / interactive bar / line graphs in the near future as well. I do use HOTween for stuff in my own game, since it does seem better flexibility / performance wise, but the example scenes will probably just use the Tween scripts in NGUI so I don’t have to say ‘Requires HOTween’ in my package.
No, not yet This is an interesting one, and something I definitely want to look into. How do you think you would actually use it? I imagine you want to change it at runtime, would that involve just setting some variables / calling some functions?
Pretty cool stuff there Yea, as I mentioned currently the only animations I pushed out that you could use via API calls are ones for the pie graph, so basically / adding / deleting / changing data has pie slice animations, and then data changes such that sort order would change also has a different animation. The timeline and pie graph on that website should be easily doable, the stacked bar chart not quite so easily, I will probably add a prefab / some more variables to support stacked bar charts in the near future. Edit Stacked bar is now also easily doable.
Hey imtrobin, thanks for buying by the way Let me try to rephrase your request, so I’m not totally off-base, you want on the series script for the line graph to be able to specify the x AND y axis data rather than specify the x-axis data on axis graph script? So each series could be a list of floats for the y-axis and a list of strings for the x-axis?
Hey, thanks for checking it out! It looks like your sentence got cut off, but I think you’re asking for a line / bar graph tutorial? Yea, I can for sure do a video tutorial on pie / line / bar graphs. Yea, you can definitely change the line graph data at run-time, and everything will automatically update. You can also change things like the x-axis and y-axis lengths and everything updates.
I haven’t yet upgraded to try it, but if NGUI works with the latest version, I’m pretty sure there will be no problems. Oh, I forgot to mention, the latest version only works with NGUI 2.7 or below, however I have fixed all the issues for the NGUI 2.7 - 3.0+ upgrade, and will be updating the package to require and only support NGUI 3.0+. If you still use NGUI 2.7-, I can still support it for the near future it if you want to continue using NGUI 2.7-, just send me you’re invoice # and I will send you the 2.7 version.
I haven’t tried Daikon Forge, there isn’t TOO much NGUI specific code in this, so it could probably be ported in a few hours work. Most of the NGUI specific code in this package is probably in my custom editor, which again is definitely not required to use for any of the graph types (pie / line / bar, etc).
Not exactly a (string,y) line series. I want to plot a 2D float (x,y) graph, then join the lines via Best Line Fit or curve. For curve fitting, I was initially using Curvy but since Graphmaker came out, I’m switching to it. This is probably the way to implment the Bezier curve.
Oh ok, so basically a scatter plot, with ability to have a best fit curve. Most scatter plots generally draw a best fit curve with a basic math function like linear or polynomial, but it sounds like you also want something like a bezier curve to fit the scatter plot?
Quick update- I have added stacked bar and percentage stacked bar: The axis graph is now more generic, so you can now instantly switch between line, side by side bar, stacked bar, and percentage stacked bar by changing just 1 parameter:
“3. No, not yet :sad: This is an interesting one, and something I definitely want to look into. How do you think you would actually use it? I imagine you want to change it at runtime, would that involve just setting some variables / calling some functions?”
Definitely at runtime, in general, as an API I would like use GraphMaker mainly during runtime and not much in-editor.
" I do use HOTween for stuff in my own game, since it does seem better flexibility / performance wise, but the example scenes will probably just use the Tween scripts in NGUI so I don’t have to say ‘Requires HOTween’ in my package."
Would you consider making a demo with HOTween and include it as a Zipped. Those that have HOTween (that’s actually quite a lot of people) would really appreciate more performant animations.
Nice Stacked Bar chart. That was very quick update, seems it wasn’t so hard.
Bezier would be great.
Edit:
It would be really cool to be able to MouseOver any of the points/bar on the graph and get a little popup showing more info about that point/bar. The ability to interact with the data points would also be handy. This sort of functionality is built into the Flare API.
GraphMaker is amongst the first Graphing packages for Unity and potentially could grow to be the " Ultimate Graphing Package " that every dev should have in their toolkit.
@imtrobin
Alright, I made the series a bit more flexible, and you can specify both x and y values with Vector2. If you want the x-values to be evenly spaced on the x-axis based on the number of points and x-axis length, you can still do so via boolean parameter. You will probably want to do this in most cases, but if not you specify meaningful x-axis values and x-axis Min / Max values to correctly space the points based on your own data. Basically, scatter plots should now be easily doable, here is a screenshot:
@rocki
Thanks, yea it wasn’t too difficult to support stacked bar’s. Yea, that’s the plan, to make Graph Maker the go-to package for creating graphs, and surprisingly, there seems to be no competition at the moment. There is not yet a link to documentation, the API is mostly parameters on scripts, rather than function calls, which the pdf manual details. I may post a link to the pdf later, but pm me your email and I can email it to you now if you want. Oh, and yes definitely interactivity (hover-over popups), and animations are things I want to do. You could implement these things yourself by calling public functions to get the points / lines and assigning event delegates / doing animations on them, but I definitely want to have some out-of-the box implementations to make this easier.
Support for changing orientation added. Can now instantly switch between vertical and horizontal side by side bar, stacked bar, and stacked percentage bar graphs: