This is kind of a hack... but I've disabled the warning section in my app by doing something like the following:
levelIndicator.criticalValue = threshold;
levelIndicator.warningValue = threshold-.00001;
If I make them equal, both are disabled and the bar is always green, but by making the warning some tiny bit below the critical level, it goes from green to red, and I never see any yellow. (The difference between engineering and mathematics... )
To disable the critical/red section, and show only green and yellow, try something like:
levelIndicator.warningValue = threshold;
levelIndicator.criticalValue = levelIndicator.maxValue+1;