I see two things. You’re missing an action call – you need
add_action( 'wp_ajax_render_admin_charts_page', 'render_admin_charts_page' );
add_action('wp_ajax_nopriv_render_admin_charts_page', 'render_admin_charts_page');
Plus, from looking at your render_admin_charts_page() you need to change your json dataType to html. Your charts function is outputting html so all you need to do is output it; your alert() should contain all the html from your function.
One more thing, if this is still a live question, why die() in your render_admin_charts_page() function? That function prints a message so that could also be messing with your returned value.
Related Posts:
- ajaxurl not defined on front end
- Get returned variable from a function to add_shortcode function
- Using Ajax call in jQuery doesn’t work in widget
- Admin-ajax.php appending a status code to ajax response
- Ajax in WordPress – path issue
- WordPress Ajax callback function from plugin – OOP
- .mo translation strings not loading in PHP scripts that handle AJAX calls
- how to search users by ajax live search
- template_redirect or admin-ajax.php?
- WordPress custom taxonomy check box to dropdown
- jquery & ajax sending data to php
- Ajax submit result opens in admin-ajax.php
- insert query on a custom table using ajax with jQuery plugin Jeditable
- Ajax: Populate with content from a post’s ID not working – duplicating current page html instead
- Data not insert and update through ajax and jQuery in admin page?
- WP ajax requests not stacking?
- ajax working when function is on child theme but not in plugin page
- Get cat parameter from admin-ajax
- Ajax on the Administration Side of plugin – returns 0
- Jquery php request is returning a weird result
- WordPress Ajax not returning Response
- wp_ajax add_action fuction won’t fire on custom jQuery action
- Filterable posts using categories
- How to get values from Tinymce visual editor popup?
- replacing jquery google cdn with a new version dynamically
- WordPress function is not called and ajax return 0
- Ajax call not working with
- Template file structure , wordpress hook for altering the template
- Page reload occurs before request finishes
- Trigger a JavaScript function based on the data fetched from Woo commerce hook
- Difference Between Filter and Action Hooks?
- add_action hook for completely new post?
- How to include jQuery and JavaScript files correctly?
- How Do I Use jQuery UI In My Plugin
- How can I run AJAX on a button click event?
- WordPress Hook for user register
- Test to see if jQuery or Prototype is queued by another plugin?
- Explanation of the “posts_join” and “posts_fields” filter hooks?
- Empty POST data on server on AJAX request using Angular $http
- jQuery in header or footer
- wp_localize_script $handle
- Help adding image upload functionality to widget
- What’s the difference between hooks, filters and actions? [duplicate]
- How to check if certain plugin exists and in expected version
- Built in admin ajax hooks?
- How to post form in ajax mode and handle it in wordpress
- Using wp_ajax and wp_ajax_nopriv hooks
- Modifying values with add_action to be sent to db
- How to display a message about updates in the plugin list
- How to delete an user including data from custom database tables
- Loading jQuery and jQuery plugin script files correctly [duplicate]
- Should action callbacks start with a verb?
- wp_insert_post() is returning the correct post ID, no failure, but the post content does not get updated
- What filter should I use to insert a button inside on Media>Add New
- Slow WP_query due to nested wp_query. Need Suggestions
- How to use a hook to override an update_post_meta call in a plugin?
- External Authentication, session_tokens not destroyed on logout
- Woocommerce checkout update totals with datepicker
- Including the necessary functions for a custom ajax registration form
- correct way to call javascript into hook function
- Dashboard – get status and position of metaboxes and pass them to ajax method
- Prefixing plugin hooks (actions/filters) with a wrapper class or functions
- Send push when new post is published in a certain category
- Storing data in wordpress database from ajax call from different website
- javascript datatables in a plugin
- Force HTTPS 301 redirect with hook
- Hide shortcodes “code” when using the “editor” the same as wordpress do with “gallery”
- Plugin – Make sure jquery is loaded in my settings page plus my JS file
- Remove entire [$key] from array stored in custom field using Ajax – unset($array[$key]); not working
- jQuery instantly executes (a button click and css change) on load
- Remove an action by extending class and replacing it
- Trying to get class to instantiate ONCE (or, “why do I keep punching myself in the head?”)
- making a plugin that moves other plugins wp_head actions to wp_footer
- Setting a JSON web token from a secondary api as a secure cookie on WordPress
- How to localize data array in plugin’s option page
- sanitizing/escaping plugin options
- wc_get_template_part doesnt display the content [duplicate]
- How to enhance a self developed plugin by its own plugin architecture
- `registration_errors` filter doesn’t seem to be called
- How to grab data after wp user search is complete
- 400 Bad Request and illegal invocation in wp_ajax based on processData set to false or true
- Rate limiting ajax requests in WordPress
- Does hooking into a plugin action / filter override the plugin’s function for that hook?
- Nested Hooks with do_action for performance reasons – safe/necessary?
- WordPress Ajax request “Failed to load resource: the server responded with a status of 400 ()”
- WordPress Plugin Boilerplate – add actions and/or filters based on user’s role
- Input field duplicates on form submit by jQuery
- How to handle ajax Request in a complex-structured plugin?
- how to retrieve post_id under woocommerce_add_to_cart_validation hook?
- How and when would I implement some code which would take data from one part of the Db and put it in another?
- plugin modal/popup integration best practice
- Script work on non logged in user but not work for logged in user?
- Get user logged in status from within a plugin. $current_user not defined
- Fatal error: Call to a member function query() on a non-object in my ajaxpage
- get_term_by() returning null on plugin
- ajax problems on loading page [closed]
- How to access Elementor-navigation-elements via jQuery
- Is there a hook for updated image metadata upon using image editor?
- How to run this plugin every time a post is saved?
- Are woocommerce_thankyou hook and is_order_received_page() redundant? [closed]