Files
XCharts/Examples/Example50_Scatter.cs

29 lines
667 B
C#
Raw Normal View History

using System;
using System.Collections.Generic;
using UnityEngine;
2022-02-19 22:37:57 +08:00
using XCharts.Runtime;
2021-12-24 13:33:09 +08:00
namespace XCharts.Example
{
[DisallowMultipleComponent]
[ExecuteInEditMode]
public class Example50_Scatter : MonoBehaviour
{
private ScatterChart chart;
void Awake()
{
chart = gameObject.GetComponent<ScatterChart>();
if (chart == null) return;
2021-11-23 13:20:07 +08:00
foreach (var serie in chart.series)
{
2022-03-04 22:17:32 +08:00
serie.symbol.sizeFunction = SymbolSize;
2021-11-23 13:20:07 +08:00
}
}
float SymbolSize(float defaultSize, SerieData serieData)
{
return defaultSize;
}
}
}