t"}, {x: document.getElementById("x_field-select").value}))
                                    ];
                        } else {
                            marks = [
                                        Plot.barY(formatted_data, Plot.groupX({y: "count"}, 
                                        {x: document.getElementById("x_field-select").value, sort: {x: "y", reverse: true}}))
                                    ];
                        }
                        plot = Plot.plot({x: x, y: {label: