Skip to content

Commit

Permalink
tidy a few docs pages
Browse files Browse the repository at this point in the history
  • Loading branch information
archiewood committed Jan 9, 2025
1 parent e82ecf1 commit 4ed3eb9
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 40 deletions.
40 changes: 19 additions & 21 deletions sites/docs/pages/components/charts/sankey-diagram/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ select 'all_traffic' as source, '/about' as target, 75 as count
```
</DocTab>

## Vertical
## Examples

### Vertical

<DocTab>
<div slot='preview'>
Expand All @@ -77,7 +79,7 @@ select 'all_traffic' as source, '/about' as target, 75 as count
```
</DocTab>

# Echarts Options String
### Echarts Options String

<DocTab>
<div slot='preview'>
Expand Down Expand Up @@ -113,7 +115,7 @@ select 'all_traffic' as source, '/about' as target, 75 as count
```
</DocTab>

# Node Depth Override
### Node Depth Override


```sql apple_income_statement
Expand Down Expand Up @@ -167,11 +169,9 @@ select 'revenue' as source, 'cost of revenue' as target, 55 as amount_usd
</DocTab>


# Labels

## Node Labels
### Labels

### `nodeLabels=name` (default)
#### `nodeLabels=name` (default)

<DocTab>
<div slot='preview'>
Expand All @@ -198,7 +198,7 @@ select 'revenue' as source, 'cost of revenue' as target, 55 as amount_usd
</DocTab>


### `nodeLabels=value`
#### `nodeLabels=value`

<DocTab>
<div slot='preview'>
Expand Down Expand Up @@ -228,7 +228,7 @@ The value labels can be formatted using the `valueFmt` option.



### `nodeLabels=full`
#### `nodeLabels=full`

<DocTab>
<div slot='preview'>
Expand Down Expand Up @@ -256,9 +256,7 @@ The value labels can be formatted using the `valueFmt` option.
```
</DocTab>

## Link Labels

### `linkLabels=full` (default)
#### `linkLabels=full` (default)
Requires `percentCol` to show percentage beside value

<DocTab>
Expand Down Expand Up @@ -288,7 +286,7 @@ Requires `percentCol` to show percentage beside value
</DocTab>


### `linkLabels=value`
#### `linkLabels=value`

<DocTab>
<div slot='preview'>
Expand Down Expand Up @@ -317,7 +315,7 @@ Requires `percentCol` to show percentage beside value
</DocTab>


### `linkLabels=percent`
#### `linkLabels=percent`

<DocTab>
<div slot='preview'>
Expand Down Expand Up @@ -345,7 +343,7 @@ Requires `percentCol` to show percentage beside value
```
</DocTab>

## Custom Color Palette
### Custom Color Palette

<DocTab>
<div slot='preview'>
Expand Down Expand Up @@ -374,9 +372,9 @@ Requires `percentCol` to show percentage beside value
</DocTab>


## Link Colors
### Link Colors

### `linkColor=grey` (default)
#### `linkColor=grey` (default)

<DocTab>
<div slot='preview'>
Expand Down Expand Up @@ -405,7 +403,7 @@ Requires `percentCol` to show percentage beside value
</DocTab>


### `linkColor=source`
#### `linkColor=source`

<DocTab>
<div slot='preview'>
Expand Down Expand Up @@ -433,7 +431,7 @@ Requires `percentCol` to show percentage beside value
```
</DocTab>

### `linkColor=target`
#### `linkColor=target`

<DocTab>
<div slot='preview'>
Expand Down Expand Up @@ -462,7 +460,7 @@ Requires `percentCol` to show percentage beside value
</DocTab>


### `linkColor=gradient`
#### `linkColor=gradient`

<DocTab>
<div slot='preview'>
Expand Down Expand Up @@ -491,7 +489,7 @@ Requires `percentCol` to show percentage beside value
</DocTab>


## Multi-level
### Multi-level

The syntax for multi-level sankey diagrams is the same, but the
underlying query must represent all the levels using the same
Expand Down
2 changes: 0 additions & 2 deletions sites/docs/pages/components/custom/component-queries/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ description: Execute SQL queries from inside custom components.
sidebar_position: 2
---

# Component Queries

Component queries allow you to run SQL queries in your component code.

Component queries transform how we build data visualizations. Instead of passing data down through props from parent pages, components become self-contained units that can request exactly what they need. This independence makes components more reusable and easier to maintain, as all the logic for both fetching and displaying data lives in one place.
Expand Down
6 changes: 2 additions & 4 deletions sites/docs/pages/components/inputs/checkbox/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ Creates a checkbox with toggleable input. The Title and Name attributes can be d
````
</DocTab>

## Examples

### Checkbox using Default Value

Defining the defaultValue property will set the initial checked value with true and false.
Expand Down Expand Up @@ -98,10 +100,6 @@ WHERE not ${inputs.exclude_low_value} -- When True, Do not evaluate the next co
</DocTab>




# Checkbox

## Options

<PropListing
Expand Down
43 changes: 30 additions & 13 deletions sites/docs/pages/components/inputs/slider/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ Creates a Slider input with default min, max and step values
````
</DocTab>

Min and Max values can be defined, the step property and define the incremental value of the slider
## Examples

### Step

<DocTab>
<div slot="preview">
Expand All @@ -50,7 +52,8 @@ Min and Max values can be defined, the step property and define the incremental
````
</DocTab>

showMaxMin property can hide the Max and Min values with false, by default showMaxMin is true
### Hide Min and Max values


<DocTab>
<div slot="preview">
Expand All @@ -74,7 +77,7 @@ showMaxMin property can hide the Max and Min values with false, by default showM
````
</DocTab>

The default size of the slider can be altered with the size property using; medium, large or full
### Size

<DocTab>
<div slot="preview">
Expand Down Expand Up @@ -149,18 +152,22 @@ The default size of the slider can be altered with the size property using; medi
</DocTab>


````sql flight_data
SELECT
CAST(fare AS INT) AS fare,
CAST((SELECT MAX(fare) FROM flights) AS INT) AS max_fare,
FROM flights
LIMIT 100
````
### Specifying Dynamic Columns

## Specifying Dynamic Columns

Supply data with specified column names for minColumn, maxColumn, and/or defaultValue. The first row’s value in each of these columns will determine the minimum, maximum, or default value, respectively.
```sql flight_data
SELECT
CAST(fare AS INT) AS fare,
CAST((SELECT MAX(fare) FROM flights) AS INT) AS max_fare,
FROM flights
LIMIT 100
```


The first row’s value in each of these columns will determine the minimum, maximum, or default value, respectively.

<DocTab>
<div slot="preview">
<Slider
title='data slider'
size=large
Expand All @@ -169,8 +176,18 @@ Supply data with specified column names for minColumn, maxColumn, and/or default
maxColumn=max_fare
defaultValue=max_fare
/>
</div>

````markdown
```sql flight_data
SELECT
CAST(fare AS INT) AS fare,
CAST((SELECT MAX(fare) FROM flights) AS INT) AS max_fare,
FROM flights
LIMIT 100
```


<Slider
title='data slider'
size=large
Expand All @@ -180,8 +197,8 @@ Supply data with specified column names for minColumn, maxColumn, and/or default
defaultValue=max_fare
/>
````
</DocTab>

# Slider

## Options

Expand Down

0 comments on commit 4ed3eb9

Please sign in to comment.