Highcharts Demo
author(s): Torstein Hønsi
by Black Label
HTML
<script src="https://code.highcharts.com/12/highcharts.js"></script>
<div id="container" style="height: 400px"></div>
JavaScript
// Workaround fix for all affected Highcharts versions: 6.1.0-13.0.2
((H)=>{const X = H.isObject;H.Point.prototype.setNestedProperty = function setNestedProperty(t,e,i){let s=i.split(".");return s.some(t=>"__proto__"===t||"constructor"===t)||s.reduce(function(t,i,s,o){let r=o.length-1===s;return t[i]=r?e:X(t[i],!0)?t[i]:{},t[i]},t),t};})(Highcharts);
// End of the workaround fix
Highcharts.chart('container', {
title: { text: 'HC v.' + Highcharts.version },
series: [
{
keys: ['__proto__.polluted', 'constructor.prototype.alsoPolluted', 'y'],
data: [['yes', 'yes', 1]],
},
],
}, (chart) => {
if (
!!{}.polluted ||
!!{}.alsoPolluted
) {
chart.setTitle({
text: '! Object.prototype should not be polluted'
}, {
text: 'but is'
});
}
})