How can I show strings on horizontal axis?
I found a function: add(double value,string txt), but label will be same with horizontal axis.
Can I set different label from horizontal axis and show strings on horizontal axis?
String horizontal axis and Label
Re: String horizontal axis and Label
Hello mks-ydi,
Could you please, check if previous code works as you want? On the other hand, I suggest you can take a look in the All Features\Welcome !\Axes\Custom Labels, where there is more examples.
Thanks,
I have made next code, and labels are changing depending as text you are adding. Therefore, it works fine for me.How can I show strings on horizontal axis?
I found a function: add(double value,string txt), but label will be same with horizontal axis.
Code: Select all
private void InitializeChart()
{
tChart1.Aspect.View3D = false;
Steema.TeeChart.Styles.Line line1 = new Steema.TeeChart.Styles.Line(tChart1.Chart);
Random rnd = new Random();
for (int i = 0; i < 10; i++)
{
line1.Add(i, rnd.Next(100), "Values:" + i.ToString());
}
}
I am not sure of understand what you want achieve. Please, can you explain exactly what do you want do?Can I set different label from horizontal axis and show strings on horizontal axis?
Thanks,
Best Regards,
Sandra Pazos / 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 |
Re: String horizontal axis and Label
I'm sorry I haven't say clearly. It should be mark. Today I found when mark style is value, tee chart show the value with two significant digits.The precision is not enough for our project, are there any solutions for this problem?
By the way I found another bug of teechart:
1. Create a project.
2. Add a UpdatePanel on the page.
3. Add an button and teechart on the UpdatePanel.
4. Make the chart support zoom.
5. Run the project.
6. Zoom the chart.
7. Click the button. You can see chart will be zoomed again.
I'm sorry I don't have time to write a sample project for this. Could you write a sample project?
By the way I found another bug of teechart:
1. Create a project.
2. Add a UpdatePanel on the page.
3. Add an button and teechart on the UpdatePanel.
4. Make the chart support zoom.
5. Run the project.
6. Zoom the chart.
7. Click the button. You can see chart will be zoomed again.
I'm sorry I don't have time to write a sample project for this. Could you write a sample project?
Re: String horizontal axis and Label
Hello,
You can use ValueFormat string to set it. Here it is an example:mks-ydi wrote:I'm sorry I haven't say clearly. It should be mark. Today I found when mark style is value, tee chart show the value with two significant digits.The precision is not enough for our project, are there any solutions for this problem?
Code: Select all
WebChart1.Chart.Aspect.View3D = false;
WebChart1.Chart.Legend.Visible = false;
Steema.TeeChart.Styles.Line line1 = new Steema.TeeChart.Styles.Line(WebChart1.Chart.Chart);
Random r = new Random();
line1.Add(r.NextDouble());
for (int i = 1; i < 20; i++)
{
line1.Add(line1.YValues[i-1] + (r.NextDouble()/1000 - 0.00045));
}
WebChart1.Chart.Axes.Left.Labels.ValueFormat = "#0.0000";
I'm trying to do it but I'm afraid I can't add the chart into the UpdatePanel. We'll be pleased to take a look at it when you'll find time to arrange a simple example project we can run as-is to reproduce the problem here. On the other hand, It looks similar to the discussion here, so I'd try what's suggested there.mks-ydi wrote:By the way I found another bug of teechart:
1. Create a project.
2. Add a UpdatePanel on the page.
3. Add an button and teechart on the UpdatePanel.
4. Make the chart support zoom.
5. Run the project.
6. Zoom the chart.
7. Click the button. You can see chart will be zoomed again.
I'm sorry I don't have time to write a sample project for this. Could you write a sample project?
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: String horizontal axis and Label
This is the sample.
- Attachments
-
- TeeChartBug2.zip
- (153.6 KiB) Downloaded 482 times
Re: String horizontal axis and Label
Hello mks-ydi,
Ok. I have modified your code and seems zoom works fine for me. Could you please, check if attach project works as you expected? If doesn't work as you expect please tell us exactly, what do you want application do? I hope will helps.
Thanks,
Ok. I have modified your code and seems zoom works fine for me. Could you please, check if attach project works as you expected? If doesn't work as you expect please tell us exactly, what do you want application do? I hope will helps.
Thanks,
Best Regards,
Sandra Pazos / 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 |
Re: String horizontal axis and Label
Idon't known why this can work. Solution seems nothing about this problem. But whatever It really works.
Thank you.
Thank you.