8000 Introducing `Plotly.update` by etpinard · Pull Request #875 · plotly/plotly.js · GitHub
[go: up one dir, main page]

Skip to content

Introducing Plotly.update #875

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Sep 7, 2016
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
plot api: rm unused 'dolayout' flag in restyle
  • Loading branch information
etpinard committed Aug 22, 2016
commit ce51b218716ab6fd6b697cacf5d0c64e23651870
16 changes: 0 additions & 16 deletions src/plot_api/plot_api.js
Original file line number Diff line number Diff line change
Expand Up @@ -1279,15 +1279,6 @@ Plotly.restyle = function restyle(gd, astr, val, traces) {
'error_y.width', 'error_x.width', 'error_x.copy_ystyle',
'marker.maxdisplayed'
];
// these ones show up in restyle because they make more sense
// in the style box, but they're graph-wide attributes, so set
// in gd.layout also axis scales and range show up here because
// we may need to undo them. These all trigger a recalc
// var layoutAttrs = [
// 'barmode', 'barnorm','bargap', 'bargroupgap',
// 'boxmode', 'boxgap', 'boxgroupgap',
// '?axis.autorange', '?axis.range', '?axis.rangemode'
// ];

// these ones may alter the axis type
// (at least if the first trace is involved)
Expand All @@ -1299,7 +1290,6 @@ Plotly.restyle = function restyle(gd, astr, val, traces) {
var docalc = false,
docalcAutorange = false,
doplot = false,
dolayout = false,
dostyle = false,
docolorbars = false;
// copies of the change (and previous values of anything affected)
Expand Down Expand Up @@ -1627,12 +1617,6 @@ Plotly.restyle = function restyle(gd, astr, val, traces) {
// now update the graphics
// a complete layout redraw takes care of plot and
var seq;
if(dolayout) {
seq = [function changeLayout() {
var copyLayout = gd.layout;
gd.layout = undefined;
return Plotly.plot(gd, '', copyLayout);
}];
}
else if(docalc || doplot || docalcAutorange) {
seq = [Plotly.plot];
Expand Down
0