protected function getOptionsJS()
    {
        foreach ($this->optsMapper as $opt => $mapped)
        {
            if (($currOpt = $this->getOptVal($this->options, $opt)) && ($currOpt !== null)) {
                $this->setOpt($this->options, $mapped, $currOpt);
                $this->unsetOpt($this->options, $opt);
            }
        }

        $opts = $this->options;

        // stupid pie plugin
        if ( $this->getOptVal( $opts, 'seriesStorage', 'pie', 'show' ) === null ) {
            $this->setNestedOptVal( $opts, 'seriesStorage', 'pie', 'show', false );
        }
        
        $this->unsetOpt( $opts, 'seriesStorage' );
        $this->unsetOpt( $opts, 'seriesDefault' );

        return $this->makeJSArray($opts);
    }