function fetchFicasData() { return new Promise((resolve, reject) => { fetch( 'https://xw4m-gifm-jsbn.f2.xano.io/api:UuWGQfqp/ficas_text_data') .then(response => { if (!response.ok) { // If the response is not OK, reject the promise with the status text reject(`Error: ${response.statusText}`); } else { // Otherwise, resolve the promise with the JSON data return response.json(); } }) .then(data => { resolve(data); }) .catch(error => { // If there's an error during the fetch or JSON parsing, reject the promise with the error reject(`Fetch error: ${error}`); }); }); } function replaceUnderscoreWithSpace(obj) { const newObj = {}; for (const key in obj) { if (obj.hasOwnProperty(key)) { // Replace underscores with spaces in the key const newKey = key.replace(/_/g, ' '); // Assign the value to the new key in the new object newObj[newKey] = obj[key]; } } return newObj; } // Promise.all([loadAirTableETIPage(), loadAirTableWeb3Page(), loadAirTableActivePage(), // loadAirTableDynamicPage() // ]) fetchFicasData().then(data => { const etiData = replaceUnderscoreWithSpace(data[0]); const web3Data = replaceUnderscoreWithSpace(data[1]); const activeData = replaceUnderscoreWithSpace(data[2]); const dynamicData = replaceUnderscoreWithSpace(data[3]); const ccccData = replaceUnderscoreWithSpace(data[4]); const aietiData = replaceUnderscoreWithSpace(data[5]); const acsetpData = replaceUnderscoreWithSpace(data[6]); const dataElements = [ { id: 'products-selected-eti-stat-left', key: 'ETI price in EUR', dataSource: 'etiData', format: value => `${value} EUR` }, { id: 'products-selected-eti-stat-right', key: 'YTD', dataSource: 'etiData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'products-dynamic-etp-stat-left', key: 'ETP price in EUR', dataSource: 'dynamicData', format: value => `${value} EUR` }, { id: 'products-dynamic-etp-stat-right', key: 'YTD', dataSource: 'dynamicData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'products-dynamic-etp-stat-left-mobile', key: 'ETP price in EUR', dataSource: 'dynamicData', format: value => `${value} EUR` }, { id: 'products-dynamic-etp-stat-right-mobile', key: 'YTD', dataSource: 'dynamicData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'products-selected-eti-ytd', key: 'YTD', dataSource: 'etiData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'products-selected-eti-cumulative', key: 'Cumulative Return Since Inception', dataSource: 'etiData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'products-selected-eti-1-month', key: '1 Month Cumulative Return', dataSource: 'etiData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'products-selected-eti-ytd-tablet', key: 'YTD', dataSource: 'etiData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'products-selected-eti-cumulative-tablet', key: 'Cumulative Return Since Inception', dataSource: 'etiData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'products-selected-eti-1-month-tablet', key: '1 Month Cumulative Return', dataSource: 'etiData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'products-selected-eti-ytd-mobile', key: 'YTD', dataSource: 'etiData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'products-selected-eti-cumulative-mobile', key: 'Cumulative Return Since Inception', dataSource: 'etiData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'products-selected-eti-1-month-mobile', key: '1 Month Cumulative Return', dataSource: 'etiData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'products-web3-digital-ytd', key: 'YTD', dataSource: 'web3Data', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'products-web3-digital-cumulative', key: 'Cumulative Return Since Inception', dataSource: 'web3Data', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'products-web3-digital-1-month', key: '1 Month Cumulative Return', dataSource: 'web3Data', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'products-web3-digital-ytd-tablet', key: 'YTD', dataSource: 'web3Data', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'products-web3-digital-cumulative-tablet', key: 'Cumulative Return Since Inception', dataSource: 'web3Data', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'products-web3-digital-1-month-tablet', key: '1 Month Cumulative Return', dataSource: 'web3Data', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'products-web3-digital-ytd-mobile', key: 'YTD', dataSource: 'web3Data', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'products-web3-digital-cumulative-mobile', key: 'Cumulative Return Since Inception', dataSource: 'web3Data', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'products-web3-digital-1-month-mobile', key: '1 Month Cumulative Return', dataSource: 'web3Data', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'products-active-etp-ytd', key: 'YTD', dataSource: 'activeData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'products-active-etp-cumulative', key: 'Cumulative Return Since Inception', dataSource: 'activeData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'products-active-etp-1-month', key: '1 Month Cumulative Return', dataSource: 'activeData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'products-active-etp-ytd-tablet', key: 'YTD', dataSource: 'activeData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'products-active-etp-cumulative-tablet', key: 'Cumulative Return Since Inception', dataSource: 'activeData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'products-active-etp-1-month-tablet', key: '1 Month Cumulative Return', dataSource: 'activeData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'products-active-etp-ytd-mobile', key: 'YTD', dataSource: 'activeData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'products-active-etp-cumulative-mobile', key: 'Cumulative Return Since Inception', dataSource: 'activeData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'products-active-etp-1-month-mobile', key: '1 Month Cumulative Return', dataSource: 'activeData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'products-cccc-ytd', key: 'YTD', dataSource: 'ccccData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'products-cccc-cumulative', key: 'Cumulative Return Since Inception', dataSource: 'ccccData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'products-cccc-1-month', key: '1 Month Cumulative Return', dataSource: 'ccccData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'products-cccc-ytd-tablet', key: 'YTD', dataSource: 'ccccData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'products-cccc-cumulative-tablet', key: 'Cumulative Return Since Inception', dataSource: 'ccccData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'products-cccc-1-month-tablet', key: '1 Month Cumulative Return', dataSource: 'ccccData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'products-cccc-ytd-mobile', key: 'YTD', dataSource: 'ccccData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'products-cccc-cumulative-mobile', key: 'Cumulative Return Since Inception', dataSource: 'ccccData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'products-cccc-1-month-mobile', key: '1 Month Cumulative Return', dataSource: 'ccccData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'products-aieti-ytd', key: 'YTD', dataSource: 'aietiData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'products-aieti-cumulative', key: 'Cumulative Return Since Inception', dataSource: 'aietiData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'products-aieti-1-month', key: '1 Month Cumulative Return', dataSource: 'aietiData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'products-aieti-ytd-tablet', key: 'YTD', dataSource: 'aietiData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'products-aieti-cumulative-tablet', key: 'Cumulative Return Since Inception', dataSource: 'aietiData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'products-aieti-1-month-tablet', key: '1 Month Cumulative Return', dataSource: 'aietiData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'products-aieti-ytd-mobile', key: 'YTD', dataSource: 'aietiData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'products-aieti-cumulative-mobile', key: 'Cumulative Return Since Inception', dataSource: 'aietiData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'products-aieti-1-month-mobile', key: '1 Month Cumulative Return', dataSource: 'aietiData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'products-acsetp-ytd', key: 'YTD', dataSource: 'acsetpData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'products-acsetp-cumulative', key: 'Cumulative Return Since Inception', dataSource: 'acsetpData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'products-acsetp-1-month', key: '1 Month Cumulative Return', dataSource: 'acsetpData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'products-acsetp-ytd-tablet', key: 'YTD', dataSource: 'acsetpData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'products-acsetp-cumulative-tablet', key: 'Cumulative Return Since Inception', dataSource: 'acsetpData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'products-acsetp-1-month-tablet', key: '1 Month Cumulative Return', dataSource: 'acsetpData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'products-acsetp-ytd-mobile', key: 'YTD', dataSource: 'acsetpData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'products-acsetp-cumulative-mobile', key: 'Cumulative Return Since Inception', dataSource: 'acsetpData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'products-acsetp-1-month-mobile', key: '1 Month Cumulative Return', dataSource: 'acsetpData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'products-dynamic-etp-ytd', key: 'YTD', dataSource: 'dynamicData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'products-dynamic-etp-cumulative', key: 'Cumulative Return Since Inception', dataSource: 'dynamicData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'products-dynamic-etp-1-month', key: '1 Month Cumulative Return', dataSource: 'dynamicData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'products-dynamic-etp-ytd-tablet', key: 'YTD', dataSource: 'dynamicData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'products-dynamic-etp-cumulative-tablet', key: 'Cumulative Return Since Inception', dataSource: 'dynamicData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'products-dynamic-etp-1-month-tablet', key: '1 Month Cumulative Return', dataSource: 'dynamicData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'products-dynamic-etp-ytd-mobile', key: 'YTD', dataSource: 'dynamicData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'products-dynamic-etp-cumulative-mobile', key: 'Cumulative Return Since Inception', dataSource: 'dynamicData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'products-dynamic-etp-1-month-mobile', key: '1 Month Cumulative Return', dataSource: 'dynamicData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'homepage-linechart-top-stat-left', key: 'ETI price in EUR', dataSource: 'etiData', format: value => `${value} EUR` }, { id: 'homepage-linechart-top-stat-right', key: 'YTD', dataSource: 'etiData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'homepage-linechart-bottom-stat-left', key: 'ETI price in EUR', dataSource: 'etiData', format: value => `${value} EUR` }, { id: 'homepage-linechart-bottom-stat-right', key: 'YTD', dataSource: 'etiData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'product-selected-eti-cumulative-top', key: 'Cumulative Return Since Inception', dataSource: 'etiData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'product-selected-eti-1-month-top', key: '1 Month Cumulative Return', dataSource: 'etiData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'product-selected-eti-ytd-top', key: 'YTD', dataSource: 'etiData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'product-selected-eti-cumulative-navbar', key: 'Cumulative Return Since Inception', dataSource: 'etiData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'product-selected-eti-1-month-navbar', key: '1 Month Cumulative Return', dataSource: 'etiData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'product-selected-eti-ytd-navbar', key: 'YTD', dataSource: 'etiData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'product-selected-eti-risk-ficas-sd', key: 'ETI Standard deviation', dataSource: 'etiData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'product-selected-eti-risk-ficas-md', key: 'ETI Max drawdown', dataSource: 'etiData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'product-selected-eti-risk-cci30-sd', key: 'CCI30 Standard deviation', dataSource: 'etiData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'product-selected-eti-risk-cci30-md', key: 'CCI30 Max drawdown', dataSource: 'etiData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'product-web3-digital-cumulative-top', key: 'Cumulative Return Since Inception', dataSource: 'web3Data', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'product-web3-digital-1-month-top', key: '1 Month Cumulative Return', dataSource: 'web3Data', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'product-web3-digital-ytd-top', key: 'YTD', dataSource: 'web3Data', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'product-web3-digital-cumulative-navbar', key: 'Cumulative Return Since Inception', dataSource: 'web3Data', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'product-web3-digital-month-navbar', key: '1 Month Cumulative Return', dataSource: 'web3Data', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'product-web3-digital-ytd-navbar', key: 'YTD', dataSource: 'web3Data', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'product-web3-digital-risk-ficas-sd', key: 'Web 3 Standard deviation', dataSource: 'web3Data', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'product-web3-digital-risk-ficas-md', key: 'Web 3 Max drawdown', dataSource: 'web3Data', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'product-web3-digital-risk-cci30-sd', key: 'CCI30 Standard deviation', dataSource: 'web3Data', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'product-web3-digital-risk-cci30-md', key: 'CCI30 Max drawdown', dataSource: 'web3Data', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'product-active-etp-cumulative-top', key: 'Cumulative Return Since Inception', dataSource: 'activeData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'product-active-etp-1-month-top', key: '1 Month Cumulative Return', dataSource: 'activeData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'product-active-etp-ytd-top', key: 'YTD', dataSource: 'activeData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'product-active-etp-cumulative-navbar', key: 'Cumulative Return Since Inception', dataSource: 'activeData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'product-active-etp-month-navbar', key: '1 Month Cumulative Return', dataSource: 'activeData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'product-active-etp-ytd-navbar', key: 'YTD', dataSource: 'activeData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'product-active-etp-risk-ficas-sd', key: '15 FiCAS Active ETP Standard deviation', dataSource: 'activeData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'product-active-etp-risk-ficas-md', key: '15 FiCAS Active ETP Max drawdown', dataSource: 'activeData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'product-active-etp-risk-cci30-sd', key: 'BTC Standard deviation', dataSource: 'activeData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'product-active-etp-risk-cci30-md', key: 'BTC Max drawdown', dataSource: 'activeData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'product-cccc-risk-ficas-sd', key: 'CCCC Standard deviation', dataSource: 'ccccData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'product-cccc-risk-ficas-md', key: 'CCCC Max drawdown', dataSource: 'ccccData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'product-cccc-risk-cci30-sd', key: 'CCi30 Standard deviation', dataSource: 'ccccData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'product-cccc-risk-cci30-md', key: 'CCi30 Max drawdown', dataSource: 'ccccData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'product-aieti-risk-ficas-sd', key: 'AI ETI Standard deviation', dataSource: 'aietiData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'product-aieti-risk-ficas-md', key: 'AI ETI Max drawdown', dataSource: 'aietiData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'product-acsetp-risk-ficas-sd', key: 'SECTR Standard deviation', dataSource: 'acsetpData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'product-acsetp-risk-ficas-md', key: 'SECTR Max drawdown', dataSource: 'acsetpData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'product-dynamic-etp-cumulative-top', key: 'Cumulative Return Since Inception', dataSource: 'dynamicData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'product-dynamic-etp-1-month-top', key: '1 Month Cumulative Return', dataSource: 'dynamicData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'product-dynamic-etp-ytd-top', key: 'YTD', dataSource: 'dynamicData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'product-cccc-cumulative-top', key: 'Cumulative Return Since Inception', dataSource: 'ccccData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'product-cccc-1-month-top', key: '1 Month Cumulative Return', dataSource: 'ccccData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'product-cccc-ytd-top', key: 'YTD', dataSource: 'ccccData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'product-aieti-cumulative-top', key: 'Cumulative Return Since Inception', dataSource: 'aietiData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'product-aieti-1-month-top', key: '1 Month Cumulative Return', dataSource: 'aietiData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'product-aieti-ytd-top', key: 'YTD', dataSource: 'aietiData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'product-acsetp-cumulative-top', key: 'Cumulative Return Since Inception', dataSource: 'acsetpData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'product-acsetp-1-month-top', key: '1 Month Cumulative Return', dataSource: 'acsetpData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'product-acsetp-ytd-top', key: 'YTD', dataSource: 'acsetpData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'product-cccc-cumulative-navbar', key: 'Cumulative Return Since Inception', dataSource: 'ccccData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'product-cccc-month-navbar', key: '1 Month Cumulative Return', dataSource: 'ccccData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'product-cccc-ytd-navbar', key: 'YTD', dataSource: 'ccccData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'product-aieti-cumulative-navbar', key: 'Cumulative Return Since Inception', dataSource: 'aietiData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'product-aieti-month-navbar', key: '1 Month Cumulative Return', dataSource: 'aietiData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'product-aieti-ytd-navbar', key: 'YTD', dataSource: 'aietiData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'product-acsetp-cumulative-navbar', key: 'Cumulative Return Since Inception', dataSource: 'acsetpData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'product-acsetp-month-navbar', key: '1 Month Cumulative Return', dataSource: 'acsetpData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'product-acsetp-ytd-navbar', key: 'YTD', dataSource: 'acsetpData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'product-dynamic-etp-cumulative-navbar', key: 'Cumulative Return Since Inception', dataSource: 'dynamicData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'product-dynamic-etp-month-navbar', key: '1 Month Cumulative Return', dataSource: 'dynamicData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'product-dynamic-etp-ytd-navbar', key: 'YTD', dataSource: 'dynamicData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'product-dynamic-etp-risk-ficas-sd', key: 'Dynamic ETP Standard deviation', dataSource: 'dynamicData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'product-dynamic-etp-risk-ficas-md', key: 'Dynamic ETP Max drawdown', dataSource: 'dynamicData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'product-dynamic-etp-risk-cci30-sd', key: 'S P 500 Standard deviation', dataSource: 'dynamicData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'product-dynamic-etp-risk-cci30-md', key: 'S P 500 Max drawdown', dataSource: 'dynamicData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'navbar-selected-eti-cumulative', key: 'Cumulative Return Since Inception', dataSource: 'etiData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'navbar-selected-eti-1-month', key: '1 Month Cumulative Return', dataSource: 'etiData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'navbar-selected-eti-ytd', key: 'YTD', dataSource: 'etiData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'navbar-web3-digital-cumulative', key: 'Cumulative Return Since Inception', dataSource: 'web3Data', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'navbar-web3-digital-1-month', key: '1 Month Cumulative Return', dataSource: 'web3Data', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'navbar-web3-digital-ytd', key: 'YTD', dataSource: 'web3Data', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'navbar-active-etp-cumulative', key: 'Cumulative Return Since Inception', dataSource: 'activeData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'navbar-active-etp-1-month', key: '1 Month Cumulative Return', dataSource: 'activeData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'navbar-active-etp-ytd', key: 'YTD', dataSource: 'activeData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'navbar-dynamic-etp-cumulative', key: 'Cumulative Return Since Inception', dataSource: 'dynamicData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'navbar-dynamic-etp-1-month', key: '1 Month Cumulative Return', dataSource: 'dynamicData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'navbar-dynamic-etp-ytd', key: 'YTD', dataSource: 'dynamicData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'navbar-cccc-cumulative', key: 'Cumulative Return Since Inception', dataSource: 'ccccData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'navbar-cccc-1-month', key: '1 Month Cumulative Return', dataSource: 'ccccData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'navbar-cccc-ytd', key: 'YTD', dataSource: 'ccccData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'navbar-ai-etp-cumulative', key: 'Cumulative Return Since Inception', dataSource: 'aietiData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'navbar-ai-etp-1-month', key: '1 Month Cumulative Return', dataSource: 'aietiData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'navbar-ai-etp-ytd', key: 'YTD', dataSource: 'aietiData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'navbar-active-sector-etp-cumulative', key: 'Cumulative Return Since Inception', dataSource: 'acsetpData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'navbar-active-sector-etp-1-month', key: '1 Month Cumulative Return', dataSource: 'acsetpData', format: value => `${(value * 100).toFixed(2)}%` }, { id: 'navbar-active-sector-etp-ytd', key: 'YTD', dataSource: 'acsetpData', format: value => `${(value * 100).toFixed(2)}%` } ]; dataElements.forEach(element => { const el = document.getElementById(element.id); if (el) { const dataSource = eval(element.dataSource); el.textContent = element.format(dataSource[element.key]); } }); });