protected function getOptionsJS()
    {
        $opts = $this->options;
        foreach ( $opts['seriesStorage'] as $label => $options ) {
            $options['label'] = $label;
            $opts['series'][] = $options;
        }
        
        if ( $this->chart->titleHidden() ) {
        	unset( $opts['title'] );
        }
        
        unset($opts['seriesStorage']);
        return $this->makeJSArray( $opts );
    }