- Home /
Question by
vijayrathore99 · Jul 22, 2015 at 01:27 PM ·
linegraphcurvevectrosity
How to draw graph(line graph , spline graph) in unity using.
Hi all, after done lot of r&d on line drawing in unity. I have made a line graph using vectrosity plugin. i made a simple line graph but i want curve in drawing line. Is there any way do to make graph curve line using vectrosity plugin. Following there is code for line drawing. List linePoints; void AddPoints {
linePoints = new List<Vector2>();
for (int i=0; i<data.Count; i++) {
lineCurvePoints.Add(new Vector3(i*50.0f,data[i],0));
}
} void DrawGraph() { Vector2[] lineVector = linePoints.ToArray(); var line = new VectorLine ("Line",lineVector , lineMaterial, 2.0f, LineType.Continuous); line.Draw (); } Below is graph image which i draw following code. i want to make curve line so it look like good graph
linegraph.png
(4.2 kB)
Comment