You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, the code in chapter two for filter uses dim instead of dims, so the updated code should be
exportdefaultasyncfunctionlifeExpectancyTable(){constgetData=async()=>{try{constresponse=awaitfetch('data/data.json');constraw=awaitresponse.json();// pay attention to the dims, and not dimreturnraw.fact.filter(d=>d.dims.GHO==='Life expectancy at birth (years)'&&d.dims.SEX==='Both sexes'&&d.dims.YEAR==='2014').map(d=>[d.dims.COUNTRY,d.Value,]);}catch(e){console.error(e);returnundefined;}};constdata=awaitgetData();data.unshift(['Country','Life expectancy (years from birth)']);returntableFactory(data);}
However, the datatable is shown with the values, but not headers which are shown as 0 and 1.
The text was updated successfully, but these errors were encountered:
First of all, the code in chapter two for filter uses
dim
instead ofdims
, so the updated code should beHowever, the datatable is shown with the values, but not headers which are shown as 0 and 1.
The text was updated successfully, but these errors were encountered: