(_descriptors, _appliers)
| 37 | */ |
| 38 | export class Defaults { |
| 39 | constructor(_descriptors, _appliers) { |
| 40 | this.animation = undefined; |
| 41 | this.backgroundColor = 'rgba(0,0,0,0.1)'; |
| 42 | this.borderColor = 'rgba(0,0,0,0.1)'; |
| 43 | this.color = '#666'; |
| 44 | this.datasets = {}; |
| 45 | this.devicePixelRatio = (context) => context.chart.platform.getDevicePixelRatio(); |
| 46 | this.elements = {}; |
| 47 | this.events = [ |
| 48 | 'mousemove', |
| 49 | 'mouseout', |
| 50 | 'click', |
| 51 | 'touchstart', |
| 52 | 'touchmove' |
| 53 | ]; |
| 54 | this.font = { |
| 55 | family: "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif", |
| 56 | size: 12, |
| 57 | style: 'normal', |
| 58 | lineHeight: 1.2, |
| 59 | weight: null |
| 60 | }; |
| 61 | this.hover = {}; |
| 62 | this.hoverBackgroundColor = (ctx, options) => getHoverColor(options.backgroundColor); |
| 63 | this.hoverBorderColor = (ctx, options) => getHoverColor(options.borderColor); |
| 64 | this.hoverColor = (ctx, options) => getHoverColor(options.color); |
| 65 | this.indexAxis = 'x'; |
| 66 | this.interaction = { |
| 67 | mode: 'nearest', |
| 68 | intersect: true, |
| 69 | includeInvisible: false |
| 70 | }; |
| 71 | this.maintainAspectRatio = true; |
| 72 | this.onHover = null; |
| 73 | this.onClick = null; |
| 74 | this.parsing = true; |
| 75 | this.plugins = {}; |
| 76 | this.responsive = true; |
| 77 | this.scale = undefined; |
| 78 | this.scales = {}; |
| 79 | this.showLine = true; |
| 80 | this.drawActiveElementsOnTop = true; |
| 81 | |
| 82 | this.describe(_descriptors); |
| 83 | this.apply(_appliers); |
| 84 | } |
| 85 | |
| 86 | /** |
| 87 | * @param {string|object} scope |
nothing calls this directly
no test coverage detected