coreui / coreui-angular

CoreUI Components Library for Angular https://coreui.io/angular/docs/
https://coreui.io/angular/
MIT License
244 stars 145 forks source link

[Angular-Charts] Plugins not recognized #206

Open Sanafan opened 3 weeks ago

Sanafan commented 3 weeks ago

So it seems like no plugins are getting recognized for the charts. Just set up a simple chart, add two lines with like 5 values for 5 days and try to set the tooltip to nearest. You will get data for every line you have although you specified to only get the nearest data inside your tooltip.

I don't know how to setup a codepen with a framework you need to buy so sorry.

My System is Windows 11 i'm using chrome with latest version but its not working on any other browser also.

const options = {
  plugins: {
    legend: {
      display: true,
      labels: {
        color: 'rgb(255, 99, 132)'
      }
    },
    tooltip: {
      enabled: true,
      mode: 'nearest',
        callbacks: {
          label: function (tooltipItem: any) {
            return 'Test Label: ${tooltipItem.label}';
          }
       }
    }
  }
};

Angular Version is 18. Just setting plugins -> tooltip -> enabled: false changes nothing so the plugins are not getting recognized correctly. @coreui/chartjs -> 4.0.0, chart.js -> 4.4.3 -> @coreui/angular-chartjs": "5.2"

xidedix commented 3 weeks ago

@Sanafan

Please find the example on stackblitz

See also: