Socket
Socket
Sign inDemoInstall

ember-apexchartsjs

Package Overview
Dependencies
424
Maintainers
2
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    ember-apexchartsjs

A simple ember wrapper around apexcharts


Version published
Weekly downloads
10
decreased by-9.09%
Maintainers
2
Install size
46.2 MB
Created
Weekly downloads
 

Readme

Source

ember-apexchartsjs

A simple ember wrapper for apexcharts

Travis

Compatibility

  • Ember.js v3.16 or above
  • Ember CLI v2.13 or above
  • Node.js v10 or above

Installation

ember install ember-apexchartsjs

Usage

Option 1: Type, height, width series, chartOptions as arguments
type = 'bar';
width = '800px';
height = '400px';
series = [{
  name: 'Sales',
  data: [30,40,35,50,49,60,70,91,125]
}];
chartOptions = {
  title: {
    text: 'Bar Chart'
  },
  xaxis: {
    categories: [1991,1992,1993,1994,1995,1996,1997, 1998,1999]
  }
}
<ApexChart
 @type={{this.type}}
 @width={{this.width}}
 @height={{this.height}}
 @series={{this.series}}
 @chartOptions={{this.chartOptions}}
/>
Option 2: chartOptions as the only argument
const chartOptions = {
  chart: {
    height: '400px',
    type: 'line',
    width: '800px'
  },
  series: [{
    data: [30,40,35,50,49,60,70,91,125]
  }],
  xaxis: {
    categories: [1991,1992,1993,1994,1995,1996,1997, 1998,1999]
  }
}
<ApexChart
  @chartOptions={{this.chartOptions}}
/>

The complete set of supported chart types and chart options can be found here: Apexcharts Documentation

Actions

All the apexchart events can be specified as arguments to the ApexChart component. The example below potrays the use of click and beforeMount events.

type = 'bar';
series = [{
  name: 'Sales',
  data: [30,40,35,50,49,60,70,91,125]
}];

@action
clickHandler() {
  //click handler
}

@action
beforeMountHandler() {
  //before mount handler
}
<ApexChart
 @type={{this.type}}
 @series={{this.series}}
 @onClick={{this.clickHandler}}
 @onBeforeMount={{this.beforeMountHandler}}
/>

Complete list of action arguments and their corresponding apexchart event below:

Apexchart eventAction Argument
beforeMountonBeforeMount
beforeZoomonBeforeZoom
clickonClick
dataPointSelectiononDataPointSelection
dataPointMouseEnteronDataPointMouseEnter
dataPointMouseLeaveonDataPointMouseLeave
legendClickonLegendClick
markerClickonMarkerClick
mouseMoveonMouseMove
mountedonMounted
scrolledonScrolled
selectiononSelection
updatedonUpdated
zoomedonZoomed

Contributing

See the Contributing guide for details.

License

This project is licensed under the MIT License.

Keywords

FAQs

Last updated on 25 Jun 2021

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc