
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
angular2-fusioncharts
Advanced tools
To install angular2-fusioncharts
library, run:
$ npm install angular2-fusioncharts --save
And then in your Angular AppModule
:
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
// Import angular2-fusioncharts
import { FusionChartsModule } from 'angular2-fusioncharts';
// Import FusionCharts library
import * as FusionCharts from 'fusioncharts';
// Import FusionCharts Charts module
import * as Charts from 'fusioncharts/fusioncharts.charts';
@NgModule({
declarations: [
AppComponent,
FusionChartsComponent
],
imports: [
BrowserModule,
// Specify FusionChartsModule as an import
// and pass FusionCharts and Charts as a dependency
FusionChartsModule.forRoot(FusionCharts, Charts),
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
Once the library is imported, you can use its components, directives in your Angular application:
In your Angular AppComponent:
import {Component} from '@angular/core';
@Component({
selector: 'my-app',
templateUrl: './app.component.html'
})
export class AppComponent {
dataSource: Object;
title: string;
constructor() {
this.title = "Angular 2 FusionCharts Sample";
this.dataSource = {
"chart": {
"caption": "Harry's SuperMart",
"subCaption": "Top 5 stores in last month by revenue"
},
"data": [{
"label": "Bakersfield Central",
"value": "880000"
}, {
"label": "Garden Groove harbour",
"value": "730000"
}, {
"label": "Los Angeles Topanga",
"value": "590000"
}, {
"label": "Compton-Rancho Dom",
"value": "520000"
}, {
"label": "Daly City Serramonte",
"value": "330000"
}]
}
}
}
<!-- You can now use fusioncharts component in app.component.html -->
<h1>
{{title}}
</h1>
<fusioncharts
width="600"
height="350"
type="Column2D"
dataFormat="JSON"
[dataSource]="dataSource"
></fusioncharts>
To generate all *.js
, *.js.map
and *.d.ts
files:
$ npm run tsc
To lint all *.ts
files:
$ npm run lint
FAQs
Unknown package
The npm package angular2-fusioncharts receives a total of 12 weekly downloads. As such, angular2-fusioncharts popularity was classified as not popular.
We found that angular2-fusioncharts 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.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.