cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

How to create multiple rendered instances of Neovis in an Angular app

I have an angular app that is using neovis to create a visualization of the database.

I created it largely with the help of the github documentation here.

neovis.component.ts:

ngAfterViewInit(): void {
    const config = {
      container_id: 'viz',
      server_url: 'bolt://localhost:7687',
      server_user: '...',
      server_password: '...',
      initial_cypher: `...`
    };
    
    const viz = new NeoVis(config);
    viz.render();
    console.log(viz);
  }

messenger.component.html:
<neovis-component *ngIf="..."></neovis-component>  

I am using this in a message component, so if the user types in a command, then the bot will respond with the neovis visualization.

However, it seems that only one of the instances will be rendered, the others are just blank (as shown in the images below).

How can I get all the instances to render?

3X_c_a_ca493d6fb89dc0f2464d30999435ce53d1617d65.png
3X_f_e_fe981f82be409db7a5987239ffdb99996e0cfd19.png

0 REPLIES 0