Kaydet (Commit) bf24374a authored tarafından Markus Mohrhard's avatar Markus Mohrhard

don't even try to create a shape for non existing values

Change-Id: I0af9285c2fa0371607e9ec750bb07968244c44d8
üst 69fa8cfb
...@@ -625,6 +625,9 @@ void GL3DBarChart::create3DShapes(const boost::ptr_vector<VDataSeries>& rDataSer ...@@ -625,6 +625,9 @@ void GL3DBarChart::create3DShapes(const boost::ptr_vector<VDataSeries>& rDataSer
} }
float nVal = rDataSeries.getYValue(nIndex); float nVal = rDataSeries.getYValue(nIndex);
if (rtl::math::isNan(nVal))
continue;
float nXPos = nIndex * (BAR_SIZE_X + BAR_DISTANCE_X) + BAR_DISTANCE_X; float nXPos = nIndex * (BAR_SIZE_X + BAR_DISTANCE_X) + BAR_DISTANCE_X;
glm::mat4 aScaleMatrix = glm::scale(glm::vec3(BAR_SIZE_X, BAR_SIZE_Y, float(nVal/nMaxVal))); glm::mat4 aScaleMatrix = glm::scale(glm::vec3(BAR_SIZE_X, BAR_SIZE_Y, float(nVal/nMaxVal)));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment