https://github.com/rockset/demo-dynamic-chartjs
An example application built on Chart.JS and Rockset using SvelteKit. Instantly visualize your Query Lambda data as a bar chart!
https://github.com/rockset/demo-dynamic-chartjs
Last synced: 6 months ago
JSON representation
An example application built on Chart.JS and Rockset using SvelteKit. Instantly visualize your Query Lambda data as a bar chart!
- Host: GitHub
- URL: https://github.com/rockset/demo-dynamic-chartjs
- Owner: rockset
- Created: 2024-02-21T02:18:41.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-21T19:10:57.000Z (over 2 years ago)
- Last Synced: 2024-04-14T03:13:00.948Z (over 2 years ago)
- Language: Svelte
- Size: 35.2 KB
- Stars: 0
- Watchers: 8
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Rockset x Sveltekit Demo
A quick demo that dynamically renders a Charts.js chart with data sourced from a Rockset Query Lambda!
It will load your data from Rockset, analyze its response to find a schema,
and present drop-downs that allow you to select which field to use as your
label and value (the former of which must be a string, the latter a number).
It will then render a bar chart based on this data!
## Setup
```bash
# Download dependencies
npm install
# Add your API key to .env so we can access the query lambda
echo "ROCKSET_API_KEY=$YOUR_API_KEY" >> .env
# Point to your Query Lambda
echo "WORKSPACE=$YOUR_QUERY_LAMBDA_WORKSPACE" >> .env
echo "QUERY_LAMBDA_NAME=$YOUR_QUERY_LAMBDA_NAME" >> .env
# replace latest with another tag if you wish
echo "QUERY_LAMBDA_TAG=latest" >> .env
```
## Running the Demo
```bash
npm run dev -- --open
```