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

chartjs-chart-error-bars

Package Overview
Dependencies
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chartjs-chart-error-bars - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

59

build/Chart.ErrorBars.esm.js

@@ -694,4 +694,13 @@ import { defaults as defaults$5, elements, helpers, controllers, scaleService } from 'chart.js';

};
defaults$5.barWithErrorBars = helpers.merge({}, [defaults$5.bar, defaults$1]);
defaults$5.horizontalBarWithErrorBars = helpers.merge({}, [defaults$5.horizontalBar, horizontalDefaults]);
defaults$5.barWithErrorBars = helpers.configMerge(defaults$5.bar, defaults$1);
defaults$5.horizontalBarWithErrorBars = helpers.configMerge(defaults$5.horizontalBar, horizontalDefaults);
if (defaults$5.global.datasets && defaults$5.global.datasets.bar) {
defaults$5.global.datasets.barWithErrorBars = _objectSpread2({}, defaults$5.global.datasets.bar);
}
if (defaults$5.global.datasets && defaults$5.global.datasets.horizontalBar) {
defaults$5.global.datasets.horizontalBarWithErrorBars = _objectSpread2({}, defaults$5.global.datasets.horizontalBar);
}
var barWithErrorBars = {

@@ -707,6 +716,12 @@ dataElementType: elements.RectangleWithErrorBar,

_updateElementGeometry: function _updateElementGeometry(elem, index, reset) {
var _Chart$controllers$ba;
updateErrorBarElement(this, elem, index);
controllers.bar.prototype._updateElementGeometry.call(this, elem, index, reset);
for (var _len = arguments.length, args = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {
args[_key - 3] = arguments[_key];
}
(_Chart$controllers$ba = controllers.bar.prototype._updateElementGeometry).call.apply(_Chart$controllers$ba, [this, elem, index, reset].concat(args));
calculateErrorBarValuesPixels(this, elem._model, index, reset);

@@ -734,3 +749,8 @@ }

};
defaults$5.lineWithErrorBars = helpers.merge({}, [defaults$5.line, defaults$2]);
defaults$5.lineWithErrorBars = helpers.configMerge(defaults$5.line, defaults$2);
if (defaults$5.global.datasets && defaults$5.global.datasets.line) {
defaults$5.global.datasets.lineWithErrorBars = _objectSpread2({}, defaults$5.global.datasets.line);
}
var lineWithErrorBars = {

@@ -742,3 +762,10 @@ dataElementType: elements.PointWithErrorBar,

updateElement: function updateElement(point, index, reset) {
controllers.line.prototype.updateElement.call(this, point, index, reset);
var _Chart$controllers$li;
for (var _len = arguments.length, args = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {
args[_key - 3] = arguments[_key];
}
(_Chart$controllers$li = controllers.line.prototype.updateElement).call.apply(_Chart$controllers$li, [this, point, index, reset].concat(args));
updateErrorBarElement(this, point, index);

@@ -765,3 +792,8 @@ calculateErrorBarValuesPixelsScatter(this, point._model, index, reset);

};
defaults$5.scatterWithErrorBars = helpers.merge({}, [defaults$5.scatter, defaults$3]);
defaults$5.scatterWithErrorBars = helpers.configMerge(defaults$5.scatter, defaults$3);
if (defaults$5.global.datasets && defaults$5.global.datasets.scatter) {
defaults$5.global.datasets.scatterWithErrorBars = _objectSpread2({}, defaults$5.global.datasets.scatter);
}
var ScatterithErrorBars = controllers.scatterWithErrorBars = LineWithErrorBars;

@@ -779,3 +811,8 @@

};
defaults$5.polarAreaWithErrorBars = helpers.merge({}, [defaults$5.polarArea, defaults$4]);
defaults$5.polarAreaWithErrorBars = helpers.configMerge(defaults$5.polarArea, defaults$4);
if (defaults$5.global.datasets && defaults$5.global.datasets.polarArea) {
defaults$5.global.datasets.polarAreaWithErrorBars = _objectSpread2({}, defaults$5.global.datasets.polarArea);
}
var superClass = controllers.polarArea.prototype;

@@ -807,4 +844,10 @@ var polarAreaWithErrorBars = {

for (var _len = arguments.length, args = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {
args[_key - 3] = arguments[_key];
}
this._withPatching(function () {
return superClass.updateElement.call(_this, arc, index, reset);
var _superClass$updateEle;
return (_superClass$updateEle = superClass.updateElement).call.apply(_superClass$updateEle, [_this, arc, index, reset].concat(args));
});

@@ -811,0 +854,0 @@

@@ -698,4 +698,13 @@ (function (global, factory) {

};
Chart.defaults.barWithErrorBars = Chart.helpers.merge({}, [Chart.defaults.bar, defaults$1]);
Chart.defaults.horizontalBarWithErrorBars = Chart.helpers.merge({}, [Chart.defaults.horizontalBar, horizontalDefaults]);
Chart.defaults.barWithErrorBars = Chart.helpers.configMerge(Chart.defaults.bar, defaults$1);
Chart.defaults.horizontalBarWithErrorBars = Chart.helpers.configMerge(Chart.defaults.horizontalBar, horizontalDefaults);
if (Chart.defaults.global.datasets && Chart.defaults.global.datasets.bar) {
Chart.defaults.global.datasets.barWithErrorBars = _objectSpread2({}, Chart.defaults.global.datasets.bar);
}
if (Chart.defaults.global.datasets && Chart.defaults.global.datasets.horizontalBar) {
Chart.defaults.global.datasets.horizontalBarWithErrorBars = _objectSpread2({}, Chart.defaults.global.datasets.horizontalBar);
}
var barWithErrorBars = {

@@ -711,6 +720,12 @@ dataElementType: Chart.elements.RectangleWithErrorBar,

_updateElementGeometry: function _updateElementGeometry(elem, index, reset) {
var _Chart$controllers$ba;
updateErrorBarElement(this, elem, index);
Chart.controllers.bar.prototype._updateElementGeometry.call(this, elem, index, reset);
for (var _len = arguments.length, args = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {
args[_key - 3] = arguments[_key];
}
(_Chart$controllers$ba = Chart.controllers.bar.prototype._updateElementGeometry).call.apply(_Chart$controllers$ba, [this, elem, index, reset].concat(args));
calculateErrorBarValuesPixels(this, elem._model, index, reset);

@@ -738,3 +753,8 @@ }

};
Chart.defaults.lineWithErrorBars = Chart.helpers.merge({}, [Chart.defaults.line, defaults$2]);
Chart.defaults.lineWithErrorBars = Chart.helpers.configMerge(Chart.defaults.line, defaults$2);
if (Chart.defaults.global.datasets && Chart.defaults.global.datasets.line) {
Chart.defaults.global.datasets.lineWithErrorBars = _objectSpread2({}, Chart.defaults.global.datasets.line);
}
var lineWithErrorBars = {

@@ -746,3 +766,10 @@ dataElementType: Chart.elements.PointWithErrorBar,

updateElement: function updateElement(point, index, reset) {
Chart.controllers.line.prototype.updateElement.call(this, point, index, reset);
var _Chart$controllers$li;
for (var _len = arguments.length, args = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {
args[_key - 3] = arguments[_key];
}
(_Chart$controllers$li = Chart.controllers.line.prototype.updateElement).call.apply(_Chart$controllers$li, [this, point, index, reset].concat(args));
updateErrorBarElement(this, point, index);

@@ -769,3 +796,8 @@ calculateErrorBarValuesPixelsScatter(this, point._model, index, reset);

};
Chart.defaults.scatterWithErrorBars = Chart.helpers.merge({}, [Chart.defaults.scatter, defaults$3]);
Chart.defaults.scatterWithErrorBars = Chart.helpers.configMerge(Chart.defaults.scatter, defaults$3);
if (Chart.defaults.global.datasets && Chart.defaults.global.datasets.scatter) {
Chart.defaults.global.datasets.scatterWithErrorBars = _objectSpread2({}, Chart.defaults.global.datasets.scatter);
}
var ScatterithErrorBars = Chart.controllers.scatterWithErrorBars = LineWithErrorBars;

@@ -783,3 +815,8 @@

};
Chart.defaults.polarAreaWithErrorBars = Chart.helpers.merge({}, [Chart.defaults.polarArea, defaults$4]);
Chart.defaults.polarAreaWithErrorBars = Chart.helpers.configMerge(Chart.defaults.polarArea, defaults$4);
if (Chart.defaults.global.datasets && Chart.defaults.global.datasets.polarArea) {
Chart.defaults.global.datasets.polarAreaWithErrorBars = _objectSpread2({}, Chart.defaults.global.datasets.polarArea);
}
var superClass = Chart.controllers.polarArea.prototype;

@@ -811,4 +848,10 @@ var polarAreaWithErrorBars = {

for (var _len = arguments.length, args = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {
args[_key - 3] = arguments[_key];
}
this._withPatching(function () {
return superClass.updateElement.call(_this, arc, index, reset);
var _superClass$updateEle;
return (_superClass$updateEle = superClass.updateElement).call.apply(_superClass$updateEle, [_this, arc, index, reset].concat(args));
});

@@ -815,0 +858,0 @@

2

build/Chart.ErrorBars.min.js

@@ -1,1 +0,1 @@

!function(r,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("chart.js")):"function"==typeof define&&define.amd?define(["exports","chart.js"],e):e((r=r||self).ChartErrorBars={},r.Chart)}(this,function(r,e){"use strict";function t(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function a(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(r);e&&(a=a.filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})),t.push.apply(t,a)}return t}function n(r){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?a(n,!0).forEach(function(e){t(r,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):a(n).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))})}return r}function i(r,e){return function(r){if(Array.isArray(r))return r}(r)||function(r,e){if(!(Symbol.iterator in Object(r)||"[object Arguments]"===Object.prototype.toString.call(r)))return;var t=[],a=!0,n=!1,i=void 0;try{for(var o,l=r[Symbol.iterator]();!(a=(o=l.next()).done)&&(t.push(o.value),!e||t.length!==e);a=!0);}catch(r){n=!0,i=r}finally{try{a||null==l.return||l.return()}finally{if(n)throw i}}return t}(r,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var o=["xMin","xMax","yMin","yMax"];function l(r){return r?o.slice(0,2):o.slice(2)}function s(r,e,t){var a=this,n=this.chart;this.min=null,this.max=null;var o=i(l(r),2),s=o[0],c=o[1];n.data.datasets.forEach(function(i,o){var l=n.getDatasetMeta(o);n.isDatasetVisible(o)&&(t||function(e){return r?e.xAxisID===a.id:e.yAxisID===a.id}(l))&&i.data.forEach(function(t,n){var i=a.getRightValue(t);if(!isNaN(i)&&!l.data[n].hidden){var o=t[s];Array.isArray(o)?o=o.reduce(function(r,e){return Math.min(r,e)},i):"number"!=typeof o&&(o=i),!isNaN(o)&&(null===a.min||o<a.min)&&(a.min=o);var h=t[c];Array.isArray(h)?h=h.reduce(function(r,e){return Math.max(r,e)},i):"number"!=typeof o&&(h=i),!isNaN(h)&&(null===a.max||h>a.max)&&(a.max=h),e&&e(t,r)}})}),null==this.min&&(this.min=0),null==this.max&&(this.max=0)}var c={errorBarLineWidth:[[1,3]],errorBarColor:[["#2c2c2c","#1f1f1f"]],errorBarWhiskerLineWidth:[[1,3]],errorBarWhiskerRatio:[[.2,.25]],errorBarWhiskerSize:[[20,24]],errorBarWhiskerColor:[["#2c2c2c","#1f1f1f"]]},h=Object.keys(c);function u(r){if(!r)return{};var e={};return o.forEach(function(t){e[t]=r[t]}),e}function f(r,e,t,a,n){o.forEach(function(i){var o=a[i];if(Array.isArray(o))if(t.hasOwnProperty(i)){var l=t[i];e.hasOwnProperty(i)||(r[i]=l.slice());var s=r[i];if(h=o,(c=s).length!==h.length||!c.every(function(r,e){return r===h[e]})){var c,h,u=Math.min(o.length,s.length);l=t[i]=new Array(u);for(var f=0;f<u;++f)l[f]=s[f]+(o[f]-s[f])*n}}else t[i]=o.slice()})}function d(r,e,t){var a=r.getDataset(),n=e.custom||{},i=r._elementOptions(),o={chart:r.chart,dataIndex:t,dataset:a,datasetIndex:r.index};h.forEach(function(r){e._model[r]=function(r,e,t){for(var a=0;a<r.length;++a){var n=r[a];if(void 0!==n&&(void 0!==e&&"function"==typeof n&&(n=n(e)),void 0!==t&&Array.isArray(n)&&(n=n[t%n.length]),void 0!==n))return n}}([n[r],a[r],i[r]],o,t)})}function m(r,e){var t=Array.isArray(r)?r:[r],a=Array.isArray(e)?e:[e];if(t.length===a.length)return t.map(function(r,e){return[r,a[e]]});var n=Math.max(t.length,a.length);return Array(n).map(function(r,e){return[t[e%t.length],a[e%a.length]]})}function y(r,e){return Array.isArray(r)?r[e%r.length]:r}function p(r,e,t){var a=y(e.errorBarWhiskerRatio,t);return null!=r&&a>0?r*a*.5:.5*y(e.errorBarWhiskerSize,t)}function v(r,e){null==r.xMin&&null==r.xMax||function(r,e,t,a){a.save(),a.translate(0,r.y),null==e&&(e=r.x),null==t&&(t=r.x);var n=m(e,t);n.reverse().forEach(function(e,t){var o=i(e,2),l=o[0],s=o[1],c=n.length-t-1,h=p(r.height,r,c);a.lineWidth=y(r.errorBarLineWidth,c),a.strokeStyle=y(r.errorBarColor,c),a.beginPath(),a.moveTo(l,0),a.lineTo(s,0),a.stroke(),a.lineWidth=y(r.errorBarWhiskerLineWidth,c),a.strokeStyle=y(r.errorBarWhiskerColor,c),a.beginPath(),a.moveTo(l,-h),a.lineTo(l,h),a.moveTo(s,-h),a.lineTo(s,h),a.stroke()}),a.restore()}(r,r.xMin,r.xMax,e),null==r.yMin&&null==r.yMax||function(r,e,t,a){a.save(),a.translate(r.x,0),null==e&&(e=r.y),null==t&&(t=r.y);var n=m(e,t);n.reverse().forEach(function(e,t){var o=i(e,2),l=o[0],s=o[1],c=n.length-t-1,h=p(r.width,r,c);a.lineWidth=y(r.errorBarLineWidth,c),a.strokeStyle=y(r.errorBarColor,c),a.beginPath(),a.moveTo(0,l),a.lineTo(0,s),a.stroke(),a.lineWidth=y(r.errorBarWhiskerLineWidth,c),a.strokeStyle=y(r.errorBarWhiskerColor,c),a.beginPath(),a.moveTo(-h,l),a.lineTo(h,l),a.moveTo(-h,s),a.lineTo(h,s),a.stroke()}),a.restore()}(r,r.yMin,r.yMax,e)}function g(r,e){null==r.yMin&&null==r.yMax||function(r,e,t,a){a.save(),a.translate(r.x,r.y),null==e&&(e=r.outerRadius),null==t&&(t=r.outerRadius);var n=(r.startAngle+r.endAngle)/2,o=Math.cos(n),l=Math.sin(n),s={x:-l,y:o},c=Math.hypot(s.x,s.y);s.x/=c,s.y/=c;var h=m(e,t);h.reverse().forEach(function(e,t){var n=i(e,2),c=n[0],u=n[1],f=h.length-t-1,d=c*o,m=c*l,v=u*o,g=u*l,x=p(null,r,f),b=s.x*x,B=s.y*x;a.lineWidth=y(r.errorBarLineWidth,f),a.strokeStyle=y(r.errorBarColor,f),a.beginPath(),a.moveTo(d,m),a.lineTo(v,g),a.stroke(),a.lineWidth=y(r.errorBarWhiskerLineWidth,f),a.strokeStyle=y(r.errorBarWhiskerColor,f),a.beginPath(),a.moveTo(d+b,m+B),a.lineTo(d-b,m-B),a.moveTo(v+b,g+B),a.lineTo(v-b,g-B),a.stroke()}),a.restore()}(r,r.yMin,r.yMax,e)}e.defaults.global.elements.rectangleWithErrorBar=n({},e.defaults.global.elements.rectangle,{},c);var x=e.elements.RectangleWithErrorBar=e.elements.Rectangle.extend({transition:function(r){var t=u(this._start),a=e.elements.Rectangle.prototype.transition.call(this,r),n=this._model,i=this._start,o=this._view;return n&&1!==r?(f(i,t,o,n,r),a):a},draw:function(){e.elements.Rectangle.prototype.draw.call(this),v(this._view,this._chart.ctx)}});e.defaults.global.elements.pointWithErrorBar=n({},e.defaults.global.elements.point,{},c);var b=e.elements.PointWithErrorBar=e.elements.Point.extend({transition:function(r){var t=u(this._start),a=e.elements.Point.prototype.transition.call(this,r),n=this._model,i=this._start,o=this._view;return n&&1!==r?(f(i,t,o,n,r),a):a},draw:function(){e.elements.Point.prototype.draw.call(this),v(this._view,this._chart.ctx)}});e.defaults.global.elements.arcWithErrorBar=n({},e.defaults.global.elements.arc,{},c);var B=e.elements.ArcWithErrorBar=e.elements.Arc.extend({transition:function(r){var t=u(this._start),a=e.elements.Arc.prototype.transition.call(this,r),n=this._model,i=this._start,o=this._view;return n&&1!==r?(f(i,t,o,n,r),a):a},draw:function(){e.elements.Arc.prototype.draw.call(this),g(this._view,this._chart.ctx)}});function E(r,e,t,a,n){var i=l(a),o=t.getBasePixel();i.forEach(function(a){var i=e[a];Array.isArray(i)?r[a]=i.map(function(r){return n?o:t.getPixelForValue(r)}):"number"==typeof i&&(r[a]=n?o:t.getPixelForValue(i))})}function W(r){return Array.isArray(r)?r.slice().reverse():r}function A(r){var t=this,a=l(r);return function(r,n){var i=e.defaults.global.tooltips.callbacks.label.call(t,r,n),o=n.datasets[r.datasetIndex].data[r.index];return null==o||a.every(function(r){return null==o[r]})?i:"".concat(i," (").concat(W(o[a[0]])," .. ").concat(o[a[1]],")")}}var S={scales:{yAxes:[{type:"linearWithErrorBars"}]},tooltips:{callbacks:{label:A(!1)}}},_={scales:{xAxes:[{type:"linearWithErrorBars"}]},tooltips:{callbacks:{label:A(!0)}}};e.defaults.barWithErrorBars=e.helpers.merge({},[e.defaults.bar,S]),e.defaults.horizontalBarWithErrorBars=e.helpers.merge({},[e.defaults.horizontalBar,_]);var k={dataElementType:e.elements.RectangleWithErrorBar,_elementOptions:function(){return this.chart.options.elements.rectangleWithErrorBar},_updateElementGeometry:function(r,t,a){d(this,r,t),e.controllers.bar.prototype._updateElementGeometry.call(this,r,t,a),function(r,e,t,a){var n=r.getDataset().data[t];if(n){var i=r._getValueScale();E(e,n,i,i.isHorizontal(),a)}}(this,r._model,t,a)}},P=e.controllers.barWithErrorBars=e.controllers.bar.extend(k),w=e.controllers.horizontalBarWithErrorBars=e.controllers.horizontalBar.extend(k),O={scales:{yAxes:[{type:"linearWithErrorBars"}]},tooltips:{callbacks:{label:A(!1)}}};e.defaults.lineWithErrorBars=e.helpers.merge({},[e.defaults.line,O]);var M={dataElementType:e.elements.PointWithErrorBar,_elementOptions:function(){return this.chart.options.elements.pointWithErrorBar},updateElement:function(r,t,a){e.controllers.line.prototype.updateElement.call(this,r,t,a),d(this,r,t),function(r,e,t,a){var n=r.getDataset().data[t];if(n){var i=r.getMeta();E(e,n,r.getScaleForId(i.xAxisID),!0,a),E(e,n,r.getScaleForId(i.yAxisID),!1,a)}}(this,r._model,t,a)}},T=e.controllers.lineWithErrorBars=e.controllers.line.extend(M),D={scales:{xAxes:[{type:"linearWithErrorBars"}],yAxes:[{type:"linearWithErrorBars"}]},tooltips:{callbacks:{label:function(r,e){var t=e.datasets[r.datasetIndex].data[r.index],a=function(r,e){var a=l(e);return null==t||a.every(function(r){return null==t[r]})?r:"".concat(r," [").concat(W(t[a[0]])," .. ").concat(t[a[1]],"]")};return"(".concat(a(r.xLabel,!0),", ").concat(a(r.yLabel,!1),")")}}}};e.defaults.scatterWithErrorBars=e.helpers.merge({},[e.defaults.scatter,D]);var L=e.controllers.scatterWithErrorBars=T,j={scale:{type:"radialLinearWithErrorBars"},tooltips:{callbacks:{label:function(r,t){var a=e.defaults.polarArea.tooltips.callbacks.label.call(this,r,t),n=t.datasets[r.datasetIndex].data[r.index],i=l(!1);return null==n||i.every(function(r){return null==n[r]})?a:"".concat(a," [").concat(W(n[i[0]])," .. ").concat(n[i[1]],"]")}}}};e.defaults.polarAreaWithErrorBars=e.helpers.merge({},[e.defaults.polarArea,j]);var R=e.controllers.polarArea.prototype,C={dataElementType:e.elements.ArcWithErrorBar,_elementOptions:function(){return this.chart.options.elements.arcWithErrorBar},_getPatchedDataset:function(){var r=R.getDataset.call(this);return Object.assign({},r,{data:r.data.map(function(r){return null!=r&&"number"==typeof r.y?r.y:r})})},_withPatching:function(r){try{return this.getDataset=this._getPatchedDataset.bind(this),r()}finally{delete this.getDataset}},updateElement:function(r,e,t){var a=this;this._withPatching(function(){return R.updateElement.call(a,r,e,t)}),d(this,r,e),function(r,e,t,a,n){var i=r.getDataset().data[a];if(i){var o=r.chart,s=o.scale,c=o.options.animation,h=function(r){var t=s.getDistanceFromCenterForValue(r),a=c.animateScale?0:t;return n?a:e.hidden?0:t};l(!1).forEach(function(r){var e=i[r];Array.isArray(e)?t[r]=e.map(h):"number"==typeof e&&(t[r]=h(e))})}}(this,r,r._model,e,t)},countVisibleElements:function(){var r=this;return this._withPatching(function(){return R.countVisibleElements.call(r)})},_computeAngle:function(r){var e=this;return this._withPatching(function(){return R._computeAngle.call(e,r)})}},I=e.controllers.polarAreaWithErrorBars=e.controllers.polarArea.extend(C),z=e.helpers.merge({},[e.scaleService.getScaleDefaults("linear")]),N=e.scaleService.getScaleConstructor("linear").extend({determineDataLimits:function(){s.call(this,this.isHorizontal()),this.handleTickRangeOptions()}});e.scaleService.registerScaleType("linearWithErrorBars",N,z);var V=e.helpers.merge({},[e.scaleService.getScaleDefaults("logarithmic")]),F=e.scaleService.getScaleConstructor("logarithmic").extend({determineDataLimits:function(){var r=this;this.minNotZero=null,s.call(this,this.isHorizontal(),function(e,t){var a=t?e.xMin:e.yMin;"number"==typeof a&&0!==a&&(null===r.minNotZero||a<r.minNotZero)&&(r.minNotZero=a)}),this.handleTickRangeOptions()}});e.scaleService.registerScaleType("logarithmicWithErrorBars",F,V);var H=e.helpers.merge({},[e.scaleService.getScaleDefaults("radialLinear")]),Z=e.scaleService.getScaleConstructor("radialLinear").extend({determineDataLimits:function(){s.call(this,!1,null,!0),this.handleTickRangeOptions()}});e.scaleService.registerScaleType("radialLinearWithErrorBars",Z,H),r.ArcWithErrorBar=B,r.BarWithErrorBars=P,r.HorizontalBarWithErrorBars=w,r.LineWithErrorBars=T,r.LinearWithErrorBarsScale=N,r.LogarithmicWithErrorBarsScale=F,r.PointWithErrorBar=b,r.PolarAreaWithErrorBars=I,r.RadialLinearWithErrorBarsScale=Z,r.RectangleWithErrorBar=x,r.ScatterithErrorBars=L,Object.defineProperty(r,"__esModule",{value:!0})});
!function(r,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("chart.js")):"function"==typeof define&&define.amd?define(["exports","chart.js"],t):t((r=r||self).ChartErrorBars={},r.Chart)}(this,function(r,t){"use strict";function e(r,t,e){return t in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,r}function a(r,t){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(r);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})),e.push.apply(e,a)}return e}function n(r){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(n,!0).forEach(function(t){e(r,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):a(n).forEach(function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(n,t))})}return r}function i(r,t){return function(r){if(Array.isArray(r))return r}(r)||function(r,t){if(!(Symbol.iterator in Object(r)||"[object Arguments]"===Object.prototype.toString.call(r)))return;var e=[],a=!0,n=!1,i=void 0;try{for(var l,o=r[Symbol.iterator]();!(a=(l=o.next()).done)&&(e.push(l.value),!t||e.length!==t);a=!0);}catch(r){n=!0,i=r}finally{try{a||null==o.return||o.return()}finally{if(n)throw i}}return e}(r,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var l=["xMin","xMax","yMin","yMax"];function o(r){return r?l.slice(0,2):l.slice(2)}function s(r,t,e){var a=this,n=this.chart;this.min=null,this.max=null;var l=i(o(r),2),s=l[0],c=l[1];n.data.datasets.forEach(function(i,l){var o=n.getDatasetMeta(l);n.isDatasetVisible(l)&&(e||function(t){return r?t.xAxisID===a.id:t.yAxisID===a.id}(o))&&i.data.forEach(function(e,n){var i=a.getRightValue(e);if(!isNaN(i)&&!o.data[n].hidden){var l=e[s];Array.isArray(l)?l=l.reduce(function(r,t){return Math.min(r,t)},i):"number"!=typeof l&&(l=i),!isNaN(l)&&(null===a.min||l<a.min)&&(a.min=l);var u=e[c];Array.isArray(u)?u=u.reduce(function(r,t){return Math.max(r,t)},i):"number"!=typeof l&&(u=i),!isNaN(u)&&(null===a.max||u>a.max)&&(a.max=u),t&&t(e,r)}})}),null==this.min&&(this.min=0),null==this.max&&(this.max=0)}var c={errorBarLineWidth:[[1,3]],errorBarColor:[["#2c2c2c","#1f1f1f"]],errorBarWhiskerLineWidth:[[1,3]],errorBarWhiskerRatio:[[.2,.25]],errorBarWhiskerSize:[[20,24]],errorBarWhiskerColor:[["#2c2c2c","#1f1f1f"]]},u=Object.keys(c);function h(r){if(!r)return{};var t={};return l.forEach(function(e){t[e]=r[e]}),t}function f(r,t,e,a,n){l.forEach(function(i){var l=a[i];if(Array.isArray(l))if(e.hasOwnProperty(i)){var o=e[i];t.hasOwnProperty(i)||(r[i]=o.slice());var s=r[i];if(u=l,(c=s).length!==u.length||!c.every(function(r,t){return r===u[t]})){var c,u,h=Math.min(l.length,s.length);o=e[i]=new Array(h);for(var f=0;f<h;++f)o[f]=s[f]+(l[f]-s[f])*n}}else e[i]=l.slice()})}function d(r,t,e){var a=r.getDataset(),n=t.custom||{},i=r._elementOptions(),l={chart:r.chart,dataIndex:e,dataset:a,datasetIndex:r.index};u.forEach(function(r){t._model[r]=function(r,t,e){for(var a=0;a<r.length;++a){var n=r[a];if(void 0!==n&&(void 0!==t&&"function"==typeof n&&(n=n(t)),void 0!==e&&Array.isArray(n)&&(n=n[e%n.length]),void 0!==n))return n}}([n[r],a[r],i[r]],l,e)})}function g(r,t){var e=Array.isArray(r)?r:[r],a=Array.isArray(t)?t:[t];if(e.length===a.length)return e.map(function(r,t){return[r,a[t]]});var n=Math.max(e.length,a.length);return Array(n).map(function(r,t){return[e[t%e.length],a[t%a.length]]})}function y(r,t){return Array.isArray(r)?r[t%r.length]:r}function p(r,t,e){var a=y(t.errorBarWhiskerRatio,e);return null!=r&&a>0?r*a*.5:.5*y(t.errorBarWhiskerSize,e)}function m(r,t){null==r.xMin&&null==r.xMax||function(r,t,e,a){a.save(),a.translate(0,r.y),null==t&&(t=r.x),null==e&&(e=r.x);var n=g(t,e);n.reverse().forEach(function(t,e){var l=i(t,2),o=l[0],s=l[1],c=n.length-e-1,u=p(r.height,r,c);a.lineWidth=y(r.errorBarLineWidth,c),a.strokeStyle=y(r.errorBarColor,c),a.beginPath(),a.moveTo(o,0),a.lineTo(s,0),a.stroke(),a.lineWidth=y(r.errorBarWhiskerLineWidth,c),a.strokeStyle=y(r.errorBarWhiskerColor,c),a.beginPath(),a.moveTo(o,-u),a.lineTo(o,u),a.moveTo(s,-u),a.lineTo(s,u),a.stroke()}),a.restore()}(r,r.xMin,r.xMax,t),null==r.yMin&&null==r.yMax||function(r,t,e,a){a.save(),a.translate(r.x,0),null==t&&(t=r.y),null==e&&(e=r.y);var n=g(t,e);n.reverse().forEach(function(t,e){var l=i(t,2),o=l[0],s=l[1],c=n.length-e-1,u=p(r.width,r,c);a.lineWidth=y(r.errorBarLineWidth,c),a.strokeStyle=y(r.errorBarColor,c),a.beginPath(),a.moveTo(0,o),a.lineTo(0,s),a.stroke(),a.lineWidth=y(r.errorBarWhiskerLineWidth,c),a.strokeStyle=y(r.errorBarWhiskerColor,c),a.beginPath(),a.moveTo(-u,o),a.lineTo(u,o),a.moveTo(-u,s),a.lineTo(u,s),a.stroke()}),a.restore()}(r,r.yMin,r.yMax,t)}function v(r,t){null==r.yMin&&null==r.yMax||function(r,t,e,a){a.save(),a.translate(r.x,r.y),null==t&&(t=r.outerRadius),null==e&&(e=r.outerRadius);var n=(r.startAngle+r.endAngle)/2,l=Math.cos(n),o=Math.sin(n),s={x:-o,y:l},c=Math.hypot(s.x,s.y);s.x/=c,s.y/=c;var u=g(t,e);u.reverse().forEach(function(t,e){var n=i(t,2),c=n[0],h=n[1],f=u.length-e-1,d=c*l,g=c*o,m=h*l,v=h*o,b=p(null,r,f),B=s.x*b,x=s.y*b;a.lineWidth=y(r.errorBarLineWidth,f),a.strokeStyle=y(r.errorBarColor,f),a.beginPath(),a.moveTo(d,g),a.lineTo(m,v),a.stroke(),a.lineWidth=y(r.errorBarWhiskerLineWidth,f),a.strokeStyle=y(r.errorBarWhiskerColor,f),a.beginPath(),a.moveTo(d+B,g+x),a.lineTo(d-B,g-x),a.moveTo(m+B,v+x),a.lineTo(m-B,v-x),a.stroke()}),a.restore()}(r,r.yMin,r.yMax,t)}t.defaults.global.elements.rectangleWithErrorBar=n({},t.defaults.global.elements.rectangle,{},c);var b=t.elements.RectangleWithErrorBar=t.elements.Rectangle.extend({transition:function(r){var e=h(this._start),a=t.elements.Rectangle.prototype.transition.call(this,r),n=this._model,i=this._start,l=this._view;return n&&1!==r?(f(i,e,l,n,r),a):a},draw:function(){t.elements.Rectangle.prototype.draw.call(this),m(this._view,this._chart.ctx)}});t.defaults.global.elements.pointWithErrorBar=n({},t.defaults.global.elements.point,{},c);var B=t.elements.PointWithErrorBar=t.elements.Point.extend({transition:function(r){var e=h(this._start),a=t.elements.Point.prototype.transition.call(this,r),n=this._model,i=this._start,l=this._view;return n&&1!==r?(f(i,e,l,n,r),a):a},draw:function(){t.elements.Point.prototype.draw.call(this),m(this._view,this._chart.ctx)}});t.defaults.global.elements.arcWithErrorBar=n({},t.defaults.global.elements.arc,{},c);var x=t.elements.ArcWithErrorBar=t.elements.Arc.extend({transition:function(r){var e=h(this._start),a=t.elements.Arc.prototype.transition.call(this,r),n=this._model,i=this._start,l=this._view;return n&&1!==r?(f(i,e,l,n,r),a):a},draw:function(){t.elements.Arc.prototype.draw.call(this),v(this._view,this._chart.ctx)}});function E(r,t,e,a,n){var i=o(a),l=e.getBasePixel();i.forEach(function(a){var i=t[a];Array.isArray(i)?r[a]=i.map(function(r){return n?l:e.getPixelForValue(r)}):"number"==typeof i&&(r[a]=n?l:e.getPixelForValue(i))})}function W(r){return Array.isArray(r)?r.slice().reverse():r}function A(r){var e=this,a=o(r);return function(r,n){var i=t.defaults.global.tooltips.callbacks.label.call(e,r,n),l=n.datasets[r.datasetIndex].data[r.index];return null==l||a.every(function(r){return null==l[r]})?i:"".concat(i," (").concat(W(l[a[0]])," .. ").concat(l[a[1]],")")}}var S={scales:{yAxes:[{type:"linearWithErrorBars"}]},tooltips:{callbacks:{label:A(!1)}}},_={scales:{xAxes:[{type:"linearWithErrorBars"}]},tooltips:{callbacks:{label:A(!0)}}};t.defaults.barWithErrorBars=t.helpers.configMerge(t.defaults.bar,S),t.defaults.horizontalBarWithErrorBars=t.helpers.configMerge(t.defaults.horizontalBar,_),t.defaults.global.datasets&&t.defaults.global.datasets.bar&&(t.defaults.global.datasets.barWithErrorBars=n({},t.defaults.global.datasets.bar)),t.defaults.global.datasets&&t.defaults.global.datasets.horizontalBar&&(t.defaults.global.datasets.horizontalBarWithErrorBars=n({},t.defaults.global.datasets.horizontalBar));var k={dataElementType:t.elements.RectangleWithErrorBar,_elementOptions:function(){return this.chart.options.elements.rectangleWithErrorBar},_updateElementGeometry:function(r,e,a){var n;d(this,r,e);for(var i=arguments.length,l=new Array(i>3?i-3:0),o=3;o<i;o++)l[o-3]=arguments[o];(n=t.controllers.bar.prototype._updateElementGeometry).call.apply(n,[this,r,e,a].concat(l)),function(r,t,e,a){var n=r.getDataset().data[e];if(n){var i=r._getValueScale();E(t,n,i,i.isHorizontal(),a)}}(this,r._model,e,a)}},P=t.controllers.barWithErrorBars=t.controllers.bar.extend(k),w=t.controllers.horizontalBarWithErrorBars=t.controllers.horizontalBar.extend(k),M={scales:{yAxes:[{type:"linearWithErrorBars"}]},tooltips:{callbacks:{label:A(!1)}}};t.defaults.lineWithErrorBars=t.helpers.configMerge(t.defaults.line,M),t.defaults.global.datasets&&t.defaults.global.datasets.line&&(t.defaults.global.datasets.lineWithErrorBars=n({},t.defaults.global.datasets.line));var O={dataElementType:t.elements.PointWithErrorBar,_elementOptions:function(){return this.chart.options.elements.pointWithErrorBar},updateElement:function(r,e,a){for(var n,i=arguments.length,l=new Array(i>3?i-3:0),o=3;o<i;o++)l[o-3]=arguments[o];(n=t.controllers.line.prototype.updateElement).call.apply(n,[this,r,e,a].concat(l)),d(this,r,e),function(r,t,e,a){var n=r.getDataset().data[e];if(n){var i=r.getMeta();E(t,n,r.getScaleForId(i.xAxisID),!0,a),E(t,n,r.getScaleForId(i.yAxisID),!1,a)}}(this,r._model,e,a)}},T=t.controllers.lineWithErrorBars=t.controllers.line.extend(O),D={scales:{xAxes:[{type:"linearWithErrorBars"}],yAxes:[{type:"linearWithErrorBars"}]},tooltips:{callbacks:{label:function(r,t){var e=t.datasets[r.datasetIndex].data[r.index],a=function(r,t){var a=o(t);return null==e||a.every(function(r){return null==e[r]})?r:"".concat(r," [").concat(W(e[a[0]])," .. ").concat(e[a[1]],"]")};return"(".concat(a(r.xLabel,!0),", ").concat(a(r.yLabel,!1),")")}}}};t.defaults.scatterWithErrorBars=t.helpers.configMerge(t.defaults.scatter,D),t.defaults.global.datasets&&t.defaults.global.datasets.scatter&&(t.defaults.global.datasets.scatterWithErrorBars=n({},t.defaults.global.datasets.scatter));var L=t.controllers.scatterWithErrorBars=T,j={scale:{type:"radialLinearWithErrorBars"},tooltips:{callbacks:{label:function(r,e){var a=t.defaults.polarArea.tooltips.callbacks.label.call(this,r,e),n=e.datasets[r.datasetIndex].data[r.index],i=o(!1);return null==n||i.every(function(r){return null==n[r]})?a:"".concat(a," [").concat(W(n[i[0]])," .. ").concat(n[i[1]],"]")}}}};t.defaults.polarAreaWithErrorBars=t.helpers.configMerge(t.defaults.polarArea,j),t.defaults.global.datasets&&t.defaults.global.datasets.polarArea&&(t.defaults.global.datasets.polarAreaWithErrorBars=n({},t.defaults.global.datasets.polarArea));var R=t.controllers.polarArea.prototype,C={dataElementType:t.elements.ArcWithErrorBar,_elementOptions:function(){return this.chart.options.elements.arcWithErrorBar},_getPatchedDataset:function(){var r=R.getDataset.call(this);return Object.assign({},r,{data:r.data.map(function(r){return null!=r&&"number"==typeof r.y?r.y:r})})},_withPatching:function(r){try{return this.getDataset=this._getPatchedDataset.bind(this),r()}finally{delete this.getDataset}},updateElement:function(r,t,e){for(var a=this,n=arguments.length,i=new Array(n>3?n-3:0),l=3;l<n;l++)i[l-3]=arguments[l];this._withPatching(function(){var n;return(n=R.updateElement).call.apply(n,[a,r,t,e].concat(i))}),d(this,r,t),function(r,t,e,a,n){var i=r.getDataset().data[a];if(i){var l=r.chart,s=l.scale,c=l.options.animation,u=function(r){var e=s.getDistanceFromCenterForValue(r),a=c.animateScale?0:e;return n?a:t.hidden?0:e};o(!1).forEach(function(r){var t=i[r];Array.isArray(t)?e[r]=t.map(u):"number"==typeof t&&(e[r]=u(t))})}}(this,r,r._model,t,e)},countVisibleElements:function(){var r=this;return this._withPatching(function(){return R.countVisibleElements.call(r)})},_computeAngle:function(r){var t=this;return this._withPatching(function(){return R._computeAngle.call(t,r)})}},z=t.controllers.polarAreaWithErrorBars=t.controllers.polarArea.extend(C),I=t.helpers.merge({},[t.scaleService.getScaleDefaults("linear")]),N=t.scaleService.getScaleConstructor("linear").extend({determineDataLimits:function(){s.call(this,this.isHorizontal()),this.handleTickRangeOptions()}});t.scaleService.registerScaleType("linearWithErrorBars",N,I);var V=t.helpers.merge({},[t.scaleService.getScaleDefaults("logarithmic")]),F=t.scaleService.getScaleConstructor("logarithmic").extend({determineDataLimits:function(){var r=this;this.minNotZero=null,s.call(this,this.isHorizontal(),function(t,e){var a=e?t.xMin:t.yMin;"number"==typeof a&&0!==a&&(null===r.minNotZero||a<r.minNotZero)&&(r.minNotZero=a)}),this.handleTickRangeOptions()}});t.scaleService.registerScaleType("logarithmicWithErrorBars",F,V);var H=t.helpers.merge({},[t.scaleService.getScaleDefaults("radialLinear")]),Z=t.scaleService.getScaleConstructor("radialLinear").extend({determineDataLimits:function(){s.call(this,!1,null,!0),this.handleTickRangeOptions()}});t.scaleService.registerScaleType("radialLinearWithErrorBars",Z,H),r.ArcWithErrorBar=x,r.BarWithErrorBars=P,r.HorizontalBarWithErrorBars=w,r.LineWithErrorBars=T,r.LinearWithErrorBarsScale=N,r.LogarithmicWithErrorBarsScale=F,r.PointWithErrorBar=B,r.PolarAreaWithErrorBars=z,r.RadialLinearWithErrorBarsScale=Z,r.RectangleWithErrorBar=b,r.ScatterithErrorBars=L,Object.defineProperty(r,"__esModule",{value:!0})});
{
"name": "chartjs-chart-error-bars",
"description": "Chart.js module for charting error bars",
"version": "1.1.0",
"version": "1.2.0",
"author": {

@@ -42,3 +42,3 @@ "name": "Samuel Gratzl",

"scripts": {
"clean": "rimraf build",
"clean": "rimraf build *.tgz",
"watch": "rollup -c -w -i src/index.js",

@@ -45,0 +45,0 @@ "lint": "eslint src",

@@ -9,5 +9,7 @@ 'use strict';

scales: {
yAxes: [{
type: 'linearWithErrorBars'
}]
yAxes: [
{
type: 'linearWithErrorBars'
}
]
},

@@ -23,5 +25,7 @@ tooltips: {

scales: {
xAxes: [{
type: 'linearWithErrorBars'
}]
xAxes: [
{
type: 'linearWithErrorBars'
}
]
},

@@ -35,5 +39,12 @@ tooltips: {

Chart.defaults.barWithErrorBars = Chart.helpers.merge({}, [Chart.defaults.bar, defaults]);
Chart.defaults.horizontalBarWithErrorBars = Chart.helpers.merge({}, [Chart.defaults.horizontalBar, horizontalDefaults]);
Chart.defaults.barWithErrorBars = Chart.helpers.configMerge(Chart.defaults.bar, defaults);
Chart.defaults.horizontalBarWithErrorBars = Chart.helpers.configMerge(Chart.defaults.horizontalBar, horizontalDefaults);
if (Chart.defaults.global.datasets && Chart.defaults.global.datasets.bar) {
Chart.defaults.global.datasets.barWithErrorBars = {...Chart.defaults.global.datasets.bar};
}
if (Chart.defaults.global.datasets && Chart.defaults.global.datasets.horizontalBar) {
Chart.defaults.global.datasets.horizontalBarWithErrorBars = {...Chart.defaults.global.datasets.horizontalBar};
}
const barWithErrorBars = {

@@ -49,6 +60,6 @@ dataElementType: Chart.elements.RectangleWithErrorBar,

*/
_updateElementGeometry(elem, index, reset) {
_updateElementGeometry(elem, index, reset, ...args) {
updateErrorBarElement(this, elem, index, reset);
Chart.controllers.bar.prototype._updateElementGeometry.call(this, elem, index, reset);
Chart.controllers.bar.prototype._updateElementGeometry.call(this, elem, index, reset, ...args);
calculateErrorBarValuesPixels(this, elem._model, index, reset);

@@ -61,3 +72,3 @@ }

*/
export const BarWithErrorBars = Chart.controllers.barWithErrorBars = Chart.controllers.bar.extend(barWithErrorBars);
export const HorizontalBarWithErrorBars = Chart.controllers.horizontalBarWithErrorBars = Chart.controllers.horizontalBar.extend(barWithErrorBars);
export const BarWithErrorBars = (Chart.controllers.barWithErrorBars = Chart.controllers.bar.extend(barWithErrorBars));
export const HorizontalBarWithErrorBars = (Chart.controllers.horizontalBarWithErrorBars = Chart.controllers.horizontalBar.extend(barWithErrorBars));

@@ -9,5 +9,7 @@ 'use strict';

scales: {
yAxes: [{
type: 'linearWithErrorBars'
}]
yAxes: [
{
type: 'linearWithErrorBars'
}
]
},

@@ -21,4 +23,8 @@ tooltips: {

Chart.defaults.lineWithErrorBars = Chart.helpers.merge({}, [Chart.defaults.line, defaults]);
Chart.defaults.lineWithErrorBars = Chart.helpers.configMerge(Chart.defaults.line, defaults);
if (Chart.defaults.global.datasets && Chart.defaults.global.datasets.line) {
Chart.defaults.global.datasets.lineWithErrorBars = {...Chart.defaults.global.datasets.line};
}
const lineWithErrorBars = {

@@ -31,4 +37,4 @@ dataElementType: Chart.elements.PointWithErrorBar,

updateElement(point, index, reset) {
Chart.controllers.line.prototype.updateElement.call(this, point, index, reset);
updateElement(point, index, reset, ...args) {
Chart.controllers.line.prototype.updateElement.call(this, point, index, reset, ...args);

@@ -41,2 +47,2 @@ updateErrorBarElement(this, point, index, reset);

export const LineWithErrorBars = Chart.controllers.lineWithErrorBars = Chart.controllers.line.extend(lineWithErrorBars);
export const LineWithErrorBars = (Chart.controllers.lineWithErrorBars = Chart.controllers.line.extend(lineWithErrorBars));

@@ -9,3 +9,3 @@ 'use strict';

scale: {
type: 'radialLinearWithErrorBars',
type: 'radialLinearWithErrorBars'
},

@@ -19,4 +19,8 @@ tooltips: {

Chart.defaults.polarAreaWithErrorBars = Chart.helpers.merge({}, [Chart.defaults.polarArea, defaults]);
Chart.defaults.polarAreaWithErrorBars = Chart.helpers.configMerge(Chart.defaults.polarArea, defaults);
if (Chart.defaults.global.datasets && Chart.defaults.global.datasets.polarArea) {
Chart.defaults.global.datasets.polarAreaWithErrorBars = {...Chart.defaults.global.datasets.polarArea};
}
const superClass = Chart.controllers.polarArea.prototype;

@@ -35,3 +39,3 @@

// inline d.v
data: dataset.data.map((d) => d != null && typeof d.y === 'number' ? d.y : d)
data: dataset.data.map((d) => (d != null && typeof d.y === 'number' ? d.y : d))
});

@@ -49,4 +53,4 @@ },

updateElement(arc, index, reset) {
this._withPatching(() => superClass.updateElement.call(this, arc, index, reset));
updateElement(arc, index, reset, ...args) {
this._withPatching(() => superClass.updateElement.call(this, arc, index, reset, ...args));

@@ -67,2 +71,2 @@ updateErrorBarElement(this, arc, index, reset);

export const PolarAreaWithErrorBars = Chart.controllers.polarAreaWithErrorBars = Chart.controllers.polarArea.extend(polarAreaWithErrorBars);
export const PolarAreaWithErrorBars = (Chart.controllers.polarAreaWithErrorBars = Chart.controllers.polarArea.extend(polarAreaWithErrorBars));

@@ -9,8 +9,12 @@ 'use strict';

scales: {
xAxes: [{
type: 'linearWithErrorBars'
}],
yAxes: [{
type: 'linearWithErrorBars'
}]
xAxes: [
{
type: 'linearWithErrorBars'
}
],
yAxes: [
{
type: 'linearWithErrorBars'
}
]
},

@@ -24,4 +28,8 @@ tooltips: {

Chart.defaults.scatterWithErrorBars = Chart.helpers.merge({}, [Chart.defaults.scatter, defaults]);
Chart.defaults.scatterWithErrorBars = Chart.helpers.configMerge(Chart.defaults.scatter, defaults);
export const ScatterithErrorBars = Chart.controllers.scatterWithErrorBars = LineWithErrorBars;
if (Chart.defaults.global.datasets && Chart.defaults.global.datasets.scatter) {
Chart.defaults.global.datasets.scatterWithErrorBars = {...Chart.defaults.global.datasets.scatter};
}
export const ScatterithErrorBars = (Chart.controllers.scatterWithErrorBars = LineWithErrorBars);
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