ureport-asserts.venderjs.chartjs-plugin-datalabels.min.js Maven / Gradle / Ivy
The newest version!
/*!
* @license
* chartjs-plugin-datalabels
* http://chartjs.org/
* Version: 0.3.0
*
* Copyright 2018 Chart.js Contributors
* Released under the MIT license
* https://github.com/chartjs/chartjs-plugin-datalabels/blob/master/LICENSE.md
*/
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(require("chart.js")):"function"==typeof define&&define.amd?define(["chart.js"],e):e(t.Chart)}(this,function(l){"use strict";var t=(l=l&&l.hasOwnProperty("default")?l.default:l).helpers,i=function(){this._rect=null,this._rotation=0};t.extend(i.prototype,{update:function(t,e,n){var a=t.x,r=t.y,i=a+e.x,o=r+e.y;this._rotation=n,this._rect={x0:i-1,y0:o-1,x1:i+e.w+2,y1:o+e.h+2,cx:a,cy:r}},contains:function(t,e){var n,a,r,i,o,l=this._rect;return!!l&&(n=l.cx,a=l.cy,r=this._rotation,i=n+(t-n)*Math.cos(r)+(e-a)*Math.sin(r),o=a-(t-n)*Math.sin(r)+(e-a)*Math.cos(r),!(il.x1||o>l.y1))}});var r=l.helpers,g={toTextLines:function(t){var e,n=[];for(t=[].concat(t);t.length;)"string"==typeof(e=t.pop())?n.unshift.apply(n,e.split("\n")):Array.isArray(e)?t.push.apply(t,e):r.isNullOrUndef(t)||n.unshift(""+e);return n},toFontString:function(t){return!t||r.isNullOrUndef(t.size)||r.isNullOrUndef(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family},textSize:function(t,e,n){var a,r=[].concat(e),i=r.length,o=t.font,l=0;for(t.font=n.string,a=0;a
© 2015 - 2024 Weber Informatics LLC | Privacy Policy