With version 6.12 of RGraph there is now a better way to produce vertical Line charts. Previously these were achieved by using the Scatter chart and adjusting the data so that a vertical line was produced. Now, however, you can use the Horizontal Bar charts to get a vertical line in a simpler way.
<?php
include_once "environment.php";
use phpRGraph\rgraph_chart;
use phpRGraph\rgraph_options;
// rgraph chart
$template = "default.php";
$width = "400";
$height = "450";
$draw_option = "trace();";
$data = array( 4,5,7,4,2,4,6,8,6,5 );
$chart = new rgraph_chart("cvs", $data, "HBar");
$options = new rgraph_options();
$options->set_option("title", "A vertical line chart");
$options->set_option("backgroundGridHlines", false);
$options->set_option("backgroundGridBorder", false);
$options->set_option("colors", array('#ffffff00'));
$options->set_option("lineColor", "blue");
$options->set_option("yaxisLabels", array('John','Fredericko','Bono','Lucy','Charles',
'Peter','Brian','Jilly','Peter','Lucy'));
$options->set_option("line", true);
$options->set_option("lineLinejoin", "round");
$options->set_option("lineLinecap", "round");
$options->set_option("lineTickmarksStyle", "circle");
$options->set_option("lineTickmarksSize", 3);
$chart->set_options($options);
$rgraph_json = $chart->toString();
$chart_script = "";
$event_script = "";
include_once ($templates . $template);
?>