(dataset)
| 215 | }); |
| 216 | |
| 217 | function decimatedConfig(dataset) { |
| 218 | return { |
| 219 | type: 'line', |
| 220 | data: { |
| 221 | datasets: [dataset] |
| 222 | }, |
| 223 | options: { |
| 224 | parsing: false, |
| 225 | scales: { |
| 226 | x: { |
| 227 | type: 'linear' |
| 228 | } |
| 229 | }, |
| 230 | plugins: { |
| 231 | decimation: { |
| 232 | enabled: true, |
| 233 | algorithm: 'lttb', |
| 234 | samples: 5, |
| 235 | threshold: 7 |
| 236 | } |
| 237 | } |
| 238 | } |
| 239 | }; |
| 240 | } |
| 241 | |
| 242 | it('should leave a frozen dataset undecimated', function() { |
| 243 | const dataset = Object.freeze({data: originalData, label: 'dataset1'}); |
no outgoing calls
no test coverage detected