Skip to content

Commit 28d302b

Browse files
author
Joseph Damiba
committed
fixups in response to PR comments
1 parent 77db3c4 commit 28d302b

File tree

4 files changed

+21
-19
lines changed

4 files changed

+21
-19
lines changed

_posts/plotly_js/3d/3d-mesh/2016-06-16-cube-mesh.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@
2727
}
2828
];
2929

30-
Plotly.plot('myDiv', data, {}, {showSendToCloud: true});
30+
Plotly.plot('myDiv', data, {});

_posts/plotly_js/chart-events/zoom-disable/2015-12-12-zoom-unbind-x-axis.html

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,13 @@
3434
}];
3535

3636
var layout = {
37-
title: 'Plotting CSV data from AJAX call',
3837
xaxis:
39-
{
40-
fixedrange: true
41-
}
42-
};
38+
{
39+
fixedrange: true
40+
}
41+
};
4342

44-
Plotly.newPlot('myDiv', traces, layout,
45-
{showSendToCloud:true});
43+
Plotly.newPlot('myDiv', traces, layout, title: 'Plotting CSV data from AJAX call');
4644
};
4745
makeplot();
4846

_posts/plotly_js/fundamentals/uirevision/2019-01-04-uirevision-persist.html

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,14 @@
1313
sitemap: false
1414
suite: uirevision
1515
---
16-
var rand = () => Math.random();
16+
17+
const rand = () => Math.random();
1718
var x = [1, 2, 3, 4, 5];
18-
var new_data = (trace) => Object.assign(trace, {y: x.map(rand)});
19+
const new_data = (trace) => Object.assign(trace, {y: x.map(rand)});
1920

2021
// add random data to three line traces
2122
var data = [
22-
{mode: 'lines', line: {color: "#b55400"}},
23+
{mode:'lines', line: {color: "#b55400"}},
2324
{mode: 'lines', line: {color: "#393e46"}},
2425
{mode: 'lines', line: {color: "#222831"}}
2526
].map(new_data);
@@ -31,7 +32,7 @@
3132
yaxis: {autorange: true}
3233
};
3334

34-
Plotly.react("myDiv", data, layout);
35+
Plotly.react('myDiv', data, layout);
3536

3637
var myPlot = document.getElementById('myDiv');
3738

@@ -43,10 +44,10 @@
4344
// so we need to reset it to true
4445
layout.xaxis.autorange = true;
4546
layout.yaxis.autorange = true;
46-
47+
4748
// not changing uirevision will ensure that user interactions are unchanged
4849
// layout.uirevision = rand();
49-
50-
Plotly.react("myDiv", data, layout);
50+
51+
Plotly.react('myDiv', data, layout);
5152
if(cnt === 100) clearInterval(interval);
5253
}, 2500);

_posts/plotly_js/fundamentals/uirevision/2019-01-04-uirevision-reset.html

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@
1111
sitemap: false
1212
suite: uirevision
1313
---
14-
var rand = () => Math.random();
14+
15+
const rand = () => Math.random();
1516
var x = [1, 2, 3, 4, 5];
16-
var new_data = (trace) => Object.assign(trace, {y: x.map(rand)});
17+
const new_data = (trace) => Object.assign(trace, {y: x.map(rand)});
1718

1819
// add random data to three line traces
1920
var data = [
@@ -29,7 +30,9 @@
2930
yaxis: {autorange: true}
3031
};
3132

32-
Plotly.react("myDiv", data, layout);
33+
Plotly.react('myDiv', data, layout);
34+
35+
var myPlot = document.getElementById('myDiv');
3336

3437
var cnt = 0;
3538
var interval = setInterval(function() {
@@ -44,6 +47,6 @@
4447
// and so the graph will autorange after the Plotly.react
4548
layout.uirevision = rand();
4649

47-
Plotly.react("myDiv", data, layout);
50+
Plotly.react('myDiv', data, layout);
4851
if(cnt === 100) clearInterval(interval);
4952
}, 2500);

0 commit comments

Comments
 (0)