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 ($) | 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 ($) | 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 ($) | 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 ($) | 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 ($) | 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 ($) |
---|---|
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 ($) | 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 ($) |
---|---|---|---|
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 ($) |
---|---|---|---|
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 ($) |
---|---|---|---|
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 ($) | Num Orders | Aov ($) | |
---|---|---|---|---|---|
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 ($) |
---|---|---|---|---|
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 ($) |
---|---|---|---|
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 ($) | 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 ($) |
---|---|---|---|
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 ($) | 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 ($) | 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 ($) | 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 ($) |
---|---|---|---|
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 | 3.0% |
California | |||||
California | Cursed Sporting Goods | Running Shoes | 105 | $5,687 | -0.6% |
California | Odd Equipment | Lamp | 175 | $5,853 | -1.5% |
California | Mysterious Apparel | Vintage Jacket | 93 | $3,126 | -0.1% |
District of Columbia | |||||
District of Columbia | Odd Equipment | Lamp | 55 | $1,810 | 5.3% |
Florida | |||||
Florida | Sinister Toys | Baseball Card | 98 | $288 | 7.3% |
Georgia | |||||
Georgia | Mysterious Apparel | Mystic Pendant | 28 | $220 | 0.9% |
Georgia | Cursed Sporting Goods | Boxing Gloves | 15 | $314 | -2.5% |
Illinois | |||||
Illinois | Mysterious Apparel | Mystic Pendant | 26 | $207 | 9.3% |
Indiana | |||||
Indiana | Odd Equipment | Lamp | 32 | $1,051 | -3.1% |
Kansas | |||||
Kansas | Odd Equipment | Lamp | 24 | $799 | 4.5% |
Louisiana | |||||
Louisiana | Mysterious Apparel | Necklace | 13 | $166 | -3.3% |
Minnesota | |||||
Minnesota | Sinister Toys | Model Racehorse | 25 | $317 | 9.8% |
Missouri | |||||
Missouri | Mysterious Apparel | Mystic Pendant | 30 | $236 | 9.3% |
New Hampshire | |||||
New Hampshire | Cursed Sporting Goods | Fishing Rod | 2 | $178 | -5.9% |
New York | |||||
New York | Sinister Toys | Model Racehorse | 57 | $718 | 3.2% |
North Carolina | |||||
North Carolina | Odd Equipment | Lamp | 26 | $869 | 7.2% |
Ohio | |||||
Ohio | Mysterious Apparel | Vintage Jacket | 24 | $809 | 9.2% |
Pennsylvania | |||||
Pennsylvania | Mysterious Apparel | Mystic Pendant | 39 | $308 | -2.2% |
Pennsylvania | Sinister Toys | Model Racehorse | 28 | $363 | 9.4% |
Tennessee | |||||
Tennessee | Cursed Sporting Goods | Fishing Rod | 20 | $1,753 | 4.2% |
Tennessee | Mysterious Apparel | Mystic Pendant | 22 | $172 | 2.6% |
Texas | |||||
Texas | Odd Equipment | Microscope | 53 | $7,495 | 7.3% |
Texas | Sinister Toys | Model Racehorse | 104 | $1,313 | 9.9% |
West Virginia | |||||
West Virginia | Sinister Toys | Baseball Card | 15 | $45 | -9.1% |
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 | 3.0% | ||
Arkansas | Sinister Toys | Model Racehorse | 6 | $77 | 3.0% |
California | 373 | $14,666 | -2.2% | ||
California | Cursed Sporting Goods | Running Shoes | 105 | $5,687 | -0.6% |
California | Odd Equipment | Lamp | 175 | $5,853 | -1.5% |
California | Mysterious Apparel | Vintage Jacket | 93 | $3,126 | -0.1% |
District of Columbia | 55 | $1,810 | 5.3% | ||
District of Columbia | Odd Equipment | Lamp | 55 | $1,810 | 5.3% |
Florida | 98 | $288 | 7.3% | ||
Florida | Sinister Toys | Baseball Card | 98 | $288 | 7.3% |
Georgia | 43 | $534 | -1.6% | ||
Georgia | Mysterious Apparel | Mystic Pendant | 28 | $220 | 0.9% |
Georgia | Cursed Sporting Goods | Boxing Gloves | 15 | $314 | -2.5% |
Illinois | 26 | $207 | 9.3% | ||
Illinois | Mysterious Apparel | Mystic Pendant | 26 | $207 | 9.3% |
Indiana | 32 | $1,051 | -3.1% | ||
Indiana | Odd Equipment | Lamp | 32 | $1,051 | -3.1% |
Kansas | 24 | $799 | 4.5% | ||
Kansas | Odd Equipment | Lamp | 24 | $799 | 4.5% |
Louisiana | 13 | $166 | -3.3% | ||
Louisiana | Mysterious Apparel | Necklace | 13 | $166 | -3.3% |
Minnesota | 25 | $317 | 9.8% | ||
Minnesota | Sinister Toys | Model Racehorse | 25 | $317 | 9.8% |
Missouri | 30 | $236 | 9.3% | ||
Missouri | Mysterious Apparel | Mystic Pendant | 30 | $236 | 9.3% |
New Hampshire | 2 | $178 | -5.9% | ||
New Hampshire | Cursed Sporting Goods | Fishing Rod | 2 | $178 | -5.9% |
New York | 57 | $718 | 3.2% | ||
New York | Sinister Toys | Model Racehorse | 57 | $718 | 3.2% |
North Carolina | 26 | $869 | 7.2% | ||
North Carolina | Odd Equipment | Lamp | 26 | $869 | 7.2% |
Ohio | 24 | $809 | 9.2% | ||
Ohio | Mysterious Apparel | Vintage Jacket | 24 | $809 | 9.2% |
Pennsylvania | 67 | $670 | 7.2% | ||
Pennsylvania | Mysterious Apparel | Mystic Pendant | 39 | $308 | -2.2% |
Pennsylvania | Sinister Toys | Model Racehorse | 28 | $363 | 9.4% |
Tennessee | 42 | $1,926 | 6.8% | ||
Tennessee | Cursed Sporting Goods | Fishing Rod | 20 | $1,753 | 4.2% |
Tennessee | Mysterious Apparel | Mystic Pendant | 22 | $172 | 2.6% |
Texas | 157 | $8,808 | 17.3% | ||
Texas | Odd Equipment | Microscope | 53 | $7,495 | 7.3% |
Texas | Sinister Toys | Model Racehorse | 104 | $1,313 | 9.9% |
West Virginia | 15 | $45 | -9.1% | ||
West Virginia | Sinister Toys | Baseball Card | 15 | $45 | -9.1% |
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 | 2.97% ▲ |
California | 3 categories | 3 items | 373 | $15k | -0.86% ▼ |
District of Columbia | 1 category | 1 item | 55 | $2k | 5.32% ▲ |
Florida | 1 category | 1 item | 98 | $0k | 7.27% ▲ |
Georgia | 2 categories | 2 items | 43 | $1k | -1.10% ▼ |
Illinois | 1 category | 1 item | 26 | $0k | 9.26% ▲ |
Indiana | 1 category | 1 item | 32 | $1k | -3.09% ▼ |
Kansas | 1 category | 1 item | 24 | $1k | 4.53% ▲ |
Louisiana | 1 category | 1 item | 13 | $0k | -3.26% ▼ |
Minnesota | 1 category | 1 item | 25 | $0k | 9.84% ▲ |
Missouri | 1 category | 1 item | 30 | $0k | 9.31% ▲ |
New Hampshire | 1 category | 1 item | 2 | $0k | -5.95% ▼ |
New York | 1 category | 1 item | 57 | $1k | 3.24% ▲ |
North Carolina | 1 category | 1 item | 26 | $1k | 7.18% ▲ |
Ohio | 1 category | 1 item | 24 | $1k | 9.24% ▲ |
Pennsylvania | 2 categories | 2 items | 67 | $1k | 4.08% ▲ |
Tennessee | 2 categories | 2 items | 42 | $2k | 4.02% ▲ |
Texas | 2 categories | 2 items | 157 | $9k | 7.73% ▲ |
West Virginia | 1 category | 1 item | 15 | $0k | -9.08% ▼ |
19 states | 4 categories | 10 items | 1,115 | $34k | 2.89% ▲ |
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 | 0.27% ▲ |
Cursed Sporting Goods | California | Running Shoes | 105 | $6k | -0.57% ▼ |
Cursed Sporting Goods | Tennessee | Fishing Rod | 20 | $2k | 4.15% ▲ |
Cursed Sporting Goods | New Hampshire | Fishing Rod | 2 | $0k | -5.95% ▼ |
Cursed Sporting Goods | Georgia | Boxing Gloves | 15 | $0k | -2.53% ▼ |
Mysterious Apparel | 8 states | 3 items | 275 | $5k | 2.02% ▲ |
Mysterious Apparel | Georgia | Mystic Pendant | 28 | $0k | 0.94% ▲ |
Mysterious Apparel | Illinois | Mystic Pendant | 26 | $0k | 9.26% ▲ |
Mysterious Apparel | Pennsylvania | Mystic Pendant | 39 | $0k | -2.20% ▼ |
Mysterious Apparel | Tennessee | Mystic Pendant | 22 | $0k | 2.63% ▲ |
Mysterious Apparel | California | Vintage Jacket | 93 | $3k | -0.15% ▼ |
Mysterious Apparel | Louisiana | Necklace | 13 | $0k | -3.26% ▼ |
Mysterious Apparel | Ohio | Vintage Jacket | 24 | $1k | 9.24% ▲ |
Mysterious Apparel | Missouri | Mystic Pendant | 30 | $0k | 9.31% ▲ |
Odd Equipment | 6 states | 2 items | 365 | $18k | 3.49% ▲ |
Odd Equipment | Texas | Microscope | 53 | $7k | 7.34% ▲ |
Odd Equipment | California | Lamp | 175 | $6k | -1.53% ▼ |
Odd Equipment | Indiana | Lamp | 32 | $1k | -3.09% ▼ |
Odd Equipment | North Carolina | Lamp | 26 | $1k | 7.18% ▲ |
Odd Equipment | Kansas | Lamp | 24 | $1k | 4.53% ▲ |
Odd Equipment | District of Columbia | Lamp | 55 | $2k | 5.32% ▲ |
Sinister Toys | 7 states | 2 items | 333 | $3k | 7.63% ▲ |
Sinister Toys | Minnesota | Model Racehorse | 25 | $0k | 9.84% ▲ |
Sinister Toys | Florida | Baseball Card | 98 | $0k | 7.27% ▲ |
Sinister Toys | New York | Model Racehorse | 57 | $1k | 3.24% ▲ |
Sinister Toys | Arkansas | Model Racehorse | 6 | $0k | 2.97% ▲ |
Sinister Toys | Texas | Model Racehorse | 104 | $1k | 9.93% ▲ |
Sinister Toys | West Virginia | Baseball Card | 15 | $0k | -9.08% ▼ |
Sinister Toys | Pennsylvania | Model Racehorse | 28 | $0k | 9.41% ▲ |
Total | 19 states | 10 items | 1,115 | $34k | 2.89% ▲ |
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.0297 |
California | Cursed Sporting Goods | Running Shoes | 105 | 5,687 | -0.0057 |
Odd Equipment | Lamp | 175 | 5,853 | -0.0153 | |
Mysterious Apparel | Vintage Jacket | 93 | 3,126 | -0.0015 | |
District of Columbia | Odd Equipment | Lamp | 55 | 1,810 | 0.0532 |
Florida | Sinister Toys | Baseball Card | 98 | 288 | 0.0727 |
Georgia | Mysterious Apparel | Mystic Pendant | 28 | 220 | 0.0094 |
Cursed Sporting Goods | Boxing Gloves | 15 | 314 | -0.0253 | |
Illinois | Mysterious Apparel | Mystic Pendant | 26 | 207 | 0.0926 |
Indiana | Odd Equipment | Lamp | 32 | 1,051 | -0.0309 |
Kansas | Odd Equipment | Lamp | 24 | 799 | 0.0453 |
Louisiana | Mysterious Apparel | Necklace | 13 | 166 | -0.0326 |
Minnesota | Sinister Toys | Model Racehorse | 25 | 317 | 0.0984 |
Missouri | Mysterious Apparel | Mystic Pendant | 30 | 236 | 0.0931 |
New Hampshire | Cursed Sporting Goods | Fishing Rod | 2 | 178 | -0.0595 |
New York | Sinister Toys | Model Racehorse | 57 | 718 | 0.0324 |
North Carolina | Odd Equipment | Lamp | 26 | 869 | 0.0718 |
Ohio | Mysterious Apparel | Vintage Jacket | 24 | 809 | 0.0924 |
Pennsylvania | Mysterious Apparel | Mystic Pendant | 39 | 308 | -0.0220 |
Sinister Toys | Model Racehorse | 28 | 363 | 0.0941 | |
Tennessee | Cursed Sporting Goods | Fishing Rod | 20 | 1,753 | 0.0415 |
Mysterious Apparel | Mystic Pendant | 22 | 172 | 0.0263 | |
Texas | Odd Equipment | Microscope | 53 | 7,495 | 0.0734 |
Sinister Toys | Model Racehorse | 104 | 1,313 | 0.0993 | |
West Virginia | Sinister Toys | Baseball Card | 15 | 45 | -0.0908 |
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 | 3.0% ▲ |
Arkansas | Total | 1 items | 6 | $0.1k | 3.0% ▲ |
California | Cursed Sporting Goods | Running Shoes | 105 | $5.7k | -0.6% – |
Odd Equipment | Lamp | 175 | $5.9k | -1.5% – | |
Mysterious Apparel | Vintage Jacket | 93 | $3.1k | -0.1% – | |
California | Total | 3 items | 373 | $14.7k | -0.9% – |
District of Columbia | Odd Equipment | Lamp | 55 | $1.8k | 5.3% ▲ |
District of Columbia | Total | 1 items | 55 | $1.8k | 5.3% ▲ |
Florida | Sinister Toys | Baseball Card | 98 | $0.3k | 7.3% ▲ |
Florida | Total | 1 items | 98 | $0.3k | 7.3% ▲ |
Georgia | Mysterious Apparel | Mystic Pendant | 28 | $0.2k | 0.9% – |
Cursed Sporting Goods | Boxing Gloves | 15 | $0.3k | -2.5% ▼ | |
Georgia | Total | 2 items | 43 | $0.5k | -1.1% – |
Illinois | Mysterious Apparel | Mystic Pendant | 26 | $0.2k | 9.3% ▲ |
Illinois | Total | 1 items | 26 | $0.2k | 9.3% ▲ |
Indiana | Odd Equipment | Lamp | 32 | $1.1k | -3.1% ▼ |
Indiana | Total | 1 items | 32 | $1.1k | -3.1% ▼ |
Kansas | Odd Equipment | Lamp | 24 | $0.8k | 4.5% ▲ |
Kansas | Total | 1 items | 24 | $0.8k | 4.5% ▲ |
Louisiana | Mysterious Apparel | Necklace | 13 | $0.2k | -3.3% ▼ |
Louisiana | Total | 1 items | 13 | $0.2k | -3.3% ▼ |
Minnesota | Sinister Toys | Model Racehorse | 25 | $0.3k | 9.8% ▲ |
Minnesota | Total | 1 items | 25 | $0.3k | 9.8% ▲ |
Missouri | Mysterious Apparel | Mystic Pendant | 30 | $0.2k | 9.3% ▲ |
Missouri | Total | 1 items | 30 | $0.2k | 9.3% ▲ |
New Hampshire | Cursed Sporting Goods | Fishing Rod | 2 | $0.2k | -5.9% ▼ |
New Hampshire | Total | 1 items | 2 | $0.2k | -5.9% ▼ |
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.2% ▲ |
North Carolina | Total | 1 items | 26 | $0.9k | 7.2% ▲ |
Ohio | Mysterious Apparel | Vintage Jacket | 24 | $0.8k | 9.2% ▲ |
Ohio | Total | 1 items | 24 | $0.8k | 9.2% ▲ |
Pennsylvania | Mysterious Apparel | Mystic Pendant | 39 | $0.3k | -2.2% ▼ |
Sinister Toys | Model Racehorse | 28 | $0.4k | 9.4% ▲ | |
Pennsylvania | Total | 2 items | 67 | $0.7k | 4.1% ▲ |
Tennessee | Cursed Sporting Goods | Fishing Rod | 20 | $1.8k | 4.2% ▲ |
Mysterious Apparel | Mystic Pendant | 22 | $0.2k | 2.6% ▲ | |
Tennessee | Total | 2 items | 42 | $1.9k | 4.0% ▲ |
Texas | Odd Equipment | Microscope | 53 | $7.5k | 7.3% ▲ |
Sinister Toys | Model Racehorse | 104 | $1.3k | 9.9% ▲ | |
Texas | Total | 2 items | 157 | $8.8k | 7.7% ▲ |
West Virginia | Sinister Toys | Baseball Card | 15 | $0.0k | -9.1% ▼ |
West Virginia | Total | 1 items | 15 | $0.0k | -9.1% ▼ |
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 | -0.6% – |
Tennessee | Fishing Rod | 20 | $1.8k | 4.2% ▲ | |
New Hampshire | Fishing Rod | 2 | $0.2k | -5.9% ▼ | |
Georgia | Boxing Gloves | 15 | $0.3k | -2.5% ▼ | |
Cursed Sporting Goods | 4 states | 3 items | 142 | $7.9k | 0.3% – |
Mysterious Apparel | Georgia | Mystic Pendant | 28 | $0.2k | 0.9% – |
Illinois | Mystic Pendant | 26 | $0.2k | 9.3% ▲ | |
Pennsylvania | Mystic Pendant | 39 | $0.3k | -2.2% ▼ | |
Tennessee | Mystic Pendant | 22 | $0.2k | 2.6% ▲ | |
California | Vintage Jacket | 93 | $3.1k | -0.1% – | |
Louisiana | Necklace | 13 | $0.2k | -3.3% ▼ | |
Ohio | Vintage Jacket | 24 | $0.8k | 9.2% ▲ | |
Missouri | Mystic Pendant | 30 | $0.2k | 9.3% ▲ | |
Mysterious Apparel | 8 states | 3 items | 275 | $5.2k | 2.0% ▲ |
Odd Equipment | Texas | Microscope | 53 | $7.5k | 7.3% ▲ |
California | Lamp | 175 | $5.9k | -1.5% – | |
Indiana | Lamp | 32 | $1.1k | -3.1% ▼ | |
North Carolina | Lamp | 26 | $0.9k | 7.2% ▲ | |
Kansas | Lamp | 24 | $0.8k | 4.5% ▲ | |
District of Columbia | Lamp | 55 | $1.8k | 5.3% ▲ | |
Odd Equipment | 6 states | 2 items | 365 | $17.9k | 3.5% ▲ |
Sinister Toys | Minnesota | Model Racehorse | 25 | $0.3k | 9.8% ▲ |
Florida | Baseball Card | 98 | $0.3k | 7.3% ▲ | |
New York | Model Racehorse | 57 | $0.7k | 3.2% ▲ | |
Arkansas | Model Racehorse | 6 | $0.1k | 3.0% ▲ | |
Texas | Model Racehorse | 104 | $1.3k | 9.9% ▲ | |
West Virginia | Baseball Card | 15 | $0.0k | -9.1% ▼ | |
Pennsylvania | Model Racehorse | 28 | $0.4k | 9.4% ▲ | |
Sinister Toys | 7 states | 2 items | 333 | $3.1k | 7.6% ▲ |
Total | 19 states | 10 items | 1,115 | $34.2k | 2.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 ($) | 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 ($) | 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
- Options:
- query name
- Options:
- number | all
- Default:
- 10
- Options:
- Hex color code | css color name
- Options:
- Hex color code | css color name
- Default:
- false
- Options:
- Hex color code | css color name
- Options:
- Hex color code | css color name
- Default:
- false
- Default:
- true
- Default:
- false
- Options:
- Hex color code | css color name
- Default:
- true
- Default:
- false
- Default:
- true
- Default:
- true
- Default:
- false
- Options:
- column name
- Default:
- false
- Default:
- false
- Default:
- error
- 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.
- Options:
- column name
- Default:
- accordion
- Default:
- false
- Options:
- Excel-style format | built-in format | custom format
- Default:
- true
- Options:
- Hex color code | css color name
- Options:
- Hex color code | css color name
- Options:
- Hex color code | css color name
- Default:
- middle
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
- Options:
- column name
- Options:
- string
- Default:
- column name (formatted)
- Default:
- left
- Options:
- Excel-style format | built-in format | custom format
- Options:
- column name
- Default:
- sum
- Options:
- Excel-style format | built-in format | custom format
- Options:
- column name
- Default:
- false
- Default:
- false
- Options:
- string
Images
contentType=image
- Options:
- number
- Default:
- original height of image
- Options:
- number
- Default:
- original width of image
- Options:
- column name
- Default:
- Name of the image file (excluding the file extension)
Links
contentType=link
- Options:
- column name | string
- Default:
- raw url
- Default:
- false
Deltas
contentType=delta
- Default:
- true
- Default:
- false
- Default:
- true
- Options:
- number
- Default:
- 0
- Options:
- number
- Default:
- 0
- Default:
- false
Conditional Formatting (Color Scales)
contentType=colorscale
- Default:
- green
- Options:
- number
- Default:
- min of column
- Options:
- number
- Default:
- mid of column
- Options:
- number
- Default:
- max of column
scaleColor
- Options:
- array of numbers
- 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>