mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-14 20:00:09 +00:00
28 lines
806 B
C#
28 lines
806 B
C#
|
|
|
|
|
|
using UnityEngine;
|
|
|
|
namespace XCharts
|
|
{
|
|
[System.Serializable]
|
|
[SerieHandler(typeof(ScatterHandler), true)]
|
|
[CoordOptions(typeof(GridCoord), typeof(SingleAxisCoord))]
|
|
[SerieExtraComponent(typeof(LabelStyle), typeof(Emphasis))]
|
|
public class Scatter : BaseScatter
|
|
{
|
|
public static Serie AddDefaultSerie(BaseChart chart, string serieName)
|
|
{
|
|
var serie = chart.AddSerie<Scatter>(serieName);
|
|
serie.symbol.show = true;
|
|
serie.symbol.type = SymbolType.Circle;
|
|
serie.itemStyle.opacity = 0.8f;
|
|
serie.clip = false;
|
|
for (int i = 0; i < 10; i++)
|
|
{
|
|
chart.AddData(serie.index, Random.Range(10, 100), Random.Range(10, 100));
|
|
}
|
|
return serie;
|
|
}
|
|
}
|
|
} |