GrafiteInc/Charts

View on GitHub
src/Commands/stubs/chart.stub

Summary

Maintainability
Test Coverage
<?php

namespace DummyNamespace;

use Grafite\Charts\Builder\Chart;

class DummyClass extends Chart
{
    public $title = null;

    public $api_url = null;

    public $loader = true;

    public $loaderColor = '#187bcd';

    public $displayLegend = false;

    public $displayTitle = true;

    public $height = '100%';

    public $beginAtZero = true;

    public $type = 'line';

    /**
     * The labels
     *
     * @return array
     */
    public function labels()
    {
        return [];
    }

    /**
     * The dataset objects as an array
     *
     * @return array
     */
    public function datasets()
    {
        return [
            $this->makeDataset('name', collect([])),
        ];
    }

    /**
     * Override any default options
     *
     * @return array
     */
    public function options()
    {
        return [];
    }
}