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

chart.js

Package Overview
Dependencies
Maintainers
5
Versions
102
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chart.js - npm Package Compare versions

Comparing version 3.0.0-beta.6 to 3.0.0-beta.7

4

dist/chart.esm.d.ts
/*!
* Chart.js v3.0.0-beta.6
* Chart.js v3.0.0-beta.7
* https://www.chartjs.org

@@ -7,2 +7,2 @@ * (c) 2020 Chart.js Contributors

*/
export { J as ActiveDataPoint, K as ActiveElement, E as Animation, aW as AnimationCommonSpec, F as AnimationEvent, aZ as AnimationOptions, aX as AnimationPropertySpec, aY as AnimationSpecContainer, H as Animations, G as Animator, ap as ArcElement, ao as ArcHoverOptions, an as ArcOptions, am as ArcProps, b as BarController, a as BarControllerChartOptions, B as BarControllerDatasetOptions, aF as BarElement, aE as BarHoverOptions, aC as BarOptions, aB as BarProps, b0 as BasePlatform, b1 as BasicPlatform, aD as BorderRadius, e as BubbleController, c as BubbleControllerDatasetOptions, d as BubbleDataPoint, bs as CartesianScaleOptions, bG as CartesianScaleTypeRegistry, bu as CategoryScale, bt as CategoryScaleOptions, M as Chart, aM as ChartArea, aK as ChartComponent, a8 as ChartComponentLike, bU as ChartConfiguration, bT as ChartData, bS as ChartDataset, bR as ChartDatasetProperties, aI as ChartEvent, N as ChartItem, I as ChartMeta, bP as ChartOptions, bL as ChartType, bK as ChartTypeRegistry, aH as Color, ak as CommonHoverOptions, aj as CommonOptions, b6 as ComplexFillTarget, C as ControllerDatasetOptions, aU as CoreChartOptions, aS as CoreInteractionOptions, ac as CoreScaleOptions, bN as DatasetChartOptions, Q as DatasetController, T as DatasetControllerChartComponent, A as DateAdapter, z as DateAdapterBase, bE as DeepPartial, bQ as DefaultDataPoint, V as Defaults, bF as DistributiveArray, b2 as DomPlatform, k as DoughnutAnimationOptions, n as DoughnutController, l as DoughnutControllerChartOptions, D as DoughnutControllerDatasetOptions, m as DoughnutDataPoint, aV as EasingFunction, X as Element, aG as ElementChartOptions, b5 as FillTarget, b3 as Filler, b7 as FillerControllerDatasetOptions, b4 as FillerOptions, a_ as FontSpec, bq as GridLineOptions, aT as HoverInteractionOptions, a2 as Interaction, Z as InteractionItem, a1 as InteractionMode, $ as InteractionModeFunction, a0 as InteractionModeMap, Y as InteractionOptions, a4 as LayoutItem, a3 as LayoutPosition, b8 as Legend, bc as LegendChartOptions, ba as LegendElement, b9 as LegendItem, bb as LegendOptions, g as LineController, f as LineControllerChartOptions, L as LineControllerDatasetOptions, at as LineElement, as as LineHoverOptions, ar as LineOptions, aq as LineProps, bw as LinearScale, bv as LinearScaleOptions, by as LogarithmicScale, bx as LogarithmicScaleOptions, P as ParsingOptions, q as PieAnimationOptions, s as PieController, p as PieControllerChartOptions, o as PieControllerDatasetOptions, r as PieDataPoint, a7 as Plugin, bp as PluginChartOptions, bo as PluginOptions, a6 as PluginService, aJ as Point, aA as PointElement, ax as PointHoverOptions, aw as PointOptions, az as PointPrefixedHoverOptions, ay as PointPrefixedOptions, au as PointProps, av as PointStyle, u as PolarAreaAnimationOptions, w as PolarAreaController, v as PolarAreaControllerChartOptions, t as PolarAreaControllerDatasetOptions, y as RadarController, x as RadarControllerChartOptions, R as RadarControllerDatasetOptions, bD as RadialLinearScale, bC as RadialLinearScaleOptions, bH as RadialScaleTypeRegistry, a9 as Registry, ad as Scale, bO as ScaleChartOptions, bM as ScaleOptions, bJ as ScaleType, bI as ScaleTypeRegistry, j as ScatterController, i as ScatterControllerChartOptions, S as ScatterControllerDatasetOptions, h as ScatterDataPoint, af as ScriptAbleScale, ae as ScriptAbleScaleContext, aO as Scriptable, aQ as ScriptableAndArray, aR as ScriptableAndArrayOptions, aN as ScriptableContext, aP as ScriptableOptions, al as Segment, a$ as TextAlign, ab as Tick, br as TickOptions, ag as Ticks, bA as TimeScale, bz as TimeScaleOptions, bB as TimeSeriesScale, aL as TimeUnit, bd as Title, bf as TitleChartOptions, be as TitleOptions, bi as Tooltip, bg as TooltipAlignment, bj as TooltipCallbacks, bm as TooltipChartOptions, bn as TooltipItem, bh as TooltipModel, bl as TooltipOptions, bk as TooltipPlugin, ah as TypedRegistry, O as UpdateMode, U as UpdateModeEnum, ai as VisualElement, _ as _adapters, W as defaults, a5 as layouts, aa as registry } from './chunks/index';
export { J as ActiveDataPoint, K as ActiveElement, E as Animation, aW as AnimationCommonSpec, F as AnimationEvent, aZ as AnimationOptions, aX as AnimationPropertySpec, aY as AnimationSpecContainer, H as Animations, G as Animator, V as AnyObject, ap as ArcElement, ao as ArcHoverOptions, an as ArcOptions, am as ArcProps, b as BarController, a as BarControllerChartOptions, B as BarControllerDatasetOptions, aF as BarElement, aE as BarHoverOptions, aC as BarOptions, aB as BarProps, b0 as BasePlatform, b1 as BasicPlatform, aD as BorderRadius, e as BubbleController, c as BubbleControllerDatasetOptions, d as BubbleDataPoint, bo as CartesianScaleOptions, bC as CartesianScaleTypeRegistry, bq as CategoryScale, bp as CategoryScaleOptions, M as Chart, aM as ChartArea, aK as ChartComponent, a8 as ChartComponentLike, bQ as ChartConfiguration, bP as ChartData, bO as ChartDataset, bN as ChartDatasetProperties, aI as ChartEvent, N as ChartItem, I as ChartMeta, bL as ChartOptions, bH as ChartType, bG as ChartTypeRegistry, aH as Color, ak as CommonHoverOptions, aj as CommonOptions, b6 as ComplexFillTarget, C as ControllerDatasetOptions, aU as CoreChartOptions, aS as CoreInteractionOptions, ac as CoreScaleOptions, bJ as DatasetChartOptions, Q as DatasetController, T as DatasetControllerChartComponent, A as DateAdapter, z as DateAdapterBase, bA as DeepPartial, bM as DefaultDataPoint, W as Defaults, bB as DistributiveArray, b2 as DomPlatform, k as DoughnutAnimationOptions, n as DoughnutController, l as DoughnutControllerChartOptions, D as DoughnutControllerDatasetOptions, m as DoughnutDataPoint, aV as EasingFunction, Y as Element, aG as ElementChartOptions, b5 as FillTarget, b3 as Filler, b7 as FillerControllerDatasetOptions, b4 as FillerOptions, a_ as FontSpec, bm as GridLineOptions, aT as HoverInteractionOptions, a3 as Interaction, $ as InteractionItem, a2 as InteractionMode, a0 as InteractionModeFunction, a1 as InteractionModeMap, Z as InteractionOptions, a5 as LayoutItem, a4 as LayoutPosition, b8 as Legend, ba as LegendElement, b9 as LegendItem, bb as LegendOptions, g as LineController, f as LineControllerChartOptions, L as LineControllerDatasetOptions, at as LineElement, as as LineHoverOptions, ar as LineOptions, aq as LineProps, bs as LinearScale, br as LinearScaleOptions, bu as LogarithmicScale, bt as LogarithmicScaleOptions, P as ParsingOptions, q as PieAnimationOptions, s as PieController, p as PieControllerChartOptions, o as PieControllerDatasetOptions, r as PieDataPoint, a7 as Plugin, bl as PluginOptions, aJ as Point, aA as PointElement, ax as PointHoverOptions, aw as PointOptions, az as PointPrefixedHoverOptions, ay as PointPrefixedOptions, au as PointProps, av as PointStyle, u as PolarAreaAnimationOptions, w as PolarAreaController, v as PolarAreaControllerChartOptions, t as PolarAreaControllerDatasetOptions, y as RadarController, x as RadarControllerChartOptions, R as RadarControllerDatasetOptions, bz as RadialLinearScale, by as RadialLinearScaleOptions, bD as RadialScaleTypeRegistry, a9 as Registry, ad as Scale, bK as ScaleChartOptions, bI as ScaleOptions, bF as ScaleType, bE as ScaleTypeRegistry, j as ScatterController, i as ScatterControllerChartOptions, S as ScatterControllerDatasetOptions, h as ScatterDataPoint, af as ScriptAbleScale, ae as ScriptAbleScaleContext, aO as Scriptable, aQ as ScriptableAndArray, aR as ScriptableAndArrayOptions, aN as ScriptableContext, aP as ScriptableOptions, al as Segment, a$ as TextAlign, ab as Tick, bn as TickOptions, ag as Ticks, bw as TimeScale, bv as TimeScaleOptions, bx as TimeSeriesScale, aL as TimeUnit, bc as Title, bd as TitleOptions, bg as Tooltip, be as TooltipAlignment, bh as TooltipCallbacks, bk as TooltipItem, bf as TooltipModel, bj as TooltipOptions, bi as TooltipPlugin, ah as TypedRegistry, O as UpdateMode, U as UpdateModeEnum, ai as VisualElement, _ as _adapters, X as defaults, a6 as layouts, aa as registry } from './chunks/index';
/*!
* Chart.js v3.0.0-beta.6
* Chart.js v3.0.0-beta.7
* https://www.chartjs.org

@@ -58,2 +58,5 @@ * (c) 2020 Chart.js Contributors

const isNumberFinite = (value) => (typeof value === 'number' || value instanceof Number) && isFinite(+value);
function finiteOrDefault(value, defaultValue) {
return isNumberFinite(value) ? value : defaultValue;
}
function valueOrDefault(value, defaultValue) {

@@ -175,13 +178,15 @@ return typeof value === 'undefined' ? defaultValue : value;

function resolveObjectKey(obj, key) {
if (key.length < 3) {
return obj[key];
if (key === 'x') {
return obj.x;
}
if (key === 'y') {
return obj.y;
}
const keys = key.split('.');
for (let i = 0, n = keys.length; i < n; ++i) {
for (let i = 0, n = keys.length; i < n && obj; ++i) {
const k = keys[i];
if (k in obj) {
obj = obj[k];
} else {
return;
if (!k) {
break;
}
obj = obj[k];
}

@@ -514,3 +519,6 @@ return obj;

constructor() {
this.color = 'rgba(0,0,0,0.1)';
this.backgroundColor = 'rgba(0,0,0,0.1)';
this.borderColor = 'rgba(0,0,0,0.1)';
this.color = '#666';
this.controllers = {};
this.elements = {};

@@ -525,3 +533,2 @@ this.events = [

this.font = {
color: '#666',
family: "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",

@@ -531,6 +538,7 @@ size: 12,

lineHeight: 1.2,
weight: null,
lineWidth: 0,
strokeStyle: undefined
weight: null
};
this.hover = {
onHover: null
};
this.interaction = {

@@ -540,17 +548,16 @@ mode: 'nearest',

};
this.hover = {
onHover: null
};
this.maintainAspectRatio = true;
this.onHover = null;
this.onClick = null;
this.plugins = {};
this.responsive = true;
this.showLine = true;
this.plugins = {};
this.scale = undefined;
this.scales = {};
this.controllers = {};
this.showLine = true;
}
set(scope, values) {
return merge(getScope(this, scope), values);
if (typeof scope === 'string') {
return merge(getScope(this, scope), values);
}
return merge(getScope(this, ''), scope);
}

@@ -855,10 +862,7 @@ get(scope) {

const font = {
color: valueOrDefault(options.color, fallback.color),
family: valueOrDefault(options.family, fallback.family),
lineHeight: toLineHeight(valueOrDefault(options.lineHeight, fallback.lineHeight), size),
lineWidth: valueOrDefault(options.lineWidth, fallback.lineWidth),
size,
style: valueOrDefault(options.style, fallback.style),
weight: valueOrDefault(options.weight, fallback.weight),
strokeStyle: valueOrDefault(options.strokeStyle, fallback.strokeStyle),
string: ''

@@ -1720,5 +1724,3 @@ };

function getStyle(el, property) {
return el.currentStyle ?
el.currentStyle[property] :
getComputedStyle(el).getPropertyValue(property);
return getComputedStyle(el).getPropertyValue(property);
}

@@ -1737,2 +1739,3 @@ const positions = ['top', 'right', 'bottom', 'left'];

}
const useOffsetPos = (x, y, target) => (x > 0 || y > 0) && (!target || !target.shadowRoot);
function getCanvasPosition(evt, canvas) {

@@ -1745,3 +1748,3 @@ const e = evt.originalEvent || evt;

let x, y;
if (offsetX > 0 || offsetY > 0) {
if (useOffsetPos(offsetX, offsetY, e.target)) {
x = offsetX;

@@ -2099,2 +2102,2 @@ y = offsetY;

export { _angleBetween as $, _isPointInArea as A, _rlookupByKey as B, toPadding as C, each as D, getMaximumSize as E, _getParentNode as F, readUsedSize as G, HALF_PI as H, throttled as I, supportsEventListenerOptions as J, log10 as K, isNumberFinite as L, callback as M, toDegrees as N, _measureText as O, PI as P, _int16Range as Q, _alignPixel as R, toFont as S, TAU as T, _factorize as U, uid as V, retinaScale as W, clear as X, _elementsEqual as Y, getAngleFromPoint as Z, _capitalize as _, resolve as a, _updateBezierControlPoints as a0, _computeSegments as a1, _boundSegments as a2, _steppedInterpolation as a3, _bezierInterpolation as a4, _pointInLine as a5, _steppedLineTo as a6, _bezierCurveTo as a7, drawPoint as a8, toTRBL as a9, QUARTER_PI as aA, TWO_THIRDS_PI as aB, _angleDiff as aC, toTRBLCorners as aa, _normalizeAngle as ab, _boundSegment as ac, INFINITY as ad, getRtlAdapter as ae, overrideTextDirection as af, restoreTextDirection as ag, distanceBetweenPoints as ah, _setMinAndMaxByKey as ai, _decimalPlaces as aj, almostEquals as ak, almostWhole as al, _longestText as am, _filterBetween as an, _lookup as ao, fontString as ap, clone as aq, _mergerIf as ar, _deprecated as as, toFontString as at, splineCurve as au, splineCurveMonotone as av, getStyle as aw, toLineHeight as ax, PITAU as ay, RAD_PER_DEG as az, isArray as b, color as c, defaults as d, effects as e, resolveObjectKey as f, getHoverColor as g, mergeIf as h, isObject as i, _merger as j, isNullOrUndef as k, listenArrayEvents as l, merge as m, noop as n, clipArea as o, unclipArea as p, _arrayUnique as q, requestAnimFrame as r, sign as s, toRadians as t, unlistenArrayEvents as u, valueOrDefault as v, isNumber as w, _limitValue as x, _lookupByKey as y, getRelativePosition as z };
export { getAngleFromPoint as $, _isPointInArea as A, _rlookupByKey as B, toPadding as C, each as D, getMaximumSize as E, _getParentNode as F, readUsedSize as G, HALF_PI as H, throttled as I, supportsEventListenerOptions as J, log10 as K, finiteOrDefault as L, isNumberFinite as M, callback as N, toDegrees as O, PI as P, _measureText as Q, _int16Range as R, _alignPixel as S, TAU as T, toFont as U, _factorize as V, uid as W, retinaScale as X, clear as Y, _elementsEqual as Z, _capitalize as _, resolve as a, _angleBetween as a0, _updateBezierControlPoints as a1, _computeSegments as a2, _boundSegments as a3, _steppedInterpolation as a4, _bezierInterpolation as a5, _pointInLine as a6, _steppedLineTo as a7, _bezierCurveTo as a8, drawPoint as a9, RAD_PER_DEG as aA, QUARTER_PI as aB, TWO_THIRDS_PI as aC, _angleDiff as aD, toTRBL as aa, toTRBLCorners as ab, _normalizeAngle as ac, _boundSegment as ad, INFINITY as ae, getRtlAdapter as af, overrideTextDirection as ag, restoreTextDirection as ah, distanceBetweenPoints as ai, _setMinAndMaxByKey as aj, _decimalPlaces as ak, almostEquals as al, almostWhole as am, _longestText as an, _filterBetween as ao, _lookup as ap, fontString as aq, clone as ar, _mergerIf as as, _deprecated as at, toFontString as au, splineCurve as av, splineCurveMonotone as aw, getStyle as ax, toLineHeight as ay, PITAU as az, isArray as b, color as c, defaults as d, effects as e, resolveObjectKey as f, getHoverColor as g, mergeIf as h, isObject as i, _merger as j, isNullOrUndef as k, listenArrayEvents as l, merge as m, noop as n, clipArea as o, unclipArea as p, _arrayUnique as q, requestAnimFrame as r, sign as s, toRadians as t, unlistenArrayEvents as u, valueOrDefault as v, isNumber as w, _limitValue as x, _lookupByKey as y, getRelativePosition as z };
/*!
* Chart.js v3.0.0-beta.6
* Chart.js v3.0.0-beta.7
* https://www.chartjs.org

@@ -4,0 +4,0 @@ * (c) 2020 Chart.js Contributors

/*!
* Chart.js v3.0.0-beta.6
* Chart.js v3.0.0-beta.7
* https://www.chartjs.org

@@ -7,2 +7,2 @@ * (c) 2020 Chart.js Contributors

*/
export { H as HALF_PI, ad as INFINITY, P as PI, ay as PITAU, aA as QUARTER_PI, az as RAD_PER_DEG, T as TAU, aB as TWO_THIRDS_PI, R as _alignPixel, $ as _angleBetween, aC as _angleDiff, q as _arrayUnique, a7 as _bezierCurveTo, a4 as _bezierInterpolation, ac as _boundSegment, a2 as _boundSegments, _ as _capitalize, a1 as _computeSegments, aj as _decimalPlaces, as as _deprecated, Y as _elementsEqual, U as _factorize, an as _filterBetween, F as _getParentNode, Q as _int16Range, A as _isPointInArea, x as _limitValue, am as _longestText, ao as _lookup, y as _lookupByKey, O as _measureText, j as _merger, ar as _mergerIf, ab as _normalizeAngle, a5 as _pointInLine, B as _rlookupByKey, ai as _setMinAndMaxByKey, a3 as _steppedInterpolation, a6 as _steppedLineTo, a0 as _updateBezierControlPoints, ak as almostEquals, al as almostWhole, M as callback, X as clear, o as clipArea, aq as clone, c as color, ah as distanceBetweenPoints, a8 as drawPoint, D as each, e as easingEffects, ap as fontString, Z as getAngleFromPoint, g as getHoverColor, E as getMaximumSize, z as getRelativePosition, ae as getRtlAdapter, aw as getStyle, b as isArray, L as isFinite, k as isNullOrUndef, w as isNumber, i as isObject, l as listenArrayEvents, K as log10, m as merge, h as mergeIf, n as noop, af as overrideTextDirection, G as readUsedSize, r as requestAnimFrame, a as resolve, f as resolveObjectKey, ag as restoreTextDirection, W as retinaScale, s as sign, au as splineCurve, av as splineCurveMonotone, J as supportsEventListenerOptions, N as toDegrees, S as toFont, at as toFontString, ax as toLineHeight, C as toPadding, t as toRadians, a9 as toTRBL, aa as toTRBLCorners, V as uid, p as unclipArea, u as unlistenArrayEvents, v as valueOrDefault } from './chunks/helpers.segment.js';
export { H as HALF_PI, ae as INFINITY, P as PI, az as PITAU, aB as QUARTER_PI, aA as RAD_PER_DEG, T as TAU, aC as TWO_THIRDS_PI, S as _alignPixel, a0 as _angleBetween, aD as _angleDiff, q as _arrayUnique, a8 as _bezierCurveTo, a5 as _bezierInterpolation, ad as _boundSegment, a3 as _boundSegments, _ as _capitalize, a2 as _computeSegments, ak as _decimalPlaces, at as _deprecated, Z as _elementsEqual, V as _factorize, ao as _filterBetween, F as _getParentNode, R as _int16Range, A as _isPointInArea, x as _limitValue, an as _longestText, ap as _lookup, y as _lookupByKey, Q as _measureText, j as _merger, as as _mergerIf, ac as _normalizeAngle, a6 as _pointInLine, B as _rlookupByKey, aj as _setMinAndMaxByKey, a4 as _steppedInterpolation, a7 as _steppedLineTo, a1 as _updateBezierControlPoints, al as almostEquals, am as almostWhole, N as callback, Y as clear, o as clipArea, ar as clone, c as color, ai as distanceBetweenPoints, a9 as drawPoint, D as each, e as easingEffects, L as finiteOrDefault, aq as fontString, $ as getAngleFromPoint, g as getHoverColor, E as getMaximumSize, z as getRelativePosition, af as getRtlAdapter, ax as getStyle, b as isArray, M as isFinite, k as isNullOrUndef, w as isNumber, i as isObject, l as listenArrayEvents, K as log10, m as merge, h as mergeIf, n as noop, ag as overrideTextDirection, G as readUsedSize, r as requestAnimFrame, a as resolve, f as resolveObjectKey, ah as restoreTextDirection, X as retinaScale, s as sign, av as splineCurve, aw as splineCurveMonotone, J as supportsEventListenerOptions, O as toDegrees, U as toFont, au as toFontString, ay as toLineHeight, C as toPadding, t as toRadians, aa as toTRBL, ab as toTRBLCorners, W as uid, p as unclipArea, u as unlistenArrayEvents, v as valueOrDefault } from './chunks/helpers.segment.js';

@@ -5,3 +5,3 @@ {

"description": "Simple HTML5 charts using the canvas element.",
"version": "3.0.0-beta.6",
"version": "3.0.0-beta.7",
"license": "MIT",

@@ -48,5 +48,2 @@ "jsdelivr": "dist/chart.min.js",

"devDependencies": {
"@babel/core": "^7.12.3",
"@babel/plugin-transform-object-assign": "^7.12.1",
"@babel/preset-env": "^7.12.1",
"@kurkle/color": "^0.1.9",

@@ -57,4 +54,2 @@ "@rollup/plugin-commonjs": "^16.0.0",

"@rollup/plugin-node-resolve": "^10.0.0",
"babel-plugin-istanbul": "^6.0.0",
"babel-preset-es2015-rollup": "^3.0.0",
"chartjs-adapter-moment": "^0.1.2",

@@ -64,5 +59,5 @@ "concurrently": "^5.3.0",

"cross-env": "^7.0.2",
"eslint": "^7.12.1",
"eslint": "^7.13.0",
"eslint-config-chartjs": "^0.2.0",
"eslint-config-esnext": "^4.1.0",
"eslint-plugin-es": "^3.0.1",
"eslint-plugin-html": "^6.1.0",

@@ -83,8 +78,6 @@ "glob": "^7.1.6",

"pixelmatch": "^5.2.1",
"promise-polyfill": "^8.2.0",
"resize-observer-polyfill": "^1.5.1",
"rollup": "^2.33.1",
"rollup-plugin-babel": "^4.4.0",
"rollup-plugin-cleanup": "^3.2.1",
"rollup-plugin-dts": "^1.4.13",
"rollup-plugin-istanbul": "^2.0.1",
"rollup-plugin-terser": "^7.0.2",

@@ -91,0 +84,0 @@ "typedoc": "^0.19.2",

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

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

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