Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make parts of vega embed selectable with querry selector? #172

Open
G4merBros opened this issue Jun 13, 2023 · 0 comments
Open

Make parts of vega embed selectable with querry selector? #172

G4merBros opened this issue Jun 13, 2023 · 0 comments

Comments

@G4merBros
Copy link

G4merBros commented Jun 13, 2023

I didnt found a way to make the single paths of my rendered vega chart selectable in angular.

vega

vegaEmbed('#vis',  vegaData[temp[0]], { "actions": false, "mode": "vega-lite" ,renderer: 'svg'})

html

<mat-grid-tile><div id="vis" style="width: 100%; height: 100%" (mouseover)='generateText(getTemp(0))'[matTooltip]="getTooltip(getTemp(0))|| ''" [dtsSelectItem]="getTooltip(getTemp(0))|| ''"></div></mat-grid-tile>

queryselector to get every single element I would like to be selectable

parentElements.forEach(parentElement => {
        const childElements = Array.from(parentElement.children);

        // Iterating through the child nodes of each parent element
        for (const childElement of childElements) {
          // Access child element properties or perform actions
          childElement.setAttribute("[dtsSelectItem]","123");
        }
      });

relatively new to frontend but don't found a way to make the child elements selectable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant