tower 3D
-
- Newbie
- Posts: 13
- Joined: Mon Oct 04, 2010 12:00 am
tower 3D
Hi
i try to plot a tower graph, but i have an error for a big values of X axes.
is there an limitation value for X axes ?
thanks
i try to plot a tower graph, but i have an error for a big values of X axes.
is there an limitation value for X axes ?
thanks
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: tower 3D
Hi micropross,
Not that I can think of except for that you exceed double values range. Can you please attach a simple example project we can run "as-is" to reproduce the problem here?
Thanks in advance.
Not that I can think of except for that you exceed double values range. Can you please attach a simple example project we can run "as-is" to reproduce the problem here?
Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Newbie
- Posts: 13
- Joined: Mon Oct 04, 2010 12:00 am
Re: tower 3D
hi Narcis
exemple :
Random r = new Random(1000);
this.towerSeries1.Clear();
for (int x=1; x<=1000; x = x+100)
for (int z=1; z<=10; z++)
this.towerSeries1.Add(x,r.Next(1000)-100,z);
this code generate a System.NullReferenceException.
thanks
exemple :
Random r = new Random(1000);
this.towerSeries1.Clear();
for (int x=1; x<=1000; x = x+100)
for (int z=1; z<=10; z++)
this.towerSeries1.Add(x,r.Next(1000)-100,z);
this code generate a System.NullReferenceException.
thanks
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: tower 3D
Hi micropross,
Thanks for the example code. You need to set Tower.IrregularGrid to true to get this working, for example:
Thanks for the example code. You need to set Tower.IrregularGrid to true to get this working, for example:
Code: Select all
public Form1()
{
InitializeComponent();
InitializeChart();
}
private Steema.TeeChart.Styles.Tower towerSeries1;
private void InitializeChart()
{
this.towerSeries1 = new Steema.TeeChart.Styles.Tower(tChart1.Chart);
this.towerSeries1.IrregularGrid = true;
Random r = new Random(1000);
this.towerSeries1.Clear();
for (int x = 1; x <= 1000; x = x + 100)
for (int z = 1; z <= 10; z++)
this.towerSeries1.Add(x, r.Next(1000) - 100, z);
}
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Newbie
- Posts: 13
- Joined: Mon Oct 04, 2010 12:00 am
Re: tower 3D
thank you very mush narcis
this exemple works well
this exemple works well
-
- Newbie
- Posts: 13
- Joined: Mon Oct 04, 2010 12:00 am
Re: tower 3D
i have another question ,
for a big values for x and Y the tower look very thin . i modified the percent width and depth to 100% but the tower remains very thin.
is there a method to modifie that?
thanks
for a big values for x and Y the tower look very thin . i modified the percent width and depth to 100% but the tower remains very thin.
is there a method to modifie that?
thanks
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: tower 3D
Hi micropross,
The problem here is you have very big X increments between each tower. X values are: 1, 101, 201, 301, ..., 901. This makes a big separation between columns and therefore them being narrow. Populating your series as in the code snippet below solves the problem.
The problem here is you have very big X increments between each tower. X values are: 1, 101, 201, 301, ..., 901. This makes a big separation between columns and therefore them being narrow. Populating your series as in the code snippet below solves the problem.
Code: Select all
public Form1()
{
InitializeComponent();
InitializeChart();
}
private Steema.TeeChart.Styles.Tower towerSeries1;
private void InitializeChart()
{
tChart1.Dock = DockStyle.Fill;
this.towerSeries1 = new Steema.TeeChart.Styles.Tower(tChart1.Chart);
this.towerSeries1.IrregularGrid = true;
Random r = new Random(1000);
this.towerSeries1.Clear();
for (int x = 1; x <= 10; x++)
for (int z = 1; z <= 10; z++)
{
double tmp = ((x - 1) * 100) + 1;
this.towerSeries1.Add(x, r.Next(1000) - 100, z, tmp.ToString());
}
tChart1.Axes.Bottom.Labels.Style = Steema.TeeChart.AxisLabelStyle.Text;
}
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Newbie
- Posts: 13
- Joined: Mon Oct 04, 2010 12:00 am
Re: tower 3D
what about Depth axis.
where can i enter the text to appear on the axis
where can i enter the text to appear on the axis
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: tower 3D
Hi micropross,
You can enable depth axis labels setting it to visible:
tChart1.Axes.Depth.Visible = true;
You can customize code in the GetAxisLabel event which you should complete here:
Finally, you can also add custom labels as in the All Features\Welcome !\Axes\Labels\Custom labels example in the features demo available at TeeChart's program group.
Hope this helps!
You can enable depth axis labels setting it to visible:
tChart1.Axes.Depth.Visible = true;
You can customize code in the GetAxisLabel event which you should complete here:
Code: Select all
public Form1()
{
InitializeComponent();
InitializeChart();
}
private Steema.TeeChart.Styles.Tower towerSeries1;
private void InitializeChart()
{
tChart1.Dock = DockStyle.Fill;
this.towerSeries1 = new Steema.TeeChart.Styles.Tower(tChart1.Chart);
this.towerSeries1.IrregularGrid = true;
Random r = new Random(1000);
this.towerSeries1.Clear();
for (int x = 1; x <= 10; x++)
for (int z = 1; z <= 10; z++)
{
double tmp = ((x - 1) * 100) + 1;
this.towerSeries1.Add(x, r.Next(1000) - 100, z, tmp.ToString());
}
tChart1.Axes.Bottom.Labels.Style = Steema.TeeChart.AxisLabelStyle.Text;
tChart1.Axes.Depth.Visible = true;
tChart1.GetAxisLabel += new Steema.TeeChart.GetAxisLabelEventHandler(tChart1_GetAxisLabel);
}
void tChart1_GetAxisLabel(object sender, Steema.TeeChart.GetAxisLabelEventArgs e)
{
if (sender.Equals(tChart1.Axes.Depth))
{
//e.LabelText = "Your text here"
}
}
Hope this helps!
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |