Add responsiveness and auto generate legend

Add attribute legend=true to canvas and auto add legend after canvas

Add attribute responsive=true to canvas and make the canvas responsive