<?php


    /*
    |------------------------------------------------------------------------------------------------
    | Information
    |------------------------------------------------------------------------------------------------
    |
    | This file is beautified by the command "sidekick:CodebeautifierCommand" of the ceetrox
    | sidekick package.
    |
    | Author: Marco Schmiedel <marco.schmiedel@itmax.email>
    | Update: 2022-06-15 10:07:09
    |
    */
    namespace Ceetrox\Sidekick\Views\Limitless\Linechart;


    /*
    |------------------------------------------------------------------------------------------------
    | Dependencies
    |------------------------------------------------------------------------------------------------
    */
    use View;


    /*
    |------------------------------------------------------------------------------------------------
    | Class "Config"
    |------------------------------------------------------------------------------------------------
    */
    class Config
    {
        public $methodAllocation = [
            'Limitless::Chart' => 'chart'
        ];

        public $assetAllocation;

        public function __construct()
        {
            $this->assetAllocation = [
                'Limitless::Chart' => [
                    'Attachments/linechart.init.js',
                    secure_url('/ceetrox/sidekick/resource/public/Webdesigns/design-limitless/Template/global_assets/js/plugins/visualization/echarts/echarts.min.js'),
                ]
            ];
        }


        /*
        |--------------------------------------------------------------------------------------------
        | Method "chart"
        |--------------------------------------------------------------------------------------------
        */
        public function chart($parameters)
        {
            return View('Limitless::Linechart.Chart')
                ->withCharts($parameters['charts'] ?? 1)
                ->withTitles($parameters['titles'] ?? null)
                ->withColors($parameters['colors'] ?? null)
                ->withPointValues($parameters['point-values'] ?? false)
                ->withBoundaryGap($parameters['boundary-gap'] ?? true)
                ->withInverted($parameters['inverted'] ?? false)
                ->withDataZoom($parameters['data-zoom'] ?? false)
                ->withStacked($parameters['stacked'] ?? false)
                ->withAnimationDuration($parameters['animation-duration'] ?? 750)
                ->withYAxisLabelValueFormat($parameters['y-axis-label-value-format'] ?? null)
                ->withMarkLine($parameters['mark-line'] ?? null)
                ->withCategories($parameters['categories'] ?? null)
                ->withSeries($parameters['series'] ?? null)
                ->withRaw($parameters['raw'] ?? null);

        }

    }



