XLQP Gen1
ElementsData & charts

CreateChart

Creates a configurable line or filled chart with a bounded point history.

CreateChart

What it does

Creates a configurable line or filled chart with a bounded point history.

When to use it

Use it for trends, time series, or changing numeric values.

ElementFunction:CreateChart(ChartConfig)

local RevenueChart = Metrics:CreateChart({
    Name = "Revenue",
    Icon = "coins",
    Prefix = "$",
    Points = {7200, 8100, 7600, 9300, 8800, 10400, 30858},
    Color = Color3.fromRGB(42, 220, 166),
    Filled = true,
    Smooth = true,
    Dots = true,
    MaxPoints = 12,
    Height = 174,
    Callback = function(point)
        Library:MakeToast({Title = "Revenue point " .. tostring(point.Index), Content = tostring(point.Text), Variant = "Info", Icon = "coins", Time = 2})
    end
})

Behavior and return value

Store the returned controller or object when later code needs to update its state, call its methods, or close it.

Fields marked optional may be omitted. XLQP then uses the method’s built-in default or leaves that feature disabled.