Column charts, also referred to as Vertical Bar Charts, use rectangular bars to compare value between different categories/series. Given example shows simple PHP Column Chart along with source code that you can try running locally.
<?php $dataPoints = array( array("y" => 3373.64, "label" => "Germany" ), array("y" => 2435.94, "label" => "France" ), array("y" => 1842.55, "label" => "China" ), array("y" => 1828.55, "label" => "Russia" ), array("y" => 1039.99, "label" => "Switzerland" ), array("y" => 765.215, "label" => "Japan" ), array("y" => 612.453, "label" => "Netherlands" ) ); ?> <!DOCTYPE HTML> <html> <head> <script> window.onload = function() { var chart = new CanvasJS.Chart("chartContainer", { animationEnabled: true, theme: "light2", title:{ text: "Gold Reserves" }, axisY: { title: "Gold Reserves (in tonnes)" }, data: [{ type: "column", yValueFormatString: "#,##0.## tonnes", dataPoints: <?php echo json_encode($dataPoints, JSON_NUMERIC_CHECK); ?> }] }); chart.render(); } </script> </head> <body> <div id="chartContainer" style="height: 370px; width: 100%;"></div> <script src="https://cdn.canvasjs.com/canvasjs.min.js"></script> </body> </html>
The width of data points can be customized using dataPointWidth property. You can also change the color and fillOpacity of the columns using color and opacity properties respectively. Some other commonly used customization options include animationEnabled, theme, etc.