Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

190
Views
Default color for not defined groups in vis network

my example code:

const nodes: [
  {
    id: 1,
    label: 'one',
    group: 'group1'
  },
  {
    id: 2,
    label: 'two',
    group: 'group2'
  },
  {
    id: 3,
    label: 'three',
    group: 'group3'
  },
  {
    id: 4,
    label: 'four',
    group: 'group4'
  },
]

const options: {
  groups: {
    group1: {
      color: {
        background: 'red'
      }
    },
    group2: {
      color: {
        background: 'blue'
      }
    },
    group3: {
      color: {
        background: 'green'
      }
    }
  }
}

In above code, there are 4 nodes with 4 different groups, but there are only 3 groups defined in options. Is there a possibility to define one default background color for groups that aren't already defined? For now Vis Network uses colors from its color pallete. I've tried to set background color in nodes options for all nodes but it seems to be ignored. Thanks!

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!