8000 minor revisions · plotly/documentation@a700849 · GitHub
[go: up one dir, main page]

Skip to content

Commit a700849

Browse files
author
mahdis-z
committed
minor revisions
1 parent 22c0923 commit a700849

File tree

4 files changed

+24
-41
lines changed

4 files changed

+24
-41
lines changed

_posts/plotly_js/fundamentals/config-options/2015-09-24-config-opt-link-text.html

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,11 @@
66
sitemap: false
77
arrangement: horizontal
88
---
9-
var trace1 = {
10-
z: [[0, 1, 2, 3, 4, 5, 6],
11-
[1, 9, 4, 7, 5, 2, 4],
12-
[2, 4, 2, 1, 6, 9, 3]],
13-
type: 'heatmap'
14-
};
15-
16-
var data = [trace1];
9+
var data = [{
10+
z: [[0, 1, 2, 3, 4, 5, 6],
11+
[1, 9, 4, 7, 5, 2, 4],
12+
[2, 4, 2, 1, 6, 9, 3]],
13+
type: 'heatmap'}]
1714

18-
var layout = {
19-
title: 'Customize The Edit Chart Link Text'
20-
};
21-
22-
Plotly.newPlot('myDiv', data, layout, {showLink: true, linkText: 'This text is custom!'});
15+
var layout = {title: 'Customize The Edit Chart Link Text'}
16+
Plotly.newPlot('myDiv', data, layout, {showLink: true, linkText: 'This text is custom!'})

_posts/plotly_js/fundamentals/config-options/2020-01-24-add-button-to-modebar.html

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
}
1616

1717
var colors = ['green', 'red', 'blue']
18-
1918
var data = [{
2019
mode: 'lines',
2120
y: [2, 1, 2],
@@ -24,8 +23,7 @@
2423

2524
var layout = {
2625
title: 'add mode bar button with custom icon',
27-
modebardisplay: false
28-
}
26+
modebardisplay: false}
2927

3028
var config = {
3129
modeBarButtonsToAdd: [
@@ -42,7 +40,6 @@
4240
direction: 'up',
4341
click: function(gd) {alert('button1')
4442
}}],
45-
modeBarButtonsToRemove: ['pan2d','select2d','lasso2d','resetScale2d','zoomOut2d']
46-
}
43+
modeBarButtonsToRemove: ['pan2d','select2d','lasso2d','resetScale2d','zoomOut2d']}
4744

4845
Plotly.newPlot('myDiv', data, layout, config)
Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
name: Always Display the Modebar
2+
name: Display Modebar
33
language: plotly_js
44
suite: configuration
55
order: 4
@@ -8,18 +8,14 @@
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 trace1 = {
11+
var data = [{
1212
y:['Marc', 'Henrietta', 'Jean', 'Claude', 'Jeffrey', 'Jonathan', 'Jennifer', 'Zacharias'],
1313
x: [90, 40, 60, 80, 75, 92, 87, 73],
1414
type: 'bar',
15-
orientation: 'h'
16-
}
17-
18-
var data = [trace1]
15+
orientation: 'h'}]
1916

2017
var layout = {
2118
title: 'Always Display the Modebar',
22-
showlegend: false
23-
}
19+
showlegend: false}
2420

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

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

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,21 @@
77
arrangement: horizontal
88
markdown_content: |
99
To delete buttons from the modebar, pass an array of strings containing the names of the buttons you want to remove to the `modeBarButtonsToRemove` attribute in the figure's configuration object. Note that different chart types have different default modebars. The following is a list of all the modebar buttons and the chart types they are associated with:
10-
<ul>
11-
<li>- 2D: `zoom2d`, `pan2d`, `select2d`, `lasso2d`, `zoomIn2d`, `zoomOut2d`, `autoScale2d`, `resetScale2d`</li>
12-
<li>- 3D: `zoom3d, `pan3d`, `orbitRotation`, `tableRotation`, `handleDrag3d`, resetCameraDefault3d, `resetCameraLastSave3d`, `hoverClosest3d`</li>
13-
<li>- Cartesian: `hoverClosestCartesian, `hoverCompareCartesian`</li>
14-
<li>- Geo: `zoomInGeo, `zoomOutGeo`, `resetGeo`, `hoverClosestGeo`</li>
15-
<li>- Other: `hoverClosestGl2d`, `hoverClosestPie`, `toggleHover`, `resetViews`, toImage, `sendDataToCloud`, `toggleSpikelines`, `resetViewMapbox`</li>
16-
</ul>
10+
<ul>
11+
<li> -'2D', `zoom2d`, `pan2d`, `select2d`, `lasso2d`, `zoomIn2d`, `zoomOut2d`, `autoScale2d`, `resetScale2d` </li>
12+
<li> -'3D', `zoom3d`, `pan3d`, `orbitRotation`, `tableRotation`, `handleDrag3d`, `resetCameraDefault3d`, `resetCameraLastSave3d`, `hoverClosest3d` </li>
13+
<li> -'Cartesian', `hoverClosestCartesian`, `hoverCompareCartesian` </li>
14+
<li> -'Geo', `zoomInGeo`, `zoomOutGeo`, `resetGeo`, `hoverClosestGeo` </li>
15+
<li> -'Other', `hoverClosestGl2d`, `hoverClosestPie`, `toggleHover`, `resetViews`, `toImage`, `sendDataToCloud`, `toggleSpikelines`, `resetViewMapbox` </li>
16+
</ul>
1717
---
18-
var trace1 = {
18+
var data = [{
1919
x:['trees', 'flowers', 'hedges'],
2020
y: [90, 130, 40],
21-
type: 'bar'
22-
}
23-
24-
var data = [trace1];
21+
type: 'bar'}]
2522

2623
var layout = {
2724
title: 'Remove Modebar Buttons',
28-
showlegend: false
29-
}
25+
showlegend: false}
3026

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

0 commit comments

Comments
 (0)
0