• Drawing graphs in Derma Panel
    2 replies, posted
Is there a way to draw a graph (specifically a pie chart and a bar graph) in a derma panel? I can understand a bar graph not being too hard to do so if there isn't already a way to draw them I can probably make my own, but I have no idea how to draw a pie chart. Also, is it possible to get the name of the folder your addon code is in?
To get the name of the folder your addon is in, you can use [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/debug/getinfo]debug.getinfo[/url]. Get the .source field from the table returned.
You can draw a graph-like background using surface.DrawLine, I guess you could then draw more lines over that to represent your line graph. So its possible but would require a fair amount of math I'll post a code example later
Sorry, you need to Log In to post a reply to this thread.