Line graph

Hey there… So I have a circuit board that is sending some data to web and I am getting that data from web to Unity… I am showing that data on screen and it is changing very fast… Now to put this data in use I need to write that values on line graph… I have seen one asset for making graphs on unity store but it is 40€ and there is no money to spend on assets atm. I have thought on how to create a graph and I cant think of anything. I would very much appreciate every help i can get.

Ps. Any code would be more appreciated in unityscript :wink:

See, I have no expire nice in graphs, but just a backup idea, for the asset you were on about, if there is any video on it, just try to look into any scripts or how it works .

Because if you do this, it’ll give you a idea on how it works, then you can probably take it from there.

If there is anyone looking for answer.

if(meas0.Count>=99)
    {
        lineRenderer=gameObject.Find("graph").GetComponent.<LineRenderer>();
        lineRenderer.SetVertexCount(lengthOfLineRenderer);
        lineRenderer.SetColors(c1, c2);
        lineRenderer.SetWidth(0.08,0.08);
        for(var i : int = 0; i < lengthOfLineRenderer; i++)
        {   
            //Debug.Log(Mathf.Sin(i + t)+"sin");
            //Debug.Log(float.Parse(meas[0])/1000+"meas");
            var pos : Vector3 = Vector3((i * 0.05)-1, float.Parse(meas0[i])/1000, 0);
            lineRenderer.SetPosition(i, pos);
        }

    }

Here is a 5.6 version
// set number of points
int listCount = resultsList.Count; //resultsList is a List
theLineRender.positionCount = listCount;
theLineRender.startWidth = 0.05f;
theLineRender.endWidth = 0.05f;

for (int i = 0; i < listCount; i++)
{
theLineRender.SetPosition(i, new Vector3((float) i, (resultsList * 100), 0.0f));
}