Sets up the initial state of the page when it loads. Calls the 'changeCategory' function to set the category to 'piadas' on page load.
Parameters:
None
window.onload = function() {
// run change category to be set to piadas when page loads
changeCategory('piadas');
};
Changes the displayed items based on the selected category. Hides all items that do not belong to the selected category and shows those that do.
Parameters:
category
(string): The category to be displayed.
function changeCategory(category) {
// ... Function code ...
}
Makes an AJAX request to fetch graph data for the selected item. Updates the graph container with the received graph data on success. Logs an error message on failure.
Parameters:
item_id
(string): The identifier of the selected item.
function updateGraph(item_id) {
// ... Function code ...
}