10000 A slightly less ambitious take on orphan subplots and 'delete last trace' by etpinard · Pull Request #289 · plotly/plotly.js · GitHub
[go: up one dir, main page]

Skip to content

A slightly less ambitious take on orphan subplots and 'delete last trace' #289

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 18 commits into from
Feb 29, 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
add jsdoc
  • Loading branch information
etpinard committed Feb 26, 2016
commit a71efa70b5df69e07d4156196d2bf109b5bbfcbf
10 changes: 10 additions & 0 deletions src/plots/plots.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,16 @@ plots.getSubplotIds = function getSubplotIds(layout, type) {
return subplotIds;
};

/**
* Get the data trace(s) associated with a given subplot.
*
* @param {array} data plotly full data array.
* @param {object} layout plotly full layout object.
* @param {string} subplotId subplot ids to look for.
*
* @return {array} list of trace objects.
*
*/
plots.getSubplotData = function getSubplotData(data, type, subplotId) {
if(plots.subplotsRegistry[type] === undefined) return [];

Expand Down
0