title: How to Modify ToolTips in Yii2 using dosamigos\chartjs\ChartJs?
body: <p>I want to change the tooltip of a Chart I made in Yii2 using <a href="https://github.com/2amigos/yii2-chartjs-widget" rel="nofollow noreferrer">dosamigos\chartjs\ChartJs</a> which is based on <a href="http://www.chartjs.org/docs/latest/" rel="nofollow noreferrer">Chart.js</a></p>
  
  <p>My problem comes when I try to modify the Tooltip part of the chart. I am unable to achieve it. I have tried using multiTooltipTemplate, tooltips.callback and tooltipTemplate properties but I have not succeeded yet.</p>
  
  <p>Below are 2 pictures of my Chart, What I want to achive is this:</p>
  
  <ol>
  <li><p>The ToolTip of the inner chart (first image) should say something like this: "A: 119 Products" or "B: 230 Products" or "C: 540 products" depending on which section of the chart you are in (red,blue,yellow).</p></li>
  <li><p>The Tooltip of the outer chart (second image) should say something like "A:  $5,966,671.64" or "B:  $1,120,022.50" or "C:  $966,671.64" depending on which color you are in (red,blue,yellow).</p></li>
  </ol>
  
  <p><a href="https://i.stack.imgur.com/oujha.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/oujha.jpg" alt="enter image description here"></a>
  <a href="https://i.stack.imgur.com/sJQYu.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sJQYu.jpg" alt="enter image description here"></a></p>
  
  <p>Bellow is the code I am using to generate the chart in my view:</p>
  
  <pre><code>&lt;?= ChartJs::widget([
   'type' =&gt; 'pie',
   'options' =&gt; [
       'height' =&gt; 200,
       'width' =&gt; 600,
       'responsive' =&gt; true,
       'animation'=&gt; true,
       'barValueSpacing' =&gt; 5,
       'barDatasetSpacing' =&gt; 1,
       //'tooltipFillColor'=&gt; "rgba(0,0,0,0.8)",
       //'multiTooltipTemplate' =&gt; "&lt;%= Value %&gt; - &lt;%= value %&gt;",
       // String - Template string for single tooltips,
       //'tooltipTemplate'=&gt;  "&lt;%if (label){%&gt;&lt;%=label%&gt;: &lt;%}%&gt;&lt;%= value %&gt;",
  
       // String - Template string for single tooltips,
       //'multiTooltipTemplate'=&gt;  "&lt;%= value %&gt;",
  
       'tooltips'=&gt; [
        'callbacks'=&gt; [
            'title' =&gt;  '***** My custom label title *****'           
  
            ]
      ],
  
  ],
   'data' =&gt; [
         'datasets' =&gt; [
            [
                'label' =&gt; 'Valor Inventario',
                'data'=&gt; [$valorInventarioA, $valorInventarioB, $valorInventarioC],
                'backgroundColor'=&gt; [
                    'rgba(255, 99, 132, 0.2)',
                    'rgba(54, 162, 235, 0.2)',
                    'rgba(255, 206, 86, 0.2)'
                ],
                'borderColor'=&gt; [
                    'rgba(255,99,132,1)',
                    'rgba(54, 162, 235, 1)',
                    'rgba(255, 206, 86, 1)'
                ]
            ],
            [
                   'label' =&gt; 'Cantidad Items',
                  'data'=&gt; [$grupoACount, $grupoBCount, $grupoCCount],
               'backgroundColor'=&gt; [
                   'rgba(255, 99, 132, 0.2)',
                   'rgba(54, 162, 235, 0.2)',
                   'rgba(255, 206, 86, 0.2)'
               ],
               'borderColor'=&gt; [
                   'rgba(255,99,132,1)',
                   'rgba(54, 162, 235, 1)',
                   'rgba(255, 206, 86, 1)'
               ]
            ]
        ],
  
         // These labels appear in the legend and in the tooltips when hovering different arcs
         'labels' =&gt; [
             'A',
             'B',
             'C'
         ]
   ]
  ]);?&gt;
  </code></pre>
  
  <p>I would appreciate any help</p>