mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-20 15:30:09 +00:00
重构LineChart和BarChart,移除Line和Bar组件,参数统一放到Serie中配置。
This commit is contained in:
@@ -34,14 +34,11 @@ public class Demo11_AddSinCurve : MonoBehaviour
|
||||
chart.xAxises[0].boundaryGap = false;
|
||||
chart.maxCacheDataNumber = 0;
|
||||
|
||||
chart.line.step = false;
|
||||
chart.line.smooth = false;
|
||||
chart.line.area = false;
|
||||
|
||||
chart.RemoveData();
|
||||
|
||||
var serie = chart.AddSerie("test", SerieType.Line);
|
||||
serie.symbol.type = SerieSymbolType.None;
|
||||
serie.lineType = LineType.Normal;
|
||||
for (angle = 0; angle < 1080; angle++)
|
||||
{
|
||||
float xvalue = Mathf.PI / 180 * angle;
|
||||
@@ -52,7 +49,7 @@ public class Demo11_AddSinCurve : MonoBehaviour
|
||||
|
||||
void Update()
|
||||
{
|
||||
if(angle > 3000) return;
|
||||
if (angle > 3000) return;
|
||||
angle++;
|
||||
float xvalue = Mathf.PI / 180 * angle;
|
||||
float yvalue = Mathf.Sin(xvalue);
|
||||
|
||||
Reference in New Issue
Block a user