This is an example page for HTML-Graphs. Click "Create Graph" and see how the graph looks different each time you change the form fields:
Graph Type:
horizontal
vertical
Show Values:
% only
abs. and %
abs. only
none
Values (comma-separated):
Labels (comma-separated):
Bars Width:
Bars Length Ratio (0.1 - 2.9):
Labels Font Size:
Values Font Size:
Percentage Font Size:
Graph Padding:
Graph BG Color:
Graph Border:
Bars Color:
Bars BG Color:
Bars Border:
Labels Color:
Labels BG Color:
Labels Border:
Values Color:
Values BG Color:
Values Border:
Graph
Horses
123
4%
Dogs
456
14%
Cats
789
24%
Birds
987
30%
Pigs
654
20%
Cows
321
10%
Code
$graph = new BAR_GRAPH("hBar"); $graph->values = "123,456,789,987,654,321"; $graph->labels = "Horses,Dogs,Cats,Birds,Pigs,Cows"; $graph->showValues = 1; $graph->barWidth = 20; $graph->barLength = 1.0; $graph->labelSize = 12; $graph->absValuesSize = 12; $graph->percValuesSize = 12; $graph->graphPadding = 10; $graph->graphBGColor = "#ABCDEF"; $graph->graphBorder = "1px solid blue"; $graph->barColors = "#A0C0F0"; $graph->barBGColor = "#E0F0FF"; $graph->barBorder = "2px outset white"; $graph->labelColor = "#000000"; $graph->labelBGColor = "#C0E0FF"; $graph->labelBorder = "2px groove white"; $graph->absValuesColor = "#000000"; $graph->absValuesBGColor = "#FFFFFF"; $graph->absValuesBorder = "2px groove white"; echo $graph->create();