TESTER

graph_histogram

graph_histogram(values, bins, [width=320], [height=200], [padding=20], [graduations], [xmin], [xmax], [ymin], [ymax], [stroke], [fill], [weight])

Draw an histogram from a list of values. Values are grouped into bins.

Syntaxe

var v = [1, 2, 2, 3, 4, 4, 4, 10];
graph_histogram(v, bins=5, fill="#3F51B5");

Arguments

NameRequiredDefaultDescription
valuesyes-List of values
binsyes-Number of bins
width-320width of graph area
height-200height of graph area
padding-20Internal padding
graduations--Color of axes and ticks (e.g. '#000'). If 'none', no graduations.
xmin--Override minimum X value
xmax--Override maximum X value
ymin--Override minimum Y value
ymax--Override maximum Y value
stroke--Stroke color
fill--Fill color
weight--Stroke weight (thickness)