npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@coreui/angular-chartjs

v5.0.4

Published

Angular wrapper component for Chart.js

Downloads

70,544

Readme

Status

angular npm package npm package NPM downloads

install:
npm install chart.js@4
npm install @coreui/chartjs@4
npm install @coreui/angular-chartjs@5
import:
// ng modules
import { ChartjsModule } from '@coreui/angular-chartjs';

@NgModule({
    imports: [
        ChartjsModule,
...
// standalone components
  import { ChartjsComponent } from '@coreui/angular-chartjs';

@Component({
    standalone: true,
    imports: [
        ChartjsComponent, 
...
usage:
@Component({
  selector: 'app-chart-sample',
  template: `<c-chart type="line" [data]="data" [options]="options" width="300"></c-chart>`,
})
export class ChartSample {

  colors = {
    label: 'My dataset',
    backgroundColor: 'rgba(77,189,116,.2)',
    borderColor: '#4dbd74',
    pointHoverBackgroundColor: '#fff',
  }

  labels = ['Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa', 'Su'];

  data = {
    labels: this.labels,
    datasets: [{
      data: [65, 59, 84, 84, 51, 55, 40],
      ...this.colors,
      fill:  {value: 65}
    }],
  }

  options = {
    plugins: {
      legend: {
        display: false
      }
    },
    maintainAspectRatio: false,
    elements: {
      line: {
        tension: 0.4
      },
    }
  };
}

README.png

c-chart

component

Inputs:

|name|description|type|default| |---|---|---|---| |customTooltips|Enables custom html based tooltips|boolean|true |data|The data passed to Chart.js chart|ChartData|required |options|The options object that is passed into the Chart.js chart|ChartOptions|undefined |plugins|The plugins array that is passed into the Chart.js chart|PluginOptionsByType|undefined |redraw|If true, will tear down and redraw chart on all updates|boolean|false |type|Chart.js chart type.|keyof ChartTypeRegistry|bar |wrapper|Put the chart into the wrapper with display: block.|boolean|true |height|Height attribute applied to the rendered canvas (px)|number|undefined |width|Width attribute applied to the rendered canvas (px)|number|undefined |id|Html id attribute applied to the rendered canvas|string|undefined

Outputs:

|name|description| |---|---| |getDatasetAtEvent|Proxy for Chart.js getDatasetAtEvent. Calls with dataset and triggering event. |getElementAtEvent|Proxy for Chart.js getElementAtEvent. Calls with single element array and triggering event. |getElementsAtEvent|Proxy for Chart.js getElementsAtEvent. Calls with element array and triggering event.

See also:

Support CoreUI Development

CoreUI is an MIT-licensed open source project and is completely free to use. However, the amount of effort needed to maintain and develop new features for the project is not sustainable without proper financial backing. You can support development by buying the CoreUI PRO or by becoming a sponsor via Open Collective.

Platinum Sponsors

Support this project by becoming a Platinum Sponsor. A large company logo will be added here with a link to your website.

Gold Sponsors

Support this project by becoming a Gold Sponsor. A big company logo will be added here with a link to your website.

Silver Sponsors

Support this project by becoming a Silver Sponsor. A medium company logo will be added here with a link to your website.

Bronze Sponsors

Support this project by becoming a Bronze Sponsor. The company avatar will show up here with a link to your OpenCollective Profile.

Backers

Thanks to all the backers and sponsors! Support this project by becoming a backer.

Copyright and license

Copyright 2024 creativeLabs Łukasz Holeczek. Code released under the MIT License. Docs released under Creative Commons.