lable axsis
lable axsis
Hello,
I have q question.
I made 2 (and more) axis on a single chart. each axis has its own graph. All graphs have the same color. U wan to distinguish between graphs.
I want to make a lable on each graph area with its name. How can i do it.
Pls look at the example
|(axsis1)
| graph name
|_____________________
|(axsis2)
| grapsh name
|_______________ ______
Second question:
I plotted 20,000 point. t chart is very slow i use 2005 version for visual studio. How canI make it faster.
Thans Alex
I have q question.
I made 2 (and more) axis on a single chart. each axis has its own graph. All graphs have the same color. U wan to distinguish between graphs.
I want to make a lable on each graph area with its name. How can i do it.
Pls look at the example
|(axsis1)
| graph name
|_____________________
|(axsis2)
| grapsh name
|_______________ ______
Second question:
I plotted 20,000 point. t chart is very slow i use 2005 version for visual studio. How canI make it faster.
Thans Alex
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Alex,
I recommend you to use Annotation tools for that, for example:
Regarding chart's performance, I suggest that you read the Real-Time Charting here and also look at the examples at All Features\Welcome!\Speed in the features demo, available at TeeChart's program group.
I recommend you to use Annotation tools for that, for example:
Code: Select all
public Form1()
{
InitializeComponent();
InitializeChart();
}
private void InitializeChart()
{
line1.FillSampleValues();
line2.FillSampleValues();
annotation1.Text = line1.Title;
annotation2.Text = line2.Title;
Bitmap bmp = tChart1.Bitmap;
}
private void SetAnnotationsPosition()
{
annotation1.Shape.CustomPosition = true;
annotation1.Shape.Left = tChart1.Axes.Left.Position + 5;
annotation1.Shape.Top = tChart1.Axes.Left.IStartPos + 5;
annotation2.Shape.CustomPosition = true;
annotation2.Shape.Left = axis1.Position + 5;
annotation2.Shape.Top = axis1.IStartPos + 5;
}
private void tChart1_AfterDraw(object sender, Steema.TeeChart.Drawing.Graphics3D g)
{
SetAnnotationsPosition();
}
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 |
another question
Hello,
You helped me a lot regarding the text title (annotation tool).
But I have another question. When I resize the tchart form the annotation tool doesn’t keep it position relative to the axis. After resizing i get the annotation tool in different place. How I can keep it always be near the axis no meter if I resize the form.
Looking for your answer
Alex,
You helped me a lot regarding the text title (annotation tool).
But I have another question. When I resize the tchart form the annotation tool doesn’t keep it position relative to the axis. After resizing i get the annotation tool in different place. How I can keep it always be near the axis no meter if I resize the form.
Looking for your answer
Alex,
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Alex,
I'm glad to hear that helped.
To solve this issue you just need to use Resize event with a Bitmap call as shown here:
Bitmap method call forces the chart being internally repainted and therefore AfterDraw event being called.
I'm glad to hear that helped.
To solve this issue you just need to use Resize event with a Bitmap call as shown here:
Code: Select all
private void tChart1_Resize(object sender, EventArgs e)
{
Bitmap bmp = tChart1.Bitmap;
}
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 |
question
Hi,
I wrote the next piece of code as u said:
private void tChart1_Resize(object sender, EventArgs e)
{
Bitmap bmp = tChart1.Bitmap;
}
but it didn't help me. What I am doing with the "bmp" variable, it is in the air.
How I make the annotation tool to save it position in resizing the form.
Thank you
Alex
I wrote the next piece of code as u said:
private void tChart1_Resize(object sender, EventArgs e)
{
Bitmap bmp = tChart1.Bitmap;
}
but it didn't help me. What I am doing with the "bmp" variable, it is in the air.
How I make the annotation tool to save it position in resizing the form.
Thank you
Alex
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Alex,
Code below works fine for me here. You don't need to use bmp variable for anything in particular. You just need it to assign the output or tChart1.Bitmap. Which, as I told you, makes the chart being internally repainted therefore AfterDraw event fired and SetAnnotationsPosition executed.
Code below works fine for me here. You don't need to use bmp variable for anything in particular. You just need it to assign the output or tChart1.Bitmap. Which, as I told you, makes the chart being internally repainted therefore AfterDraw event fired and SetAnnotationsPosition executed.
Code: Select all
public Form1()
{
InitializeComponent();
InitializeChart();
}
private void InitializeChart()
{
line1.FillSampleValues();
line2.FillSampleValues();
annotation1.Text = line1.Title;
annotation2.Text = line2.Title;
Bitmap bmp = tChart1.Bitmap;
}
private void SetAnnotationsPosition()
{
annotation1.Shape.CustomPosition = true;
annotation1.Shape.Left = tChart1.Axes.Left.Position + 5;
annotation1.Shape.Top = tChart1.Axes.Left.IStartPos + 5;
annotation2.Shape.CustomPosition = true;
annotation2.Shape.Left = axis1.Position + 5;
annotation2.Shape.Top = axis1.IStartPos + 5;
}
private void tChart1_AfterDraw(object sender, Steema.TeeChart.Drawing.Graphics3D g)
{
SetAnnotationsPosition();
}
private void tChart1_Resize(object sender, EventArgs e)
{
Bitmap bmp = tChart1.Bitmap;
}
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 |
new question
Hello,
Your answer helped me a lot.
Regarding the second problem, when I draw 20,000 points I also used your advice (fast line) and it helped. But when I use "label member" from data source it slows tchart very much.
Is there a way to overcome this problem? Using labels with out the slowing effect.
Thanks,
Alex,
Your answer helped me a lot.
Regarding the second problem, when I draw 20,000 points I also used your advice (fast line) and it helped. But when I use "label member" from data source it slows tchart very much.
Is there a way to overcome this problem? Using labels with out the slowing effect.
Thanks,
Alex,
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Alex,
Which is the performance differential at the moment? Could you please send us a simple example project we can run "as-is" to reproduce the issue here?
You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.
Thanks in advance.
Which is the performance differential at the moment? Could you please send us a simple example project we can run "as-is" to reproduce the issue here?
You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.
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 |
labels problem
Hello,
First of all thank you. Secondly I used labels because in the "x" axis I have a time scaling. The "x" axis values are in datatable and are constructed in the next form:
x (axis)
21:08:37:616
21:08:37:666
21:08:37:818
21:08:38:116
21:08:36:268
The problem was that I couldn't find how to make this values to be shown on the "x" axis so i used labels.
Can you tell me what is the code for taking this values on "x" axis. I looked at the demo and it didn't helped me.
Alex,
First of all thank you. Secondly I used labels because in the "x" axis I have a time scaling. The "x" axis values are in datatable and are constructed in the next form:
x (axis)
21:08:37:616
21:08:37:666
21:08:37:818
21:08:38:116
21:08:36:268
The problem was that I couldn't find how to make this values to be shown on the "x" axis so i used labels.
Can you tell me what is the code for taking this values on "x" axis. I looked at the demo and it didn't helped me.
Alex,
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Alex,
You should set series' XValues to DateTime, for example:
Then you should set bottom axis labels DateTimeFormat as described in Tutorial 4 - Axis Control, for example:
You'll find the tutorials at TeeChart's program group. You may also be interested in reading Custom Date and Time Format Strings.
You should set series' XValues to DateTime, for example:
Code: Select all
line1.XValues.DateTime = true;
Code: Select all
tChart1.Axes.Bottom.Labels.DateTimeFormat = "hh:mm:ss.FFF";
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 |
time axsis
Hello,
This helped me but I have a small problem.
I can't see the "x" axis labels values. Only if I will do the next command I will see them:
tchart.axsis.bottom.labels.angle=90;
And even in this case I will see the labels only if the form is wide enough.
If the form is small size it is as if there is no place to the labels and tchart doesn’t show them.
Also I need that the labels will be horizontal angle =180 and of cause to see them.
Looking to your answer,
Alex,
This helped me but I have a small problem.
I can't see the "x" axis labels values. Only if I will do the next command I will see them:
tchart.axsis.bottom.labels.angle=90;
And even in this case I will see the labels only if the form is wide enough.
If the form is small size it is as if there is no place to the labels and tchart doesn’t show them.
Also I need that the labels will be horizontal angle =180 and of cause to see them.
Looking to your answer,
Alex,
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Alex,
I can see the bottom axis labels in the project you sent. Anyway, I recommend you to read this thread. It's quite a long thread but almost all posibilities with axes labels are discussed there.
Thanks in advance.
I can see the bottom axis labels in the project you sent. Anyway, I recommend you to read this thread. It's quite a long thread but almost all posibilities with axes labels are discussed there.
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 |
your answer
Hello,
I sent you a piece of code few days ago about "x" axis labels that I can see. I Will be very thank full if you will answer me as quick as possible, it is very urgent.
Alex,
I sent you a piece of code few days ago about "x" axis labels that I can see. I Will be very thank full if you will answer me as quick as possible, it is very urgent.
Alex,
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Alex,
I'm sorry but I can't find this code. Would you be so kind to remind me of it?
Thanks in advance.
I'm sorry but I can't find this code. Would you be so kind to remind me of it?
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 |
question
Hello,
I sent my code on suuport mailbox.
my mail: det_moroz5@yahoo.com
Looking for your answer,
Alex,
I sent my code on suuport mailbox.
my mail: det_moroz5@yahoo.com
Looking for your answer,
Alex,