Title: Hide Chart Title
Last modified: November 22, 2021

---

# Hide Chart Title

 *  Resolved [datverse](https://wordpress.org/support/users/datverse/)
 * (@datverse)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/hide-chart-title/)
 * Hi,
    I want hide Chart Title. Do you have any Hooks that support this? Thanks

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [methnen](https://wordpress.org/support/users/methnen/)
 * (@methnen)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/hide-chart-title/#post-15093240)
 * If you’re comfortable playing with WP hooks yes.
 * This is the one you’d want:
 * [https://github.com/methnen/m-chart/wiki/Action-and-filter-hooks#m_chart_chart_args](https://github.com/methnen/m-chart/wiki/Action-and-filter-hooks#m_chart_chart_args)
 * It lets you play with everything the charting library will receive RIGHT before
   it gets printed out to the Javascript.
 * Note that it’s in the form of a PHP Array which then get’s written out as a JSON
   object for the JS charting library to use.
 *  Thread Starter [datverse](https://wordpress.org/support/users/datverse/)
 * (@datverse)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/hide-chart-title/#post-15094257)
 * Hi,
    Thank for your reply. With your help I did it successfully.
 * The code snippet is:
 *     ```
       function filter_m_chart_chart_args( $chart_args, $post, $post_meta, $args ) {
       	$chart_args['options']['plugins']['title'] = [
       		'display' => false
       	];
   
       	return $chart_args;
       }
   
       add_filter( 'm_chart_chart_args', 'filter_m_chart_chart_args', 10, 4 );
       ```
   
 * The config from the chartjs(.org)
    [https://www.chartjs.org/docs/latest/configuration/title.html](https://www.chartjs.org/docs/latest/configuration/title.html)
 *     ```
       const chart = new Chart(ctx, {
           type: 'line',
           data: data,
           options: {
               plugins: {
                   title: {
                       display: true,
                       text: 'Custom Chart Title',
                       padding: {
                           top: 10,
                           bottom: 30
                       }
                   }
               }
           }
       });
       ```
   
 * Thanks

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Hide Chart Title’ is closed to new replies.

 * ![](https://ps.w.org/m-chart/assets/icon-256x256.png?rev=3472197)
 * [M Chart](https://wordpress.org/plugins/m-chart/)
 * [Support Threads](https://wordpress.org/support/plugin/m-chart/)
 * [Active Topics](https://wordpress.org/support/plugin/m-chart/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/m-chart/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/m-chart/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [datverse](https://wordpress.org/support/users/datverse/)
 * Last activity: [4 years, 6 months ago](https://wordpress.org/support/topic/hide-chart-title/#post-15094257)
 * Status: resolved