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 |
---|
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 showLinkCol/>
Click on a row to navigate using the row link:
Country | Country ID | Category | Value Usd | Links |
---|---|---|---|---|
Austria | 100384 | B | $87 | See more |
Zimbabwe | 100337 | A | $100 | See more |
Yemen | 100774 | B | $67 | See more |
Vietnam | 104948 | A | $101 | See more |
Ukraine | 101938 | C | $168 | See more |
Thailand | 104837 | C | $248 | See more |
Sweden | 101847 | B | $190 | See more |
Romania | 101384 | A | $190 | See more |
Qatar | 100181 | C | $113 | See more |
Philippines | 104128 | D | $59 | See more |
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.1% |
California | |||||
California | Cursed Sporting Goods | Running Shoes | 105 | $5,687 | 5.0% |
California | Odd Equipment | Lamp | 175 | $5,853 | -9.5% |
California | Mysterious Apparel | Vintage Jacket | 93 | $3,126 | -4.9% |
District of Columbia | |||||
District of Columbia | Odd Equipment | Lamp | 55 | $1,810 | -3.0% |
Florida | |||||
Florida | Sinister Toys | Baseball Card | 98 | $288 | -5.6% |
Georgia | |||||
Georgia | Mysterious Apparel | Mystic Pendant | 28 | $220 | 4.9% |
Georgia | Cursed Sporting Goods | Boxing Gloves | 15 | $314 | 7.9% |
Illinois | |||||
Illinois | Mysterious Apparel | Mystic Pendant | 26 | $207 | 1.9% |
Indiana | |||||
Indiana | Odd Equipment | Lamp | 32 | $1,051 | -7.7% |
Kansas | |||||
Kansas | Odd Equipment | Lamp | 24 | $799 | 1.6% |
Louisiana | |||||
Louisiana | Mysterious Apparel | Necklace | 13 | $166 | 6.2% |
Minnesota | |||||
Minnesota | Sinister Toys | Model Racehorse | 25 | $317 | 2.9% |
Missouri | |||||
Missouri | Mysterious Apparel | Mystic Pendant | 30 | $236 | -8.4% |
New Hampshire | |||||
New Hampshire | Cursed Sporting Goods | Fishing Rod | 2 | $178 | 0.2% |
New York | |||||
New York | Sinister Toys | Model Racehorse | 57 | $718 | 3.2% |
North Carolina | |||||
North Carolina | Odd Equipment | Lamp | 26 | $869 | 7.3% |
Ohio | |||||
Ohio | Mysterious Apparel | Vintage Jacket | 24 | $809 | 8.9% |
Pennsylvania | |||||
Pennsylvania | Mysterious Apparel | Mystic Pendant | 39 | $308 | -6.2% |
Pennsylvania | Sinister Toys | Model Racehorse | 28 | $363 | 0.5% |
Tennessee | |||||
Tennessee | Cursed Sporting Goods | Fishing Rod | 20 | $1,753 | -3.0% |
Tennessee | Mysterious Apparel | Mystic Pendant | 22 | $172 | 8.0% |
Texas | |||||
Texas | Odd Equipment | Microscope | 53 | $7,495 | 6.7% |
Texas | Sinister Toys | Model Racehorse | 104 | $1,313 | 0.7% |
West Virginia | |||||
West Virginia | Sinister Toys | Baseball Card | 15 | $45 | 1.4% |
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.1% | ||
Arkansas | Sinister Toys | Model Racehorse | 6 | $77 | 8.1% |
California | 373 | $14,666 | -9.3% | ||
California | Cursed Sporting Goods | Running Shoes | 105 | $5,687 | 5.0% |
California | Odd Equipment | Lamp | 175 | $5,853 | -9.5% |
California | Mysterious Apparel | Vintage Jacket | 93 | $3,126 | -4.9% |
District of Columbia | 55 | $1,810 | -3.0% | ||
District of Columbia | Odd Equipment | Lamp | 55 | $1,810 | -3.0% |
Florida | 98 | $288 | -5.6% | ||
Florida | Sinister Toys | Baseball Card | 98 | $288 | -5.6% |
Georgia | 43 | $534 | 12.9% | ||
Georgia | Mysterious Apparel | Mystic Pendant | 28 | $220 | 4.9% |
Georgia | Cursed Sporting Goods | Boxing Gloves | 15 | $314 | 7.9% |
Illinois | 26 | $207 | 1.9% | ||
Illinois | Mysterious Apparel | Mystic Pendant | 26 | $207 | 1.9% |
Indiana | 32 | $1,051 | -7.7% | ||
Indiana | Odd Equipment | Lamp | 32 | $1,051 | -7.7% |
Kansas | 24 | $799 | 1.6% | ||
Kansas | Odd Equipment | Lamp | 24 | $799 | 1.6% |
Louisiana | 13 | $166 | 6.2% | ||
Louisiana | Mysterious Apparel | Necklace | 13 | $166 | 6.2% |
Minnesota | 25 | $317 | 2.9% | ||
Minnesota | Sinister Toys | Model Racehorse | 25 | $317 | 2.9% |
Missouri | 30 | $236 | -8.4% | ||
Missouri | Mysterious Apparel | Mystic Pendant | 30 | $236 | -8.4% |
New Hampshire | 2 | $178 | 0.2% | ||
New Hampshire | Cursed Sporting Goods | Fishing Rod | 2 | $178 | 0.2% |
New York | 57 | $718 | 3.2% | ||
New York | Sinister Toys | Model Racehorse | 57 | $718 | 3.2% |
North Carolina | 26 | $869 | 7.3% | ||
North Carolina | Odd Equipment | Lamp | 26 | $869 | 7.3% |
Ohio | 24 | $809 | 8.9% | ||
Ohio | Mysterious Apparel | Vintage Jacket | 24 | $809 | 8.9% |
Pennsylvania | 67 | $670 | -5.7% | ||
Pennsylvania | Mysterious Apparel | Mystic Pendant | 39 | $308 | -6.2% |
Pennsylvania | Sinister Toys | Model Racehorse | 28 | $363 | 0.5% |
Tennessee | 42 | $1,926 | 5.0% | ||
Tennessee | Cursed Sporting Goods | Fishing Rod | 20 | $1,753 | -3.0% |
Tennessee | Mysterious Apparel | Mystic Pendant | 22 | $172 | 8.0% |
Texas | 157 | $8,808 | 7.4% | ||
Texas | Odd Equipment | Microscope | 53 | $7,495 | 6.7% |
Texas | Sinister Toys | Model Racehorse | 104 | $1,313 | 0.7% |
West Virginia | 15 | $45 | 1.4% | ||
West Virginia | Sinister Toys | Baseball Card | 15 | $45 | 1.4% |
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.15% ▲ |
Arkansas | Sinister Toys | Model Racehorse | 6 | $0k | 8.15% ▲ |
California | 3 categories | 3 items | 373 | $15k | -2.87% ▼ |
California | Cursed Sporting Goods | Running Shoes | 105 | $6k | 5.02% ▲ |
California | Odd Equipment | Lamp | 175 | $6k | -9.46% ▼ |
California | Mysterious Apparel | Vintage Jacket | 93 | $3k | -4.88% ▼ |
District of Columbia | 1 category | 1 item | 55 | $2k | -2.96% ▼ |
District of Columbia | Odd Equipment | Lamp | 55 | $2k | -2.96% ▼ |
Florida | 1 category | 1 item | 98 | $0k | -5.61% ▼ |
Florida | Sinister Toys | Baseball Card | 98 | $0k | -5.61% ▼ |
Georgia | 2 categories | 2 items | 43 | $1k | 6.69% ▲ |
Georgia | Mysterious Apparel | Mystic Pendant | 28 | $0k | 4.95% ▲ |
Georgia | Cursed Sporting Goods | Boxing Gloves | 15 | $0k | 7.91% ▲ |
Illinois | 1 category | 1 item | 26 | $0k | 1.91% ▲ |
Illinois | Mysterious Apparel | Mystic Pendant | 26 | $0k | 1.91% ▲ |
Indiana | 1 category | 1 item | 32 | $1k | -7.67% ▼ |
Indiana | Odd Equipment | Lamp | 32 | $1k | -7.67% ▼ |
Kansas | 1 category | 1 item | 24 | $1k | 1.64% ▲ |
Kansas | Odd Equipment | Lamp | 24 | $1k | 1.64% ▲ |
Louisiana | 1 category | 1 item | 13 | $0k | 6.17% ▲ |
Louisiana | Mysterious Apparel | Necklace | 13 | $0k | 6.17% ▲ |
Minnesota | 1 category | 1 item | 25 | $0k | 2.94% ▲ |
Minnesota | Sinister Toys | Model Racehorse | 25 | $0k | 2.94% ▲ |
Missouri | 1 category | 1 item | 30 | $0k | -8.42% ▼ |
Missouri | Mysterious Apparel | Mystic Pendant | 30 | $0k | -8.42% ▼ |
New Hampshire | 1 category | 1 item | 2 | $0k | 0.18% ▲ |
New Hampshire | Cursed Sporting Goods | Fishing Rod | 2 | $0k | 0.18% ▲ |
New York | 1 category | 1 item | 57 | $1k | 3.17% ▲ |
New York | Sinister Toys | Model Racehorse | 57 | $1k | 3.17% ▲ |
North Carolina | 1 category | 1 item | 26 | $1k | 7.26% ▲ |
North Carolina | Odd Equipment | Lamp | 26 | $1k | 7.26% ▲ |
Ohio | 1 category | 1 item | 24 | $1k | 8.91% ▲ |
Ohio | Mysterious Apparel | Vintage Jacket | 24 | $1k | 8.91% ▲ |
Pennsylvania | 2 categories | 2 items | 67 | $1k | -2.55% ▼ |
Pennsylvania | Mysterious Apparel | Mystic Pendant | 39 | $0k | -6.21% ▼ |
Pennsylvania | Sinister Toys | Model Racehorse | 28 | $0k | 0.54% ▲ |
Tennessee | 2 categories | 2 items | 42 | $2k | -2.02% ▼ |
Tennessee | Cursed Sporting Goods | Fishing Rod | 20 | $2k | -3.00% ▼ |
Tennessee | Mysterious Apparel | Mystic Pendant | 22 | $0k | 8.03% ▲ |
Texas | 2 categories | 2 items | 157 | $9k | 5.79% ▲ |
Texas | Odd Equipment | Microscope | 53 | $7k | 6.67% ▲ |
Texas | Sinister Toys | Model Racehorse | 104 | $1k | 0.73% ▲ |
West Virginia | 1 category | 1 item | 15 | $0k | 1.41% ▲ |
West Virginia | Sinister Toys | Baseball Card | 15 | $0k | 1.41% ▲ |
19 states | 4 categories | 10 items | 1,115 | $34k | 0.29% ▲ |
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 | 3.25% ▲ |
Cursed Sporting Goods | California | Running Shoes | 105 | $6k | 5.02% ▲ |
Cursed Sporting Goods | Tennessee | Fishing Rod | 20 | $2k | -3.00% ▼ |
Cursed Sporting Goods | New Hampshire | Fishing Rod | 2 | $0k | 0.18% ▲ |
Cursed Sporting Goods | Georgia | Boxing Gloves | 15 | $0k | 7.91% ▲ |
Mysterious Apparel | 8 states | 3 items | 275 | $5k | -1.53% ▼ |
Mysterious Apparel | Georgia | Mystic Pendant | 28 | $0k | 4.95% ▲ |
Mysterious Apparel | Illinois | Mystic Pendant | 26 | $0k | 1.91% ▲ |
Mysterious Apparel | Pennsylvania | Mystic Pendant | 39 | $0k | -6.21% ▼ |
Mysterious Apparel | Tennessee | Mystic Pendant | 22 | $0k | 8.03% ▲ |
Mysterious Apparel | California | Vintage Jacket | 93 | $3k | -4.88% ▼ |
Mysterious Apparel | Louisiana | Necklace | 13 | $0k | 6.17% ▲ |
Mysterious Apparel | Ohio | Vintage Jacket | 24 | $1k | 8.91% ▲ |
Mysterious Apparel | Missouri | Mystic Pendant | 30 | $0k | -8.42% ▼ |
Odd Equipment | 6 states | 2 items | 365 | $18k | -0.63% ▼ |
Odd Equipment | Texas | Microscope | 53 | $7k | 6.67% ▲ |
Odd Equipment | California | Lamp | 175 | $6k | -9.46% ▼ |
Odd Equipment | Indiana | Lamp | 32 | $1k | -7.67% ▼ |
Odd Equipment | North Carolina | Lamp | 26 | $1k | 7.26% ▲ |
Odd Equipment | Kansas | Lamp | 24 | $1k | 1.64% ▲ |
Odd Equipment | District of Columbia | Lamp | 55 | $2k | -2.96% ▼ |
Sinister Toys | 7 states | 2 items | 333 | $3k | 1.10% ▲ |
Sinister Toys | Minnesota | Model Racehorse | 25 | $0k | 2.94% ▲ |
Sinister Toys | Florida | Baseball Card | 98 | $0k | -5.61% ▼ |
Sinister Toys | New York | Model Racehorse | 57 | $1k | 3.17% ▲ |
Sinister Toys | Arkansas | Model Racehorse | 6 | $0k | 8.15% ▲ |
Sinister Toys | Texas | Model Racehorse | 104 | $1k | 0.73% ▲ |
Sinister Toys | West Virginia | Baseball Card | 15 | $0k | 1.41% ▲ |
Sinister Toys | Pennsylvania | Model Racehorse | 28 | $0k | 0.54% ▲ |
Total | 19 states | 10 items | 1,115 | $34k | 0.29% ▲ |
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.0815 |
California | Cursed Sporting Goods | Running Shoes | 105 | 5,687 | 0.0502 |
Odd Equipment | Lamp | 175 | 5,853 | -0.0946 | |
Mysterious Apparel | Vintage Jacket | 93 | 3,126 | -0.0488 | |
District of Columbia | Odd Equipment | Lamp | 55 | 1,810 | -0.0296 |
Florida | Sinister Toys | Baseball Card | 98 | 288 | -0.0561 |
Georgia | Mysterious Apparel | Mystic Pendant | 28 | 220 | 0.0495 |
Cursed Sporting Goods | Boxing Gloves | 15 | 314 | 0.0791 | |
Illinois | Mysterious Apparel | Mystic Pendant | 26 | 207 | 0.0191 |
Indiana | Odd Equipment | Lamp | 32 | 1,051 | -0.0767 |
Kansas | Odd Equipment | Lamp | 24 | 799 | 0.0164 |
Louisiana | Mysterious Apparel | Necklace | 13 | 166 | 0.0617 |
Minnesota | Sinister Toys | Model Racehorse | 25 | 317 | 0.0294 |
Missouri | Mysterious Apparel | Mystic Pendant | 30 | 236 | -0.0842 |
New Hampshire | Cursed Sporting Goods | Fishing Rod | 2 | 178 | 0.0018 |
New York | Sinister Toys | Model Racehorse | 57 | 718 | 0.0317 |
North Carolina | Odd Equipment | Lamp | 26 | 869 | 0.0726 |
Ohio | Mysterious Apparel | Vintage Jacket | 24 | 809 | 0.0891 |
Pennsylvania | Mysterious Apparel | Mystic Pendant | 39 | 308 | -0.0621 |
Sinister Toys | Model Racehorse | 28 | 363 | 0.0054 | |
Tennessee | Cursed Sporting Goods | Fishing Rod | 20 | 1,753 | -0.0300 |
Mysterious Apparel | Mystic Pendant | 22 | 172 | 0.0803 | |
Texas | Odd Equipment | Microscope | 53 | 7,495 | 0.0667 |
Sinister Toys | Model Racehorse | 104 | 1,313 | 0.0073 | |
West Virginia | Sinister Toys | Baseball Card | 15 | 45 | 0.0141 |
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.1% ▲ |
Arkansas | Total | 1 items | 6 | $0.1k | 8.1% ▲ |
California | Cursed Sporting Goods | Running Shoes | 105 | $5.7k | 5.0% ▲ |
Odd Equipment | Lamp | 175 | $5.9k | -9.5% ▼ | |
Mysterious Apparel | Vintage Jacket | 93 | $3.1k | -4.9% ▼ | |
California | Total | 3 items | 373 | $14.7k | -2.9% ▼ |
District of Columbia | Odd Equipment | Lamp | 55 | $1.8k | -3.0% ▼ |
District of Columbia | Total | 1 items | 55 | $1.8k | -3.0% ▼ |
Florida | Sinister Toys | Baseball Card | 98 | $0.3k | -5.6% ▼ |
Florida | Total | 1 items | 98 | $0.3k | -5.6% ▼ |
Georgia | Mysterious Apparel | Mystic Pendant | 28 | $0.2k | 4.9% ▲ |
Cursed Sporting Goods | Boxing Gloves | 15 | $0.3k | 7.9% ▲ | |
Georgia | Total | 2 items | 43 | $0.5k | 6.7% ▲ |
Illinois | Mysterious Apparel | Mystic Pendant | 26 | $0.2k | 1.9% – |
Illinois | Total | 1 items | 26 | $0.2k | 1.9% – |
Indiana | Odd Equipment | Lamp | 32 | $1.1k | -7.7% ▼ |
Indiana | Total | 1 items | 32 | $1.1k | -7.7% ▼ |
Kansas | Odd Equipment | Lamp | 24 | $0.8k | 1.6% – |
Kansas | Total | 1 items | 24 | $0.8k | 1.6% – |
Louisiana | Mysterious Apparel | Necklace | 13 | $0.2k | 6.2% ▲ |
Louisiana | Total | 1 items | 13 | $0.2k | 6.2% ▲ |
Minnesota | Sinister Toys | Model Racehorse | 25 | $0.3k | 2.9% ▲ |
Minnesota | Total | 1 items | 25 | $0.3k | 2.9% ▲ |
Missouri | Mysterious Apparel | Mystic Pendant | 30 | $0.2k | -8.4% ▼ |
Missouri | Total | 1 items | 30 | $0.2k | -8.4% ▼ |
New Hampshire | Cursed Sporting Goods | Fishing Rod | 2 | $0.2k | 0.2% – |
New Hampshire | Total | 1 items | 2 | $0.2k | 0.2% – |
New York | Sinister Toys | Model Racehorse | 57 | $0.7k | 3.2% ▲ |
New York | Total | 1 items | 57 | $0.7k | 3.2% ▲ |
North Carolina | Odd Equipment | Lamp | 26 | $0.9k | 7.3% ▲ |
North Carolina | Total | 1 items | 26 | $0.9k | 7.3% ▲ |
Ohio | Mysterious Apparel | Vintage Jacket | 24 | $0.8k | 8.9% ▲ |
Ohio | Total | 1 items | 24 | $0.8k | 8.9% ▲ |
Pennsylvania | Mysterious Apparel | Mystic Pendant | 39 | $0.3k | -6.2% ▼ |
Sinister Toys | Model Racehorse | 28 | $0.4k | 0.5% – | |
Pennsylvania | Total | 2 items | 67 | $0.7k | -2.6% ▼ |
Tennessee | Cursed Sporting Goods | Fishing Rod | 20 | $1.8k | -3.0% ▼ |
Mysterious Apparel | Mystic Pendant | 22 | $0.2k | 8.0% ▲ | |
Tennessee | Total | 2 items | 42 | $1.9k | -2.0% ▼ |
Texas | Odd Equipment | Microscope | 53 | $7.5k | 6.7% ▲ |
Sinister Toys | Model Racehorse | 104 | $1.3k | 0.7% – | |
Texas | Total | 2 items | 157 | $8.8k | 5.8% ▲ |
West Virginia | Sinister Toys | Baseball Card | 15 | $0.0k | 1.4% – |
West Virginia | Total | 1 items | 15 | $0.0k | 1.4% – |
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 | 5.0% ▲ |
Tennessee | Fishing Rod | 20 | $1.8k | -3.0% ▼ | |
New Hampshire | Fishing Rod | 2 | $0.2k | 0.2% – | |
Georgia | Boxing Gloves | 15 | $0.3k | 7.9% ▲ | |
Cursed Sporting Goods | 4 states | 3 items | 142 | $7.9k | 3.3% ▲ |
Mysterious Apparel | Georgia | Mystic Pendant | 28 | $0.2k | 4.9% ▲ |
Illinois | Mystic Pendant | 26 | $0.2k | 1.9% – | |
Pennsylvania | Mystic Pendant | 39 | $0.3k | -6.2% ▼ | |
Tennessee | Mystic Pendant | 22 | $0.2k | 8.0% ▲ | |
California | Vintage Jacket | 93 | $3.1k | -4.9% ▼ | |
Louisiana | Necklace | 13 | $0.2k | 6.2% ▲ | |
Ohio | Vintage Jacket | 24 | $0.8k | 8.9% ▲ | |
Missouri | Mystic Pendant | 30 | $0.2k | -8.4% ▼ | |
Mysterious Apparel | 8 states | 3 items | 275 | $5.2k | -1.5% – |
Odd Equipment | Texas | Microscope | 53 | $7.5k | 6.7% ▲ |
California | Lamp | 175 | $5.9k | -9.5% ▼ | |
Indiana | Lamp | 32 | $1.1k | -7.7% ▼ | |
North Carolina | Lamp | 26 | $0.9k | 7.3% ▲ | |
Kansas | Lamp | 24 | $0.8k | 1.6% – | |
District of Columbia | Lamp | 55 | $1.8k | -3.0% ▼ | |
Odd Equipment | 6 states | 2 items | 365 | $17.9k | -0.6% – |
Sinister Toys | Minnesota | Model Racehorse | 25 | $0.3k | 2.9% ▲ |
Florida | Baseball Card | 98 | $0.3k | -5.6% ▼ | |
New York | Model Racehorse | 57 | $0.7k | 3.2% ▲ | |
Arkansas | Model Racehorse | 6 | $0.1k | 8.1% ▲ | |
Texas | Model Racehorse | 104 | $1.3k | 0.7% – | |
West Virginia | Baseball Card | 15 | $0.0k | 1.4% – | |
Pennsylvania | Model Racehorse | 28 | $0.4k | 0.5% – | |
Sinister Toys | 7 states | 2 items | 333 | $3.1k | 1.1% – |
Total | 19 states | 10 items | 1,115 | $34.2k | 0.3% – |
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>