'Uncaught Error: Class 'LinePlot' not found

I am trying to make a line graph in JpGraph and when I copy the official code from here it returns the error

Fatal error: Uncaught Error: Class 'LinePlot' not found in /opt/lampp/htdocs/graph/official.php:34 Stack trace: #0 {main} thrown in /opt/lampp/htdocs/graph/official.php on line 34

This also happens for other line graphs that I try to do when it mentions the new LinePlot in code. What is going wrong?



Solution 1:[1]

Check if you included both of these

require_once "jpgraph.php";
require_once "jpgraph_line.php";

Thats what was missing for me.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Robi