diff --git a/example.html b/example.html index cafd4964..a6e3d9be 100644 --- a/example.html +++ b/example.html @@ -51,11 +51,6 @@ - + diff --git a/src/components/charts/chart.ts b/src/components/charts/chart.ts index ca2cad07..215592d5 100644 --- a/src/components/charts/chart.ts +++ b/src/components/charts/chart.ts @@ -186,6 +186,11 @@ export default class AstraChart extends ClassifiedElement { 'x-chart-api-key': apiKey, 'content-type': 'application/json', }, + body: JSON.stringify({ + filters: { + time: { type: 'search', value: "'9 years'" }, + }, + }), }) return response.json() } catch (err) { @@ -262,6 +267,15 @@ export default class AstraChart extends ClassifiedElement { override updated(_changedProperties: PropertyValueMap | Map): void { super.updated(_changedProperties) + // Iterating through attributes to find those with the 'filter-' prefix + Array.from(this.attributes).forEach((attr) => { + if (attr.name.startsWith('filter-')) { + const key = attr.name + const value = attr.value + console.log(`Key: ${key}, Value: ${value}`) + } + }) + if ( _changedProperties.has('data') || _changedProperties.has('type') || diff --git a/src/variables.ts b/src/variables.ts index 40d0aaf8..77453fa1 100644 --- a/src/variables.ts +++ b/src/variables.ts @@ -1 +1 @@ -export const OUTERBASE_API_DOMAIN = 'app.outerbase.com' +export const OUTERBASE_API_DOMAIN = 'app.dev.outerbase.com'