protected function renderAxis(AxisInterface $axis)
    {
        $options = array(
            'opposite' => $axis->isOpposite(),
            'showFirstLabel' => $axis->getLabel()->isShowFirst(),
            'showLastLabel' => $axis->getLabel()->isShowLast(),
        );

        if (0 < count($axis->getCategories())) {
            $options['categories'] = array_values($axis->getCategories());
        }
        if (null !== $axis->getMaxValue()) {
            $options['max'] = $axis->getMaxValue();
        }
        if (null !== $axis->getMinValue()) {
            $options['min'] = $axis->getMinValue();
        }

        if (false === $axis->getTitle()->isEnabled()) {
            $options['title']['text'] = null;
        } else {
            if (null !== $axis->getTitle()->getText()) {
                $options['title']['text'] = $axis->getTitle()->getText();
            }
            if (0 < count($axis->getTitle()->getStyles())) {
                $options['title']['style'] = $axis->getTitle()->getStyles();
            }
        }

        $options['labels'] = array(
            'enabled' => $axis->getLabel()->isEnabled(),
        );
        if (null !== $axis->getLabel()->getAlign()) {
            $options['labels']['align'] = $axis->getLabel()->getAlign();
        }
        if (0 < count($axis->getLabel()->getStyles())) {
            $options['labels']['style'] = $axis->getLabel()->getStyles();
        }
        if (null !== $axis->getLabel()->getXOffset()) {
            $options['labels']['x'] = $axis->getLabel()->getXOffset();
        }
        if (null !== $axis->getLabel()->getYOffset()) {
            $options['labels']['y'] = $axis->getLabel()->getYOffset();
        }
        if (null !== $axis->getLabel()->getFormatter()) {
            $options['labels']['formatter'] = $axis->getLabel()->getFormatter();
        }
        $options['tickWidth'] = $axis->getTickWidth();
        $options['gridLineWidth'] = $axis->getGridLineWidth();

        return $options;
    }
protected function renderAxis(AxisInterface $axis)
    {
        $options = array(
            'opposite' => $axis->isOpposite(),
            'showFirstLabel' => $axis->getLabel()->isShowFirst(),
            'showLastLabel' => $axis->getLabel()->isShowLast(),
        );

        if (0 < count($axis->getCategories())) {
            $options['categories'] = array_values($axis->getCategories());
        }
        if (null !== $axis->getMaxValue()) {
            $options['max'] = $axis->getMaxValue();
        }
        if (null !== $axis->getMinValue()) {
            $options['min'] = $axis->getMinValue();
        }

        if (false === $axis->getTitle()->isEnabled()) {
            $options['title']['text'] = null;
        } else {
            if (null !== $axis->getTitle()->getText()) {
                $options['title']['text'] = $axis->getTitle()->getText();
            }
            if (0 < count($axis->getTitle()->getStyles())) {
                $options['title']['style'] = $axis->getTitle()->getStyles();
            }
        }

        $options['labels'] = array(
            'enabled' => $axis->getLabel()->isEnabled(),
        );
        if (null !== $axis->getLabel()->getAlign()) {
            $options['labels']['align'] = $axis->getLabel()->getAlign();
        }
        if (0 < count($axis->getLabel()->getStyles())) {
            $options['labels']['style'] = $axis->getLabel()->getStyles();
        }
        if (null !== $axis->getLabel()->getXOffset()) {
            $options['labels']['x'] = $axis->getLabel()->getXOffset();
        }
        if (null !== $axis->getLabel()->getYOffset()) {
            $options['labels']['y'] = $axis->getLabel()->getYOffset();
        }
        if (null !== $axis->getLabel()->getFormatter()) {
            $options['labels']['formatter'] = $axis->getLabel()->getFormatter();
        }
        $options['tickWidth'] = $axis->getTickWidth();
        $options['gridLineWidth'] = $axis->getGridLineWidth();

        return $options;
    }
protected function renderAxis ( AxisInterface $ axis ) { $ options = array ( 'opposite' => $ axis -> isOpposite ( ) , 'showFirstLabel' => $ axis -> getLabel ( ) -> isShowFirst ( ) , 'showLastLabel' => $ axis -> getLabel ( ) -> isShowLast ( ) , ) ; if ( 0 < count ( $ axis -> getCategories ( ) ) ) { $ options [ 'categories' ] = array_values ( $ axis -> getCategories ( ) ) ; } if ( null !== $ axis -> getMaxValue ( ) ) { $ options [ 'max' ] = $ axis -> getMaxValue ( ) ; } if ( null !== $ axis -> getMinValue ( ) ) { $ options [ 'min' ] = $ axis -> getMinValue ( ) ; } if ( false === $ axis -> getTitle ( ) -> isEnabled ( ) ) { $ options [ 'title' ] [ 'text' ] = null ; } else { if ( null !== $ axis -> getTitle ( ) -> getText ( ) ) { $ options [ 'title' ] [ 'text' ] = $ axis -> getTitle ( ) -> getText ( ) ; } if ( 0 < count ( $ axis -> getTitle ( ) -> getStyles ( ) ) ) { $ options [ 'title' ] [ 'style' ] = $ axis -> getTitle ( ) -> getStyles ( ) ; } } $ options [ 'labels' ] = array ( 'enabled' => $ axis -> getLabel ( ) -> isEnabled ( ) , ) ; if ( null !== $ axis -> getLabel ( ) -> getAlign ( ) ) { $ options [ 'labels' ] [ 'align' ] = $ axis -> getLabel ( ) -> getAlign ( ) ; } if ( 0 < count ( $ axis -> getLabel ( ) -> getStyles ( ) ) ) { $ options [ 'labels' ] [ 'style' ] = $ axis -> getLabel ( ) -> getStyles ( ) ; } if ( null !== $ axis -> getLabel ( ) -> getXOffset ( ) ) { $ options [ 'labels' ] [ 'x' ] = $ axis -> getLabel ( ) -> getXOffset ( ) ; } if ( null !== $ axis -> getLabel ( ) -> getYOffset ( ) ) { $ options [ 'labels' ] [ 'y' ] = $ axis -> getLabel ( ) -> getYOffset ( ) ; } if ( null !== $ axis -> getLabel ( ) -> getFormatter ( ) ) { $ options [ 'labels' ] [ 'formatter' ] = $ axis -> getLabel ( ) -> getFormatter ( ) ; } $ options [ 'tickWidth' ] = $ axis -> getTickWidth ( ) ; $ options [ 'gridLineWidth' ] = $ axis -> getGridLineWidth ( ) ; return $ options ; }
Renders an axis.

@param AxisInterface $axis Axis.

@return array Options.
Renders an axis .