Hello Bon,
This article is a good resource: https://how-to.aimms.com/Articles/49/49-webui-css-color.html
Depending on the AIMMS version you are using, .aimms-widget and .theme-aimms are not necessary in all cases. For example, most of your CSS code will work just fine if you remove the .aimms-widget class in recent versions of AIMMS.
Suppose you have an identifier p_Identifier with the annotation whatever_I_name_it in 2 barcharts - bar-1, bar-2 and a pie chart, pie-1.
code:.annotation-whatever_I_name_it {
fill: #FF0099
}
This above code with only annotation will color p_Identifier with #FF0099 in all of the 3 widgets.
If you only want this color in the bar charts, you will use the .tag-widgetname class.
code:.tag-barchart .annotation-whatever_I_name_it {
fill: #FF0099
}
This code will change the color of p_Identifier in both bar-1 and bar-2 but not in pie-1.
If you want this color applied only in bar-1, you will use the data-widget\.uri class to filter on that widget's name.
code:.tag-widget[data-widget\.uri="bar-1"] .annotation-whatever_I_name_it {
fill: #FF0099
}
There is a Theme Switch add-on for WebUI. You can ask your colleagues for it, or reach out to
@AIMMS User Support to get a copy of these add on. It is a collection of CSS files for styling and javascript objects which lets you select the WebUI theme using a drop down bar.
If you want your above CSS styling to be applied only when a particular theme is selected, then you will use the .theme- class.
code:.theme-custom .annotation-whatever_I_name_it {
fill: #FF0099
}
This above code will not have any effect in your WebUI if you do not select the theme named "custom". .theme-aimms is the default theme and the below code will not apply the colors when you select the "custom" theme.
code:.theme-aimms .annotation-whatever_I_name_it {
fill: #FF0099
}
Hope this helps,
Mohan