12 [DisallowMultipleComponent]
22 chart = gameObject.GetComponent<
LineChart>();
25 chart = gameObject.AddComponent<
LineChart>();
27 chart.title.show =
true;
28 chart.title.text =
"Sin Curve";
30 chart.tooltip.show =
true;
31 chart.legend.show =
false;
33 chart.
xAxes[0].show =
true;
34 chart.
xAxes[1].show =
false;
35 chart.
yAxes[0].show =
true;
36 chart.
yAxes[1].show =
false;
41 chart.
xAxes[0].boundaryGap =
false;
42 chart.
xAxes[0].maxCache = 0;
43 chart.series.list[0].maxCache = 0;
47 var serie = chart.AddSerie(
SerieType.Line);
48 serie.symbol.show =
false;
50 for (angle = 0; angle < 1080; angle++)
52 float xvalue = Mathf.PI / 180 * angle;
53 float yvalue = Mathf.Sin(xvalue);
54 chart.AddData(0, xvalue, yvalue);
60 if (angle > 3000)
return;
62 float xvalue = Mathf.PI / 180 * angle;
63 float yvalue = Mathf.Sin(xvalue);
64 chart.AddData(0, xvalue, yvalue);