Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 22c0923

Browse files
author
Joseph Damiba
committed
fixup inlined charts
1 parent 9b79d98 commit 22c0923

File tree

3 files changed

+23
-37
lines changed

3 files changed

+23
-37
lines changed

_posts/plotly_js/fundamentals/config-options/2015-09-24-config-opt-display-modebar.html

Lines changed: 0 additions & 23 deletions
This file was deleted.
Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
name: Display the Modebar
2+
name: Always Display the Modebar
33
language: plotly_js
44
suite: configuration
55
order: 4
@@ -8,13 +8,18 @@
88
markdown_content: |
99
When you hover over the top right of a figure generated with `plotly.js`, a bar appears which we call a `modeBar`. To display or hide this modebar set the `displayModeBar` attribute in the `config` of your figure to `true` or `false`, respectively.
1010
---
11-
var data = {
12-
y:['Marc', 'Henrietta', 'Jean', 'Claude', 'Jeffrey', 'Jonathan', 'Jennifer', 'Zacharias'],
13-
x: [90, 40, 60, 80, 75, 92, 87, 73],
14-
type: 'bar',
15-
orientation: 'h'
11+
var trace1 = {
12+
y:['Marc', 'Henrietta', 'Jean', 'Claude', 'Jeffrey', 'Jonathan', 'Jennifer', 'Zacharias'],
13+
x: [90, 40, 60, 80, 75, 92, 87, 73],
14+
type: 'bar',
15+
orientation: 'h'
1616
}
17+
18+
var data = [trace1]
1719

18-
var layout = {title: 'Always Display the Modebar', showlegend: false}
20+
var layout = {
21+
title: 'Always Display the Modebar',
22+
showlegend: false
23+
}
1924

2025
Plotly.newPlot('myDiv', data, layout, {displayModeBar: true})

_posts/plotly_js/fundamentals/config-options/2020-01-24-remove-modebarButtons.html

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,17 @@
1515
<li>- Other: `hoverClosestGl2d`, `hoverClosestPie`, `toggleHover`, `resetViews`, toImage, `sendDataToCloud`, `toggleSpikelines`, `resetViewMapbox`</li>
1616
</ul>
1717
---
18-
var data = {
19-
x:['trees', 'flowers', 'hedges'],
20-
y: [90, 130, 40],
21-
type: 'bar'}
18+
var trace1 = {
19+
x:['trees', 'flowers', 'hedges'],
20+
y: [90, 130, 40],
21+
type: 'bar'
22+
}
23+
24+
var data = [trace1];
2225

2326
var layout = {
24-
title: 'Remove Modebar Buttons',
25-
showlegend: false}
27+
title: 'Remove Modebar Buttons',
28+
showlegend: false
29+
}
2630

27-
Plotly.newPlot('myDiv', data, layout, {modeBarButtonsToRemove: ['toImage']})
31+
Plotly.newPlot('myDiv', data, layout, {modeBarButtonsToRemove: ['toImage']});

0 commit comments

Comments
 (0)