XLQP Gen1
ElementsData & charts

CreateBarChart

Creates a bar chart from labeled points.

CreateBarChart

What it does

Creates a bar chart from labeled points.

When to use it

Use it to compare discrete categories or values side by side.

ElementFunction:CreateBarChart(BarConfig)

local KillsChart = Metrics:CreateBarChart({
    Name = "Kills per Match",
    Icon = "crosshair",
    Points = {
        {Label = "M1", Value = 2},
        {Label = "M2", Value = 3},
        {Label = "M3", Value = 5},
        {Label = "M4", Value = 6},
        {Label = "M5", Value = 4},
        {Label = "M6", Value = 3},
        {Label = "M7", Value = 2}
    },
    Callback = function(point)
        Library:MakeToast({Title = point.Label, Content = tostring(point.Value) .. " kills", Variant = "Info", Icon = "crosshair", 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.