Open mu-777 opened 6 years ago
http://www.html5.jp/canvas/ref/method/createPattern.html
canvasのfillにセットできれば良さそう
dataset.backgroundColor = ctx.createPattern(img, 'repeat')
でやるとこんな感じ. グラフ全体の左上が原点になってるぽい
やるならpositionとって,resizeして,ちゃんとcanvasに描かないといけないぽい が,バー細すぎていい感じにならないかも
https://codepen.io/shan31/pen/OpYRmN