Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NVD3 - removing options for stackedAreaChart

I'm using the stacked area chart in NVD3, but I don't want it to show the three options for Stacked, Stream, and Expanded.

Is there a flag I can pass to remove the UI element to switch between them and pick which one to use?

enter image description here

like image 536
Leopd Avatar asked Aug 25 '13 18:08

Leopd


People also ask

What is NVD3?

Nvd3 A reusable chart library for d3.js GitHubExamplesDocumentation Downloads: ZIP TAR NVD3 Documentation This page lists out all options available to the charts and is generated programatically using the new options object model.

What library do I need for NVD3?

Download d3.v3.js. This is the only required library for NVD3. Download the latest nv.d3.js (version 1.8.1). Get the developmentversion, or minified productionversion.

What inspired NVD3’s codebase?

NVD3’s codebase is heavily inspired by the work of Mike Bostock. In particular, his article “Towards Reusable Charts”serves as our guide.

Who is the current maintainer of NVD3?

NVD3 is currently maintained by a team of frontend software engineers at Novus Partners. Our charting technology is used to provide powerful analytics to our clients in the financial industry.


2 Answers

You can pass .showControls(false) to the model to disable this.

like image 132
Lars Kotthoff Avatar answered Oct 13 '22 10:10

Lars Kotthoff


 $scope.options = {
            chart: {
               ..
                showControls: false,
                }
        };

Add showControls: false , to your options

like image 38
Amila Silva Avatar answered Oct 13 '22 11:10

Amila Silva