new jsonCanvas class and configurable legend