LoginSignup
0
0

More than 5 years have passed since last update.

chart.jsでCanvasタグが画面全体に広がってしまうことに関して

Posted at

chart.jsでグラフを描写しようとしたときに、グラフがブラウザ全体に広がってしまいました。
optionsでresponsive: falseと明示することでレスポンシブルが解除されました。
デフォルトでレスポンシブルになっているようなので、記入しなかったり、コメントアウトしてもレスポンシブルになってしまいます。

var options = {

    responsive: false,
    title:{ display:true,
        text:'Chart sample'
    },
    chartArea: {
        backgroundColor: "#ecf0f1"
    }
};

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0