NVD3 - removing options for stackedAreaChart
Asked Answered
N

3

7

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

Neurotic answered 25/8, 2013 at 18:54 Comment(0)
H
12

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

Horatia answered 25/8, 2013 at 19:11 Comment(1)
If any rCharts users come here, if n is your nPlot, do n$chart(style = 'stack') followed by n$chart(showControls = FALSE), to get the above with the default 'stack' selected. The other two are 'stream' and 'expand'.Compunction
W
5
 $scope.options = {
            chart: {
               ..
                showControls: false,
                }
        };

Add showControls: false , to your options

Wildwood answered 3/11, 2015 at 7:47 Comment(0)
R
0

Alternatively, if you're using angular-nvd3, you can use CSS.

svg {
    .nv-controlsWrap {
        display: none;
    }
}
Russell answered 3/6, 2015 at 7:13 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.