Hi
I have a chart with bar series.
I need to stack it using code. I can do it from the teechart editor but I really need to do it in code.
I'm using VB
I have tried this:
Dim mybar As Steema.TeeChart.Styles.MultiBars = CType(tChart.Series(0), Steema.TeeChart.Styles.Barmultibars)
mybar.Stacked = Steema.TeeChart.Styles.MultiBars.Side
But it does not allow me to do the conversion in the first line. It tells me:
Type: Steema.TeeChart.Styles.MultiBars Not defined
What Am I doing wrong?
Thanks in advance
Lars Iversen
Stacking bars
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Lars,
You need tu use MultiBar property like this:
You need tu use MultiBar property like this:
Code: Select all
Dim bar1 As New Steema.TeeChart.Styles.Bar(TChart1.Chart)
bar1.MultiBar = Steema.TeeChart.Styles.MultiBars.Side
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: 61
- Joined: Wed Jun 22, 2005 4:00 am
- Location: cph
Hi Narcís
Thanks that seems to work, but then again maybe not.
The code runs but series do not get stacked ( The stay the same.
Is it a bug that might be fixed. I'm using version: 2.0.2306.26232
I have to use this version because of a lot of other problems I have with the newer ones. (Its mostly about streaming to ten and back)
anyway do you have any other suggestions on how to get my bar series stacked?
Thanks in advance
Lars
Thanks that seems to work, but then again maybe not.
The code runs but series do not get stacked ( The stay the same.
Is it a bug that might be fixed. I'm using version: 2.0.2306.26232
I have to use this version because of a lot of other problems I have with the newer ones. (Its mostly about streaming to ten and back)
anyway do you have any other suggestions on how to get my bar series stacked?
Thanks in advance
Lars
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Lars,
Code below works fine for me here using latest TeeChart for .NET v2 build available. Could you please check if this version solves the problems at your end?
Which are the exact problems you are having with newer versions? If you already reported them could you please post the forums thread where they were discussed?
Thanks in advance.
Code below works fine for me here using latest TeeChart for .NET v2 build available. Could you please check if this version solves the problems at your end?
Code: Select all
For index As Integer = 0 To 3
Dim bar1 As New Steema.TeeChart.Styles.Bar(TChart1.Chart)
bar1.MultiBar = Steema.TeeChart.Styles.MultiBars.Side
bar1.FillSampleValues()
Next
Code: Select all
I have to use this version because of a lot of other problems I have with the newer ones. (Its mostly about streaming to ten and back)
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: 61
- Joined: Wed Jun 22, 2005 4:00 am
- Location: cph
Ahh sorry. I can now see the problem. the example you gave me creates a new bar series and makes sure they are stacken and THEN the data is filled. that works fine too in a small example I have made now.
I have it the other way around. When my customer wants to stack. the bar series has already been made in the chart. So I have to make the bar series stacked after they are filled. Somehow I need to go through the existing series and make them stacked. can you give an example of that?
Regarding the other issues I have with newer versions: I have tried to do a search where I put in "Lars Iversen" as author but it does not return anything. But in short: I have some advanced code that builds up database queries runtime and adds data and a lot of formatting to the chart. then I can't export the chart as a stream. I get some kind of error that some string could not be converted to numeric or something like that. I can not make a small example that will simulate it (
BR
Lars
I have it the other way around. When my customer wants to stack. the bar series has already been made in the chart. So I have to make the bar series stacked after they are filled. Somehow I need to go through the existing series and make them stacked. can you give an example of that?
Regarding the other issues I have with newer versions: I have tried to do a search where I put in "Lars Iversen" as author but it does not return anything. But in short: I have some advanced code that builds up database queries runtime and adds data and a lot of formatting to the chart. then I can't export the chart as a stream. I get some kind of error that some string could not be converted to numeric or something like that. I can not make a small example that will simulate it (
BR
Lars
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Lars,
Sure, you can make something like this:
Regarding the other issues, what about searching here?
http://www.teechart.net/support/search. ... or=9637396
Is that the issue?
http://www.teechart.net/support/viewtopic.php?t=6422
Thanks in advance.
Sure, you can make something like this:
Code: Select all
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
For Each b As Steema.TeeChart.Styles.Series In TChart1.Series
If (TypeOf b Is Steema.TeeChart.Styles.Bar) Then
CType(b, Steema.TeeChart.Styles.Bar).MultiBar = Steema.TeeChart.Styles.MultiBars.Side
End If
Next
End Sub
http://www.teechart.net/support/search. ... or=9637396
Is that the issue?
http://www.teechart.net/support/viewtopic.php?t=6422
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 |