File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
src/lib/components/data-vis/table Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change 51
51
52
52
$inspect (" columns array is " , columns);
53
53
54
- const metrics = Object .keys (localCopyOfData[0 ]).slice (
55
- 1 ,
56
- localCopyOfData[0 ].length ,
57
- );
54
+ const metrics = columns
55
+ .filter ((column ) => column .dataType === " number" )
56
+ .map ((column ) => column .key );
58
57
59
58
$inspect (" metrics is" , metrics);
60
59
145
144
<caption class ="govuk-table__caption" >{caption }</caption >
146
145
<thead class =" govuk-table__head"
147
146
><tr class =" govuk-table__row" >
148
- <!-- <th scope="col" class="govuk-table__header" aria-sort="ascending"
149
- >Area</th
150
- > -->
151
147
{#each columns as column }
152
148
<th
153
149
scope =" col"
154
- class =" govuk-table__header govuk-table__header--numeric"
150
+ class ={ ` govuk-table__header ${ column . dataType === " number " ? " govuk-table__header--numeric" : " " } ` }
155
151
title ={metaData [column .key ].explainer }
156
152
aria-sort =" none"
157
153
>
You can’t perform that action at this time.
0 commit comments