Page 1 of 1
Polar Plot Clipping Question
Posted: Wed Nov 19, 2008 4:43 pm
by 13045490
When I draw a polar plot in which the axis limit is less than the data space the line in drawn outside the plot range. Is there a way to clip the plot data without physically changing the data each time the user changes the axis limits?
Posted: Wed Nov 19, 2008 5:03 pm
by narcis
Hi johnf,
Yes, you can try doing something like this:
Code: Select all
public Form1()
{
InitializeComponent();
InitializeChart();
}
private Steema.TeeChart.Styles.Polar polar1;
private void InitializeChart()
{
tChart1.Aspect.View3D = false;
polar1 = new Steema.TeeChart.Styles.Polar(tChart1.Chart);
polar1.FillSampleValues();
polar1.BeforeDrawValues += new Steema.TeeChart.PaintChartEventHandler(polar1_BeforeDrawValues);
polar1.AfterDrawValues += new Steema.TeeChart.PaintChartEventHandler(polar1_AfterDrawValues);
}
void polar1_AfterDrawValues(object sender, Steema.TeeChart.Drawing.Graphics3D g)
{
g.ClearClipRegions();
}
void polar1_BeforeDrawValues(object sender, Steema.TeeChart.Drawing.Graphics3D g)
{
g.ClipEllipse(tChart1.Chart.ChartRect);
}