[docs][xs] - added catalog example
This commit is contained in:
parent
964eb5b3ee
commit
87c46aba04
@ -1,9 +1,9 @@
|
||||
# How to have data rich documents with charts and tables?
|
||||
|
||||
|
||||
## Tables
|
||||
## Data previews
|
||||
|
||||
- You can use the table component
|
||||
- If you want to have data previews, you can use the `<Table>` component
|
||||

|
||||
|
||||
- It can be used with raw data
|
||||
@ -43,7 +43,8 @@
|
||||
]}
|
||||
/>
|
||||
```
|
||||
- It can be used with a raw csv string
|
||||
|
||||
- It can be used by passing a raw csv string
|
||||

|
||||
```
|
||||
<Table
|
||||
@ -54,17 +55,20 @@
|
||||
"
|
||||
/>
|
||||
```
|
||||
- It can be used with a URL string
|
||||
|
||||
- It can be used by passing a URL string
|
||||

|
||||
```
|
||||
<Table url="https://raw.githubusercontent.com/datasets/finance-vix/main/data/vix-daily.csv" />
|
||||
```
|
||||
- More info on the [storybook page](https://storybook.portaljs.org/?path=/docs/components-table--docs)
|
||||
|
||||
## Charts
|
||||
|
||||
### Linecharts
|
||||
|
||||
- You can add LineCharts passing in a array of data
|
||||
- You can add simple line charts with the `<LineChart>` component
|
||||
- Here is an example passing in a array of data
|
||||

|
||||
```
|
||||
<LineChart
|
||||
@ -92,7 +96,7 @@
|
||||
]}
|
||||
/>
|
||||
```
|
||||
- You can pass a URL
|
||||
- And here passing an url
|
||||

|
||||
```
|
||||
<LineChart
|
||||
@ -102,6 +106,7 @@
|
||||
yAxis="Price"
|
||||
/>
|
||||
```
|
||||
- More info on the [storybook page](https://storybook.portaljs.org/?path=/docs/components-linechart--docs)
|
||||
|
||||
### Vega Charts
|
||||
|
||||
@ -141,6 +146,7 @@ You can add Vega charts with the `<Vega />` component like this, it supports all
|
||||
}}
|
||||
/>
|
||||
```
|
||||
- More info on the [storybook page](https://storybook.portaljs.org/?path=/docs/components-vega--docs)
|
||||
|
||||
### VegaLite Charts
|
||||
|
||||
@ -179,3 +185,19 @@ You can add Vega charts with the `<Vega />` component like this, it supports all
|
||||
}}
|
||||
/>
|
||||
```
|
||||
- More info on the [storybook page](https://storybook.portaljs.org/?path=/docs/components-vegalite--docs)
|
||||
|
||||
## Catalog
|
||||
|
||||
- You can add a `<Catalog>` component that takes a list of dataset and will provide you with a searchable interface.
|
||||

|
||||
- The dataset object requires the following structure
|
||||
```
|
||||
_id //A unique identifique for the item in the catalog
|
||||
metadata //The dataset metadata
|
||||
url_path //The url for the dataset showcase page
|
||||
```
|
||||
- You can also add facets that are going to act as filters for your metadata
|
||||

|
||||
|
||||
- More info on the [storybook page](https://storybook.portaljs.org/?path=/docs/components-catalog--docs)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user