-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bc3e7a8
commit a49702b
Showing
23 changed files
with
6,193 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
lerna-debug.log* | ||
|
||
node_modules | ||
dist | ||
dist-ssr | ||
*.local | ||
|
||
# Editor directories and files | ||
.vscode/* | ||
!.vscode/extensions.json | ||
.idea | ||
.DS_Store | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
title: "Bring your own chart" | ||
description: "Create your own custom visualization powered by Luzmo queries, with full interactivity to other Luzmo charts." | ||
tags: | ||
- chart | ||
- flex | ||
author: "Luzmo" | ||
image: "https://s3.eu-west-1.amazonaws.com/static.cumul.io/showcases/byoc.png" | ||
url: "https://stackblitz.com/edit/vitejs-vite-fob7ft?embed=1&view=preview" | ||
--- | ||
|
||
# Luzmo Flex showcase: Bring Your Own Chart | ||
The chart on the left is a standard donut chart, created using [Luzmo Flex](https://www.luzmo.com/flex). On the right, you see a fully custom bar chart visualization, developed in React. The bar chart's data is dynamically populated by querying Luzmo datasets through the Luzmo API [`data` endpoint](https://developer.luzmo.com/api/getData). | ||
|
||
Maintaining bi-directional interactivity between these charts is seamless. For example, clicking a slice in the donut chart automatically filters the data displayed in the custom bar chart. This functionality is achieved by utilizing the `changedFilters` Flex [event](https://developer.luzmo.com/guide/flex--component-api-reference#event-changedfilters). | ||
|
||
## Installation | ||
|
||
To install and run the application, follow these steps: | ||
|
||
1. Install the dependencies using npm: | ||
|
||
```bash | ||
npm install | ||
``` | ||
|
||
## Running the Application | ||
|
||
1. Start the application using `npm`: | ||
|
||
```bash | ||
npm dev | ||
``` | ||
|
||
## Accessing the Application | ||
|
||
Once the application is running, you can access it in your web browser at `http://localhost:5173`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import js from '@eslint/js' | ||
import globals from 'globals' | ||
import reactHooks from 'eslint-plugin-react-hooks' | ||
import reactRefresh from 'eslint-plugin-react-refresh' | ||
import tseslint from 'typescript-eslint' | ||
|
||
export default tseslint.config({ | ||
extends: [js.configs.recommended, ...tseslint.configs.recommended], | ||
files: ['**/*.{ts,tsx}'], | ||
ignores: ['dist'], | ||
languageOptions: { | ||
ecmaVersion: 2020, | ||
globals: globals.browser, | ||
}, | ||
plugins: { | ||
'react-hooks': reactHooks, | ||
'react-refresh': reactRefresh, | ||
}, | ||
rules: { | ||
...reactHooks.configs.recommended.rules, | ||
'react-refresh/only-export-components': [ | ||
'warn', | ||
{ allowConstantExport: true }, | ||
], | ||
}, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<link rel="icon" type="image/svg+xml" href="/vite.svg" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Vite + React + TS</title> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
<script type="module" src="/src/main.tsx"></script> | ||
</body> | ||
</html> |
Oops, something went wrong.