
Research
NPM targeted by malware campaign mimicking familiar library names
Socket uncovered npm malware campaign mimicking popular Node.js libraries and packages from other ecosystems; packages steal data and execute remote code.
@dvsl/angular-zoomcharts
Advanced tools
You need to set up your development environment before you can do anything.
Install Node.js® and npm if they are not already on your machine.
Install the Angular CLI globally.
npm install -g @angular/cli
ng new my-zoomchartsApp
Go to project directory.
cd my-zoomchartsApp
npm install --save @dvsl/angular-zoomcharts
Import ZoomchartsModule into app.module.ts.
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
import { ZoomchartsModule, WindowRef } from '@dvsl/angular-zoomcharts';
@NgModule({
declarations: [
AppComponent
], imports: [
BrowserModule,
ZoomchartsModule.forRoot({})
],
providers: [WindowRef],
bootstrap: [AppComponent]
})
export class AppModule { }
Import ZoomchartsService into app.component.ts.
import { Component, OnInit, AfterViewInit } from '@angular/core';
import { ZoomchartsService } from '@dvsl/angular-zoomcharts';
@Component({
selector: 'app-root',
template: `
<div class='chart-container'>
<div class='chart'>
<app-zoomcharts-component [settings]='piechartSettings' [id]='"component-1"'></app-zoomcharts-component>
</div>
</div>`,
styleUrls: ['./app.component.css']
})
export class AppComponent implements OnInit {
constructor(private zcService: ZoomchartsService) {
// add license key
this.zcService.setLicenseKey({
license: "",
licenseKey: ""
});
}
// set data
piechartSettings: any = {
pieChart: {
assetsUrlBase: '../assets/',
area: { height: 350 },
data: {
preloaded: {
subvalues: [
{
id: 'foo', value: 100, subvalues: [
{ id: 'foo-1', value: 50, style: { expandable: false } },
{ id: 'foo-2', value: 50, style: { expandable: false } }
]
},
{ id: 'bar', value: 50, style: { expandable: false } },
{ id: 'baz', value: 30, style: { expandable: false } }
]
}
}
}
}
ngOnInit() {
this.zcService.getComponent('component-1').then(component => {
component.instance.chart.updateSettings({
height: 450
});
});
}
}
To display the ZoomchartsComponent, you must add it to the template.
<app-zoomcharts-component [settings]='piechartSettings' [id]='"component-1"'></app-zoomcharts-component>
//Add { "glob": "**/*", "input": "../node_modules/@dvsl/angular-zoomcharts/assets", "output": "./assets/" }
"options": [
{
...
"assets": [
"assets",
"favicon.ico",
{ "glob": "**/*", "input": "./node_modules/@dvsl/angular-zoomcharts/assets", "output": "./assets/" }
],
...
}
],
ng serve --open
FAQs
ZoomCharts angular component library.
We found that @dvsl/angular-zoomcharts demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Socket uncovered npm malware campaign mimicking popular Node.js libraries and packages from other ecosystems; packages steal data and execute remote code.
Research
Socket's research uncovers three dangerous Go modules that contain obfuscated disk-wiping malware, threatening complete data loss.
Research
Socket uncovers malicious packages on PyPI using Gmail's SMTP protocol for command and control (C2) to exfiltrate data and execute commands.