title: Refencing a plugin in ChartJs.Blazor
body: <p>I am converting an application from standard C# MVC application to a Blazor application. The MVC application uses ChartJs to create charts and graphs. The one thing I have not been able to figure out is how to call a plugin in ChartJs.Blazor.  Here is my plugin that works correctly in the MVC application using Javascript version of ChartJs:</p>
  <pre><code> Chart.pluginService.register({
          beforeUpdate: function (chartInstance) {
              chartInstance.data.datasets.forEach(function (dataset) {
                  if (dataset.label === &quot;CPAP Usage&quot;) {
                      dataset.backgroundColor = dataset.data.map(function (data) {
                          return data &lt; 4 ? '#7d1646' : '#40a37f';
                      })
  
                  }
              })
          }
      });
  </code></pre>