Evo uiUi elements
Radar Chart
A multi axis polygon chart
This page documents Evo UI v1. For the current version, see Evo UI v2. Upgrading? Read the migration guide.
Overview
Radar Chart displays a multi dimensional dataset arranged radially around a center point. Each data point represents a category and value between 0 and 100. The chart is fully dynamic and regenerates itself whenever data or layout changes.
This component is ideal for stats distribution, character attributes, comparisons, and skill diagrams.
Properties
Data
| Name | Type | Description |
|---|---|---|
dataPoints | List<DataPoint> | List of category labels and values |
DataPoint
| Field | Type | Description |
|---|---|---|
label | string | Category name |
value | float | Value between 0 and 100 |
tableKey (optional) | string | Localization key |
Chart Settings
| Name | Type | Description |
|---|---|---|
scaleMultiplier | float | Scales chart radius relative to rect size |
angleOffset | float | Starting rotation angle in degrees |
Axis Settings
| Name | Type | Description |
|---|---|---|
axisThickness | float | Thickness of axis lines from center outward |
Fill Settings
| Name | Type | Description |
|---|---|---|
showFill | bool | Draws filled polygon of data |
Line Settings
| Name | Type | Description |
|---|---|---|
showLine | bool | Draws outline connecting points |
lineThickness | float | Thickness of outline |
Point Settings
| Name | Type | Description |
|---|---|---|
showPoints | bool | Shows circular markers at each point |
pointSize | float | Diameter of point markers |
Grid Settings
| Name | Type | Description |
|---|---|---|
showGrid | bool | Shows polygon grid behind chart |
gridLevels | int | Number of concentric grid levels |
gridLineThickness | float | Line thickness of grid polygons |
Label Settings
| Name | Type | Description |
|---|---|---|
showLabels | bool | Displays labels at outer edges |
labelOffset | float | Offset distance from chart radius |
labelFontSize | float | Font size of labels |
drawLabelBackground | bool | Draws background behind label text |
labelBackgroundSprite | Sprite | Optional background sprite |
labelBackgroundPPU | float | PPU multiplier for background sprite |
labelPadding | Vector2 | Padding around label text |
Styling
| Name | Type | Description |
|---|---|---|
stylingSource | StylingSource | Custom or StylerPreset |
stylerPreset | StylerPreset | Optional preset for fonts and colors |
axisColor | ColorMapping | Color of axis lines |
fillColor | ColorMapping | Color of fill polygon |
lineColor | ColorMapping | Color of outline |
pointColor | ColorMapping | Color of point markers |
gridColor | ColorMapping | Color of grid lines |
labelColor | ColorMapping | Color of label text |
labelBackgroundColor | ColorMapping | Background color for label sprites |
labelFont | FontMapping | Font used for labels |
Public Methods
| Name | Parameters | Description |
|---|---|---|
UpdateData(newData) | List<DataPoint> | Replaces dataset and redraws |
DrawChart() | None | Rebuilds the entire chart |
SetDataPoint(index, value) | int, float | Updates value by index |
SetDataPoint(label, value) | string, float | Updates value by label |
SetDataPoint(data, label, value) | DataPoint, string, float | Updates a specific item |
UpdateAllData(values) | float[] | Updates all values in order |
SetAxisThickness(value) | float | Adjusts axis thickness |
ShowFill | bool | Toggles fill region and redraws |
ShowPoints | bool | Toggles point markers |
ShowLine | bool | Toggles outline |
ShowGrid | bool | Toggles grid |
ShowLabels | bool | Toggles category labels |
Code Example
using UnityEngine;
using Evo.UI;
public class RadarChartExample : MonoBehaviour
{
public RadarChart chart;
void Start()
{
// Update one stat
chart.SetDataPoint("Speed", 95f);
// Update by index
chart.SetDataPoint(2, 80f);
// Update all stats
chart.UpdateAllData(new float[] { 90, 75, 60, 85, 50, 95 });
// Toggle visuals
chart.ShowFill = true;
chart.ShowLine = true;
chart.ShowPoints = true;
// Force redraw
chart.DrawChart();
}
}