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

200
Views
How to use timeline_item.add content field to use a repeating image Vis.js Timeline

I have been using the timeline_item add function with content field to represent the element with a image. It works fine.

timeline_items.add({
    id                        : entity_id,
    group                     : "timeline_group_id",
    start                     : start_date,
    end                       : end_date,
    content                   : "<img src='" + element_src_link + "'></img>",
    className                 : 'timeline-imagecontainer',
});

However, although I explicitly define a className, that does not help with the style properties of the image.

The images shows as below :

enter image description here

How can I :

  • keep aspect ratio
  • fit the image to timeline element
  • use it repeating background for the element
  • keep element height fixed to a value of 60px

I want to have a repeating background with the img inside the timeline element.

How can I achieve this ?

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!