Menu

#120 Some Pointpainters should not draw interpolated points

next_bugfix_release
open
nobody
5
2017-09-19
2017-09-19
Anonymous
No

I have discovered an issue with pointpainters that occurs when the point to be drawn is interpolated (that is, it lies on either the far left or far right edge of the chart). Normally you want a line to be interpolated from a visible point to a point off the screen, so the line extends to the edge. This is the expected behavior for PointPainterLine. However it is confusing for PointPainterVerticalBar and PointerPainterDisc because it looks as if there is a real data point at the edge of the screen. Therefore these pointpainters should not draw themselves if the point is interpolated. My work around so far is to not draw the points if the point lies at the start or stop pixel. In the paintPoint() method of either PointPainterVerticalBar or PointPainterDisc, I modified the method body as follows:

if (absoluteX > m_chart.getXChartStart() && absoluteX < m_chart.getXChartEnd())
g.fillRect.....

Discussion

Anonymous
Anonymous

Add attachments
Cancel





Auth0 Logo