![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.
ng2-charts
Advanced tools
Reactive, responsive, beautiful charts for Angular2 based on Chart.js
Beautiful charts for Angular2 based on Chart.js
Library updated for Angular 7
Sample using ng2-charts@2.0.0-beta.10
https://stackblitz.com/edit/ng2-charts7-demo
Original sample using ng2-charts@1.1.0
http://valor-software.github.io/ng2-charts/ http://plnkr.co/edit/7fGsiuRjcF0M0Ffeoml2?p=preview
npm install ng2-charts@2.0.0-beta.10 --save
Chart.js
library in your application (it is a peer dependency of this library) (more info can be found in the official chart.js
documentation)npm install chart.js --save
Demo and API details of ng2-charts can be found here:
https://stackblitz.com/edit/ng2-charts7-demo
import { ChartsModule } from 'ng2-charts';
// In your App's module:
imports: [
ChartsModule
]
There are one directive for all chart types: baseChart
, and there are 6 types of charts: , line
, bar
, radar
, pie
, polarArea
, doughnut
.
Note: For more information about possible options please refer to original chart.js documentation
data
(SingleOrMultiDataSet
) - set of points of the chart, it should be MultiDataSet
only for line
, bar
and radar
, otherwise SingleDataSet
datasets
({ data: SingleDataSet, label: string }[]
) - data
see about, the label
for the dataset which appears in the legend and tooltipslabels
(string[]
) - x axis labels. It's necessary for charts: line
, bar
and radar
. And just labels (on hover) for charts: polarArea
, pie
and doughnut
chartType
(ChartType
) - indicates the type of charts, it can be: line
, bar
, radar
, pie
, polarArea
, doughnut
options
(ChartOptions
) - chart options (as from Chart.js documentation)colors
(Color[]
) - data colors, will use default and|or random colors if not specified (see below)legend
: (boolean = false
) - if true show legend below the chart, otherwise not be shownchartClick
: fires when click on a chart has occurred, returns information regarding active points and labelschartHover
: fires when mousemove (hover) on a chart has occurred, returns information regarding active points and labelsThere are a set several default colors. Colors can be replaced using the colors
attribute. If there is more data than colors, colors are generated randomly.
Please follow this guidelines when reporting bugs and feature requests:
Thanks for understanding!
The MIT License (see the LICENSE file for the full text)
FAQs
Reactive, responsive, beautiful charts for Angular based on Chart.js
The npm package ng2-charts receives a total of 215,965 weekly downloads. As such, ng2-charts popularity was classified as popular.
We found that ng2-charts demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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.