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

dygraphs

Package Overview
Dependencies
Maintainers
5
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dygraphs - npm Package Compare versions

Comparing version 2.0.0 to 2.1.0

2

package.json
{
"name": "dygraphs",
"version": "2.0.0",
"version": "2.1.0",
"description": "dygraphs is a fast, flexible open source JavaScript charting library.",

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

@@ -691,3 +691,4 @@ /**

canvasx: context.dragEndX,
canvasy: context.dragEndY
canvasy: context.dragEndY,
cancelable: true
};

@@ -694,0 +695,0 @@ if (g.cascadeEvents_('dblclick', e)) {

@@ -243,2 +243,8 @@ /**

},
"pixelRatio": {
"default": "(devicePixelRatio / context.backingStoreRatio)",
"labels": ["Overall display"],
"type": "float",
"description": "Overrides the pixel ratio scaling factor for the canvas's 2d context. Ordinarily, this is set to the devicePixelRatio / (context.backingStoreRatio || 1), so on mobile devices, where the devicePixelRatio can be somewhere around 3, performance can be improved by overriding this value to something less precise, like 1, at the expense of resolution."
},
"interactionModel": {

@@ -513,3 +519,3 @@ "default": "...",

"type": "float",
"description": "A value representing the farthest a graph may be panned, in percent of the display. For example, a value of 0.1 means that the graph can only be panned 10% pased the edges of the displayed values. null means no bounds."
"description": "A value representing the farthest a graph may be panned, in percent of the display. For example, a value of 0.1 means that the graph can only be panned 10% passed the edges of the displayed values. null means no bounds."
},

@@ -516,0 +522,0 @@ "title": {

@@ -233,25 +233,32 @@ /**

var Granularity = {
SECONDLY: 0,
TWO_SECONDLY: 1,
FIVE_SECONDLY: 2,
TEN_SECONDLY: 3,
THIRTY_SECONDLY: 4,
MINUTELY: 5,
TWO_MINUTELY: 6,
FIVE_MINUTELY: 7,
TEN_MINUTELY: 8,
THIRTY_MINUTELY: 9,
HOURLY: 10,
TWO_HOURLY: 11,
SIX_HOURLY: 12,
DAILY: 13,
TWO_DAILY: 14,
WEEKLY: 15,
MONTHLY: 16,
QUARTERLY: 17,
BIANNUAL: 18,
ANNUAL: 19,
DECADAL: 20,
CENTENNIAL: 21,
NUM_GRANULARITIES: 22
MILLISECONDLY: 0,
TWO_MILLISECONDLY: 1,
FIVE_MILLISECONDLY: 2,
TEN_MILLISECONDLY: 3,
FIFTY_MILLISECONDLY: 4,
HUNDRED_MILLISECONDLY: 5,
FIVE_HUNDRED_MILLISECONDLY: 6,
SECONDLY: 7,
TWO_SECONDLY: 8,
FIVE_SECONDLY: 9,
TEN_SECONDLY: 10,
THIRTY_SECONDLY: 11,
MINUTELY: 12,
TWO_MINUTELY: 13,
FIVE_MINUTELY: 14,
TEN_MINUTELY: 15,
THIRTY_MINUTELY: 16,
HOURLY: 17,
TWO_HOURLY: 18,
SIX_HOURLY: 19,
DAILY: 20,
TWO_DAILY: 21,
WEEKLY: 22,
MONTHLY: 23,
QUARTERLY: 24,
BIANNUAL: 25,
ANNUAL: 26,
DECADAL: 27,
CENTENNIAL: 28,
NUM_GRANULARITIES: 29
};

@@ -287,2 +294,9 @@

var TICK_PLACEMENT = [];
TICK_PLACEMENT[Granularity.MILLISECONDLY] = { datefield: DateField.DATEFIELD_MS, step: 1, spacing: 1 };
TICK_PLACEMENT[Granularity.TWO_MILLISECONDLY] = { datefield: DateField.DATEFIELD_MS, step: 2, spacing: 2 };
TICK_PLACEMENT[Granularity.FIVE_MILLISECONDLY] = { datefield: DateField.DATEFIELD_MS, step: 5, spacing: 5 };
TICK_PLACEMENT[Granularity.TEN_MILLISECONDLY] = { datefield: DateField.DATEFIELD_MS, step: 10, spacing: 10 };
TICK_PLACEMENT[Granularity.FIFTY_MILLISECONDLY] = { datefield: DateField.DATEFIELD_MS, step: 50, spacing: 50 };
TICK_PLACEMENT[Granularity.HUNDRED_MILLISECONDLY] = { datefield: DateField.DATEFIELD_MS, step: 100, spacing: 100 };
TICK_PLACEMENT[Granularity.FIVE_HUNDRED_MILLISECONDLY] = { datefield: DateField.DATEFIELD_MS, step: 500, spacing: 500 };
TICK_PLACEMENT[Granularity.SECONDLY] = { datefield: DateField.DATEFIELD_SS, step: 1, spacing: 1000 * 1 };

@@ -289,0 +303,0 @@ TICK_PLACEMENT[Granularity.TWO_SECONDLY] = { datefield: DateField.DATEFIELD_SS, step: 2, spacing: 1000 * 2 };

@@ -95,3 +95,3 @@ /**

//
// Multiply both sides by the right-side demoninator.
// Multiply both sides by the right-side denominator.
// pct * (log(xRange[1] - log(xRange[0]))) = log(x) - log(xRange[0])

@@ -364,3 +364,3 @@ //

/**
* Number formatting function which mimicks the behavior of %g in printf, i.e.
* Number formatting function which mimics the behavior of %g in printf, i.e.
* either exponential or fixed format (without trailing 0s) is used depending on

@@ -519,3 +519,3 @@ * the length of the generated string. The advantage of this format is that

* @param {number} time The JavaScript time value (ms since epoch)
* @param {boolean} utc Wether output UTC or local time
* @param {boolean} utc Whether output UTC or local time
* @return {string} A date of one of these forms:

@@ -1428,2 +1428,8 @@ * "YYYY/MM/DD", "YYYY/MM/DD HH:MM" or "YYYY/MM/DD HH:MM:SS"

return zeropad(day) + ' ' + SHORT_MONTH_NAMES_[month];
} else if (granularity < DygraphTickers.Granularity.SECONDLY) {
// e.g. 40.310 (meaning 40 seconds and 310 milliseconds)
var str = "" + millis;
return zeropad(secs) + "." + ('000' + str).substring(str.length);
} else if (granularity > DygraphTickers.Granularity.MINUTELY) {
return hmsString_(hours, mins, secs, 0);
} else {

@@ -1430,0 +1436,0 @@ return hmsString_(hours, mins, secs, millis);

@@ -182,4 +182,4 @@ /**

rangeSelector.prototype.resize_ = function () {
function setElementRect(canvas, context, rect) {
var canvasScale = utils.getContextPixelRatio(context);
function setElementRect(canvas, context, rect, pixelRatioOption) {
var canvasScale = pixelRatioOption || utils.getContextPixelRatio(context);

@@ -211,4 +211,5 @@ canvas.style.top = rect.y + 'px';

setElementRect(this.bgcanvas_, this.bgcanvas_ctx_, this.canvasRect_);
setElementRect(this.fgcanvas_, this.fgcanvas_ctx_, this.canvasRect_);
var pixelRatioOption = this.dygraph_.getNumericOption('pixelRatio');
setElementRect(this.bgcanvas_, this.bgcanvas_ctx_, this.canvasRect_, pixelRatioOption);
setElementRect(this.fgcanvas_, this.fgcanvas_ctx_, this.canvasRect_, pixelRatioOption);
};

@@ -215,0 +216,0 @@

@@ -709,3 +709,4 @@ /**

canvasx: context.dragEndX,
canvasy: context.dragEndY
canvasy: context.dragEndY,
cancelable: true,
};

@@ -712,0 +713,0 @@ if (g.cascadeEvents_('dblclick', e)) {

@@ -302,2 +302,8 @@ /**

},
"pixelRatio": {
"default": "(devicePixelRatio / context.backingStoreRatio)",
"labels": ["Overall display"],
"type": "float",
"description": "Overrides the pixel ratio scaling factor for the canvas's 2d context. Ordinarily, this is set to the devicePixelRatio / (context.backingStoreRatio || 1), so on mobile devices, where the devicePixelRatio can be somewhere around 3, performance can be improved by overriding this value to something less precise, like 1, at the expense of resolution."
},
"interactionModel": {

@@ -590,3 +596,3 @@ "default": "...",

"type": "float",
"description": "A value representing the farthest a graph may be panned, in percent of the display. For example, a value of 0.1 means that the graph can only be panned 10% pased the edges of the displayed values. null means no bounds."
"description": "A value representing the farthest a graph may be panned, in percent of the display. For example, a value of 0.1 means that the graph can only be panned 10% passed the edges of the displayed values. null means no bounds."
},

@@ -593,0 +599,0 @@ "title": {

@@ -223,25 +223,32 @@ /**

export var Granularity = {
SECONDLY: 0,
TWO_SECONDLY: 1,
FIVE_SECONDLY: 2,
TEN_SECONDLY: 3,
THIRTY_SECONDLY : 4,
MINUTELY: 5,
TWO_MINUTELY: 6,
FIVE_MINUTELY: 7,
TEN_MINUTELY: 8,
THIRTY_MINUTELY: 9,
HOURLY: 10,
TWO_HOURLY: 11,
SIX_HOURLY: 12,
DAILY: 13,
TWO_DAILY: 14,
WEEKLY: 15,
MONTHLY: 16,
QUARTERLY: 17,
BIANNUAL: 18,
ANNUAL: 19,
DECADAL: 20,
CENTENNIAL: 21,
NUM_GRANULARITIES: 22
MILLISECONDLY: 0,
TWO_MILLISECONDLY: 1,
FIVE_MILLISECONDLY: 2,
TEN_MILLISECONDLY: 3,
FIFTY_MILLISECONDLY: 4,
HUNDRED_MILLISECONDLY: 5,
FIVE_HUNDRED_MILLISECONDLY: 6,
SECONDLY: 7,
TWO_SECONDLY: 8,
FIVE_SECONDLY: 9,
TEN_SECONDLY: 10,
THIRTY_SECONDLY: 11,
MINUTELY: 12,
TWO_MINUTELY: 13,
FIVE_MINUTELY: 14,
TEN_MINUTELY: 15,
THIRTY_MINUTELY: 16,
HOURLY: 17,
TWO_HOURLY: 18,
SIX_HOURLY: 19,
DAILY: 20,
TWO_DAILY: 21,
WEEKLY: 22,
MONTHLY: 23,
QUARTERLY: 24,
BIANNUAL: 25,
ANNUAL: 26,
DECADAL: 27,
CENTENNIAL: 28,
NUM_GRANULARITIES: 29
}

@@ -277,2 +284,9 @@

var TICK_PLACEMENT = [];
TICK_PLACEMENT[Granularity.MILLISECONDLY] = {datefield: DateField.DATEFIELD_MS, step: 1, spacing: 1};
TICK_PLACEMENT[Granularity.TWO_MILLISECONDLY] = {datefield: DateField.DATEFIELD_MS, step: 2, spacing: 2};
TICK_PLACEMENT[Granularity.FIVE_MILLISECONDLY] = {datefield: DateField.DATEFIELD_MS, step: 5, spacing: 5};
TICK_PLACEMENT[Granularity.TEN_MILLISECONDLY] = {datefield: DateField.DATEFIELD_MS, step: 10, spacing: 10};
TICK_PLACEMENT[Granularity.FIFTY_MILLISECONDLY] = {datefield: DateField.DATEFIELD_MS, step: 50, spacing: 50};
TICK_PLACEMENT[Granularity.HUNDRED_MILLISECONDLY] = {datefield: DateField.DATEFIELD_MS, step: 100, spacing: 100};
TICK_PLACEMENT[Granularity.FIVE_HUNDRED_MILLISECONDLY] = {datefield: DateField.DATEFIELD_MS, step: 500, spacing: 500};
TICK_PLACEMENT[Granularity.SECONDLY] = {datefield: DateField.DATEFIELD_SS, step: 1, spacing: 1000 * 1};

@@ -279,0 +293,0 @@ TICK_PLACEMENT[Granularity.TWO_SECONDLY] = {datefield: DateField.DATEFIELD_SS, step: 2, spacing: 1000 * 2};

@@ -45,3 +45,3 @@ /**

//
// Multiply both sides by the right-side demoninator.
// Multiply both sides by the right-side denominator.
// pct * (log(xRange[1] - log(xRange[0]))) = log(x) - log(xRange[0])

@@ -269,3 +269,3 @@ //

/**
* Number formatting function which mimicks the behavior of %g in printf, i.e.
* Number formatting function which mimics the behavior of %g in printf, i.e.
* either exponential or fixed format (without trailing 0s) is used depending on

@@ -382,3 +382,3 @@ * the length of the generated string. The advantage of this format is that

* @param {number} time The JavaScript time value (ms since epoch)
* @param {boolean} utc Wether output UTC or local time
* @param {boolean} utc Whether output UTC or local time
* @return {string} A date of one of these forms:

@@ -1220,2 +1220,8 @@ * "YYYY/MM/DD", "YYYY/MM/DD HH:MM" or "YYYY/MM/DD HH:MM:SS"

return zeropad(day) + '&#160;' + SHORT_MONTH_NAMES_[month];
} else if (granularity < DygraphTickers.Granularity.SECONDLY) {
// e.g. 40.310 (meaning 40 seconds and 310 milliseconds)
var str = "" + millis;
return zeropad(secs) + "." + ('000'+str).substring(str.length);
} else if (granularity > DygraphTickers.Granularity.MINUTELY) {
return hmsString_(hours, mins, secs, 0);
} else {

@@ -1222,0 +1228,0 @@ return hmsString_(hours, mins, secs, millis);

@@ -164,4 +164,4 @@ /**

rangeSelector.prototype.resize_ = function() {
function setElementRect(canvas, context, rect) {
var canvasScale = utils.getContextPixelRatio(context);
function setElementRect(canvas, context, rect, pixelRatioOption) {
var canvasScale = pixelRatioOption || utils.getContextPixelRatio(context);

@@ -193,4 +193,5 @@ canvas.style.top = rect.y + 'px';

setElementRect(this.bgcanvas_, this.bgcanvas_ctx_, this.canvasRect_);
setElementRect(this.fgcanvas_, this.fgcanvas_ctx_, this.canvasRect_);
var pixelRatioOption = this.dygraph_.getNumericOption('pixelRatio');
setElementRect(this.bgcanvas_, this.bgcanvas_ctx_, this.canvasRect_, pixelRatioOption);
setElementRect(this.fgcanvas_, this.fgcanvas_ctx_, this.canvasRect_, pixelRatioOption);
};

@@ -197,0 +198,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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