using System.Collections.Generic; using UnityEngine; using UnityEngine.UIElements; using EasyChart; namespace EasyChart.Layers { public abstract class BaseSeriesRenderer : VisualElement { public ChartData Data { get; set; } public Color BackgroundColor { get; set; } = Color.black; // Default public virtual void ClearHover() { } // Animation protected float _animationProgress = 1.0f; public float AnimationProgress { get => _animationProgress; set { if (!Mathf.Approximately(_animationProgress, value)) { _animationProgress = value; MarkDirtyRepaint(); // Optional: UpdateLabels() if labels depend on animation? // Usually labels might fade in or move. For now let's keep labels static or hide them during animation? // Better to just repaint for now. } } } // Common properties for range, can be overridden or used by subclasses protected float _xMin, _xMax; protected float _yMin, _yMax; protected VisualElement _labelContainer; // Label Pooling private List