Independent X,Y axes for each series?
Independent X,Y axes for each series?
Dear All,
What I want to do is to use only one teechart control but I want to have a different X,Y Axes for each series. I would like to have it look like that each series X, Y axes are on each different TeeChart control.
Each X, Y axes are the same as they are in the seperate teechart control?
Could you please advise how to do this?
Regards,
LG
What I want to do is to use only one teechart control but I want to have a different X,Y Axes for each series. I would like to have it look like that each series X, Y axes are on each different TeeChart control.
Each X, Y axes are the same as they are in the seperate teechart control?
Could you please advise how to do this?
Regards,
LG
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi LG,
To achieve this you should use custom axes and position them wherever you want.
You will find information on how to use them at "Tutorial 4 - Axis Control". You will also find some examples at the TeeChart features demo. Both tutorials and features demo can be found at TeeChart program group.
To achieve this you should use custom axes and position them wherever you want.
You will find information on how to use them at "Tutorial 4 - Axis Control". You will also find some examples at the TeeChart features demo. Both tutorials and features demo can be found at TeeChart program group.
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 |
Dear Narcis,
Thanks for your resply. That is not what I want to have at all.
Please find the sameple image that I use lot of controls to make it independent. But what I am asking is there anyway to use a single teeChart control and make it look the same what it is in my sample image?
Sorry that I could not upload the image to the forum. Could you please let me know if there anyway that I can send you the image?
Regards,
LG
Thanks for your resply. That is not what I want to have at all.
Please find the sameple image that I use lot of controls to make it independent. But what I am asking is there anyway to use a single teeChart control and make it look the same what it is in my sample image?
Sorry that I could not upload the image to the forum. Could you please let me know if there anyway that I can send you the image?
Regards,
LG
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Dear LG,
Using custom axes doesn't mean having more than on TChart control. You can add several custom axes to a TChart control.
Regarding the image, please post it at [url]news://www.steema.net/steema.public.attachments[/url] newsgroup. This will help us to figure out what you need.
Using custom axes doesn't mean having more than on TChart control. You can add several custom axes to a TChart control.
Regarding the image, please post it at [url]news://www.steema.net/steema.public.attachments[/url] newsgroup. This will help us to figure out what you need.
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 |
Hi.
But looking at the image you posted you basically want all charts to have the same "look" and alignment. I think this can be done by using several charts with (some) common properties.
One way to do this is to design new chart theme and apply it to all charts. Another (similar) solution is to create a chart template and then use it for all charts (an example about chart templates is available in TeeChart demo). Yet another way to left-align all charts is to set vertical axis properties (title size, label size, label separation, left margin) and thus ensure all charts will be left-aligned.
Yes, if you use custom axes and additional legends for each series type.there anyway to use a single teeChart
But looking at the image you posted you basically want all charts to have the same "look" and alignment. I think this can be done by using several charts with (some) common properties.
One way to do this is to design new chart theme and apply it to all charts. Another (similar) solution is to create a chart template and then use it for all charts (an example about chart templates is available in TeeChart demo). Yet another way to left-align all charts is to set vertical axis properties (title size, label size, label separation, left margin) and thus ensure all charts will be left-aligned.
Marjan Slatinek,
http://www.steema.com
http://www.steema.com
Dear Marjan,
I have problem as what you said on the left axis because some values in left axis are one digits, two digits, three, etc.
I could not find out any property used to set the left margin at all. Could you please advise how to align them properly even what ever number of digits? Could you please advise how to make sure all control are aligned both sides left & right?
Another problem I encounter by using candle.ColorEachLine = true seem not to work.
But somehow the color for each line doesn't work at all. It draws just one color.
Regards,
LG
I have problem as what you said on the left axis because some values in left axis are one digits, two digits, three, etc.
I could not find out any property used to set the left margin at all. Could you please advise how to align them properly even what ever number of digits? Could you please advise how to make sure all control are aligned both sides left & right?
Another problem I encounter by using candle.ColorEachLine = true seem not to work.
Code: Select all
ctrTChart.Series.Add(candle);
// adding X, Y values to chart
for (int intIndex=0; intIndex<= adatTimeResult.GetUpperBound(0); intIndex++)
{ // add new line
if (astrValue[intIndex].ToLower() == "x")
candle.Color = Color.Green;
else if (astrValue[intIndex].ToLower() == "y")
candle.Color = Color.Red;
else
candle.Color = Color.Yellow; // stand by
// add value
candle.Add(adatTimeResult[intIndex], 2, 3, 0, 1);
}
Regards,
LG
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Dear LG,
You could set the margins using:I could not find out any property used to set the left margin at all. Could you please advise how to align them properly even what ever number of digits? Could you please advise how to make sure all control are aligned both sides left & right?
Code: Select all
this.tChart1.Panel.MarginUnits=Steema.TeeChart.PanelMarginUnits.Pixels;
this.tChart1.Panel.MarginLeft=5;
this.tChart1.Panel.MarginRight=5;
this.tChart1.Panel.MarginTop=5;
this.tChart1.Panel.MarginBottom5;
You have to set ColorEach property to true:Another problem I encounter by using candle.ColorEachLine = true seem not to work.
Code: Select all
this.candle1.ColorEach=true;
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 |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Dear LG,
Ok, then you may need to set left axis position:
Ok, then you may need to set left axis position:
Code: Select all
this.tChart1.Axes.Left.PositionUnits=Steema.TeeChart.PositionUnits.Pixels;
this.tChart1.Axes.Left.Position=30;
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 |
Dear Narcis,
I am not sure why? I try but it say Position is a read-only property.
Please note that I create chart controls at run time.
Error message:
Any suggestions?
Regards,
LG
I am not sure why? I try but it say Position is a read-only property.
Please note that I create chart controls at run time.
Error message:
Code: Select all
Property or indexer 'Steema.TeeChart.Axis.Position' cannot be assigned to -- it is read only
Any suggestions?
Regards,
LG
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
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 |
Dear Narcís,
Sorry to tell you that it doesn't line up very well at all even I use the relative position. Could you advise any other solution please?
Another thing I have found that
When I pad it with a single space but when showing on the legend it always trim up. So there's no space at the end at all.
Is it a bug?
Regards,
LG
Sorry to tell you that it doesn't line up very well at all even I use the relative position. Could you advise any other solution please?
Another thing I have found that
Code: Select all
strTitle = "Hello";
line.Title = strTitle.PadRight(14, ' ')
Is it a bug?
Regards,
LG
Hi,
A solution is to set the same label size and title size for each Chart.Sorry to tell you that it doesn't line up very well at all even I use the relative position. Could you advise any other solution please?
Code: Select all
tChart1.Axes.Left.Labels.CustomSize = 60;
tChart1.Axes.Left.Title.CustomSize = 20;
tChart2.Axes.Left.Labels.CustomSize = 60;
tChart2.Axes.Left.Title.CustomSize = 20;
Nope, it's by default (it removes the blank spaces at the end). Maybe you can add a dot or any other trick.When I pad it with a single space but when showing on the legend it always trim up. So there's no space at the end at all.
Is it a bug?
Pep Jorge
http://support.steema.com
http://support.steema.com