Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ember-highcharts

Package Overview
Dependencies
Maintainers
1
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-highcharts - npm Package Compare versions

Comparing version 0.4.2 to 0.4.3

.npmignore

61

addon/components/high-charts.js

@@ -10,3 +10,2 @@ import Ember from 'ember';

set,
merge,
on,

@@ -17,2 +16,4 @@ run,

const assign = Ember.assign || Ember.merge;
export default Component.extend({

@@ -37,3 +38,3 @@ classNames: ['highcharts-wrapper'],

return merge(defaults, chartOptions);
return assign(defaults, chartOptions);
}),

@@ -44,9 +45,8 @@

if (!(get(this, 'content') && get(this, 'chart'))) {
const { content, chart, mode } = this.getProperties('content', 'chart', 'mode');
if (!content || !chart) {
return;
}
let chart = get(this, 'chart');
let noData = chart.get('noData');
if (noData != null) {

@@ -56,25 +56,52 @@ noData.remove();

let numToRemove = chart.series.length - get(this, 'content').length;
const isStockChart = mode === 'StockChart';
for (let i = numToRemove; i > 0; i--) {
let lastIndex = chart.series.length - 1;
// create maps to make series data easier to work with
const contentSeriesMap = content.reduce((contentSeriesMap, contentSeries) => {
contentSeriesMap[contentSeries.name] = contentSeries;
return contentSeriesMap;
}, {});
if (chart.series[lastIndex]) {
chart.series[lastIndex].remove(false);
const chartSeriesMap = chart.series.reduce((chartSeriesMap, chartSeries) => {
chartSeriesMap[chartSeries.name] = chartSeries;
return chartSeriesMap;
}, {});
// remove and update current series
const chartSeriesToRemove = [];
chart.series.forEach((series) => {
if (isStockChart && series.name === 'Navigator') {
return;
}
}
const contentSeries = contentSeriesMap[series.name];
get(this, 'content').forEach((series, idx) => {
if (!contentSeries) {
return chartSeriesToRemove.push(series);
}
if (chart.series[idx]) {
return chart.series[idx].setData(series.data, false);
} else {
return chart.addSeries(series, false);
series.setData(contentSeries.data, false);
});
chartSeriesToRemove.forEach((series) => series.remove(false));
// add new series
content.forEach((contentSeries) => {
if (!chartSeriesMap.hasOwnProperty(contentSeries.name)) {
chart.addSeries(contentSeries, false);
}
});
// reset navigator data
if (isStockChart && chart.xAxis.length) {
chart.xAxis[0].setExtremes();
}
return chart.redraw();
},

@@ -81,0 +108,0 @@

# Changelog
## 0.4.3
- Clean up tests
- Upgrade to ember-cli 2.4.2
- Add ember observer and code climate badges
- Changed merge -> assign to silent deprecation warning in Ember 2.5
- Update highstock component to be interactive
- Refactor logic for handling chart updates
## 0.4.2

@@ -4,0 +13,0 @@

{
"name": "ember-highcharts",
"version": "0.4.2",
"version": "0.4.3",
"description": "A Highcharts, HighStock and HighMaps component for ember cli",

@@ -24,23 +24,24 @@ "directories": {

"ember-cli-babel": "^5.1.5",
"ember-getowner-polyfill": "1.0.0"
"ember-getowner-polyfill": "1.0.1"
},
"devDependencies": {
"broccoli-asset-rev": "^2.2.0",
"ember-cli": "1.13.15",
"ember-cli": "2.4.2",
"ember-cli-app-version": "^1.0.0",
"ember-cli-content-security-policy": "0.4.0",
"ember-cli-dependency-checker": "^1.1.0",
"ember-cli-dependency-checker": "^1.2.0",
"ember-cli-htmlbars": "^1.0.1",
"ember-cli-htmlbars-inline-precompile": "^0.3.1",
"ember-cli-ic-ajax": "0.2.4",
"ember-cli-inject-live-reload": "^1.3.1",
"ember-cli-qunit": "^1.0.4",
"ember-cli-qunit": "^1.2.1",
"ember-cli-release": "0.2.8",
"ember-cli-sri": "^1.2.0",
"ember-cli-sri": "^2.1.0",
"ember-cli-uglify": "^1.2.0",
"ember-disable-prototype-extensions": "^1.0.0",
"ember-disable-prototype-extensions": "^1.1.0",
"ember-disable-proxy-controllers": "^1.0.1",
"ember-export-application-global": "^1.0.4",
"ember-try": "~0.0.8",
"highcharts": "^4.2.1"
"ember-load-initializers": "^0.5.1",
"ember-resolver": "^2.0.3",
"ember-try": "~0.1.2",
"highcharts": "^4.2.4",
"loader.js": "^4.0.1"
},

@@ -47,0 +48,0 @@ "keywords": [

@@ -1,3 +0,8 @@

# Ember-highcharts [![Build Status](https://travis-ci.org/ahmadsoe/ember-highcharts.svg)](https://travis-ci.org/ahmadsoe/ember-highcharts) [![npm version](https://badge.fury.io/js/ember-highcharts.svg)](http://badge.fury.io/js/ember-highcharts)
[![Build Status](https://travis-ci.org/ahmadsoe/ember-highcharts.svg?branch=master)](https://travis-ci.org/ahmadsoe/ember-highcharts)
[![Ember Observer Score](http://emberobserver.com/badges/ember-highcharts.svg)](http://emberobserver.com/addons/ember-highcharts)
[![Code Climate](https://codeclimate.com/github/ahmadsoe/ember-highcharts/badges/gpa.svg)](https://codeclimate.com/github/ahmadsoe/ember-highcharts)
[![npm version](https://badge.fury.io/js/ember-highcharts.svg)](https://badge.fury.io/js/ember-highcharts)
# Ember-highcharts
A [Highcharts](http://www.highcharts.com/products/highcharts), [Highstock](http://www.highcharts.com/products/highstock) and [Highmaps](http://www.highcharts.com/products/highmaps) component for [Ember CLI](http://www.ember-cli.com/).

@@ -4,0 +9,0 @@

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc