Skip to content

Commit

Permalink
Add options to example
Browse files Browse the repository at this point in the history
  • Loading branch information
guerler committed Nov 13, 2024
1 parent 19f9eb1 commit 40535f3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions docs/content/xml-framework.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ Follow the prompts and choose any of the provided templates.

### Step 3: Import the Charts Vite Configuration

Download the charts configuration file <a href="/galaxy-charts/downloads/vite.config.charts.js" download>vite.config.charts.js</a>, and import it into your `vite.config` as follows:
Download the charts configuration file <a href="/galaxy-charts/downloads/vite.config.charts.js" download>vite.config.charts.js</a>, and import it into your existing `vite.config` (or create a new one) as follows:

```bash
import { defineConfig } from "vite";
Expand All @@ -142,6 +142,7 @@ const appElement = document.querySelector("#app");
if (import.meta.env.DEV) {
// Build the incoming data object
const dataIncoming = {
root: "/",
visualization_config: {
dataset_url: "MY_DATASET_URL",
dataset_id: "MY_DATASET_ID",
Expand All @@ -161,7 +162,9 @@ const incoming = JSON.parse(appElement?.getAttribute("data-incoming") || "{}");
* In production, this data will be provided by Galaxy.
*/
const datasetId = incoming.visualization_config.dataset_id;
...
const root = incoming.root;
/* Place your code here... */
```
::: tip Note
Expand Down

0 comments on commit 40535f3

Please sign in to comment.