From 87c46aba0452e4a45a8ee7ac940831ddb675184c Mon Sep 17 00:00:00 2001 From: Luccas Mateus de Medeiros Gomes Date: Thu, 18 May 2023 11:48:59 -0300 Subject: [PATCH] [docs][xs] - added catalog example --- site/content/howto/drd.md | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/site/content/howto/drd.md b/site/content/howto/drd.md index bede788c..63b92c1c 100644 --- a/site/content/howto/drd.md +++ b/site/content/howto/drd.md @@ -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 `` component ![](https://hackmd.io/_uploads/HyrtR_mS2.png) - 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 ![](https://hackmd.io/_uploads/SJglXtQrh.png) ```
``` -- It can be used with a URL string + +- It can be used by passing a URL string ![](https://hackmd.io/_uploads/S19GXYXBn.png) ```
``` +- 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 `` component +- Here is an example passing in a array of data ![](https://hackmd.io/_uploads/S1TBXYXH3.png) ``` ``` -- You can pass a URL +- And here passing an url ![](https://hackmd.io/_uploads/SkHd7KXS3.png) ``` ``` +- 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 `` 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 `` 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 `` component that takes a list of dataset and will provide you with a searchable interface. +![](https://hackmd.io/_uploads/rJv-d3Xr3.png) +- 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 +![](https://hackmd.io/_uploads/HygOF3XH2.png) + +- More info on the [storybook page](https://storybook.portaljs.org/?path=/docs/components-catalog--docs)