Polygon Plotting issues in webchart (.NET 2.0)
Posted: Tue Sep 19, 2006 12:33 am
Hello,
I have this problem where I cannot plot a Polygon inside WebChart, Can anyone please let me know what I am doing wrong here, this is a simple example with the default.aspx having the following code, I can see a empty chart but no Polygon
public partial class _Default : System.Web.UI.Page
{
Steema.TeeChart.Chart tchart;
protected void Page_Load(object sender, EventArgs e)
{
tchart=WebChart1.Chart;
Steema.TeeChart.Styles.Map map1 = new Steema.TeeChart.Styles.Map(tchart);
Steema.TeeChart.Styles.Polygon P1 = new Steema.TeeChart.Styles.Polygon(tchart);
P1.Add(100.2, 100.2);
P1.Add(200.2, 200.2);
P1.Add(300.2, 300.3);
P1.Add(150.5, 150.5);
P1.Add(100.2, 100.2);
map1.Shapes.Add(P1);
P1.ParentSeries = map1;
}
}
Also I am successfully using AddShape method in map series to draw polygons, but the limitation for AddShape method is it takes only integer values. I am trying to use Polygon series so that I can use floating point co-ordinates.
Thanks
I have this problem where I cannot plot a Polygon inside WebChart, Can anyone please let me know what I am doing wrong here, this is a simple example with the default.aspx having the following code, I can see a empty chart but no Polygon
public partial class _Default : System.Web.UI.Page
{
Steema.TeeChart.Chart tchart;
protected void Page_Load(object sender, EventArgs e)
{
tchart=WebChart1.Chart;
Steema.TeeChart.Styles.Map map1 = new Steema.TeeChart.Styles.Map(tchart);
Steema.TeeChart.Styles.Polygon P1 = new Steema.TeeChart.Styles.Polygon(tchart);
P1.Add(100.2, 100.2);
P1.Add(200.2, 200.2);
P1.Add(300.2, 300.3);
P1.Add(150.5, 150.5);
P1.Add(100.2, 100.2);
map1.Shapes.Add(P1);
P1.ParentSeries = map1;
}
}
Also I am successfully using AddShape method in map series to draw polygons, but the limitation for AddShape method is it takes only integer values. I am trying to use Polygon series so that I can use floating point co-ordinates.
Thanks