(function () {
const CHART_ENGINE_NAME = ‘CustomDataChart_MARKETWATCH_0_12_0’;
const LOAD_STATE_LOADING = “LOAD_STATE_LOADING”;
const LOAD_STATE_LOADED = “LOAD_STATE_LOADED”;
if (!window.CHARTLOS_ENGINES_STATUS)
window.CHARTLOS_ENGINES_STATUS = ;
const isFirstEngineLoad = !window.CHARTLOS_ENGINES_STATUS[CHART_ENGINE_NAME];
if (isFirstEngineLoad)
window.CHARTLOS_ENGINES_STATUS[CHART_ENGINE_NAME] = LOAD_STATE_LOADING;
if (window.CHARTLOS_ENGINES_STATUS[CHART_ENGINE_NAME] === LOAD_STATE_LOADING)
window.addEventListener(“chartlosScriptLoad”, (evt) =>
if (evt.detail === CHART_ENGINE_NAME)
init();
);
else
init();
if (isFirstEngineLoad)
const awsStr = ‘https://djcs-olympics.s3.amazonaws.com/custom-data-charts/custom-data-chart-marketwatch-0.12.0.min.js’;
Promise.all([loadCSS(‘https://asset.barrons.com/dynamic-insets/charts/marketwatch-digital.3.css’), loadScript(awsStr)]).then(() =>
window.CHARTLOS_ENGINES_STATUS[CHART_ENGINE_NAME] = LOAD_STATE_LOADED;
const event = new CustomEvent(‘chartlosScriptLoad’, detail: CHART_ENGINE_NAME );
window.dispatchEvent(event);
).catch(error =>
console.error(`Chartlos Error: $error`)
);
function loadCSS(cssURL) {
if (cssURL)
return new Promise((resolve, reject) =>
const link = document.createElement(‘link’);
link.rel = ‘stylesheet’;
link.type = ‘text/css’
link.href = cssURL;
link.onload = resolve;
link.onerror = function()
reject(new Error(`Chartlos css failed to load from the src: $cssURL.`))
document.head.appendChild(link);
)
else
return Promise.resolve();
}
function loadScript(src)
return new Promise((resolve, reject) =>
const script = document.createElement(‘script’);
script.async = true;
script.onload = resolve;
script.onerror = function()
reject(new Error(`Chartlos engine failed to load from the src: $src.`))
script.setAttribute(‘src’, src);
document.getElementById(“chart_b3359127f6ddafaf04d88ac9”).appendChild(script);
)
function init() {
let width = 0;
let timeoutId;
const ChartEngine = window[CHART_ENGINE_NAME];
const options = {“isStaging”:false,”skipUpdate”:false,”series”:[“name”:”SPX”,”symbol”:”SPX”,”markdown”:”series”,”decimals”:2,”prefix”:””,”suffix”:””,”tickerType”:”Index”,”showInLegend”:true,”data”:[“y”:3811.14974959828,”y”:3841.94137113893,”y”:3943.34279505168,”y”:3913.09920508966,”y”:3974.5368731917,”y”:4019.87,”y”:4128.80207984965,”y”:4185.46871075711,”y”:4180.16737629523,”y”:4181.17489544079,”y”:4232.60137825733,”y”:4173.85409424243,”y”:4155.85781173105,”y”:4204.11,”y”:4229.89060410313,”y”:4247.43978475243,”y”:4166.45323733481,”y”:4280.7024217071,”y”:4352.34,”y”:4369.55099818166,”y”:4327.15815383649,”y”:4411.79242160244,”y”:4395.26397216318,”y”:4436.5177567441,”y”:4468.00324399052,”y”:4441.66518209213,”y”:4509.36908937952,”y”:4535.43,”y”:4458.57985453462,”y”:4432.98748002952,”y”:4455.4779158833,”y”:4357.03887533834,”y”:4391.33805216648,”y”:4471.36845421777,”y”:4544.89825268172,”y”:4605.3766481776,”y”:4697.52680548523,”y”:4682.84739595077,”y”:4697.95510644297,”y”:4594.61827751423,”y”:4538.42786493653,”y”:4712.02413615172,”y”:4620.63898525376,”y”:4725.79,”y”:4766.18297242831,”y”:4677.02765673394,”y”:4662.85,”y”:4397.93917452807,”y”:4431.84911901363,”y”:4500.5314571996,”y”:4418.63651709235,”y”:4348.87,”y”:4384.65449108098,”y”:4328.87288645792,”y”:4204.31185061722,”y”:4463.117590483,”y”:4543.05637878789,”y”:4545.85553739713,”y”:4488.28175147148,”y”:4392.59,”y”:4271.77561930729,”y”:4131.9264103776,”y”:4123.33565011693,”y”:4023.89127017048,”y”:3901.36057603227,”y”:4158.24,”y”:4108.53540807609,”y”:3900.86447578119,”y”:3674.84136004501,”y”:3911.7438513629,”y”:3825.33,”y”:3899.37714759523,”y”:3863.16282712398,”y”:3961.63488124323,”y”:4130.28577381916,”y”:4145.18907742856,”y”:4280.15052801321,”y”:4228.47848819532,”y”:4057.66307108622,”y”:3924.26,”y”:4067.36232459575,”y”:3873.33427273986,”y”:3693.2335292453,”y”:3585.62410354868,”y”:3639.66002576183,”y”:3583.06911496471,”y”:3752.74785302527,”y”:3901.06379685648,”y”:3770.54643792558,”y”:3992.92773919241,”y”:3965.33930068925,”y”:4026.11549849075,”y”:4071.70003337522,”y”:3934.37647622434,”y”:3852.36359299055,”y”:3844.82,”y”:3839.5,”y”:3895.07556779247,”y”:3999.09,”y”:3972.61045284292,”y”:4070.55829205337,”y”:4136.4816001272,”y”:4090.46196492792,”y”:4079.09,”y”:3970.03677595126,”y”:4045.63764756572,”y”:3861.58990838957,”y”:3916.63723885714,”y”:3970.98641190523,”y”:4109.31244462147,”y”:4105.02,”y”:4137.63873473667,”y”:4133.52132040314,”y”:4169.48140063598,”y”:4136.25335453818,”y”:4124.08102151994,”y”:4191.97978780284,”y”:4205.45,”y”:4282.36557298293,”y”:4298.85731384696,”y”:4409.59,”y”:4348.33067094926,”y”:4450.38131180921,”y”:4398.95265992047,”y”:4505.42033933513,”y”:4536.33853701547,”y”:4582.23132534368,”y”:4478.03384306695,”y”:4464.05456257282,”y”:4369.7115006548,”y”:4405.70573105304,”y”:4515.77,”y”:4457.48930856539,”y”:4450.31628318222,”y”:4320.05712658047,”y”:4288.05412263992,”y”:4308.50225926671,”y”:4327.78302724628,”y”:4224.15948286722,”y”:4117.37382831942,”y”:4358.33518200419,”y”:4415.24469100287,”y”:4514.01786343295,”y”:4559.33520893394,”y”:4594.63158053104,”y”:4604.37225436089,”y”:4719.19064895214,”y”:4754.63144747396,”y”:4769.82941079067,”y”:4697.24493980366,”y”:4783.83,”y”:4839.81142444367,”y”:4890.97051286915,”y”:4958.61389196024,”y”:5026.60857518218,”y”:5005.57,”y”:5094.87],”dashStyle”:”solid”,”opacity”:100,”colorIndex”:0,”color”:”#89b8e3″,”negativeColor”:”#a76cc0″,”negativeColorIdx”:1],”categories”:[“02/26/2021″,”03/05/2021″,”03/12/2021″,”03/18/2021″,”03/26/2021″,”04/02/2021″,”04/09/2021″,”04/16/2021″,”04/23/2021″,”04/30/2021″,”05/07/2021″,”05/14/2021″,”05/21/2021″,”05/28/2021″,”06/04/2021″,”06/11/2021″,”06/18/2021″,”06/25/2021″,”07/02/2021″,”07/09/2021″,”07/16/2021″,”07/23/2021″,”07/30/2021″,”08/06/2021″,”08/13/2021″,”08/20/2021″,”08/27/2021″,”09/03/2021″,”09/10/2021″,”09/17/2021″,”09/24/2021″,”10/01/2021″,”10/08/2021″,”10/15/2021″,”10/22/2021″,”10/29/2021″,”11/05/2021″,”11/12/2021″,”11/19/2021″,”11/26/2021″,”12/03/2021″,”12/10/2021″,”12/17/2021″,”12/24/2021″,”12/31/2021″,”01/07/2022″,”01/14/2022″,”01/21/2022″,”01/28/2022″,”02/04/2022″,”02/11/2022″,”02/18/2022″,”02/25/2022″,”03/04/2022″,”03/11/2022″,”03/17/2022″,”03/25/2022″,”04/01/2022″,”04/08/2022″,”04/15/2022″,”04/22/2022″,”04/29/2022″,”05/06/2022″,”05/13/2022″,”05/20/2022″,”05/27/2022″,”06/03/2022″,”06/10/2022″,”06/17/2022″,”06/24/2022″,”07/01/2022″,”07/08/2022″,”07/15/2022″,”07/22/2022″,”07/29/2022″,”08/05/2022″,”08/12/2022″,”08/19/2022″,”08/26/2022″,”09/02/2022″,”09/09/2022″,”09/16/2022″,”09/23/2022″,”09/30/2022″,”10/07/2022″,”10/14/2022″,”10/21/2022″,”10/28/2022″,”11/04/2022″,”11/11/2022″,”11/18/2022″,”11/25/2022″,”12/02/2022″,”12/09/2022″,”12/16/2022″,”12/23/2022″,”12/30/2022″,”01/06/2023″,”01/13/2023″,”01/20/2023″,”01/27/2023″,”02/03/2023″,”02/10/2023″,”02/17/2023″,”02/24/2023″,”03/03/2023″,”03/10/2023″,”03/16/2023″,”03/24/2023″,”03/31/2023″,”04/07/2023″,”04/14/2023″,”04/21/2023″,”04/28/2023″,”05/05/2023″,”05/12/2023″,”05/19/2023″,”05/26/2023″,”06/02/2023″,”06/09/2023″,”06/16/2023″,”06/23/2023″,”06/30/2023″,”07/07/2023″,”07/14/2023″,”07/21/2023″,”07/28/2023″,”08/04/2023″,”08/11/2023″,”08/18/2023″,”08/25/2023″,”09/01/2023″,”09/08/2023″,”09/15/2023″,”09/22/2023″,”09/29/2023″,”10/06/2023″,”10/13/2023″,”10/20/2023″,”10/27/2023″,”11/03/2023″,”11/10/2023″,”11/17/2023″,”11/24/2023″,”12/01/2023″,”12/08/2023″,”12/15/2023″,”12/22/2023″,”12/29/2023″,”01/05/2024″,”01/12/2024″,”01/19/2024″,”01/26/2024″,”02/02/2024″,”02/09/2024″,”02/16/2024″,”02/23/2024″],”annotations”:[],”legend”:”enabled”:false,”layout”:”default”,”showColorChips”:true,”itemsInOrder”:false,”headings”:”title”:”text”:”S&P 500 jumps in 2024″,”enabled”:true,”dek”:”text”:””,”enabled”:true,”subdek”:”text”:”S&P 500 Index”,”enabled”:true,”note”:”text”:”Note: “,”enabled”:false,”source”:”text”:”Source: FactSet”,”enabled”:true,”date”:”text”:”As of Feb. 23, 12 p.m. ET”,”enabled”:false,”xaxisTitle”:”text”:””,”enabled”:true,”yaxisTitle”:”text”:””,”enabled”:true,”slug”:”0″:”s”,”1″:”p”,”2″:”x”,”3″:”0″,”4″:”2″,”5″:”2″,”6″:”3″,”subdekPromo”:”text”:””,”enabled”:false,”sourcePromo”:”text”:”Source: “,”enabled”:false,”notePromo”:”text”:”Note: “,”enabled”:false,”chartFont”:”en”,”altText”:”text”:””,”modifiedByUser”:false,”prevProp”:”dek”,”xAxisInterval”:”auto”,”mobileXAxisInterval”:”auto”,”mobileXAxisIntervalSameAsDesktop”:true,”yAxisInterval”:””,”yAxisMobileInterval”:””,”yAxisMobileEnabled”:true,”logScale”:false,”allowDecimals”:true,”plotBands”:[],”plotBandPresets”:[],”majorTicksArticle”:”halfDecade”,”minorTicksArticle”:”year”,”majorTicksPrint”:”halfDecade”,”minorTicksPrint”:”year”,”majorTicksPromo”:”year”,”minorTicksPromo”:”month”,”hiddenCategoriesArticle”:[],”hiddenCategoriesPrint”:[],”hiddenCategoriesPromo”:[],”dateSpan”:94348800000,”minorLabelsVisible”:false,”plotLines”:[“plotLineValue”:””,”plotLineDashStyle”:”solid”,”plotLineLabel”:””,”plotLineLabelPosition”:”top right”,”plotLineColor”:””],”colorMode”:”DEFAULT”,”horizontalBarType”:”normal”,”specialHorizontalBarXValue”:””,”horizontalBarLabel”:true,”step”:false,”liveMarketData”:true,”isIntraday”:false,”needsCommas”:false,”isPercent”:false,”singleIsPercent”:false,”tickers”:[“chartingSymbol”:”INDEX/US/S&P US/SPX”,”company”:”S&P 500 Index”,”country”:”US”,”djnSymbol”:null,”exchange”:”S&P US”,”exchangeIsoCode”:”S&P US”,”isFuture”:false,”factivaCode”:null,”ticker”:”SPX”,”type”:”Index”,”score”:1],”dateRange”:”3Y”,”start”:”2021-02-26T00:00:00-05:00″,”end”:”2024-02-23T00:00:00-05:00″,”isRolling”:false,”frequency”:”P7D”,”showMinorTicks”:true,”showTooltips”:true,”connectEmptyDataPoints”:”dotted”,”markedDataPoints”:false,”categoriesAreDates”:true,”categoriesAreMonthly”:false,”fiscalYears”:false,”irregularDates”:true,”reverseDateMonth”:false,”removeOverlappingCategories”:false,”allowCategoriesLinebreak”:false,”suppress”:,”el”:null,”type”:”line”,”product”:”marketwatch”,”width”:480,”sizes”:”marketwatch-4u-inset”:”axes”:”shown”:true,”tickStyle”:null,”units”:”commas”:false,”prefix”:””,”suffix”:””,”divisor”:”none”,”showRecessions”:false,”showUkRecessions”:false,”reversed”:false,”xAxis”:,”yAxis”:,”stacking”:null,”tooltips”:”commas”:false,”prefix”:””,”suffix”:””,”divisor”:”none”,”sameAsAxes”:true,”height”:400,”editing”:true,”marketwatch-8u-inset”:”axes”:”shown”:true,”tickStyle”:null,”units”:”commas”:false,”prefix”:””,”suffix”:””,”divisor”:”none”,”showRecessions”:false,”showUkRecessions”:false,”reversed”:false,”xAxis”:,”yAxis”:,”stacking”:null,”tooltips”:”commas”:false,”prefix”:””,”suffix”:””,”divisor”:”none”,”sameAsAxes”:true,”height”:434,”editing”:true,”marketwatch-12u-inset”:”axes”:”shown”:true,”tickStyle”:null,”units”:”commas”:false,”prefix”:””,”suffix”:””,”divisor”:”none”,”showRecessions”:false,”showUkRecessions”:false,”reversed”:false,”xAxis”:,”yAxis”:,”stacking”:null,”tooltips”:”commas”:false,”prefix”:””,”suffix”:””,”divisor”:”none”,”sameAsAxes”:true,”height”:505,”editing”:true,”marketwatch-thumb”:”axes”:”shown”:true,”tickStyle”:null,”units”:”commas”:false,”prefix”:””,”suffix”:””,”divisor”:”none”,”showRecessions”:false,”showUkRecessions”:false,”reversed”:false,”xAxis”:,”yAxis”:,”stacking”:null,”tooltips”:”commas”:false,”prefix”:””,”suffix”:””,”divisor”:”none”,”sameAsAxes”:true,”height”:169,”editing”:true,”size”:null,”print”:null,”defaults”:”colors”:[“#89b8e3″,”#a76cc0″,”#61c9ae”,”#f8954a”,”#67B2CF”,”#4DB74D”,”#FD523B”,”#F6881F”,”#F9E073″,”#286E84″,”#4d4d4d”,”#919191″,”rgba(0, 0, 0, 0)”,”#3677A8″,”#367F2E”,”#101010″],”sizes”:[“id”:”marketwatch-4u-inset”,”label”:”Inset Mobile”,”width”:300,”height”:400,”minWidth”:0,”minHeight”:200,”maxHeight”:3000,”interactive”:true,”scale”:2,”target”:”marketwatch”,”publish”:”inset”,”group”:”Dynamic Insets/IFrames”,”id”:”marketwatch-8u-inset”,”label”:”Inset MG”,”width”:620,”height”:434,”minWidth”:360,”minHeight”:200,”maxHeight”:3000,”interactive”:true,”scale”:1,”target”:”marketwatch”,”publish”:”inset”,”group”:”Dynamic Insets/IFrames”,”id”:”marketwatch-12u-inset”,”label”:”Inset ZH”,”width”:940,”height”:505,”minWidth”:621,”minHeight”:200,”maxHeight”:3000,”interactive”:true,”scale”:1,”target”:”marketwatch”,”publish”:”inset”,”group”:”Dynamic Insets/IFrames”,”id”:”marketwatch-thumb”,”label”:”Thumb”,”width”:300,”height”:169,”minWidth”:0,”minHeight”:169,”maxHeight”:169,”interactive”:true,”scale”:1,”target”:”marketwatch”,”publish”:”inset”,”group”:”Dynamic Insets/IFrames”]};
options.el = document.getElementById(‘chart_inner_b3359127f6ddafaf04d88ac9’);
render();
window.addEventListener(‘resize’, function()
clearTimeout(timeoutId);
timeoutId = setTimeout(render, 100);
);
window.addEventListener(‘hashchange’, render);
trackAction(‘render’);
function render(event)
const newWidth = window.innerWidth;
if ((event && event.type === ‘hashchange’) ;
}
function trackAction(action)
if (window && window.NREUM)
const articleId = document.querySelector(‘meta[name=”article.id”]’);
const metaSection = document.querySelector(‘meta[name=”article.section”]’);
const pageSource = document.querySelector(‘meta[name=”page.content.source”]’);
const metaType = document.querySelector(‘meta[name=”article.type”]’);
const data =
insetName: ‘chartlos’,
chartId: ‘b3359127f6ddafaf04d88ac9’,
chartVersion: ‘0_12_0’,
chartProduct: ‘MARKETWATCH’,
articleId: articleId ? articleId.getAttribute(‘content’) : ”,
articleType: metaType ? metaType.getAttribute(‘content’) : ”,
articleSection: metaType ? metaSection.getAttribute(‘content’) : ”,
pageSource: pageSource ? pageSource.getAttribute(‘content’) : ”
window.NREUM.addPageAction(
‘chartlos:’ + action,
data
);
;
})();