Data Table
Examples
Displaying All Columns in Query
<DataTable data={orders_summary}/>
ID | Order Datetime | Order Month | First Name | Last Name | Address | State | Zipcode | Item | Category | Sales | Channel | Channel Group | Channel Month | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | 2020-06-08 | 2020-06-01 | Tracey | Coppard | tcoppard0@ameblo.jp | 2 Mosinee Trail | Minnesota | 55.4k | Model Racehorse | Sinister Toys | 12.3 | Google Paid | Paid Search | Google Paid2020-06-01 |
2 | 2019-12-11 | 2019-12-01 | Noland | Kupka | nkupka1@samsung.com | 840 Cordelia Crossing | Texas | 77.2k | Microscope | Odd Equipment | 129.6 | Tiktok Ads | Social | Tiktok Ads2019-12-01 |
3 | 2020-12-25 | 2020-12-01 | Skell | Wedge | swedge2@google.cn | 058 Moulton Trail | Florida | 32.2k | Baseball Card | Sinister Toys | 3.0 | Referral | Referral | Referral2020-12-01 |
4 | 2021-04-27 | 2021-04-01 | Bordie | Hallworth | bhallworth3@usnews.com | 66054 Mosinee Circle | Georgia | 30.2k | Mystic Pendant | Mysterious Apparel | 8.0 | Google Paid | Paid Search | Google Paid2021-04-01 |
5 | 2020-03-19 | 2020-03-01 | Harlen | Hughesdon | hhughesdon4@icio.us | 1 Northfield Junction | California | 92.8k | Running Shoes | Cursed Sporting Goods | 55.0 | Facebook Ads | Social | Facebook Ads2020-03-01 |
6 | 2021-01-04 | 2021-01-01 | Minne | Dablin | mdablin5@ameblo.jp | 6191 Dryden Alley | New York | 11.4k | Model Racehorse | Sinister Toys | 13.0 | Google Organic | Organic Search | Google Organic2021-01-01 |
7 | 2019-07-08 | 2019-07-01 | Guido | Delgardillo | gdelgardillo6@webs.com | 82 Vera Place | Tennessee | 37.9k | Fishing Rod | Cursed Sporting Goods | 89.0 | Google Organic | Organic Search | Google Organic2019-07-01 |
8 | 2021-09-19 | 2021-09-01 | Floyd | Greensides | fgreensides7@ibm.com | 292 Gina Center | Illinois | 60.5k | Mystic Pendant | Mysterious Apparel | 8.0 | Google Paid | Paid Search | Google Paid2021-09-01 |
9 | 2019-11-29 | 2019-11-01 | Judas | Grigorkin | jgrigorkin8@ted.com | 808 Armistice Drive | New Hampshire | 0.2k | Fishing Rod | Cursed Sporting Goods | 89.0 | Facebook Ads | Social | Facebook Ads2019-11-01 |
10 | 2019-12-11 | 2019-12-01 | Nona | Manhare | nmanhare9@cornell.edu | 89010 American Ash Trail | California | 94.2k | Lamp | Odd Equipment | 34.0 | Google Paid | Paid Search | Google Paid2019-12-01 |
Selecting Specific Columns
<DataTable data={orders_summary}>
<Column id=state title="Sales State"/>
<Column id=item/>
<Column id=category/>
<Column id=sales fmt=usd/>
<Column id=channel/>
</DataTable>
Sales State | Item | Category | Sales | Channel |
---|---|---|---|---|
Minnesota | Model Racehorse | Sinister Toys | $12.35 | Google Paid |
Texas | Microscope | Odd Equipment | $129.60 | Tiktok Ads |
Florida | Baseball Card | Sinister Toys | $3.00 | Referral |
Georgia | Mystic Pendant | Mysterious Apparel | $8.00 | Google Paid |
California | Running Shoes | Cursed Sporting Goods | $55.00 | Facebook Ads |
New York | Model Racehorse | Sinister Toys | $13.00 | Google Organic |
Tennessee | Fishing Rod | Cursed Sporting Goods | $89.00 | Google Organic |
Illinois | Mystic Pendant | Mysterious Apparel | $8.00 | Google Paid |
New Hampshire | Fishing Rod | Cursed Sporting Goods | $89.00 | Facebook Ads |
California | Lamp | Odd Equipment | $34.00 | Google Paid |
Custom Column Formatting
You can use the fmt
prop to format your columns using built-in format names or Excel format codes
<DataTable data={country_summary}>
<Column id=country />
<Column id=category />
<Column id=value_usd fmt=eur/>
<Column id=yoy title="Y/Y Growth" fmt=pct3/>
</DataTable>
Country | Category | Value Usd | Y/Y Growth |
---|---|---|---|
Austria | B | €87 | 2.340% |
Zimbabwe | A | €100 | 1.100% |
Yemen | B | €67 | 2.940% |
Vietnam | A | €101 | 2.340% |
Ukraine | C | €168 | 2.940% |
Thailand | C | €248 | 2.540% |
Sweden | B | €190 | -5.540% |
Romania | A | €190 | 1.340% |
Qatar | C | €113 | 5.540% |
Philippines | D | €59 | 8.280% |
Formatting Driven by Another Column
This example includes a custom_format
column, which contains a different currency format code for many of the rows.
<DataTable data={country_summary_fmts}>
<Column id=country />
<Column id=category />
<Column id=value_usd fmtColumn=custom_format/>
<Column id=yoy title="Y/Y Growth" fmt=pct3/>
</DataTable>
Country | Category | Value Usd | Y/Y Growth |
---|---|---|---|
Austria | B | €87 | 2.3% |
Zimbabwe | A | $100 | 1.1% |
Yemen | B | $67 | 2.9% |
Vietnam | A | ₫101 | 2.3% |
Ukraine | C | €168 | 2.9% |
Thailand | C | $248 | 2.5% |
Sweden | B | kr190 | -5.5% |
Romania | A | $190 | 1.3% |
Qatar | C | $113 | 5.5% |
Philippines | D | $59 | 8.3% |
Search
<DataTable data={orders_summary} search=true/>
ID | Order Datetime | Order Month | First Name | Last Name | Address | State | Zipcode | Item | Category | Sales | Channel | Channel Group | Channel Month | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | 2020-06-08 | 2020-06-01 | Tracey | Coppard | tcoppard0@ameblo.jp | 2 Mosinee Trail | Minnesota | 55.4k | Model Racehorse | Sinister Toys | 12.3 | Google Paid | Paid Search | Google Paid2020-06-01 |
2 | 2019-12-11 | 2019-12-01 | Noland | Kupka | nkupka1@samsung.com | 840 Cordelia Crossing | Texas | 77.2k | Microscope | Odd Equipment | 129.6 | Tiktok Ads | Social | Tiktok Ads2019-12-01 |
3 | 2020-12-25 | 2020-12-01 | Skell | Wedge | swedge2@google.cn | 058 Moulton Trail | Florida | 32.2k | Baseball Card | Sinister Toys | 3.0 | Referral | Referral | Referral2020-12-01 |
4 | 2021-04-27 | 2021-04-01 | Bordie | Hallworth | bhallworth3@usnews.com | 66054 Mosinee Circle | Georgia | 30.2k | Mystic Pendant | Mysterious Apparel | 8.0 | Google Paid | Paid Search | Google Paid2021-04-01 |
5 | 2020-03-19 | 2020-03-01 | Harlen | Hughesdon | hhughesdon4@icio.us | 1 Northfield Junction | California | 92.8k | Running Shoes | Cursed Sporting Goods | 55.0 | Facebook Ads | Social | Facebook Ads2020-03-01 |
6 | 2021-01-04 | 2021-01-01 | Minne | Dablin | mdablin5@ameblo.jp | 6191 Dryden Alley | New York | 11.4k | Model Racehorse | Sinister Toys | 13.0 | Google Organic | Organic Search | Google Organic2021-01-01 |
7 | 2019-07-08 | 2019-07-01 | Guido | Delgardillo | gdelgardillo6@webs.com | 82 Vera Place | Tennessee | 37.9k | Fishing Rod | Cursed Sporting Goods | 89.0 | Google Organic | Organic Search | Google Organic2019-07-01 |
8 | 2021-09-19 | 2021-09-01 | Floyd | Greensides | fgreensides7@ibm.com | 292 Gina Center | Illinois | 60.5k | Mystic Pendant | Mysterious Apparel | 8.0 | Google Paid | Paid Search | Google Paid2021-09-01 |
9 | 2019-11-29 | 2019-11-01 | Judas | Grigorkin | jgrigorkin8@ted.com | 808 Armistice Drive | New Hampshire | 0.2k | Fishing Rod | Cursed Sporting Goods | 89.0 | Facebook Ads | Social | Facebook Ads2019-11-01 |
10 | 2019-12-11 | 2019-12-01 | Nona | Manhare | nmanhare9@cornell.edu | 89010 American Ash Trail | California | 94.2k | Lamp | Odd Equipment | 34.0 | Google Paid | Paid Search | Google Paid2019-12-01 |
Deltas
<DataTable data={country_summary}>
<Column id=country />
<Column id=category />
<Column id=value_usd />
<Column id=yoy contentType=delta fmt=pct title="Y/Y Chg"/>
</DataTable>
Country | Category | Value Usd | Y/Y Chg |
---|---|---|---|
Austria | B | $87 | 2.34% ▲ |
Zimbabwe | A | $100 | 1.10% ▲ |
Yemen | B | $67 | 2.94% ▲ |
Vietnam | A | $101 | 2.34% ▲ |
Ukraine | C | $168 | 2.94% ▲ |
Thailand | C | $248 | 2.54% ▲ |
Sweden | B | $190 | -5.54% ▼ |
Romania | A | $190 | 1.34% ▲ |
Qatar | C | $113 | 5.54% ▲ |
Philippines | D | $59 | 8.28% ▲ |
Total Row
Default total aggregation is sum
<DataTable data={country_example} totalRow=true rows=5>
<Column id=country/>
<Column id=gdp_usd/>
<Column id=gdp_growth fmt='pct2'/>
<Column id=population fmt='#,##0"M"'/>
</DataTable>
Country | GDP Usd | GDP Growth | Population |
---|---|---|---|
United States | $22,996 | 1.70% | 332M |
Brazil | $1,609 | 3.20% | 213M |
Russia | $1,776 | -4.00% | 146M |
South Korea | $1,799 | 2.90% | 52M |
Canada | $1,991 | 2.90% | 38M |
- | $30,171 | 6.70% | 781M |
Using Built-in Aggregation Functions
<DataTable data={country_example} totalRow=true rows=5>
<Column id=country/>
<Column id=gdp_usd totalAgg=sum/>
<Column id=gdp_growth totalAgg=weightedMean weightCol=gdp_usd fmt='pct2'/>
<Column id=population totalAgg=mean fmt='#,##0"M"'/>
</DataTable>
Country | GDP Usd | GDP Growth | Population |
---|---|---|---|
United States | $22,996 | 1.70% | 332M |
Brazil | $1,609 | 3.20% | 213M |
Russia | $1,776 | -4.00% | 146M |
South Korea | $1,799 | 2.90% | 52M |
Canada | $1,991 | 2.90% | 38M |
- | $30,171 | 1.60% | 156M |
Custom Aggregations Values
<DataTable data={countries} totalRow=true rows=5>
<Column id=country totalAgg="Just the USA"/>
<Column id=gdp_usd totalAgg={countries[0].gdp_usd} totalFmt=usd/>
</DataTable>
Country | GDP Usd |
---|---|
United States | $22,996 |
Brazil | $1,609 |
Russia | $1,776 |
South Korea | $1,799 |
Canada | $1,991 |
Just the USA | $22,996 |
Custom Total Formats
<DataTable data={countries} totalRow=true rows=5>
<Column id=country totalAgg="All Countries"/>
<Column id=continent totalAgg=countDistinct totalFmt='# "Unique continents"'/>
<Column id=gdp_usd totalAgg=sum fmt='$#,##0"B"' totalFmt='$#,##0.0,"T"'/>
<Column id=gdp_growth totalAgg=mean fmt='pct2' totalFmt='pct1'/>
<Column id=interest_rate totalAgg=mean fmt='pct2' totalFmt='pct1'/>
<Column id=inflation_rate totalAgg=mean fmt='pct2' totalFmt='pct1'/>
<Column id=jobless_rate totalAgg=mean fmt='pct0'/>
<Column id=gov_budget totalAgg=mean fmt='0.0"%"'/>
<Column id=debt_to_gdp totalAgg=mean fmt='0"%"'/>
<Column id=current_account totalAgg=mean fmt='0.0"%"'/>
<Column id=population totalAgg=sum fmt='#,##0"M"'/>
</DataTable>
Country | Continent | GDP Usd | GDP Growth | Interest Rate | Inflation Rate | Jobless Rate | Gov Budget | Debt To GDP | Current Account | Population |
---|---|---|---|---|---|---|---|---|---|---|
United States | North America | $22,996B | 1.70% | 2.50% | 8.50% | 4% | -16.7% | 137% | -3.6% | 332M |
Brazil | South America | $1,609B | 3.20% | 13.75% | 10.07% | 9% | -4.5% | 80% | -1.8% | 213M |
Russia | Europe | $1,776B | -4.00% | 8.00% | 15.10% | 4% | 0.8% | 18% | 6.8% | 146M |
South Korea | Asia | $1,799B | 2.90% | 2.50% | 5.70% | 3% | -6.1% | 43% | 3.5% | 52M |
Canada | North America | $1,991B | 2.90% | 2.50% | 7.60% | 5% | -4.7% | 118% | 0.1% | 38M |
All Countries | 4 Unique continents | $30.2T | 1.3% | 5.9% | 9.4% | 5% | -6.2% | 79% | 1.0% | 781M |
Conditional Formatting
Default (scaleColor=green
)
<DataTable data={countries}>
<Column id=country />
<Column id=country_id align=center/>
<Column id=category align=center/>
<Column id=value_usd contentType=colorscale/>
</DataTable>
Country | Country ID | Category | Value Usd |
---|---|---|---|
Austria | 100384 | B | $87 |
Zimbabwe | 100337 | A | $100 |
Yemen | 100774 | B | $67 |
Vietnam | 104948 | A | $101 |
Ukraine | 101938 | C | $168 |
Thailand | 104837 | C | $248 |
Sweden | 101847 | B | $190 |
Romania | 101384 | A | $190 |
Qatar | 100181 | C | $113 |
Philippines | 104128 | D | $59 |
scaleColor=red
<DataTable data={countries}>
<Column id=country />
<Column id=country_id align=center/>
<Column id=category align=center/>
<Column id=value_usd contentType=colorscale scaleColor=red/>
</DataTable>
Country | Country ID | Category | Value Usd |
---|---|---|---|
Austria | 100384 | B | $87 |
Zimbabwe | 100337 | A | $100 |
Yemen | 100774 | B | $67 |
Vietnam | 104948 | A | $101 |
Ukraine | 101938 | C | $168 |
Thailand | 104837 | C | $248 |
Sweden | 101847 | B | $190 |
Romania | 101384 | A | $190 |
Qatar | 100181 | C | $113 |
Philippines | 104128 | D | $59 |
scaleColor=blue
<DataTable data={countries}>
<Column id=country />
<Column id=country_id align=center/>
<Column id=category align=center/>
<Column id=value_usd contentType=colorscale scaleColor=blue/>
</DataTable>
Country | Country ID | Category | Value Usd |
---|---|---|---|
Austria | 100384 | B | $87 |
Zimbabwe | 100337 | A | $100 |
Yemen | 100774 | B | $67 |
Vietnam | 104948 | A | $101 |
Ukraine | 101938 | C | $168 |
Thailand | 104837 | C | $248 |
Sweden | 101847 | B | $190 |
Romania | 101384 | A | $190 |
Qatar | 100181 | C | $113 |
Philippines | 104128 | D | $59 |
Custom Colors
When you pass a custom color to scaleColor
, Evidence will create a color palette for you, starting at white and ending at the color you provided. See examples further down the page to see how to specify a custom color palette with multiple colors.
<DataTable data={orders_by_category} rowNumbers=true>
<Column id=month/>
<Column id=category/>
<Column id=sales_usd0k contentType=colorscale scaleColor=#a85ab8 align=center/>
<Column id=num_orders_num0 contentType=colorscale scaleColor=#e3af05 align=center/>
<Column id=aov_usd2 contentType=colorscale scaleColor=#c43957 align=center/>
</DataTable>
Month | Category | Sales Usd0k | Num Orders Num0 | Aov Usd2 | |
---|---|---|---|---|---|
1 | 2020-06-01 | Sinister Toys | $0k | 62 | $6.80 |
2 | 2019-12-01 | Odd Equipment | $4k | 61 | $66.49 |
3 | 2020-12-01 | Sinister Toys | $1k | 74 | $7.40 |
4 | 2021-04-01 | Mysterious Apparel | $2k | 90 | $16.67 |
5 | 2020-03-01 | Cursed Sporting Goods | $3k | 56 | $59.19 |
6 | 2021-01-01 | Sinister Toys | $1k | 79 | $6.81 |
7 | 2019-07-01 | Cursed Sporting Goods | $3k | 46 | $61.32 |
8 | 2021-09-01 | Mysterious Apparel | $2k | 94 | $18.49 |
9 | 2019-11-01 | Cursed Sporting Goods | $3k | 49 | $56.43 |
10 | 2019-02-01 | Cursed Sporting Goods | $2k | 40 | $57.62 |
Custom Color Palettes
Diverging Scale
<DataTable data={numbers}>
<Column id=name/>
<Column id=number contentType=colorscale scaleColor={['#6db678','white','#ce5050']}/>
</DataTable>
Name | Number |
---|---|
A | 1 |
B | 2 |
C | 3 |
D | 4 |
E | 5 |
F | 6 |
G | 7 |
H | 8 |
I | 9 |
J | 10 |
Heatmap
<DataTable data={numbers}>
<Column id=name/>
<Column id=number contentType=colorscale scaleColor={['#6db678','#ebbb38','#ce5050']}/>
</DataTable>
Name | Number |
---|---|
A | 1 |
B | 2 |
C | 3 |
D | 4 |
E | 5 |
F | 6 |
G | 7 |
H | 8 |
I | 9 |
J | 10 |
Color Breakpoints
Use colorBreakpoints
or colorMid
/colorMin
/colorMax
to control which values are assigned to which sections of the color scale
<DataTable data={negatives} rows=all>
<Column id=name/>
<Column id=number contentType=colorscale scaleColor={['#ce5050','white','#6db678']} colorMid=0/>
</DataTable>
Name | Number |
---|---|
A | -5 |
B | -4 |
C | -3 |
D | -2 |
E | -1 |
F | 0 |
G | 1 |
H | 2 |
I | 3 |
J | 4 |
Create Scale from Another Column
The number
column in this example has a color scale defined by the scale_defining_number
column, rather than by its own values.
<DataTable data={numbers_othercol}>
<Column id=name/>
<Column id=scale_defining_number fontColor={['green','red']}/>
<Column id=number contentType=colorscale scaleColor={['#6db678','white','#ce5050']} scaleColumn=scale_defining_number fmtCol=fmt/>
</DataTable>
Name | Scale Defining Number | Number |
---|---|---|
A | 2 | 1 |
B | 10 | 2 |
C | 30 | 3 |
D | 20 | 4 |
E | 10 | 5 |
F | 5 | 6 |
G | 1 | 7 |
H | 44 | 8 |
I | 4 | 9 |
J | 55 | 10 |
Red Negatives
<DataTable data={negatives}>
<Column id=name/>
<Column id=number redNegatives=true/>
</DataTable>
Name | Number |
---|---|
A | -5 |
B | -4 |
C | -3 |
D | -2 |
E | -1 |
F | 0 |
G | 1 |
H | 2 |
I | 3 |
J | 4 |
Including Images
You can include images by indicating either an absolute path e.g. https://www.example.com/images/image.png
or a relative path e.g. /images/image.png
. For relative paths, see storing static files in a static folder.
In this example, flag
is either an absolute path or a relative path to the image.
<DataTable data={countries}>
<Column id=flag contentType=image height=30px align=center />
<Column id=country />
<Column id=country_id align=center />
<Column id=category />
<Column id=value_usd />
</DataTable>
Flag | Country | Country ID | Category | Value Usd |
---|---|---|---|---|
Austria | 100384 | B | $87 | |
Zimbabwe | 100337 | A | $100 | |
Yemen | 100774 | B | $67 | |
Vietnam | 104948 | A | $101 | |
Ukraine | 101938 | C | $168 | |
Thailand | 104837 | C | $248 | |
Sweden | 101847 | B | $190 | |
Romania | 101384 | A | $190 | |
Qatar | 100181 | C | $113 | |
Philippines | 104128 | D | $59 |
Link Columns
Link Column with Unique Labels
<DataTable data={countries}>
<Column id=country_url contentType=link linkLabel=country />
<Column id=country_id align=center />
<Column id=category />
<Column id=value_usd />
</DataTable>
Country Url | Country ID | Category | Value Usd |
---|---|---|---|
Austria | 100384 | B | $87 |
Zimbabwe | 100337 | A | $100 |
Yemen | 100774 | B | $67 |
Vietnam | 104948 | A | $101 |
Ukraine | 101938 | C | $168 |
Thailand | 104837 | C | $248 |
Sweden | 101847 | B | $190 |
Romania | 101384 | A | $190 |
Qatar | 100181 | C | $113 |
Philippines | 104128 | D | $59 |
Link Column with Consistent String Label
<DataTable data={countries}>
<Column id=country />
<Column id=country_id align=center />
<Column id=category />
<Column id=value_usd />
<Column id=country_url contentType=link linkLabel="Details →" />
</DataTable>
Country | Country ID | Category | Value Usd | Country Url |
---|---|---|---|---|
Austria | 100384 | B | $87 | Details → |
Zimbabwe | 100337 | A | $100 | Details → |
Yemen | 100774 | B | $67 | Details → |
Vietnam | 104948 | A | $101 | Details → |
Ukraine | 101938 | C | $168 | Details → |
Thailand | 104837 | C | $248 | Details → |
Sweden | 101847 | B | $190 | Details → |
Romania | 101384 | A | $190 | Details → |
Qatar | 100181 | C | $113 | Details → |
Philippines | 104128 | D | $59 | Details → |
HTML Content
```sql html_in_table
select '<b>Bold</b> text' as "HTML in Table", 0 as row_number union all
select '<i>Italic</i> text', 1 union all
select '<a href="https://evidence.dev">Link</a>', 2 union all
select '<img src="https://raw.githubusercontent.com/evidence-dev/media-kit/main/png/wordmark-gray-800.png" width="200px"/>', 3 union all
select 'Inline <code class=markdown>Code</code></br> is supported', 4
order by row_number
```
<DataTable data={html_in_table}>
<Column id="HTML in Table" contentType=html/>
</DataTable>
Html in Table |
---|
Bold text |
Italic text |
Link |
Inline Code is supported |
To apply styling to most HTML tags, you should add the class=markdown
attribute to the tag in your column. This will apply the same styling as the markdown renderer.
Row Links
External Links
This example includes a column country_url
which contains a country name as a search term in Google (e.g., https://google.ca/search?q=canada
)
<DataTable data={countries} search=true link=country_url>
<Column id=country />
<Column id=country_id align=center />
<Column id=category />
<Column id=value_usd />
</DataTable>
Click on a row to navigate using the row link:
Country | Country ID | Category | Value Usd |
---|---|---|---|
Austria | 100384 | B | $87 |
Zimbabwe | 100337 | A | $100 |
Yemen | 100774 | B | $67 |
Vietnam | 104948 | A | $101 |
Ukraine | 101938 | C | $168 |
Thailand | 104837 | C | $248 |
Sweden | 101847 | B | $190 |
Romania | 101384 | A | $190 |
Qatar | 100181 | C | $113 |
Philippines | 104128 | D | $59 |
Link to Pages in Your Project
In this example, the SQL query contains a column with links to parameterized pages in the project. Below is an example of the SQL that could be used to generate such links:
select
category,
'/parameterized-pages/' || category as category_link,
sum(sales) as sales_usd0
from needful_things.orders
group by 1
You can then use the link
property of the DataTable to use your link column as a row link (category_link
in this example):
<DataTable data={orders} link=category_link />
By default, the link column of your table is hidden. If you would like it to be displayed in the table, you can use showLinkCol=true
.
Styling
Row Shading + Row Lines
<DataTable data={countries} rowShading=true />
Country | Continent | GDP Usd | GDP Growth | Interest Rate | Inflation Rate | Jobless Rate | Gov Budget | Debt To GDP | Current Account | Population |
---|---|---|---|---|---|---|---|---|---|---|
United States | North America | $22,996 | 0.0170 | 0.0250 | 0.0850 | 0.0370 | -17 | 137.2 | -3.60 | 332 |
Brazil | South America | $1,609 | 0.0320 | 0.1375 | 0.1007 | 0.0910 | -5 | 80.3 | -1.80 | 213 |
Russia | Europe | $1,776 | -0.0400 | 0.0800 | 0.1510 | 0.0390 | 1 | 18.2 | 6.80 | 146 |
South Korea | Asia | $1,799 | 0.0290 | 0.0250 | 0.0570 | 0.0290 | -6 | 42.6 | 3.50 | 52 |
Canada | North America | $1,991 | 0.0290 | 0.0250 | 0.0760 | 0.0490 | -5 | 117.8 | 0.10 | 38 |
Italy | Europe | $2,100 | 0.0470 | 0.0050 | 0.0840 | 0.0790 | -7 | 150.8 | 2.50 | 59 |
France | Europe | $2,937 | 0.0420 | 0.0050 | 0.0580 | 0.0740 | -7 | 112.9 | 0.40 | 68 |
India | Asia | $3,173 | 0.1350 | 0.0540 | 0.0671 | 0.0780 | -9 | 74.0 | -1.70 | 1,380 |
United Kingdom | Europe | $3,187 | 0.0290 | 0.0175 | 0.1010 | 0.0380 | -6 | 95.9 | -2.60 | 68 |
Germany | Europe | $4,223 | 0.0170 | 0.0050 | 0.0790 | 0.0550 | -4 | 69.3 | 7.40 | 83 |
Row Shading + No Row Lines
<DataTable data={countries} rowShading=true rowLines=false />
Country | Continent | GDP Usd | GDP Growth | Interest Rate | Inflation Rate | Jobless Rate | Gov Budget | Debt To GDP | Current Account | Population |
---|---|---|---|---|---|---|---|---|---|---|
United States | North America | $22,996 | 0.0170 | 0.0250 | 0.0850 | 0.0370 | -17 | 137.2 | -3.60 | 332 |
Brazil | South America | $1,609 | 0.0320 | 0.1375 | 0.1007 | 0.0910 | -5 | 80.3 | -1.80 | 213 |
Russia | Europe | $1,776 | -0.0400 | 0.0800 | 0.1510 | 0.0390 | 1 | 18.2 | 6.80 | 146 |
South Korea | Asia | $1,799 | 0.0290 | 0.0250 | 0.0570 | 0.0290 | -6 | 42.6 | 3.50 | 52 |
Canada | North America | $1,991 | 0.0290 | 0.0250 | 0.0760 | 0.0490 | -5 | 117.8 | 0.10 | 38 |
Italy | Europe | $2,100 | 0.0470 | 0.0050 | 0.0840 | 0.0790 | -7 | 150.8 | 2.50 | 59 |
France | Europe | $2,937 | 0.0420 | 0.0050 | 0.0580 | 0.0740 | -7 | 112.9 | 0.40 | 68 |
India | Asia | $3,173 | 0.1350 | 0.0540 | 0.0671 | 0.0780 | -9 | 74.0 | -1.70 | 1,380 |
United Kingdom | Europe | $3,187 | 0.0290 | 0.0175 | 0.1010 | 0.0380 | -6 | 95.9 | -2.60 | 68 |
Germany | Europe | $4,223 | 0.0170 | 0.0050 | 0.0790 | 0.0550 | -4 | 69.3 | 7.40 | 83 |
No Lines or Shading
<DataTable data={countries} rowLines=false />
Country | Continent | GDP Usd | GDP Growth | Interest Rate | Inflation Rate | Jobless Rate | Gov Budget | Debt To GDP | Current Account | Population |
---|---|---|---|---|---|---|---|---|---|---|
United States | North America | $22,996 | 0.0170 | 0.0250 | 0.0850 | 0.0370 | -17 | 137.2 | -3.60 | 332 |
Brazil | South America | $1,609 | 0.0320 | 0.1375 | 0.1007 | 0.0910 | -5 | 80.3 | -1.80 | 213 |
Russia | Europe | $1,776 | -0.0400 | 0.0800 | 0.1510 | 0.0390 | 1 | 18.2 | 6.80 | 146 |
South Korea | Asia | $1,799 | 0.0290 | 0.0250 | 0.0570 | 0.0290 | -6 | 42.6 | 3.50 | 52 |
Canada | North America | $1,991 | 0.0290 | 0.0250 | 0.0760 | 0.0490 | -5 | 117.8 | 0.10 | 38 |
Italy | Europe | $2,100 | 0.0470 | 0.0050 | 0.0840 | 0.0790 | -7 | 150.8 | 2.50 | 59 |
France | Europe | $2,937 | 0.0420 | 0.0050 | 0.0580 | 0.0740 | -7 | 112.9 | 0.40 | 68 |
India | Asia | $3,173 | 0.1350 | 0.0540 | 0.0671 | 0.0780 | -9 | 74.0 | -1.70 | 1,380 |
United Kingdom | Europe | $3,187 | 0.0290 | 0.0175 | 0.1010 | 0.0380 | -6 | 95.9 | -2.60 | 68 |
Germany | Europe | $4,223 | 0.0170 | 0.0050 | 0.0790 | 0.0550 | -4 | 69.3 | 7.40 | 83 |
Column Alignment
<DataTable data={country_summary}>
<Column id=country align=right />
<Column id=country_id align=center />
<Column id=category align=left />
<Column id=value_usd align=left />
</DataTable>
Country | Country ID | Category | Value Usd |
---|---|---|---|
Austria | 100384 | B | $87 |
Zimbabwe | 100337 | A | $100 |
Yemen | 100774 | B | $67 |
Vietnam | 104948 | A | $101 |
Ukraine | 101938 | C | $168 |
Thailand | 104837 | C | $248 |
Sweden | 101847 | B | $190 |
Romania | 101384 | A | $190 |
Qatar | 100181 | C | $113 |
Philippines | 104128 | D | $59 |
Custom Column Titles
<DataTable data={country_summary}>
<Column id=country title="Country Name" />
<Column id=country_id align=center title="ID" />
<Column id=category align=center title="Product Category" />
<Column id=value_usd title="Sales in 2022" />
</DataTable>
Country Name | ID | Product Category | Sales in 2022 |
---|---|---|---|
Austria | 100384 | B | $87 |
Zimbabwe | 100337 | A | $100 |
Yemen | 100774 | B | $67 |
Vietnam | 104948 | A | $101 |
Ukraine | 101938 | C | $168 |
Thailand | 104837 | C | $248 |
Sweden | 101847 | B | $190 |
Romania | 101384 | A | $190 |
Qatar | 100181 | C | $113 |
Philippines | 104128 | D | $59 |
Raw Column Names
<DataTable data={country_summary} formatColumnTitles=false />
date | value_usd | yoy | country | category | country_id | country_code | flag | country_url |
---|---|---|---|---|---|---|---|---|
2020-04-30 | $87 | 0.0234 | Austria | B | 100384 | AT | https://flaglog.com/codes/standardized-rectangle-120px/AT.png | https://www.google.ca/search?q=austria |
2020-05-26 | $100 | 0.0110 | Zimbabwe | A | 100337 | ZW | https://flaglog.com/codes/standardized-rectangle-120px/ZW.png | https://www.google.ca/search?q=zimbabwe |
2020-05-25 | $67 | 0.0294 | Yemen | B | 100774 | YE | https://flaglog.com/codes/standardized-rectangle-120px/YE.png | https://www.google.ca/search?q=yemen |
2020-05-24 | $101 | 0.0234 | Vietnam | A | 104948 | VN | https://flaglog.com/codes/standardized-rectangle-120px/VN.png | https://www.google.ca/search?q=vietnam |
2020-05-23 | $168 | 0.0294 | Ukraine | C | 101938 | UA | https://flaglog.com/codes/standardized-rectangle-120px/UA.png | https://www.google.ca/search?q=ukraine |
2020-05-22 | $248 | 0.0254 | Thailand | C | 104837 | TH | https://flaglog.com/codes/standardized-rectangle-120px/TH.png | https://www.google.ca/search?q=thailand |
2020-05-21 | $190 | -0.0554 | Sweden | B | 101847 | SE | https://flaglog.com/codes/standardized-rectangle-120px/SE.png | https://www.google.ca/search?q=sweden |
2020-05-20 | $190 | 0.0134 | Romania | A | 101384 | RO | https://flaglog.com/codes/standardized-rectangle-120px/RO.png | https://www.google.ca/search?q=romania ! startups |
2020-05-19 | $113 | 0.0554 | Qatar | C | 100181 | QA | https://flaglog.com/codes/standardized-rectangle-120px/QA.png | https://www.google.ca/search?q=qatar |
2020-05-18 | $59 | 0.0828 | Philippines | D | 104128 | PH | https://flaglog.com/codes/standardized-rectangle-120px/PH.png | https://www.google.ca/search?q=philippines |
Groups - Accordion
Without subtotals
<DataTable data={orders} groupBy=state>
<Column id=state/>
<Column id=category totalAgg=""/>
<Column id=item totalAgg=""/>
<Column id=orders/>
<Column id=sales fmt=usd/>
<Column id=growth fmt=pct1/>
</DataTable>
State | Category | Item | Orders | Sales | Growth |
---|---|---|---|---|---|
Arkansas | |||||
Arkansas | Sinister Toys | Model Racehorse | 6 | $77 | -8.4% |
California | |||||
California | Cursed Sporting Goods | Running Shoes | 105 | $5,687 | -7.8% |
California | Odd Equipment | Lamp | 175 | $5,853 | -9.5% |
California | Mysterious Apparel | Vintage Jacket | 93 | $3,126 | -6.0% |
District of Columbia | |||||
District of Columbia | Odd Equipment | Lamp | 55 | $1,810 | 2.0% |
Florida | |||||
Florida | Sinister Toys | Baseball Card | 98 | $288 | -5.3% |
Georgia | |||||
Georgia | Mysterious Apparel | Mystic Pendant | 28 | $220 | 9.0% |
Georgia | Cursed Sporting Goods | Boxing Gloves | 15 | $314 | 4.3% |
Illinois | |||||
Illinois | Mysterious Apparel | Mystic Pendant | 26 | $207 | 8.6% |
Indiana | |||||
Indiana | Odd Equipment | Lamp | 32 | $1,051 | -2.2% |
Kansas | |||||
Kansas | Odd Equipment | Lamp | 24 | $799 | -7.6% |
Louisiana | |||||
Louisiana | Mysterious Apparel | Necklace | 13 | $166 | 0.8% |
Minnesota | |||||
Minnesota | Sinister Toys | Model Racehorse | 25 | $317 | 2.6% |
Missouri | |||||
Missouri | Mysterious Apparel | Mystic Pendant | 30 | $236 | 4.2% |
New Hampshire | |||||
New Hampshire | Cursed Sporting Goods | Fishing Rod | 2 | $178 | 3.4% |
New York | |||||
New York | Sinister Toys | Model Racehorse | 57 | $718 | 0.2% |
North Carolina | |||||
North Carolina | Odd Equipment | Lamp | 26 | $869 | 7.1% |
Ohio | |||||
Ohio | Mysterious Apparel | Vintage Jacket | 24 | $809 | 4.7% |
Pennsylvania | |||||
Pennsylvania | Mysterious Apparel | Mystic Pendant | 39 | $308 | 3.7% |
Pennsylvania | Sinister Toys | Model Racehorse | 28 | $363 | 5.0% |
Tennessee | |||||
Tennessee | Cursed Sporting Goods | Fishing Rod | 20 | $1,753 | 0.0% |
Tennessee | Mysterious Apparel | Mystic Pendant | 22 | $172 | -6.8% |
Texas | |||||
Texas | Odd Equipment | Microscope | 53 | $7,495 | -2.3% |
Texas | Sinister Toys | Model Racehorse | 104 | $1,313 | -8.7% |
West Virginia | |||||
West Virginia | Sinister Toys | Baseball Card | 15 | $45 | 9.9% |
With Subtotals
<DataTable data={orders} groupBy=state subtotals=true>
<Column id=state/>
<Column id=category totalAgg=""/>
<Column id=item totalAgg=""/>
<Column id=orders/>
<Column id=sales fmt=usd/>
<Column id=growth fmt=pct1/>
</DataTable>
State | Category | Item | Orders | Sales | Growth |
---|---|---|---|---|---|
Arkansas | 6 | $77 | -8.4% | ||
Arkansas | Sinister Toys | Model Racehorse | 6 | $77 | -8.4% |
California | 373 | $14,666 | -23.3% | ||
California | Cursed Sporting Goods | Running Shoes | 105 | $5,687 | -7.8% |
California | Odd Equipment | Lamp | 175 | $5,853 | -9.5% |
California | Mysterious Apparel | Vintage Jacket | 93 | $3,126 | -6.0% |
District of Columbia | 55 | $1,810 | 2.0% | ||
District of Columbia | Odd Equipment | Lamp | 55 | $1,810 | 2.0% |
Florida | 98 | $288 | -5.3% | ||
Florida | Sinister Toys | Baseball Card | 98 | $288 | -5.3% |
Georgia | 43 | $534 | 13.3% | ||
Georgia | Mysterious Apparel | Mystic Pendant | 28 | $220 | 9.0% |
Georgia | Cursed Sporting Goods | Boxing Gloves | 15 | $314 | 4.3% |
Illinois | 26 | $207 | 8.6% | ||
Illinois | Mysterious Apparel | Mystic Pendant | 26 | $207 | 8.6% |
Indiana | 32 | $1,051 | -2.2% | ||
Indiana | Odd Equipment | Lamp | 32 | $1,051 | -2.2% |
Kansas | 24 | $799 | -7.6% | ||
Kansas | Odd Equipment | Lamp | 24 | $799 | -7.6% |
Louisiana | 13 | $166 | 0.8% | ||
Louisiana | Mysterious Apparel | Necklace | 13 | $166 | 0.8% |
Minnesota | 25 | $317 | 2.6% | ||
Minnesota | Sinister Toys | Model Racehorse | 25 | $317 | 2.6% |
Missouri | 30 | $236 | 4.2% | ||
Missouri | Mysterious Apparel | Mystic Pendant | 30 | $236 | 4.2% |
New Hampshire | 2 | $178 | 3.4% | ||
New Hampshire | Cursed Sporting Goods | Fishing Rod | 2 | $178 | 3.4% |
New York | 57 | $718 | 0.2% | ||
New York | Sinister Toys | Model Racehorse | 57 | $718 | 0.2% |
North Carolina | 26 | $869 | 7.1% | ||
North Carolina | Odd Equipment | Lamp | 26 | $869 | 7.1% |
Ohio | 24 | $809 | 4.7% | ||
Ohio | Mysterious Apparel | Vintage Jacket | 24 | $809 | 4.7% |
Pennsylvania | 67 | $670 | 8.7% | ||
Pennsylvania | Mysterious Apparel | Mystic Pendant | 39 | $308 | 3.7% |
Pennsylvania | Sinister Toys | Model Racehorse | 28 | $363 | 5.0% |
Tennessee | 42 | $1,926 | -6.7% | ||
Tennessee | Cursed Sporting Goods | Fishing Rod | 20 | $1,753 | 0.0% |
Tennessee | Mysterious Apparel | Mystic Pendant | 22 | $172 | -6.8% |
Texas | 157 | $8,808 | -11.0% | ||
Texas | Odd Equipment | Microscope | 53 | $7,495 | -2.3% |
Texas | Sinister Toys | Model Racehorse | 104 | $1,313 | -8.7% |
West Virginia | 15 | $45 | 9.9% | ||
West Virginia | Sinister Toys | Baseball Card | 15 | $45 | 9.9% |
Closed by Default
<DataTable data={orders} groupBy=state subtotals=true totalRow=true groupsOpen=false>
<Column id=state totalAgg=countDistinct totalFmt='0 "states"'/>
<Column id=category totalAgg=countDistinct totalFmt='[=1]0 "category";0 "categories"'/>
<Column id=item totalAgg=countDistinct totalFmt='[=1]0 "item";0 "items"'/>
<Column id=orders/>
<Column id=sales fmt=usd0k/>
<Column id=growth contentType=delta fmt=pct totalAgg=weightedMean weightCol=sales/>
</DataTable>
State | Category | Item | Orders | Sales | Growth |
---|---|---|---|---|---|
Arkansas | 1 category | 1 item | 6 | $0k | -8.367% ▼ |
California | 3 categories | 3 items | 373 | $15k | -8.097% ▼ |
District of Columbia | 1 category | 1 item | 55 | $2k | 1.962% ▲ |
Florida | 1 category | 1 item | 98 | $0k | -5.340% ▼ |
Georgia | 2 categories | 2 items | 43 | $1k | 6.245% ▲ |
Illinois | 1 category | 1 item | 26 | $0k | 8.604% ▲ |
Indiana | 1 category | 1 item | 32 | $1k | -2.237% ▼ |
Kansas | 1 category | 1 item | 24 | $1k | -7.636% ▼ |
Louisiana | 1 category | 1 item | 13 | $0k | 0.793% ▲ |
Minnesota | 1 category | 1 item | 25 | $0k | 2.608% ▲ |
Missouri | 1 category | 1 item | 30 | $0k | 4.224% ▲ |
New Hampshire | 1 category | 1 item | 2 | $0k | 3.409% ▲ |
New York | 1 category | 1 item | 57 | $1k | 0.236% ▲ |
North Carolina | 1 category | 1 item | 26 | $1k | 7.105% ▲ |
Ohio | 1 category | 1 item | 24 | $1k | 4.689% ▲ |
Pennsylvania | 2 categories | 2 items | 67 | $1k | 4.388% ▲ |
Tennessee | 2 categories | 2 items | 42 | $2k | -0.593% ▼ |
Texas | 2 categories | 2 items | 157 | $9k | -3.254% ▼ |
West Virginia | 1 category | 1 item | 15 | $0k | 9.914% ▲ |
19 states | 4 categories | 10 items | 1,115 | $34k | -3.934% ▼ |
With Configured Columns
<DataTable data={orders} groupBy=category subtotals=true totalRow=true>
<Column id=state totalAgg=countDistinct totalFmt='0 "states"'/>
<Column id=category totalAgg=Total/>
<Column id=item totalAgg=countDistinct totalFmt='0 "items"'/>
<Column id=orders contentType=colorscale/>
<Column id=sales fmt=usd0k/>
<Column id=growth contentType=delta fmt=pct totalAgg=weightedMean weightCol=sales/>
</DataTable>
Category | State | Item | Orders | Sales | Growth |
---|---|---|---|---|---|
Cursed Sporting Goods | 4 states | 3 items | 142 | $8k | -5.325% ▼ |
Cursed Sporting Goods | California | Running Shoes | 105 | $6k | -7.778% ▼ |
Cursed Sporting Goods | Tennessee | Fishing Rod | 20 | $2k | 0.014% ▲ |
Cursed Sporting Goods | New Hampshire | Fishing Rod | 2 | $0k | 3.409% ▲ |
Cursed Sporting Goods | Georgia | Boxing Gloves | 15 | $0k | 4.338% ▲ |
Mysterious Apparel | 8 states | 3 items | 275 | $5k | -1.934% ▼ |
Mysterious Apparel | Georgia | Mystic Pendant | 28 | $0k | 8.972% ▲ |
Mysterious Apparel | Illinois | Mystic Pendant | 26 | $0k | 8.604% ▲ |
Mysterious Apparel | Pennsylvania | Mystic Pendant | 39 | $0k | 3.702% ▲ |
Mysterious Apparel | Tennessee | Mystic Pendant | 22 | $0k | -6.762% ▼ |
Mysterious Apparel | California | Vintage Jacket | 93 | $3k | -6.009% ▼ |
Mysterious Apparel | Louisiana | Necklace | 13 | $0k | 0.793% ▲ |
Mysterious Apparel | Ohio | Vintage Jacket | 24 | $1k | 4.689% ▲ |
Mysterious Apparel | Missouri | Mystic Pendant | 30 | $0k | 4.224% ▲ |
Odd Equipment | 6 states | 2 items | 365 | $18k | -4.013% ▼ |
Odd Equipment | Texas | Microscope | 53 | $7k | -2.306% ▼ |
Odd Equipment | California | Lamp | 175 | $6k | -9.522% ▼ |
Odd Equipment | Indiana | Lamp | 32 | $1k | -2.237% ▼ |
Odd Equipment | North Carolina | Lamp | 26 | $1k | 7.105% ▲ |
Odd Equipment | Kansas | Lamp | 24 | $1k | -7.636% ▼ |
Odd Equipment | District of Columbia | Lamp | 55 | $2k | 1.962% ▲ |
Sinister Toys | 7 states | 2 items | 333 | $3k | -3.309% ▼ |
Sinister Toys | Minnesota | Model Racehorse | 25 | $0k | 2.608% ▲ |
Sinister Toys | Florida | Baseball Card | 98 | $0k | -5.340% ▼ |
Sinister Toys | New York | Model Racehorse | 57 | $1k | 0.236% ▲ |
Sinister Toys | Arkansas | Model Racehorse | 6 | $0k | -8.367% ▼ |
Sinister Toys | Texas | Model Racehorse | 104 | $1k | -8.668% ▼ |
Sinister Toys | West Virginia | Baseball Card | 15 | $0k | 9.914% ▲ |
Sinister Toys | Pennsylvania | Model Racehorse | 28 | $0k | 4.970% ▲ |
Total | 19 states | 10 items | 1,115 | $34k | -3.934% ▼ |
Groups - Section
Without subtotals
<DataTable data={orders} groupBy=state groupType=section/>
State | Category | Item | Orders | Sales | Growth |
---|---|---|---|---|---|
Arkansas | Sinister Toys | Model Racehorse | 6 | 77 | -0.08367 |
California | Cursed Sporting Goods | Running Shoes | 105 | 5,687 | -0.07778 |
Odd Equipment | Lamp | 175 | 5,853 | -0.09522 | |
Mysterious Apparel | Vintage Jacket | 93 | 3,126 | -0.06009 | |
District of Columbia | Odd Equipment | Lamp | 55 | 1,810 | 0.01962 |
Florida | Sinister Toys | Baseball Card | 98 | 288 | -0.05340 |
Georgia | Mysterious Apparel | Mystic Pendant | 28 | 220 | 0.08972 |
Cursed Sporting Goods | Boxing Gloves | 15 | 314 | 0.04338 | |
Illinois | Mysterious Apparel | Mystic Pendant | 26 | 207 | 0.08604 |
Indiana | Odd Equipment | Lamp | 32 | 1,051 | -0.02237 |
Kansas | Odd Equipment | Lamp | 24 | 799 | -0.07636 |
Louisiana | Mysterious Apparel | Necklace | 13 | 166 | 0.00793 |
Minnesota | Sinister Toys | Model Racehorse | 25 | 317 | 0.02608 |
Missouri | Mysterious Apparel | Mystic Pendant | 30 | 236 | 0.04224 |
New Hampshire | Cursed Sporting Goods | Fishing Rod | 2 | 178 | 0.03409 |
New York | Sinister Toys | Model Racehorse | 57 | 718 | 0.00236 |
North Carolina | Odd Equipment | Lamp | 26 | 869 | 0.07105 |
Ohio | Mysterious Apparel | Vintage Jacket | 24 | 809 | 0.04689 |
Pennsylvania | Mysterious Apparel | Mystic Pendant | 39 | 308 | 0.03702 |
Sinister Toys | Model Racehorse | 28 | 363 | 0.04970 | |
Tennessee | Cursed Sporting Goods | Fishing Rod | 20 | 1,753 | 0.00014 |
Mysterious Apparel | Mystic Pendant | 22 | 172 | -0.06762 | |
Texas | Odd Equipment | Microscope | 53 | 7,495 | -0.02306 |
Sinister Toys | Model Racehorse | 104 | 1,313 | -0.08668 | |
West Virginia | Sinister Toys | Baseball Card | 15 | 45 | 0.09914 |
With Subtotals
<DataTable data={orders} groupBy=state subtotals=true groupType=section>
<Column id=state totalAgg=countDistinct totalFmt='[=1]0 "state";0 "states"'/>
<Column id=category totalAgg=Total/>
<Column id=item totalAgg=countDistinct totalFmt='0 "items"'/>
<Column id=orders/>
<Column id=sales fmt=usd1k/>
<Column id=growth contentType=delta neutralMin=-0.02 neutralMax=0.02 fmt=pct1 totalAgg=weightedMean weightCol=sales />
</DataTable>
State | Category | Item | Orders | Sales | Growth |
---|---|---|---|---|---|
Arkansas | Sinister Toys | Model Racehorse | 6 | $0.1k | -8.4% ▼ |
Arkansas | Total | 1 items | 6 | $0.1k | -8.4% ▼ |
California | Cursed Sporting Goods | Running Shoes | 105 | $5.7k | -7.8% ▼ |
Odd Equipment | Lamp | 175 | $5.9k | -9.5% ▼ | |
Mysterious Apparel | Vintage Jacket | 93 | $3.1k | -6.0% ▼ | |
California | Total | 3 items | 373 | $14.7k | -8.1% ▼ |
District of Columbia | Odd Equipment | Lamp | 55 | $1.8k | 2.0% – |
District of Columbia | Total | 1 items | 55 | $1.8k | 2.0% – |
Florida | Sinister Toys | Baseball Card | 98 | $0.3k | -5.3% ▼ |
Florida | Total | 1 items | 98 | $0.3k | -5.3% ▼ |
Georgia | Mysterious Apparel | Mystic Pendant | 28 | $0.2k | 9.0% ▲ |
Cursed Sporting Goods | Boxing Gloves | 15 | $0.3k | 4.3% ▲ | |
Georgia | Total | 2 items | 43 | $0.5k | 6.2% ▲ |
Illinois | Mysterious Apparel | Mystic Pendant | 26 | $0.2k | 8.6% ▲ |
Illinois | Total | 1 items | 26 | $0.2k | 8.6% ▲ |
Indiana | Odd Equipment | Lamp | 32 | $1.1k | -2.2% ▼ |
Indiana | Total | 1 items | 32 | $1.1k | -2.2% ▼ |
Kansas | Odd Equipment | Lamp | 24 | $0.8k | -7.6% ▼ |
Kansas | Total | 1 items | 24 | $0.8k | -7.6% ▼ |
Louisiana | Mysterious Apparel | Necklace | 13 | $0.2k | 0.8% – |
Louisiana | Total | 1 items | 13 | $0.2k | 0.8% – |
Minnesota | Sinister Toys | Model Racehorse | 25 | $0.3k | 2.6% ▲ |
Minnesota | Total | 1 items | 25 | $0.3k | 2.6% ▲ |
Missouri | Mysterious Apparel | Mystic Pendant | 30 | $0.2k | 4.2% ▲ |
Missouri | Total | 1 items | 30 | $0.2k | 4.2% ▲ |
New Hampshire | Cursed Sporting Goods | Fishing Rod | 2 | $0.2k | 3.4% ▲ |
New Hampshire | Total | 1 items | 2 | $0.2k | 3.4% ▲ |
New York | Sinister Toys | Model Racehorse | 57 | $0.7k | 0.2% – |
New York | Total | 1 items | 57 | $0.7k | 0.2% – |
North Carolina | Odd Equipment | Lamp | 26 | $0.9k | 7.1% ▲ |
North Carolina | Total | 1 items | 26 | $0.9k | 7.1% ▲ |
Ohio | Mysterious Apparel | Vintage Jacket | 24 | $0.8k | 4.7% ▲ |
Ohio | Total | 1 items | 24 | $0.8k | 4.7% ▲ |
Pennsylvania | Mysterious Apparel | Mystic Pendant | 39 | $0.3k | 3.7% ▲ |
Sinister Toys | Model Racehorse | 28 | $0.4k | 5.0% ▲ | |
Pennsylvania | Total | 2 items | 67 | $0.7k | 4.4% ▲ |
Tennessee | Cursed Sporting Goods | Fishing Rod | 20 | $1.8k | 0.0% – |
Mysterious Apparel | Mystic Pendant | 22 | $0.2k | -6.8% ▼ | |
Tennessee | Total | 2 items | 42 | $1.9k | -0.6% – |
Texas | Odd Equipment | Microscope | 53 | $7.5k | -2.3% ▼ |
Sinister Toys | Model Racehorse | 104 | $1.3k | -8.7% ▼ | |
Texas | Total | 2 items | 157 | $8.8k | -3.3% ▼ |
West Virginia | Sinister Toys | Baseball Card | 15 | $0.0k | 9.9% ▲ |
West Virginia | Total | 1 items | 15 | $0.0k | 9.9% ▲ |
With Configured Columns
<DataTable data={orders} groupBy=category groupType=section subtotals=true totalRow=true totalRowColor=#fff0cc>
<Column id=state totalAgg=countDistinct totalFmt='[=1]0 "state";0 "states"'/>
<Column id=category totalAgg=Total/>
<Column id=item totalAgg=countDistinct totalFmt='0 "items"'/>
<Column id=orders contentType=colorscale/>
<Column id=sales fmt=usd1k/>
<Column id=growth contentType=delta neutralMin=-0.02 neutralMax=0.02 fmt=pct1 totalAgg=weightedMean weightCol=sales />
</DataTable>
Category | State | Item | Orders | Sales | Growth |
---|---|---|---|---|---|
Cursed Sporting Goods | California | Running Shoes | 105 | $5.7k | -7.8% ▼ |
Tennessee | Fishing Rod | 20 | $1.8k | 0.0% – | |
New Hampshire | Fishing Rod | 2 | $0.2k | 3.4% ▲ | |
Georgia | Boxing Gloves | 15 | $0.3k | 4.3% ▲ | |
Cursed Sporting Goods | 4 states | 3 items | 142 | $7.9k | -5.3% ▼ |
Mysterious Apparel | Georgia | Mystic Pendant | 28 | $0.2k | 9.0% ▲ |
Illinois | Mystic Pendant | 26 | $0.2k | 8.6% ▲ | |
Pennsylvania | Mystic Pendant | 39 | $0.3k | 3.7% ▲ | |
Tennessee | Mystic Pendant | 22 | $0.2k | -6.8% ▼ | |
California | Vintage Jacket | 93 | $3.1k | -6.0% ▼ | |
Louisiana | Necklace | 13 | $0.2k | 0.8% – | |
Ohio | Vintage Jacket | 24 | $0.8k | 4.7% ▲ | |
Missouri | Mystic Pendant | 30 | $0.2k | 4.2% ▲ | |
Mysterious Apparel | 8 states | 3 items | 275 | $5.2k | -1.9% – |
Odd Equipment | Texas | Microscope | 53 | $7.5k | -2.3% ▼ |
California | Lamp | 175 | $5.9k | -9.5% ▼ | |
Indiana | Lamp | 32 | $1.1k | -2.2% ▼ | |
North Carolina | Lamp | 26 | $0.9k | 7.1% ▲ | |
Kansas | Lamp | 24 | $0.8k | -7.6% ▼ | |
District of Columbia | Lamp | 55 | $1.8k | 2.0% – | |
Odd Equipment | 6 states | 2 items | 365 | $17.9k | -4.0% ▼ |
Sinister Toys | Minnesota | Model Racehorse | 25 | $0.3k | 2.6% ▲ |
Florida | Baseball Card | 98 | $0.3k | -5.3% ▼ | |
New York | Model Racehorse | 57 | $0.7k | 0.2% – | |
Arkansas | Model Racehorse | 6 | $0.1k | -8.4% ▼ | |
Texas | Model Racehorse | 104 | $1.3k | -8.7% ▼ | |
West Virginia | Baseball Card | 15 | $0.0k | 9.9% ▲ | |
Pennsylvania | Model Racehorse | 28 | $0.4k | 5.0% ▲ | |
Sinister Toys | 7 states | 2 items | 333 | $3.1k | -3.3% ▼ |
Total | 19 states | 10 items | 1,115 | $34.2k | -3.9% ▼ |
Column Groups
<DataTable data={countries} totalRow=true rows=5 wrapTitles groupBy=continent groupType=section totalRowColor=#f2f2f2>
<Column id=continent totalAgg="Total" totalFmt='# "Unique continents"'/>
<Column id=country totalAgg=countDistinct totalFmt='0 "countries"'/>
<Column id=gdp_usd totalAgg=sum fmt='$#,##0"B"' totalFmt='$#,##0.0,"T"' colGroup="GDP"/>
<Column id=gdp_growth totalAgg=weightedMean weightCol=gdp_usd fmt='pct1' colGroup="GDP" contentType=delta/>
<Column id=jobless_rate totalAgg=weightedMean weightCol=gdp_usd fmt='pct1' contentType=colorscale scaleColor=red colGroup="Labour Market"/>
<Column id=population totalAgg=sum fmt='#,##0"M"' totalFmt='#,##0.0,"B"' colGroup="Labour Market"/>
<Column id=interest_rate totalAgg=weightedMean weightCol=gdp_usd fmt='pct2' wrapTitle=false colGroup="Other"/>
<Column id=inflation_rate totalAgg=weightedMean weightCol=gdp_usd fmt='pct2' colGroup="Other"/>
<Column id=gov_budget totalAgg=weightedMean weightCol=gdp_usd fmt='0.0"%"' contentType=delta colGroup="Other"/>
<Column id=current_account totalAgg=weightedMean weightCol=gdp_usd fmt='0.0"%"' colGroup="Other"/>
</DataTable>
GDP | Labour Market | Other | |||||||
---|---|---|---|---|---|---|---|---|---|
Continent | Country | GDP Usd | GDP Growth | Jobless Rate | Population | Interest Rate | Inflation Rate | Gov Budget | Current Account |
Asia | South Korea | $1,799B | 2.9% ▲ | 2.9% | 52M | 2.50% | 5.70% | -6.1% ▼ | 3.5% |
India | $3,173B | 13.5% ▲ | 7.8% | 1,380M | 5.40% | 6.71% | -9.4% ▼ | -1.7% | |
Japan | $4,937B | 0.2% ▲ | 2.6% | 125M | -0.10% | 2.60% | -12.6% ▼ | 3.2% | |
China | $17,734B | 0.4% ▲ | 5.4% | 1,413M | 3.65% | 2.70% | -3.7% ▼ | 1.8% | |
Europe | Russia | $1,776B | -4.0% ▼ | 3.9% | 146M | 8.00% | 15.10% | 0.8% ▲ | 6.8% |
Italy | $2,100B | 4.7% ▲ | 7.9% | 59M | 0.50% | 8.40% | -7.2% ▼ | 2.5% | |
France | $2,937B | 4.2% ▲ | 7.4% | 68M | 0.50% | 5.80% | -6.5% ▼ | 0.4% | |
United Kingdom | $3,187B | 2.9% ▲ | 3.8% | 68M | 1.75% | 10.10% | -6.0% ▼ | -2.6% | |
Germany | $4,223B | 1.7% ▲ | 5.5% | 83M | 0.50% | 7.90% | -3.7% ▼ | 7.4% | |
North America | United States | $22,996B | 1.7% ▲ | 3.7% | 332M | 2.50% | 8.50% | -16.7% ▼ | -3.6% |
Canada | $1,991B | 2.9% ▲ | 4.9% | 38M | 2.50% | 7.60% | -4.7% ▼ | 0.1% | |
South America | Brazil | $1,609B | 3.2% ▲ | 9.1% | 213M | 13.75% | 10.07% | -4.5% ▼ | -1.8% |
Total | 12 countries | $68.5T | 2.0% ▲ | 4.8% | 4.0B | 2.85% | 6.52% | -9.3% ▼ | 0.1% |
Wrap Titles
<DataTable data={countries} wrapTitles=true />
Country | Continent | GDP Usd | GDP Growth | Interest Rate | Inflation Rate | Jobless Rate | Gov Budget | Debt To GDP | Current Account | Population |
---|---|---|---|---|---|---|---|---|---|---|
United States | North America | $22,996 | 0.0170 | 0.0250 | 0.0850 | 0.0370 | -17 | 137.2 | -3.60 | 332 |
Brazil | South America | $1,609 | 0.0320 | 0.1375 | 0.1007 | 0.0910 | -5 | 80.3 | -1.80 | 213 |
Russia | Europe | $1,776 | -0.0400 | 0.0800 | 0.1510 | 0.0390 | 1 | 18.2 | 6.80 | 146 |
South Korea | Asia | $1,799 | 0.0290 | 0.0250 | 0.0570 | 0.0290 | -6 | 42.6 | 3.50 | 52 |
Canada | North America | $1,991 | 0.0290 | 0.0250 | 0.0760 | 0.0490 | -5 | 117.8 | 0.10 | 38 |
Italy | Europe | $2,100 | 0.0470 | 0.0050 | 0.0840 | 0.0790 | -7 | 150.8 | 2.50 | 59 |
France | Europe | $2,937 | 0.0420 | 0.0050 | 0.0580 | 0.0740 | -7 | 112.9 | 0.40 | 68 |
India | Asia | $3,173 | 0.1350 | 0.0540 | 0.0671 | 0.0780 | -9 | 74.0 | -1.70 | 1,380 |
United Kingdom | Europe | $3,187 | 0.0290 | 0.0175 | 0.1010 | 0.0380 | -6 | 95.9 | -2.60 | 68 |
Germany | Europe | $4,223 | 0.0170 | 0.0050 | 0.0790 | 0.0550 | -4 | 69.3 | 7.40 | 83 |
DataTable
Options
Query name, wrapped in curly braces
- Options:
- query name
Number of rows to show in the table before paginating results. Use rows=all
to show all rows in the table.
- Options:
- number | all
- Default:
- 10
Background color of the header row
- Options:
- Hex color code | css color name
Font color of the header row
- Options:
- Hex color code | css color name
Background color of the total row
- Options:
- Hex color code | css color name
Font color of the total row
- Options:
- Hex color code | css color name
Background color of the table
- Options:
- Hex color code | css color name
Makes each row of your table a clickable link. Accepts the name of a column containing the link to use for each row in your table
- Options:
- column name
Sets behaviour for empty datasets. Can throw an error, a warning, or allow empty. When set to 'error', empty datasets will block builds in build:strict
. Note this only applies to initial page load - empty datasets caused by input component changes (dropdowns, etc.) are allowed.
- Default:
- error
Text to display when an empty dataset is received - only applies when emptySet
is 'warn' or 'pass', or when the empty dataset is a result of an input component change (dropdowns, etc.).
- Options:
- string
- Default:
- No records
Groups
Groups allow you to create sections within your table, increasing the density of the content you're displaying. Groups are currently limited to 1 level, but will be expanded in future versions.
Column to use to create groups. Note that groups are currently limited to a single group column.
- Options:
- column name
Specify an override format to use in the subtotal row (see available formats). Custom strings or values are unformatted by default.
- Options:
- Excel-style format | built-in format | custom format
[groupType=accordion] Background color for the accordion row
- Options:
- Hex color code | css color name
[groupType=section] Background color for the subtotal row
- Options:
- Hex color code | css color name
[groupType=section] Font color for the subtotal row
- Options:
- Hex color code | css color name
Column
Use the Column
component to choose specific columns to display in your table, and to apply options to specific columns. If you don't supply any columns to the table, it will display all columns from your query result.
Options
Column id (from SQL query)
- Options:
- column name
Override title of column
- Options:
- string
- Default:
- column name (formatted)
Format the values in the column (see available formats)
- Options:
- Excel-style format | built-in format | custom format
Column to use to format values in this column. This is used to achieve different value formats by row. The fmtColumn should contain strings of format codes - either Evidence built-in formats or Excel codes.
- Options:
- column name
Specify an override format to use in the total row (see available formats). Custom strings or values are unformatted by default.
- Options:
- Excel-style format | built-in format | custom format
Column to use as the weight values for weighted mean aggregation. If not specified, a weight of 1 for each value will be used and the result will be the same as the mean
aggregation.
- Options:
- column name
Group name to display above a group of columns. Columns with the same group name will get a shared header above them
- Options:
- string
Images
contentType=image
Height of image in pixels
- Options:
- number
- Default:
- original height of image
Width of image in pixels
- Options:
- number
- Default:
- original width of image
Alt text for image
- Options:
- column name
- Default:
- Name of the image file (excluding the file extension)
Links
contentType=link
Text to display for link
- Options:
- column name | string
- Default:
- raw url
Deltas
contentType=delta
Start of the range for 'neutral' values, which appear in grey font with a dash instead of an up/down arrow. By default, neutral is not applied to any values.
- Options:
- number
- Default:
- 0
End of the range for 'neutral' values, which appear in grey font with a dash instead of an up/down arrow. By default, neutral is not applied to any values.
- Options:
- number
- Default:
- 0
Conditional Formatting (Color Scales)
contentType=colorscale
Set a minimum for the scale. Any values below that minimum will appear in the lowest color on the scale
- Options:
- number
- Default:
- min of column
Set a midpoint for the scale
- Options:
- number
- Default:
- mid of column
Set a maximum for the scale. Any values above that maximum will appear in the highest color on the scale
- Options:
- number
- Default:
- max of column
Array of numbers to use as breakpoints for each color in your color scale. Should line up with the colors you provide in scaleColor
- Options:
- array of numbers
Column to use to define the color scale range. Values in this column will have their cell color determined by the value in the scaleColumn
- Options:
- column name
HTML
contentType=html
To apply styling to HTML tags, you will need to add the class=markdown
attribute to the HTML tag in your column. This will apply the same styling as the markdown renderer. E.g., <code class=markdown>Code</code>