diff --git a/Fwk/AppFwk/cafVizExtensions/cafCategoryMapper.cpp b/Fwk/AppFwk/cafVizExtensions/cafCategoryMapper.cpp index 1fa133adc8..b89c5b6df4 100644 --- a/Fwk/AppFwk/cafVizExtensions/cafCategoryMapper.cpp +++ b/Fwk/AppFwk/cafVizExtensions/cafCategoryMapper.cpp @@ -180,11 +180,13 @@ double CategoryMapper::domainValue(double normalizedValue) const int CategoryMapper::categoryIndexForCategory(double domainValue) const { int catIndex = -1; + + int intDomainValue = static_cast(nearbyint(domainValue)); size_t i = 0; while (i < m_categoryValues.size() && catIndex == -1) { - if (m_categoryValues[i] == domainValue) + if (m_categoryValues[i] == intDomainValue) { catIndex = static_cast(i); }