It seems like you are setting up the common Chart Options in a JS file but as all the charts are going to have different footer caption you shouldn’t set it as a common option.
As you specified that the post has three charts that means the captionLabel
JavaScript variable is getting declared and being assigned the value 3 times if that is part of shortcode. So the final value assigned to the captionLabel
will be label 3
and then the chart options are being set in the js file. Thus, all your charts are having label 3
as footer caption.
May be you can set the label in Chart Options on per chart basis.
Related Posts:
- Run shortcode at certain resolution
- Using a javascript file to access a get posts array
- Listing and displaying WooCommerce Shipping Zones in the frontend? [closed]
- Create shortcodes within foreach loop (using array)
- Trigger popup in a php if/else statement
- Populate dropdown with Child Pages based on Parent Page chosen
- Creating own shortcode – echoeing php variable based on JS variable
- Redirect to another page using contact form 7? [closed]
- Get html data with javascript to php array and store to wordpress database
- Calling PHP Titles inside Javascript Markup
- MySQL Query Returns Array () In Shortcode
- using shortcodes inside gravity forms
- Display one random image from Media Library
- Show the subcategory name based on current product
- How to output values from a loop into a javascript array
- Replacing entire tag with shortcode – JavaScript [duplicate]
- make an array in wordpress cusmization api?
- Force ‘permanent’ post cache of shortcode results
- How to get values from wordpress listings and use them in javascript array?
- Set variable in javascript and using in my shortcode
- Is there a better way to output HTML as a shortcode?
- Show Login Errors In WordPress/Elementor (Code “works”, but breaks site)
- Calling a function via a shortcode in javascript
- How to make this shortcode not refresh the whole page when i use it on frontend
- How to pass php array to external js file in WordPress
- How to Insert Shortcodes into Theme?
- Colorbox ajax loading of outside HTML content works perfect on localhost but not on server
- ‘orderby’ => ‘rand’ alternative for better performance?
- How can I get content inside one shortcode to another shortcode?
- How to make custom total price reactive in navigation
- Adding tawk.to code just before body tag on functions.php file
- Template part inside shortcode, unexpected reult
- How to convert objects into arrays
- How do I fetch all comments per post via WP REST API?
- Deregistering a script in WordPress seems impossible
- Slide in Panel WordPress Post
- Shortcode Inside Class Not Working
- custom shortcode will not display the wrapped content
- Sending jsPDF documents to the server
- Shortcode content output but not in correct place
- How to prevent those PHP variables from being cached on WordPress?
- is_page “range” for if statement?
- Ajax return code 400
- How can I generate random numbers inside my shortcodes on each implementation?
- Parsing php string in jquery [closed]
- Pass a php string to a javascript variable
- How can I add an alert (like the old javascript alerts) to my WP page?
- Pass PHP variable to JavaScript without inline JS
- Admin Options page. Save as Array
- Show post in slider
- How can I output a php value into a JS file within WordPress?
- PHP code inside shortcodes
- Use WP_Query in shortcode
- Shortcode API: How to get name that matched shortcode RegEx?
- Using shipped version of jquery
- Putting PHP variables into javascript [duplicate]
- Bridging TinyMCE js and WordPress PHP?
- PHP get the first post separately from array returned by wpdb->get_results()
- Working with query_posts ( arrays and query strings)
- Shortcode content filter?
- Trying to implement Ajax comments in WordPress, getting WP error
- How to test nonce with AJAX – Plugin development
- how can i show only the parents in owl-carousel?
- How do I display a user’s previous orders as a select box option on a product?
- Simple Plugin with custom javascript wont work – no console error
- How does this WordPress Plugin (Thrive Comments) apply their custom comment sort? [closed]
- How can I use a modal window to display the current post in loops featured image?
- js file in root loading without
- class click counter save number
- Custom Theme, Custom shortcode not working
- Using a variable in is_page(array())
- Remove duplicates – array_unique()
- How can I add multiple ‘tax_query’ arrays via a loop?
- Slider loading issue
- Append HTML Using Shortcode
- AJAX request status 200 but no actual “response”
- Button not refreshing page
- How to properly loop through these external URLs to get them into the sitemap using this hook
- Ajax not working es expected (Returns 0)
- Why is file_get_contents returning page source?
- Plugin CSS not enqueing
- Use menu link or onClick to set a variable
- Recent posts with featured image or fallback image with permalink
- How to select the contents in the text view textrea in wp_editor?
- Creating a Multi-Level Associative Object Using AJAX
- Different loop output every x posts in custom post type
- Call global variable array() in woocommerce child/template
- WP functions in .js
- Adding custom directory and PHP files in wordpress
- How to output a PHP file values by shortcode?
- Storing Array from returned database query and using the array in a new query
- Showing content from one page on another
- Ajax – Call to undefined function get_option()
- get_the_tags() not iterating through for/while loop, but will with foreach
- Showing a different gallery in a seperate post
- get a simple array of all of the term names that exist in all taxonomies
- How to display posts by current user in a drop down
- Create own WordPress shortcode gallery
- remove wp floating submenu in wp dashboard
- Get value from shortcode to do something