Alexander Kvamme
Alexander Kvamme

Reputation: 1

Clipping of linechart graph with round lineCap and thick line

While trying to learn danielgindi/Charts, I found a problem that I have not yet figured out. If I use thick lines as you can see in the right part of the image here

enter image description here

The simplest solution seem to be to somehow disable clipping of the CGContext used to draw the line, or expand it by have a line thickness. But I have not figured out how or where to do this, and CGContext seems to handle clipping differently than UIView. Is there a simpler way, or how do I do this? How can I avoid this clipping?

I have tried disabling clipping on the containing views.

Upvotes: 0

Views: 38

Answers (1)

Alexander Kvamme
Alexander Kvamme

Reputation: 1

I figure out one way to do something similar to what I want. In your renderer class, go into the XBound object and where it calculates the entryTo value, subtract one. This will make the last point in the viewFinder no longer be drawn. This is of course not optimal, but it gets the job done.

Upvotes: 0

Related Questions