Logo
UI Elements

Radar Chart

A multi axis polygon chart

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

NameTypeDescription
dataPointsList<DataPoint>List of category labels and values

DataPoint

FieldTypeDescription
labelstringCategory name
valuefloatValue between 0 and 100
tableKey (optional)stringLocalization key

Chart Settings

NameTypeDescription
scaleMultiplierfloatScales chart radius relative to rect size
angleOffsetfloatStarting rotation angle in degrees

Axis Settings

NameTypeDescription
axisThicknessfloatThickness of axis lines from center outward

Fill Settings

NameTypeDescription
showFillboolDraws filled polygon of data

Line Settings

NameTypeDescription
showLineboolDraws outline connecting points
lineThicknessfloatThickness of outline

Point Settings

NameTypeDescription
showPointsboolShows circular markers at each point
pointSizefloatDiameter of point markers

Grid Settings

NameTypeDescription
showGridboolShows polygon grid behind chart
gridLevelsintNumber of concentric grid levels
gridLineThicknessfloatLine thickness of grid polygons

Label Settings

NameTypeDescription
showLabelsboolDisplays labels at outer edges
labelOffsetfloatOffset distance from chart radius
labelFontSizefloatFont size of labels
drawLabelBackgroundboolDraws background behind label text
labelBackgroundSpriteSpriteOptional background sprite
labelBackgroundPPUfloatPPU multiplier for background sprite
labelPaddingVector2Padding around label text

Styling

NameTypeDescription
stylingSourceStylingSourceCustom or StylerPreset
stylerPresetStylerPresetOptional preset for fonts and colors
axisColorColorMappingColor of axis lines
fillColorColorMappingColor of fill polygon
lineColorColorMappingColor of outline
pointColorColorMappingColor of point markers
gridColorColorMappingColor of grid lines
labelColorColorMappingColor of label text
labelBackgroundColorColorMappingBackground color for label sprites
labelFontFontMappingFont used for labels

Public Methods

NameParametersDescription
UpdateData(newData)List<DataPoint>Replaces dataset and redraws
DrawChart()NoneRebuilds the entire chart
SetDataPoint(index, value)int, floatUpdates value by index
SetDataPoint(label, value)string, floatUpdates value by label
SetDataPoint(data, label, value)DataPoint, string, floatUpdates a specific item
UpdateAllData(values)float[]Updates all values in order
SetAxisThickness(value)floatAdjusts axis thickness
ShowFillboolToggles fill region and redraws
ShowPointsboolToggles point markers
ShowLineboolToggles outline
ShowGridboolToggles grid
ShowLabelsboolToggles category labels

Code Example

RadarChartExample.cs
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();
    }
}

On this page