2021-07-08 07:19:31 +08:00
|
|
|
using System;
|
2019-10-22 04:09:04 +08:00
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using UnityEngine;
|
2022-02-19 22:37:57 +08:00
|
|
|
using XCharts.Runtime;
|
2019-10-22 04:09:04 +08:00
|
|
|
|
2021-12-24 13:33:09 +08:00
|
|
|
namespace XCharts.Example
|
2019-10-22 04:09:04 +08:00
|
|
|
{
|
|
|
|
|
[DisallowMultipleComponent]
|
|
|
|
|
[ExecuteInEditMode]
|
2020-05-15 06:52:40 +08:00
|
|
|
public class Example50_Scatter : MonoBehaviour
|
2019-10-22 04:09:04 +08:00
|
|
|
{
|
|
|
|
|
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
|
|
|
}
|
2019-10-22 04:09:04 +08:00
|
|
|
}
|
|
|
|
|
|
2025-02-09 20:21:42 +08:00
|
|
|
float SymbolSize(float defaultSize, SerieData serieData)
|
2019-10-22 04:09:04 +08:00
|
|
|
{
|
2025-02-09 20:21:42 +08:00
|
|
|
return defaultSize;
|
2019-10-22 04:09:04 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|