mirror of
https://github.com/stfrigerio/sqliteDB.git
synced 2026-07-22 05:38:02 +00:00
arrivo
This commit is contained in:
parent
ecff9d33eb
commit
ac2fd5fc48
1 changed files with 72 additions and 0 deletions
72
README.md
72
README.md
|
|
@ -104,3 +104,75 @@ Below is a list of available parameters you can use in your SQL blocks:
|
|||
| `chartType` | Type of chart to create. | `chartType: pie` |
|
||||
| `categoryColumn`| Column to use for the category in the chart. | `categoryColumn: priority` |
|
||||
| `valueColumn` | Column to use for the value in the chart. | `valueColumn: completed` |
|
||||
|
||||
Each chart takes an optional chartOptions object that can be used to customize the different chart types:
|
||||
|
||||
### Line Chart
|
||||
|
||||
```sql-chart
|
||||
|
||||
table: QuantifiableHabits
|
||||
chartType: line
|
||||
|
||||
xColumn: date
|
||||
yColumns: value
|
||||
categoryColumn: habitKey
|
||||
|
||||
dateColumn: date
|
||||
startDate: 2025-01-01
|
||||
endDate: 2025-01-31
|
||||
|
||||
chartOptions: {
|
||||
fill: false,
|
||||
tension: 0.5,
|
||||
pointRadius: 4,
|
||||
showLegend: true,
|
||||
animations: true,
|
||||
yAxisMin: 0,
|
||||
yAxisMax: 10
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
### Bar Chart
|
||||
|
||||
```sql-chart
|
||||
table: QuantifiableHabits
|
||||
chartType: bar
|
||||
|
||||
xColumn: date
|
||||
yColumns: value
|
||||
categoryColumn: habitKey
|
||||
|
||||
dateColumn: date
|
||||
startDate: 2025-01-01
|
||||
endDate: 2025-01-31
|
||||
|
||||
chartOptions: {
|
||||
stacked: true,
|
||||
horizontal: false,
|
||||
showLegend: true,
|
||||
animations: true,
|
||||
tooltips: true
|
||||
}
|
||||
```
|
||||
|
||||
### Pie Chart
|
||||
|
||||
```sql-chart
|
||||
|
||||
table: Money
|
||||
chartType: pie
|
||||
|
||||
categoryColumn: tag
|
||||
valueColumn: amount
|
||||
|
||||
dateColumn: date
|
||||
startDate: 2025-01-01
|
||||
endDate: 2025-01-31
|
||||
|
||||
chartOptions: {
|
||||
showLegend: true,
|
||||
isDoughnut: true
|
||||
}
|
||||
```
|
||||
Loading…
Reference in a new issue