Graph Module- Easily draw graphs of your data

Looks cool, happy to see you’re finding use for it. Just be careful that your market game doesn’t break Roblox’s TOS on gambling!

It uses in-game currency and there aren’t any cashouts or anything so we should be fine

Found what might be a slight issue. The cursor blocks out the number at certain times image

Is it possible to add an X axis? My specific use-case would be for showing the specific time each price point occurred at.

1 Like
local graphModule = require(script.graphModule)

local Frame = Instance.new("Frame")
Frame.Size = UDim2.fromScale(1,1)

Frame.Parent = script.Parent

local graph = graphModule.new(Frame)

local Data = {Example = {}}

graph.Data = Data

for i= 1, 10 do
	table.insert(Data.Example, i)
end

this simple script has cause this error:
Script timeout: exhausted allowed execution time

is it intended behavior or an error?

graphModule.rbxl (33.7 KB)

I’m using your module to display graphs with real time data but this error causes issues


3 Likes

Hey, I’m also trying to display data in real time with this but I get the same problem.

you forgot to add wait() in the for loops

This is cool but I am kinda confused, question how do I made it work like task manager I mean like I want to make a temp history monitor that updates each 10 seconds, I want the graph to show different of the current temp and 10 seconds earlier, to do that I made a variable that will be updated to the last temp that it checks so means when it updating the graph it will take the last 10 sec earlier record and the current temp while it’s updating it and show the graph of it, it’s kinda confuse on how I trying to explain it but u will understand eventually, it’s something like this

image

actually nvm my friend help me out

I’m having a size issue where the lines and the plot points don’t line up. This bug only happens when the Frame it’s parented on is using Scale instead of Offset.


This is what it looks like on any size of Offset, this is equivalent to my Player’s UDim2.fromScale(1, 1,). Nothing goes wrong here.


Then, when converted to Scale (any size) the lines seem to only utilize the top left portion of the graph, meanwhile the dots respect Scale.

Hi, thanks for your module.
I’m doing some initial tests and I noticed some discrepancies regarding the numbers and what is drawn on the graph:

local Graph = require(script.Graph)
local Data = { -- This will draw two lines named "LineA" and "LineB" that cross in the center
	LineA = {0,4,2,3,8,5,1,7,3,9};
	LineB = {9,8,7,6,15,5,4,3,2,0};
}

-- Create the graph and give it the data
local GraphHandler = Graph.new(script.Parent.Frame)
GraphHandler.Resolution = 10
GraphHandler.BaselineZero = false
GraphHandler.Data = Data

image

Both arrays contain 10 elements and GraphHandler.Resolution was set to 10.
However:

  1. LineB starts with 9 but the graph is showing 8 as the first value
  2. The 5th element of LineB is 15, but it is not being considered, nor is the vertical dimension being calculated to find 15.
  3. Since LineA comes alphabetically before LineB, they should be displayed in an orderly fashion in the header.

Anyway, it’s an excellent contribution and only the first two points are relevant.
How can I solve these problems?

Is there any way I can make this graph work with Ping? GetNetworkPing