      legend.appendChild(container);

          this.scatterMeta.forEach(s => {
            let index = this.seriesState[s.name];
            if (s.has_legend) {
              let legendSection = []
              if (!s.is_range[index]) {
                s.legend[index].forEach(v => {
                  legendSection.push(Faerun.createElement('div', { classes: 'legend-element' }, [
                    Faerun.createColorBox(v[0]),
                    Faerun.createElement('div', { classes: 'legend-label', cont