                                    }
                                }
                            } else {
                                for (var i = 1; i < n; i++) {
                                    breakpoints.push(data[Math.round((data.length) * i / n - 1)]);
                                }
                            }

                            var colors = document.getElementById("colors-select").value, palette;
                            try {
                                palette = col