mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-25 02:10:16 +00:00
3.0 - unitypackage
This commit is contained in:
25
Runtime/Serie/Scatter/EffectScatter.cs
Normal file
25
Runtime/Serie/Scatter/EffectScatter.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[System.Serializable]
|
||||
[SerieHandler(typeof(EffectScatterHandler), true)]
|
||||
[CoordOptions(typeof(GridCoord), typeof(SingleAxisCoord))]
|
||||
[SerieExtraComponent(typeof(LabelStyle), typeof(Emphasis))]
|
||||
public class EffectScatter : BaseScatter
|
||||
{
|
||||
public static void AddDefaultSerie(BaseChart chart, string serieName)
|
||||
{
|
||||
var serie = chart.AddSerie<EffectScatter>(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));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user