https://www.datanormandie.fr/sites/default/files/api/portail_d4c/lib/chartjs-border/Plugin.Border.js
1(function (global, factory) { 2 typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('chart.js')) : 3 typeof define === 'function' && define.amd ? define(['chart.js'], factory) : 4 (global.PluginBorder = factory(global.Chart)); 5}(this, (function (Chart) { 'use strict'; 6 7Chart = Chart && Chart.hasOwnProperty('default') ? Chart['default'] : Chart; 8 9var BorderPlugin = { 10 id: 'chartJsPluginBorder', 11 12 /** 13 * Plugin hook to draw the background 14 * @param chart chartjs instance 15 * @param options plugin options 16 */ 17 beforeDraw(chart, args, options) { 18 if(options.borderWidth > 0){ 19 const {ctx, chartArea: {left, top, right, bottom}} = chart; 20 21 ctx.save(); 22 ctx.strokeStyle = options.borderColor; 23 ctx.lineWidth = options.borderWidth; 24 ctx.setLineDash(options.borderDash || []); 25 ctx.lineDashOffset = options.borderDashOffset; 26 27 // Calculate width 28 const width = right - left; 29 const height = bottom - top; 30 31 ctx.strokeRect(left, top, width, height); 32 ctx.restore(); 33 } 34 } 35}; 36 37Chart.register(BorderPlugin); 38 39return BorderPlugin; 40 41})));
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.