Welcome Guest, Not a member yet? Register   Sign In
Quickchart package not found


I use CI4 on WAMP and PHP 7.3.5.
I've installed ianw/quickchart package to create PNG chart and put it in a html page. Next I convert it in PDF with dompdf.
In a model I wrote

PHP Code:
use Ianw/Quickchart

When I use :

PHP Code:
$qc = new QuickChart(array(
          'width'=> 600,
          'height'=> 300,
An error appear : Class 'Ianw/Quickchart' not found
I don't know why.
Can you help me ?

The problem might be from the namespace. You need to answer some questions:

- How did you install the package? Composer or manually?
- Where exactly is the package located?

Check the file for the correct namespace to use.

Must be a name space issue, where did you install the package at (directory structure)?
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )

PHP Code:
use Ianw\Quickchart

I've installed it with composer.
It's located in \vendor\ianw\quickchart

Code below works. You do not add row "use Ianw/Quickchart;"
PHP Code:
$qc = new \QuickChart([
  'width'=> 500,
  'height'=> 300,

See https://packagist.org/packages/ianw/quickchart

It is not namespaced. \QuickChart is correct.

Theme © iAndrew 2016 - Forum software by © MyBB