Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Timeline and hilites

    I tried using hilites in the TimeLine component, but it didn't work out. Can you tell me where my mistake is?

    Code:
      const CURRENT_DATE = new Date();
      const WARNING_DATE = new Date(new Date().setMonth(CURRENT_DATE.getMonth() + 4));
      const myhilites = [
        { fieldName: "endDate", backgroundColor: "#CC0000", cssText: "background-color: #CC0000;", criteria: { fieldName: "endDate", operator: "lessThan", value: CURRENT_DATE } },
        { fieldName: "endDate", backgroundColor: "#E08E30", cssText: "background-color: #E08E30;", criteria: { fieldName: "endDate", operator: "lessThan", value: WARNING_DATE } }
      ];
    isc.Timeline.create({
        ID: "timeline",
        ...
        hilites: myhilites
    });

    #2
    Hilites are not currently supported in Calendars/Timelines.

    Were you expecting your hilites here to affect the background-color of EventCanvas children? Hilites typically affect grid-cells rather than child-components - but we could likely add this support as a feature sponsorship, if that interests you.

    Comment


      #3
      I thought it would work like in a List Grid with cell elements. Now I have implemented an option with style assignment and I wanted to try it with hilites
      Click image for larger version

Name:	Screenshot 2024-12-10 201509.png
Views:	21
Size:	24.1 KB
ID:	274326

      Comment


        #4
        Unfortunately, criteria-hilites aren't supported for this case. One way you could achieve the same behavior with current code is to override timeline.getEventCanvasStyle() to return different classes with the styles you want - the name you return is suffixed Header and Body for separate parts of the eventCanvas, as described in the docs.

        If you're interested in sponsoring proper hilite support, let us know.

        Comment

        Working...
        X