Page 1 of 1

Clip series graphics to axis bounds?

Posted: Wed Jul 06, 2011 5:42 am
by dglass
Is there a way to clip the drawing of the chart's series to the area bounded by the chart's axes?
LiveCodeScreenSnapz025.jpg
overrunning the axes
In the screenshot, I would like to clip the colored, stacked-line portion of the chart so it doesn't extend outside the axes on the left and right edges.

I would rather not have to recalculate the data in order to do the clipping.

Re: Clip series graphics to axis bounds?

Posted: Wed Jul 06, 2011 7:45 am
by BvG
Looks like a bug to me. Can you give me the charts["data"] that you use? Do you also set the charts["gridX"], or charts["minX" or "maxX"]? If you want you can also simply send me an example stack, and I'll look into it.

Re: Clip series graphics to axis bounds?

Posted: Wed Jul 06, 2011 5:45 pm
by dglass
I can try to give you the data I'm using. I made some changes last night to how the chart gets drawn, and am now having trouble getting it to do what I show in the screenshot.

I can also try to break it out into a small sample project, as soon as I can recreate what I was seeing yesterday.

I do set the gridX, minX, and maxX values.

Re: Clip series graphics to axis bounds?

Posted: Wed Jul 06, 2011 6:00 pm
by dglass
Sample attached.

If the MinX is after the earliest X value, then the chart is drawn too far to the left.
If the MaxX is before the last X value, then the chart is drawn too far to the right.

Re: Clip series graphics to axis bounds?

Posted: Fri Jul 08, 2011 3:26 pm
by BvG
Sadly, i have no time to check if this is a bug or not right now. I will get back to you on this problem after Sunday.