![PyPI Now Supports iOS and Android Wheels for Mobile Python Development](https://cdn.sanity.io/images/cgdhsj6q/production/96416c872705517a6a65ad9646ce3e7caef623a0-1024x1024.webp?w=400&fit=max&auto=format)
Security News
PyPI Now Supports iOS and Android Wheels for Mobile Python Development
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
ngx-line-chart
Advanced tools
Good-looking, easy-to-use, customizable Angular line chart library for 1 or 2 data sets with separate or common y-axes.
Good-looking, easy-to-use, customizable Angular line chart library for 1 or 2 data sets with separate or common y-axes.
deepmerge
) without any transitive dependenciesxLabelFunction
or yLabelFunction
to specify how they should be shown)To install this library, run:
$ npm install ngx-line-chart --save
and then add the module in AppModule
as an imported module:
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
// Import the module
import { NgxLineChartModule } from 'ngx-line-chart';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
// Add module here
NgxLineChartModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
Module only contains single component, called ngx-line-chart
to be used in the templates:
<ngx-line-chart []></ngx-line-chart>
See explanation for inputs below.
Input | Type | Example value | Description |
---|---|---|---|
dataSets | IDataSet[] | [{name: 'likes', points: [{x: 10, y: 100}, {x: 20, y: 500}, {x: 50, y: 40}]] | Array of 1 or 2 data sets each containing a name and the actual data points (x and y as numbers). There data sets will be used to determine x-axis values along with the corresponding y-axis for each data set. |
xLabelFunction | (value: number) => string | (value: number) => value.toString() (this is the default) | This function will be called for each value of the x-axis labels for it to be formatted. Default function shows the values as they are. You may use this to format values as for example dates. |
xLabelFunction | (value: number) => string | (value: number) => value.toString() (this is the default) | This function will be called for each value of the y-axis labels for it to be formatted. Default function shows the values as they are. |
style | IChartStyle | - | Explained below. |
The axes
input will be fixed in the future to work as intended. It can be skipped for now.
Layout level section explains how to specify the size for the chart where as the details allow you to specify the colors and widths used within the chart.
The most important thing to note is that the line chart will always fulfill the element it is inserted into. What this means in practice is that if you have something like
<div style="width: 600px; height: 400px;">
<ngx-line-chart ...></ngx-line-chart>
</div>
The chart will now be 600px x 400px.
Details of the chart can be fine tuned also with style
input. The options for this include:
Plan is to generalize the library as going forward. Things to be included contain at least:
Pull requests would be greatly appreciated for any of these or any other features you feel would be useful.
To generate all *.js
, *.d.ts
and *.metadata.json
files:
$ npm run build
To lint all *.ts
files:
$ npm run lint
MIT © Roope Hakulinen
FAQs
Good-looking, easy-to-use, customizable Angular line chart library for 1 or 2 data sets with separate or common y-axes.
The npm package ngx-line-chart receives a total of 112 weekly downloads. As such, ngx-line-chart popularity was classified as not popular.
We found that ngx-line-chart 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
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.