Skip to content
This repository has been archived by the owner on Jun 4, 2024. It is now read-only.

getImage: Error when add layout in opts #71

Open
LorhanSohaky opened this issue Aug 15, 2022 · 0 comments
Open

getImage: Error when add layout in opts #71

LorhanSohaky opened this issue Aug 15, 2022 · 0 comments

Comments

@LorhanSohaky
Copy link

// Learn about API authentication here: https://plotly.com/nodejs/getting-started
// Find your api_key here: https://plotly.com/settings/api

require('plotly')(username, api_key);

var trace1 = {
  x: ["giraffes", "orangutans", "monkeys"],
  y: [20, 14, 23],
  name: "SF Zoo",
  type: "bar"
};
var trace2 = {
  x: ["giraffes", "orangutans", "monkeys"],
  y: [12, 18, 29],
  name: "LA Zoo",
  type: "bar"
};
var data = [trace1, trace2];
var layout = {barmode: "stack"};
var graphOptions = {layout: layout, filename: "stacked-bar", fileopt: "overwrite"};
plotly.getImage(data, graphOptions, function (err, msg) {
    console.log(msg);
});
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant