graphium
v0.0.4
Published
Graphium is an Angular component library that provides a versatile and easy-to-use charting component, enabling developers to integrate dynamic and customizable charts into their Angular applications seamlessly.
Downloads
4
Readme
Graphium
Graphium is an Angular component library that provides a versatile and easy-to-use charting component, enabling developers to integrate dynamic and customizable charts into their Angular applications seamlessly.
MyNewLib
This project was generated with Angular CLI version 14.2.13.
Development server
Run ng serve for a dev server. Navigate to http://localhost:4200/. The application will automatically reload if you change any of the source files.
Code scaffolding
Run ng generate component component-name to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module.
Installation
Install Graphium using npm:
npm install graphium --save
3. Usage
Demonstrate how to import and use the GraphiumComponent in an Angular application.
Usage
- Import the
GraphiumModuleinto your application's module:
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
import { GraphiumModule } from 'graphium';
@NgModule({
declarations: [AppComponent],
imports: [BrowserModule, GraphiumModule],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
2. use this in templates files
<graphium
[chartData]="chartData"
[chartType]="'line'"
></graphium>
3. In your component, define the chartData:
export class AppComponent {
chartData = [
{ month: 'January', sales: 100, revenue: 200 },
{ month: 'February', sales: 150, revenue: 250 },
// ... more data points
];
}
**4. Inputs**
List and describe the inputs that the `GraphiumComponent` accepts.
```markdown
## Inputs
- `chartData` (Array): An array of data objects to be visualized in the chart.
- `chartType` (string): The type of chart to render (e.g., 'line', 'bar', 'pie').
## License
This project is licensed under the MIT License.
