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

getImage for dates returns blank graph #63

Open
PinnacleBot opened this issue May 9, 2020 · 0 comments
Open

getImage for dates returns blank graph #63

PinnacleBot opened this issue May 9, 2020 · 0 comments

Comments

@PinnacleBot
Copy link

var dates = ['2020-05-09T17:48:49.000+00:00', '2020-05-06T17:48:49.000+00:00']
var members = [16, 9]

var trace = {
                x: [dates],
                y: [members],
                type: "scatter"
            };
        var figure = {'data': [trace]};

        var imgOpts = {
            format: 'jpeg',
            width: 700,
            height: 500
        };
        plotly.getImage(figure, imgOpts, function (error, imageStream) {
            if (error) return console.log (error);
        
            var fileStream = fs.createWriteStream('../../Bots/Pinnacle/graphs/1.jpeg');
            imageStream.pipe(fileStream);
            fileStream.on('error', err => console.log(err))
        })

This code returns a jpeg file that is a blank graph. If any more info is needed just say so

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