Search code examples
androidandroidplot

FastLineAndPointRenderer with DashPathEffect


it appears that the FastLineAndPointRenderer does not support the DashPathEffect ???

is this true or am i doing something wrong

if it does support the dashed plots, i will publish some of my setup, otherwise it's not relevant


Solution

  • This is probably due to the difference in how lines are drawn between the two renderers. FastLineAndPointRenderer draws a line between each pair of points using canvas.drawLine(...) while LineAndPointRenderer calculates the entire path and uses Canvas.DrawPath(...) instead. In the case of the former I believe that the path effect is relative to the start of each line segment so if your series had enough points, each new segment would reset the path effect before the first dash could appear. In your case the dash path intervals you've specified are probably greater in size than the average segment length in your series (due to high number of samples).

    As far as why lines with higher slopes show more of the dash effect, the longer the line, the more room there is for the dash effect to manifest, and in a fixed interval scheme, the greater the slope of a line, the longer the line is.