title: How to use Line Renderer to plot Line chart/graph?
body: <p>I was told that to create a line chart/graph, I need to first know how to create graphics like line into the game scene. I did and now how should I go about plotting and making it into a line chart? I need to plot a real-time graph.
  This is the code for drawing line using Line renderer.</p>
  
  <pre><code>public Transform origin;
      public Transform destination;
  
  
      public float lineDrawSpeed = 6f;
  
      // Use this for initialization
      void Start () 
      {
          lineRenderer = GetComponent&lt;LineRenderer&gt; ();
          lineRenderer.SetPosition(0, origin.position);
  
          lineRenderer.SetWidth(.10f, .10f);
  
          dist = Vector3.Distance (origin.position, destination.position);
  
      }
  
      // Update is called once per frame
      void Update () 
      {
          if (counter &lt; dist) {
  
          counter += .1f / lineDrawSpeed;
  
          float x = Mathf.Lerp (0, dist, counter);
  
          Vector3 pointA = origin.position;
          Vector3 pointB = destination.position;
  
          //Get the unit vector in the desired direction, multiply by the desired length and add the starting point.
          Vector3 pointAlongLine = x * Vector3.Normalize (pointB - pointA) + pointA;
  
          lineRenderer.SetPosition (1, pointAlongLine);
  
  }
  }
  }
  </code></pre>