Hi Andy H ,
I think I found what you are looking for. Let's say that we have a featurelayer with 3 types of outages (see values A, B and C in field Outage Type) and the data when the outage was reported (field Outage Date):
When the Outage Type is "B" the color should vary from yellow to orange to red, where red indicate that most time has passed. Like this:
To get there you will nee to do the following. First define the symbology based on the outage type and assign the green and white colors to A and C. Then you will have to go into the second tap "vary the symbology by attribute":
To be able to create the colors for outage type "B", you will have enable the option "Allow symbol property connections":
When you do this, you can now create the color effect for outage type B based on the date. Click on the symbol for outage type B:
You will now be able to enter the properties, and activate the layers and to the right hand side you will see a grey icon that will allow you to define how to vary in this case the color. In my case the symbol is already blue since I already defined the attribute mapping:
This will open an interface where you can select an existing field or you can define an Arcade expression. I use the Arcade expression to define the scale of colors:
Since the colors should vary from yellow (most recent outages) to red (most dated outages) you can use the DateDiff function to calculate the difference between the current date and the date stored in the Outage Date field. Since to go from yellow, through orange to red you just vary the green intensity from 255 to 0, you can use a simple calculation. In my case my maximum time was 11 days so I divide the calculated days by 11 invert the result and multiply by 255. Then I construct the text to return "rgb(255, green, 0)" and that is all. If your green value will be out of the range from 0 to 255, it will be limited to 0 - 255.
Example Arcade expression:
var days = Abs(DateDiff(Now(), $feature.OutageDate, "days"));
var green = Round((1.0 - (days / 11.0)) * 255,0);
return "rgb(255," + green + ",0)";
Let me know if you run into any problems.