npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

anychart-angular2

v1.0.7

Published

Angular2 directives for AnyChart

Downloads

271

Readme

AngularJS v2.x directives for AnyChart

AngularJS v2.x directives for AnyChart provide an easy way to use AnyChart JavaScript Charts with Angular2 Framework.

Table of Contents

Download and install

Package managers

You can install Angular2-plugin using npm, bower or yarn:

  • npm install anychart-angular2
  • bower install anychart-angular2
  • yarn add anychart-angular2

Direct download

You can download compiled Angular2 components directly from the dist folder.

Please, note: components.js and components.d.ts files export basic Anychart-Angular2 integration functionality.

Quick start

Here's a basic sample that shows how to quickly create an Angular2 application with AnyChart component:

<!DOCTYPE html>
<html>
<head>
    <title>Angular Quick Start</title>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <!-- Polyfill(s) for older browsers -->
    <script src="node_modules/core-js/client/shim.min.js"></script>

    <!-- Add zone.js (https://github.com/angular/zone.js/) -->
    <script src="node_modules/zone.js/dist/zone.js"></script>
    
    <!-- Add modules loader -->
    <script src="node_modules/systemjs/dist/system.src.js"></script>
    
    <!-- Include anychart component -->
    <script src="node_modules/anychart/dist/anychart-bundle.min.js"></script>

    <!-- General section, this configuration adds all the requirements to run -->
    <script src="systemjs.config.js"></script>
    <script>
        //Import of application to run.
        System.import('app').catch(function(err){ console.error(err); });
    </script>
</head>

<body>
<my-app>Loading AppComponent content here ...</my-app>
</body>
</html>

Run the demo

  1. Go to any of demos directory
  2. Install all dependencies with npm install command.
  3. Start the demo with npm run start command.

Build

  1. Despite the AnyChart-Angular2 integration is available with package managers, the license allows to modify and use it freely (though you need AnyChart license to use the library itself in commercial projects). This quick start guide clarifies the structure of integration project and explains how it works and how it can be used.

If the integration is cloned from GitHub and Node Package Manager (npm command) is available in command line, the following command compiles source code to dist/ directory:

npm run build
  1. If needed, package.json of demo-application can be configured to declare custom run-commands and to add required dependencies excepting already included.

  2. Run npm install command to load all required npm modules.

  3. Configure systemjs.config.js to declare the mapping of dependencies of application (see any demo to see the basic configuration). In 'map'-section AnyChart integration library is declared:

...
'anychart-angular2': 'node_modules/anychart-angular2'
  1. In 'packages'-section anychart-angular2 library is declared:
'anychart-angular2': {
  main: 'index'
}
  1. These actions allow to use anychart-angular2 integration in an application like one described in Quick start.

  2. Since 'app' folder is declared in systemjs.config.js as application root directory, the application's Angular2 modules and components can be created right there.

Package directory

├── def
│   ├── anychart.d.ts
│   ...
├── dist
│   ├── anychart.directive.d.ts
│   ├── anychart.directive.js
│       ...
├── src
│   ├── anychart.directive.ts
│   ├── anychart.service.ts
│       ...
│   components.d.ts
│   components.js
│   package.json
│   LICENSE
│   README.md
│   ...
  • def/anychart.d.ts - Anychart typescript definition file. Used to correctly compile source code to dist/ directory.

  • dist/ - Output directory that contains compiled js and d.ts files. The general component declarations (components.js and components.d.ts) rely on this directory content.

  • src/ - Source code directory. Contains Angular2-compatible components to provide AnyChart integration.

  • components.d.ts and components.js - Components definition. Relies on dist/ directory content.

  • package.json - Package manager configuration file. Also contains descriptions of available run commands (including build command) and the list of dependencies.

Demos overview

See these samples to learn how things work:

Contacts

Links

License

AnyChart Angular2 plugin includes two parts:

  • code of the plugin that allows to use Javascript library (in this case, AnyChart) with Angular Framework. You can use, edit, modify it, use it with other Javascript libraries without any restrictions. It is released under Apache 2.0 License.
  • AnyChart JavaScript library. It is released under Commercial license. You can test this plugin with the trial version of AnyChart. Our trial version is not limited by time and doesn't contain any feature limitations. Check details here

If you have any questions regarding licensing - please contact us. [email protected]

Analytics