delphi - Is it possible to 'clip' the lower part of TAreaSeries? -


i hints on working teechart tareaseries, , on creating not overlapping series.

when create 2 area series on same plot, related same bottomaxis , leftaxis this:

https://skydrive.live.com/redir?resid=9966bbbe2447aa89!116&authkey=!akm6dmvrxlex5ps

and if scroll plot vertically see these 2 series expanding downwards endlessly negative infinity (y coordinate).

but wonder if possible 'cut' lower part of series @ y point? retrieve this:

https://skydrive.live.com/redir?resid=9966bbbe2447aa89!115&authkey=!agaejdrepknpymy

(excuse me links instead of images, don't have permission post them due reputation restrictions)

yes, can in all features\welcome!\axes\opaque zones example @ new features demo, available @ teechart's program group, example:

unit unit1;  interface  uses   windows, messages, sysutils, variants, classes, graphics, controls, forms,   dialogs, teegdiplus, teengine, series, extctrls, teeprocs, chart;  type   tform1 = class(tform)     chart1: tchart;     series1: tareaseries;     series2: tareaseries;     procedure formcreate(sender: tobject);     procedure series1click(sender: tchartseries; valueindex: integer;       button: tmousebutton; shift: tshiftstate; x, y: integer);     procedure chart1mousedown(sender: tobject; button: tmousebutton;       shift: tshiftstate; x, y: integer);   private     { private declarations }     cliprect: trect;     procedure seriesbeforedraw(sender: tobject);     procedure seriesafterdraw(sender: tobject);   public     { public declarations }   end;  var   form1: tform1;  implementation  {$r *.dfm}  uses tecanvas;  procedure tform1.formcreate(sender: tobject); begin   series1.beforedrawvalues:=seriesbeforedraw;   series1.afterdrawvalues:=seriesafterdraw; end;  procedure tform1.seriesbeforedraw(sender: tobject);    function seriesrect(series:tchartseries):trect;   begin     result     begin       left:=series.gethorizaxis.istartpos;       right:=series.gethorizaxis.iendpos;       top:=series.getvertaxis.istartpos;       bottom:=series.getvertaxis.calcyposvalue(700);     end;   end;  begin   cliprect:=seriesrect( sender tchartseries );    { make opaque }   chart1        if canclip           canvas.cliprectangle(cliprect); end;  procedure tform1.seriesafterdraw(sender: tobject); begin   chart1.canvas.uncliprectangle; end;  procedure tform1.series1click(sender: tchartseries; valueindex: integer;   button: tmousebutton; shift: tshiftstate; x, y: integer); begin   caption:=inttostr(valueindex); end;  procedure tform1.chart1mousedown(sender: tobject; button: tmousebutton;   shift: tshiftstate; x, y: integer); begin   if (series1.clicked(x,y)<>-1)     chart1.cancelmouse:=not pointinrect(cliprect,x,y); end;  end. 

which produces chart:

enter image description here


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -