Skip to content

Commit

Permalink
add docusaurus site
Browse files Browse the repository at this point in the history
  • Loading branch information
mcrascal committed Aug 6, 2021
1 parent b3adc8a commit 7ca4a9a
Show file tree
Hide file tree
Showing 125 changed files with 12,734 additions and 1,344 deletions.
11,615 changes: 10,271 additions & 1,344 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions sites/docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.docusaurus
3 changes: 3 additions & 0 deletions sites/docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Evidence Docs

This is the source for Evidence's public documentation.
3 changes: 3 additions & 0 deletions sites/docs/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
};
4 changes: 4 additions & 0 deletions sites/docs/docs/components/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"label": "Components",
"position": 5
}
38 changes: 38 additions & 0 deletions sites/docs/docs/components/area-chart.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
sidebar_position: 4
hide_title: true
hide_table_of_contents: false
---

# AreaChart
<h1 class="community-header"><span class="gradient">&lt;AreaChart/></span></h1>

![area-chart](/img/area-chart.png)

```markdown
<AreaChart
data={data.query_name}
x=column_x
y=column_y
/>
```

### Required Props
* **data** - query name, referenced as a subset of Evidence's **`data`** object
* **x** - column to use for the x-axis of the chart, name without quotes
* **y** - column to use for the y-axis of the chart, name without quotes

### Labeling Props
* **units** - adds a label to the top of the y-axis, to the right of the top value on the axis
* **xAxisTitle** - adds a title to the x-axis at the bottom right of the chart. This can also serve as a footnote location

### Formatting Props
* **yMin** - value to start the y-axis at. Default is 0
* **xGridlines** - turn x-axis gridlines on or off. Default is off. Turn on with `xGridlines=true`
* **yGridlines** - turn y-axis gridlines on or off. Default is on. Turn off with `yGridlines=false`
* **fillColor** - color of the area. CSS color input (CSS color name, hexadecimal code, RGB code)
* **fillTransparency** - % of color which will be rendered as transparent (value between 0 and 1)

:::note
Evidence's component tags need to be closed using `/>` (same as HTML tags)
:::
53 changes: 53 additions & 0 deletions sites/docs/docs/components/bar-chart.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
sidebar_position: 6
hide_title: true
hide_table_of_contents: false
---

# BarChart
<h1 class="community-header"><span class="gradient">&lt;BarChart/></span></h1>

![bar-chart](/img/bar-chart.png)

```markdown
<BarChart
data={data.query_name}
x=column_x
y=column_y
/>
```

BarChart is a **reverse axis** chart: the x-axis is vertical and the y-axis is horizontal.

### Required Props
* **data** - query name, referenced as a subset of Evidence's **`data`** object
* **x** - column to use for x-axis (vertical axis) of the chart, name without quotes
* **y** - column to use for y-axis (horizontal axis) of the chart, name without quotes

### Optional Props
* **series** - colunn to use as the series (groups) in a multi-series chart
* **legend** - turn legend off or on. Default is `legend=top`; to turn off, change to `legend=none`
* **sort** - turn sorting off or on. Default is `sort=true`, which applies Evidence's default sorting; to turn off, change to `sort=false`

### Labeling Props
* **units** - adds a label to the top of the y-axis, to the right of the top value on the axis

### Formatting Props
* **yMin** - value to start the y-axis at. Default is 0
* **xGridlines** - turn x-axis gridlines on or off. Default is off. Turn of with `xGridlines=false`
* **yGridlines** - turn y-axis gridlines on or off. Default is on. Turn on with `yGridlines=true`
* **fillColor** - color of the columns. CSS color input (CSS color name, hexadecimal code, RGB code)
* **fillTransparency** - % of color which will be rendered as transparent (value between 0 and 1)

:::caution Support for Dates
Bar charts do not yet support dates on the x-axis. This will be added in a future release.
:::

:::note
Evidence's component tags need to be closed using `/>` (same as HTML tags)
:::

### Smart Defaults
If you create a bar chart with many x-axis items (e.g., names of departments), Evidence will extend the height of the chart for you to avoid the bars becoming squished.

![bar-chart-long](/img/bar-chart-long.png)
54 changes: 54 additions & 0 deletions sites/docs/docs/components/bubble-chart.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
sidebar_position: 9
hide_title: true
hide_table_of_contents: false
---

# BubbleChart
<h1 class="community-header"><span class="gradient">&lt;BubbleChart/></span></h1>

![bubble-chart](/img/bubble-chart.png)

```markdown
<BubbleChart
data={data.query_name}
x=column_x
y=column_y
size=column_size
/>
```

### Required Props
* **data** - query name, referenced as a subset of Evidence's **`data`** object
* **x** - column to use for the x-axis of the chart, name without quotes
* **y** - column to use for the y-axis of the chart, name without quotes

### Optional Props
* **series** - colunn to use as the series (groups) in a multi-series chart
* **legend** - turn legend off or on. Default is `legend=top`; to turn off, change to `legend=none`

### Labeling Props
* **units** - adds a label to the top of the y-axis, to the right of the top value on the axis
* **xAxisTitle** - adds a title to the x-axis at the bottom right of the chart. This can also serve as a footnote location

### Formatting Props
* **yMin** - value to start the y-axis at. Default is minimum value in your `y` column
* **xGridlines** - turn x-axis gridlines on or off. Default is off. Turn on with `xGridlines=true`
* **yGridlines** - turn y-axis gridlines on or off. Default is on. Turn off with `yGridlines=false`
* **fillColor** - color of the points (CSS color input)
* **fillTransparency** - % of color which will be rendered as transparent (value between 0 and 1). Default is 0.25
* **outlineColor** - color of the line surrounding the point
* **outlineWidth** - px width of the line surrounding the point
* **outlineTransparency** - % of outline color which will be rendered as transparent (value between 0 and 1)
* **minPointSize** - size of smallest point on chart (used to set the bounds on the size range - values are then mapped to that range)
* **maxPointSize** - size of largest point on chart (used to set the bounds on the size range - values are then mapped to that range)

:::note
Evidence's component tags need to be closed using `/>` (same as HTML tags)
:::

### Checking Values
You can hover over each point on your chart to see the value and (if applicable) the series it belongs to:

![bubble-hovertags](/img/bubble-hovertag-close.png)

47 changes: 47 additions & 0 deletions sites/docs/docs/components/column-chart.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
sidebar_position: 5
hide_title: true
hide_table_of_contents: false
---

# ColumnChart
<h1 class="community-header"><span class="gradient">&lt;ColumnChart/></span></h1>

![stacked-column](/img/stacked-column-legend.png)

```markdown
<ColumnChart
data={data.query_name}
x=column_x
y=column_y
/>
```

### Required Props
* **data** - query name, referenced as a subset of Evidence's **`data`** object
* **x** - column to use for the x-axis of the chart, name without quotes
* **y** - column to use for the y-axis of the chart, name without quotes

### Optional Props
* **series** - colunn to use as the series (groups) in a multi-series chart
* **legend** - turn legend off or on. Default is `legend=top`; to turn off, change to `legend=none`
* **sort** - turn sorting off or on. Default is `sort=true`, which applies Evidence's default sorting; to turn off, change to `sort=false`

### Labeling Props
* **units** - adds a label to the top of the y-axis, to the right of the top value on the axis
* **xAxisTitle** - adds a title to the x-axis at the bottom right of the chart. This can also serve as a footnote location

### Formatting Props
* **yMin** - value to start the y-axis at. Default is 0
* **xGridlines** - turn x-axis gridlines on or off. Default is off. Turn on with `xGridlines=true`
* **yGridlines** - turn y-axis gridlines on or off. Default is on. Turn off with `yGridlines=false`
* **fillColor** - color of the columns. CSS color input (CSS color name, hexadecimal code, RGB code)
* **fillTransparency** - % of color which will be rendered as transparent (value between 0 and 1)

:::caution Support for Dates
Column charts do not yet support dates on the x-axis. This will be added in a future release.
:::

:::note
Evidence's component tags need to be closed using `/>` (same as HTML tags)
:::
34 changes: 34 additions & 0 deletions sites/docs/docs/components/data-table.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
sidebar_position: 2
hide_title: true
hide_table_of_contents: false
---

# DataTable
<h1 class="community-header"><span class="gradient">&lt;DataTable/></span></h1>

![datatable](/img/datatable-medianrent.png)

```markdown
<DataTable
data={data.query_name}
/>
```
### Required Props
* **data** - query name, referenced as a subset of Evidence's **`data`** object

### Optional Props
* **rows** - # of rows to show in the table before paginating results. Default is 5 rows
* **rowNumbers** - turn index number column of table on or off. Default is on. Turn off with `rowNumbers=false`
* **rowLines** - turn table row borders on or off. Default is on. Turn off with `rowLines=false`

### Formatting
Formatting is automatically applied based on the column names of your SQL query result. See the [formatting](/formatting/format-tags) section for more details.

:::note
Evidence's component tags need to be closed using `/>` (same as HTML tags)
:::




42 changes: 42 additions & 0 deletions sites/docs/docs/components/hist.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
sidebar_position: 7
hide_title: true
hide_table_of_contents: false
---

# Hist
<h1 class="community-header"><span class="gradient">&lt;Hist/></span></h1>

![hist](/img/hist-chart-only.png)

```markdown
<Hist
data={data.query_name}
x=column_x
/>
```
### Required Props
* **data** - query name, referenced as a subset of Evidence's **`data`** object
* **x** - column to use for the x-axis of the chart, name without quotes

### Optional Props
* **binCount** - number of bins to create. By default, Evidence uses the [Freedman-Diaconis rule](https://en.wikipedia.org/wiki/Freedman%E2%80%93Diaconis_rule) to determine the number of bins
![hist-bins](/img/hist-bin-changes.gif)

### Labeling Props
* **units** - adds a label to the top of the y-axis, to the right of the top value on the axis
* **xAxisTitle** - adds a title to the x-axis at the bottom right of the chart. This can also serve as a footnote location

### Formatting Props
* **yMin** - value to start the y-axis at. Default is 0
* **xGridlines** - turn x-axis gridlines on or off. Default is off. Turn on with `xGridlines=true`
* **yGridlines** - turn y-axis gridlines on or off. Default is on. Turn off with `yGridlines=false`
* **fillColor** - color of the columns. CSS color input (CSS color name, hexadecimal code, RGB code)
* **fillTransparency** - % of color which will be rendered as transparent (value between 0 and 1)

:::note
Evidence's component tags need to be closed using `/>` (same as HTML tags)
:::



44 changes: 44 additions & 0 deletions sites/docs/docs/components/line-chart.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
sidebar_position: 3
hide_title: true
hide_table_of_contents: false
---

# LineChart
<h1 class="community-header"><span class="gradient">&lt;LineChart/></span></h1>

![line-chart](/img/line-chart.png)

```markdown
<LineChart
data={data.query_name}
x=column_x
y=column_y
/>
```
### Required Props
* **data** - query name, referenced as a subset of Evidence's **`data`** object
* **x** - column to use for the x-axis of the chart, name without quotes
* **y** - column to use for the y-axis of the chart, name without quotes

### Optional Props
* **series** - colunn to use as the series (groups) in a multi-series chart
* **legend** - turn legend off or on. Default is `legend=top`; to turn off, change to `legend=none`

### Labeling Props
* **units** - adds a label to the top of the y-axis, to the right of the top value on the axis
* **xAxisTitle** - adds a title to the x-axis at the bottom right of the chart. This can also serve as a footnote location

### Formatting Props
* **yMin** - value to start the y-axis at. Default is 0
* **xGridlines** - turn x-axis gridlines on or off. Default is off. Turn on with `xGridlines=true`
* **yGridlines** - turn y-axis gridlines on or off. Default is on. Turn off with `yGridlines=false`
* **lineLabel** - direct label for a single line chart. Label appears just to the right of the last point in the line
* **lineColor** - CSS color input (color name, hexadecimal code, or RGB code)
* **lineWidth** - pixel width of line (number). Default = 1.5
* **lineTransparency** - % of color which will be rendered as transparent (value between 0 and 1)
* **lineDashSize** - determines distance between dashes. Default is 0. Turn dashes on with any value above 0

:::note
Evidence's component tags need to be closed using `/>` (same as HTML tags)
:::
53 changes: 53 additions & 0 deletions sites/docs/docs/components/scatter-plot.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
sidebar_position: 8
hide_title: true
hide_table_of_contents: false
---

# ScatterPlot
<h1 class="community-header"><span class="gradient">&lt;ScatterPlot/></span></h1>

![scatter-plot](/img/scatter-plot.png)

```markdown
<ScatterPlot
data={data.query_name}
x=column_x
y=column_y
/>
```

### Required Props
* **data** - query name, referenced as a subset of Evidence's **`data`** object
* **x** - column to use for the x-axis of the chart, name without quotes
* **y** - column to use for the y-axis of the chart, name without quotes

### Optional Props
* **series** - colunn to use as the series (groups) in a multi-series chart
* **legend** - turn legend off or on. Default is `legend=top`; to turn off, change to `legend=none`

### Labeling Props
* **units** - adds a label to the top of the y-axis, to the right of the top value on the axis
* **xAxisTitle** - adds a title to the x-axis at the bottom right of the chart. This can also serve as a footnote location

### Formatting Props
* **yMin** - value to start the y-axis at. Default is minimum value in your `y` column
* **xGridlines** - turn x-axis gridlines on or off. Default is off. Turn on with `xGridlines=true`
* **yGridlines** - turn y-axis gridlines on or off. Default is on. Turn off with `yGridlines=false`
* **fillColor** - color of the points (CSS color input)
* **fillTransparency** - % of color which will be rendered as transparent (value between 0 and 1). Default is 0.25
* **outlineColor** - color of the line surrounding the point
* **outlineWidth** - px width of the line surrounding the point
* **outlineTransparency** - % of outline color which will be rendered as transparent (value between 0 and 1)
* **pointSize** - size of each point (number)

:::note
Evidence's component tags need to be closed using `/>` (same as HTML tags)
:::


### Checking Values
You can hover over each point on your chart to see the value and (if applicable) the series it belongs to:

![scatter-hovertags](/img/scatter-hovertag-close.png)

Loading

0 comments on commit 7ca4a9a

Please sign in to comment.