New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

coconut-graph

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

coconut-graph - npm Package Compare versions

Comparing version 1.0.13 to 1.0.14

debug/spinner.html

1

index.js

@@ -5,2 +5,3 @@ (function () {

Loader: require('./src/loader.js'),
normalize: require('./src/normalize.js'),
nl_NL: require('./src/d3.nl_nl.js'),

@@ -7,0 +8,0 @@ util: require('./src/util.js')

2

package.json
{
"name": "coconut-graph",
"version": "1.0.13",
"version": "1.0.14",
"description": "Graph lib using d3 ",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -11,2 +11,4 @@ var Class = require('./class.js');

var spinner = require('./spinner.js');
var Graph = Class.extend({

@@ -20,2 +22,3 @@ options: {

height: 260,
spinner: true,

@@ -27,8 +30,2 @@ axes: {

},
statics: {
parseDatetime: function (s) {
return (typeof s === 'string') ?
d3.time.format('%Y-%m-%dT%H:%M:%S').parse(s) : s;
}
},

@@ -64,2 +61,7 @@ initialize: function (options) {

this._initAxes();
this.spinner = spinner(this.container, {
height: this.options.height,
width: this.width()
});
this.spinner();

@@ -131,3 +133,3 @@ // Attach onresize listener

this.plotContainer = svg.append('g');
this.plotContainer = svg.append('g'); //.attr('plots');
this.svg = svg;

@@ -189,2 +191,3 @@ },

}
this.spinner.remove();
this.firstRender = false;

@@ -191,0 +194,0 @@ },

@@ -7,2 +7,3 @@ var Class = require('./class.js');

var Graph = require('./graph.js');
var normalize = require('./normalize.js');

@@ -25,2 +26,3 @@ module.exports = Class.extend({

load: function (url, callback) {

@@ -52,3 +54,3 @@ var self = this;

this.meta = response.meta;
response.data = this.normalize(response.data);
response.data = normalize(response.data);

@@ -71,16 +73,2 @@ this.eachGraph(function (graph, key) {

normalize: function (data) {
if (data.extents) {
data.extents = data.extents.map(Graph.parseDatetime);
}
var timestamp_idx = data.keys.indexOf('timestamp');
if (timestamp_idx !== -1) {
data.values.forEach(function (it, i) {
data.values[i][timestamp_idx] = Graph.parseDatetime(it[timestamp_idx]);
}, this);
}
return data;
},
onResize: function () {

@@ -87,0 +75,0 @@ this.eachGraph(function (graph) {

@@ -80,3 +80,3 @@ var extend = require('extend');

graph.svg.append('g').attr({
class: 'x axis ' + (axis.class || ''),
class: 'axis x ' + (axis.class || ''),
transform: 'translate(0, ' + height + ')'

@@ -83,0 +83,0 @@ });

@@ -14,3 +14,13 @@ /* globals

// hack the transition function of d3's select API
d3.selection.prototype.transition = function() { return this; };
// this is very ugly and only works for the order of chaining used in spinner.js
d3.selection.prototype.transition = function () {
this.ease = function () {
this.duration = function () {
this.attrTween = function () { return this; };
return this;
};
return this;
};
return this;
};
})();

@@ -17,0 +27,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