Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Khill\Lavacharts\Exceptions\InvalidStringValue: Invalid argument, must be a non-empty string #335

Open
BrusNoland opened this issue Mar 2, 2021 · 0 comments

Comments

@BrusNoland
Copy link

What Version?

lavacharts version : * 3.1.14

PHP 7.0.33 (cli) (built: Dec 5 2018 21:22:29) ( ZTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
with Xdebug v2.7.0beta1, Copyright (c) 2002-2018, by Derick Rethans

Issue

When I'm trying to create a DataTable by any way addDateColumn('Day of Month'), or DataFactory::arrayToDataTable I always get the same exception "Exception has occurred.
Khill\Lavacharts\Exceptions\InvalidStringValue: Invalid argument, must be a non-empty string."
I tried all provided examples.

Controller Code (chart creation code)

<?php
require 'vendor/autoload.php';
    use \Khill\Lavacharts\DataTables\DataFactory;
    $lava = new Khill\Lavacharts\Lavacharts;

    $stocksTable = $lava->DataTable();

    $stocksTable->addDateColumn('Day of Month') //exceptions rises here
                ->addNumberColumn('Projected')
                ->addNumberColumn('Official');
    
    // Random Data For Example
    for ($a = 1; $a < 30; $a++) {
        $stocksTable->addRow([
          '2015-10-' . $a, rand(800,1000), rand(800,1000)
        ]);
    }

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant