Skip to content
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

Setting canvas size to 0 #1093

Closed
heirteir opened this issue Apr 30, 2015 · 2 comments
Closed

Setting canvas size to 0 #1093

heirteir opened this issue Apr 30, 2015 · 2 comments

Comments

@heirteir
Copy link

Whenever I created a chart from my canvas it just sets it's size to 0 on my other computer it works but when I move the code over to this computer it breaks... there is no errors and I know my code is fine because it works on my other computer
This is the html for my canvas

    <canvas id="modalgrid" height="400px" width="550px"></canvas>

here is my javascript

var graph = new Chart(ctx).Line({
                                        labels: dates,
                                        datasets: [
                                            {
                                                label: "Stock",
                                                fillColor: "rgba(220,220,220,0.2)",
                                                strokeColor: "rgba(220,220,220,1)",
                                                pointColor: "rgba(220,220,220,1)",
                                                pointStrokeColor: "#fff",
                                                pointHighlightFill: "#fff",
                                                pointHighlightStroke: "rgba(220,220,220,1)",
                                                data: stock
                                            },
                                            {
                                                label: "Sellers",
                                                fillColor: "rgba(151,187,205,0.2)",
                                                strokeColor: "rgba(151,187,205,1)",
                                                pointColor: "rgba(151,187,205,1)",
                                                pointStrokeColor: "#fff",
                                                pointHighlightFill: "#fff",
                                                pointHighlightStroke: "rgba(151,187,205,1)",
                                                data: sellers
                                            }
                                        ]
                                    }, {bezierCurve: false});

Here is the data for each of the supplied variables

"B003TXIE3A": {
            "title": "Skechers for Work Women's D'Lite Sr Sneaker,White,8.5 M US",
            "asin": "B003TXIE3A",
            "date-updated": 1430445789,
            "sellers": "5",
            "salesrank": 0,
            "salesrank-all": [
                0,
                0,
                0
            ],
            "stock": [
                65,
                64,
                64
            ],
            "dates": [
                1430239930,
                1430316281,
                1430402589
            ],
            "sellers": [
                "5",
                "5",
                "5"
            ],
            "needs-update": false
        }
@benVigie
Copy link

There is no magic 😄 ! If your computers have different OS, different browser or even different browser version, then the render of your page can be different.

So far we can't help you without know your environment.

@etimberg
Copy link
Member

I think this is a duplicate of/the same issue as #762

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants