暫無描述
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

EffectScatter.cs 1.0KB

123456789101112131415161718192021222324252627
  1. using UnityEngine;
  2. namespace XCharts.Runtime
  3. {
  4. [System.Serializable]
  5. [SerieHandler(typeof(EffectScatterHandler), true)]
  6. [CoordOptions(typeof(GridCoord), typeof(SingleAxisCoord))]
  7. [SerieComponent(typeof(LabelStyle), typeof(EmphasisStyle), typeof(BlurStyle), typeof(SelectStyle))]
  8. [SerieDataComponent(typeof(ItemStyle), typeof(LabelStyle), typeof(EmphasisStyle), typeof(BlurStyle), typeof(SelectStyle))]
  9. [SerieDataExtraField("m_Radius")]
  10. public class EffectScatter : BaseScatter
  11. {
  12. public static Serie AddDefaultSerie(BaseChart chart, string serieName)
  13. {
  14. var serie = chart.AddSerie<EffectScatter>(serieName);
  15. serie.symbol.show = true;
  16. serie.symbol.type = SymbolType.Circle;
  17. serie.itemStyle.opacity = 0.8f;
  18. serie.clip = false;
  19. for (int i = 0; i < 10; i++)
  20. {
  21. chart.AddData(serie.index, Random.Range(10, 100), Random.Range(10, 100));
  22. }
  23. return serie;
  24. }
  25. }
  26. }