Spamworldpro Mini Shell
Spamworldpro


Server : Apache/2.4.62 (Unix) OpenSSL/1.0.2k-fips
System : Linux server1.richineiserver.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User : fdshops ( 1003)
PHP Version : 8.2.21
Disable Function : NONE
Directory :  /home/fdshops/public_html/vendor/consoletvs/charts/src/Features/Highcharts/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/fdshops/public_html/vendor/consoletvs/charts/src/Features/Highcharts/Chart.php
<?php

namespace ConsoleTVs\Charts\Features\Highcharts;

trait Chart
{
    /**
     * Display the chart axes.
     *
     * @param bool $axes
     *
     * @return self
     */
    public function displayAxes(bool $axes)
    {
        return $this->options([
            'xAxis' => [
                'visible' => $axes,
            ],
            'yAxis' => [
                'visible' => $axes,
            ],
        ]);
    }

    /**
     * Display the legend.
     *
     * @param bool $legend
     *
     * @return self
     */
    public function displayLegend(bool $legend)
    {
        return $this->options([
            'legend' => [
                'enabled' => $legend,
            ],
        ]);
    }

    /**
     * Rotates the labels of the xAxis.
     *
     * @param float $angle
     *
     * @return self
     */
    public function labelsRotation(float $angle)
    {
        return $this->options([
            'xAxis' => [
                'labels' => [
                    'rotation' => $angle,
                ],
            ],
        ]);
    }

    /**
     * Set the chart style to minimalist.
     *
     * @param bool $display
     *
     * @return self
     */
    public function minimalist(bool $display = false)
    {
        $this->displayLegend(!$display);

        return $this->displayAxes(!$display);
    }

    /**
     * Set the highcharts yAxis label.
     *
     * @param string $label
     *
     * @return self
     */
    public function label(string $label)
    {
        return $this->options([
            'yAxis' => [
                'title' => [
                    'text' => $label,
                ],
            ],
        ]);
    }

    /**
     * Set the chart title.
     *
     * @param string $title
     *
     * @return self
     */
    public function title(string $title)
    {
        return $this->options([
            'title' => [
                'text' => $title,
            ],
        ]);
    }

    /**
     * Shapes the pie chart into a doughnut.
     *
     * @return self
     */
    public function doughnut(int $size = 50)
    {
        return $this->options([
            'plotOptions' => [
                'pie' => [
                    'innerSize' => "{$size}%",
                ],
            ],
        ]);
    }
}

Spamworldpro Mini