enum for styles?
enum for styles?
I can't find an enum for Steema.TeeChart.Styles, something along the lines of LegendStyles? Could you point me in the right direction?
Cheers
Francis
Cheers
Francis
Hi Francis
"Steema.TeeChart.LegendStyles" has 5 options, which are: auto, LastValues, Palette, Series and Values.
You can use a Steema.TeeChart.LegendStyles as below line:
"Steema.TeeChart.LegendStyles" has 5 options, which are: auto, LastValues, Palette, Series and Values.
You can use a Steema.TeeChart.LegendStyles as below line:
Code: Select all
tChart1.Legend.LegendStyle = Steema.TeeChart.LegendStyles.Auto;
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Francis,
Ok, then you are in the right direction, you should use, for example: Steema.TeeChart.Styles.Points, Steema.TeeChart.Styles.Line, Steema.TeeChart.Styles.FastLine, Steema.TeeChart.Styles.Arrow, Steema.TeeChart.Styles.Bar, etc.
Ok, then you are in the right direction, you should use, for example: Steema.TeeChart.Styles.Points, Steema.TeeChart.Styles.Line, Steema.TeeChart.Styles.FastLine, Steema.TeeChart.Styles.Arrow, Steema.TeeChart.Styles.Bar, etc.
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 Narcis,
Yep, I know how to use them, we've been using them for years. The question is whether there is a enum LIKE the enum 'LegendStyles' (which contain thngs such as 'Palette', 'Series' etc.) that contain the Chart.Styles (such as 'FastLine', 'Arrow').
This is so I can write general routines and decide during run time what style I want.
Hope this clarifies my question a bit more,
Cheers
Francis
Yep, I know how to use them, we've been using them for years. The question is whether there is a enum LIKE the enum 'LegendStyles' (which contain thngs such as 'Palette', 'Series' etc.) that contain the Chart.Styles (such as 'FastLine', 'Arrow').
This is so I can write general routines and decide during run time what style I want.
Hope this clarifies my question a bit more,
Cheers
Francis
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Francis,
I'm afraid such enum doesn't exist. All series styles come from Steema.TeeChart.Styles namespace.
For palettes, for example, you can use Steema.TeeChart.Styles.PaletteStyles.GrayScale.
Please notice that in Visual Studio, when using a property, just write it down, for example: "surface1.PaletteStyle", then place the mouse over the property and a hint will appear with the type of the property.
Hope this helps!
I'm afraid such enum doesn't exist. All series styles come from Steema.TeeChart.Styles namespace.
For palettes, for example, you can use Steema.TeeChart.Styles.PaletteStyles.GrayScale.
Please notice that in Visual Studio, when using a property, just write it down, for example: "surface1.PaletteStyle", then place the mouse over the property and a hint will appear with the type of the property.
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 |
Hi Narcis,
Maybe better to explain what I would like to achieve. Here is a code snippet for some imaginary situation:
dim ChrtStyle as Chart.ChrStyle
ChrtStyle = CHRTSTYLE_FastLine
SomeFun(ChrtStyle )
........
Public Function SomeFun(ChrtStl as Chart.ChrStyle)
Dim serie As New ChrtStl
....
end function
This can be done using a class factory approach. Maybe there is a simpler approach using TChart?
Thanks
Francis
Maybe better to explain what I would like to achieve. Here is a code snippet for some imaginary situation:
dim ChrtStyle as Chart.ChrStyle
ChrtStyle = CHRTSTYLE_FastLine
SomeFun(ChrtStyle )
........
Public Function SomeFun(ChrtStl as Chart.ChrStyle)
Dim serie As New ChrtStl
....
end function
This can be done using a class factory approach. Maybe there is a simpler approach using TChart?
Thanks
Francis
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi FrancisP,
Ok, now I understand what are you trying to do. This can be achieve doing something like this:
Ok, now I understand what are you trying to do. This can be achieve doing something like this:
Code: Select all
private void InitializeChart()
{
System.Type ChrStyle = System.Type.GetType("Steema.TeeChart.Styles.FastLine,TeeChart");
SomeFun(ChrStyle);
}
private void SomeFun(System.Type ChrStyle)
{
tChart1.Series.Add(ChrStyle);
tChart1[0].FillSampleValues();
}
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:
Hi Francis,
You're very welcome! I'm glad to hear that helped.
Thank you very much for your nice words.
You're very welcome! I'm glad to hear that helped.
Thank you very much for your nice words.
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 |