0.0.8 • Published 2 months ago

encharting v0.0.8

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

Getting Started

Encharting is an Angular library designed to simplify the process of 2D charts generation.

Installation

After creating a new Angular project simply run:

npm install encharting --save

Usage

  • Firstly, import EnchartingDirective in your app module (or any other proper Angular Module, Standalone Components also work).

    import { EnchartingDirective } from 'encharting';
    
    @NgModule({
        imports: [
            EnchartingDirective
        ],
    })
    export class AppModule {}
  • Then use the encharting directive in the HTML of your Angular component:

    <div encharting></div>

Input API

NameTypeDefaultDescription
@Input configChart{ components: [] }The chart configuration object
@Input widthstring600pxThe width of the canvas element (use same css values)
@Input heightstring400pxThe height of the canvas element (use same css values)
@Input themeEnchartingThemeundefinedThe theme of the chart
@Input fontFamilystringThe Font Family of the chart

Output API

NameTypeDescription
@Output (onClick)ECElementEventEmits an ECElementEvent object when clicking on a component of the chart (for example a point of a line)
@Output (onBlankClick)BasePointEmits a BasePoint object when clicking on a blank space of the chart