svir_viewer.js - add dynamic chart legends