This site is currently read-only as we are migrating to Oracle Forums for an improved community experience. You will not be able to initiate activity until January 30th, when you will be able to use this site as normal.

    Forum Stats

  • 3,889,958 Users
  • 2,269,775 Discussions
  • 7,916,823 Comments

Discussions

Setting JET 4.2 Gantt Chart task color by CSS class

BRB91
BRB91 Member Posts: 46 Red Ribbon

APEX 18.2 in compatibiity mode for 4.2 and using Theme 26 "PRODUCTIVITY_APPLICATIONS".

Setting colours of OJ Gantt Tasks using CSS classes defined by the Gantt SQL causes the same classes to be appended rather than overwritten each time the Gantt region is refreshed. (It also remembers old task classes which cause conflicts when trying to change colour).

pastedImage_2.png

In this example I am returning either "blue" or "grey" from the MY_COLOUR item and applying it to a Gantt Task.

Rather than the Gantt Task CSS class overwriting the old value, it is appended like so.

pastedImage_3.png

Here the task started off as blue, then set to grey however the blue class remained (which overrides the grey colour making it stay blue) and each refresh or resize of the gantt region (which triggers a refresh) caused the current value of MY_COLOUR to be applied to the Gantt Task again resulting in some very long strings of CSS class names which conflict with eachother.

Does anyone know of any way to prevent this from happening so that on the region refreshing, only the current value of MY_COLOUR is applied to the Task?

Thanks in advance,

BRB

Tagged: