Skip to content

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

@BrusNoland

Description

@BrusNoland

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions