ReGui
  • Introduction
  • Getting Started
    • Installing
    • Creating windows
  • Plugins
    • Custom elements
    • Custom flags
    • Custom themes
  • Examples
    • Demo window
    • Example scripts
  • Methods
  • ReGui functions
  • Canvas functions
  • Configuration saving
  • Elements
    • :Label
    • :Error
    • Code Editor
    • :Button
    • :SmallButton
    • :RadioButton
    • :Image
    • :VideoPlayer
    • :Checkbox
    • :Radiobox
    • :Viewport
    • :Console
    • :Region
    • :List
    • :CollapsingHeader
    • :TreeNode
    • :Separator
    • :Indent
    • :BulletText
    • :Bullet
    • :Row
    • :SliderInt
    • :SliderFloat
    • :SliderEnum
    • :SliderColor3
    • :SliderCFrame
    • :SliderProgress
    • :DragInt
    • :DragFloat
    • :DragColor3
    • :DragCFrame
    • :InputText
    • :InputTextMultiline
    • :InputInt
    • :InputColor3
    • :InputCFrame
    • :ProgressBar
    • :Combo
    • :Keybind
    • :PlotHistogram
    • :Table
    • :TabSelector
    • :Window
    • :TabsWindow
    • :PopupModal
Powered by GitBook
On this page
  1. Elements

:PlotHistogram

Previous:KeybindNext:Table

Last updated 2 months ago

type Points = {
	[number]: number
}
type PlotHistogram = {
	Label: string?,
	Points: Points,
	Minimum: number?, // Otherwise automatic
	Maximum: number?, // Otherwise automatic
	GetBaseValues: (PlotHistogram) -> (number, number),
	UpdateGraph: (PlotHistogram) -> PlotHistogram,
	PlotGraph: (PlotHistogram, Points: Points) -> PlotHistogram,
	Plot: (PlotHistogram, Value: number) -> {
		SetValue: (Plot, Value: number) -> nil,
		GetPointIndex: (Plot) -> number,
		Remove: (Plot, Value: number) -> nil,
	},
}

Example usage:

:PlotHistogram({
    Points = {0.6, 0.1, 1.0, 0.5, 0.92, 0.1, 0.2}
})

--// With limited sizes
:PlotHistogram({
    Minimum = 0,
    Maximum = 1,
    Points = {0.6, 0.1, 1.0, 0.5, 0.92, 0.1, 0.2}
})
Preview