david.gilbert wrote:Cool. If you want to, post a diff of the changes you made and I'll update the class for the next release.
I'd be happy to help, but my code is actually specialized to deal with only the type of polygon that my project utilizes... I'm not sure it would work for all cases.
Plus, I'm a rather amateur coder so I wouldn't want to pollute your terrific software with my code
That said, I'll at least explain the workaround:
 Find max and min of 'x' and 'y' values in polygon
 Get the domain and range axis lower and upper bounds
 Check whether polygon falls within domain and range bounds, and return if it does not (this prevents a lot of unnecessary JavaTo2D method calls for charts that are often heavily zoomed in).
 When drawing the polygon, always take the 'x' and 'y' value and use max() and min() functions to restrict them to the edge of the visible bounds when needed.