how can i adjust width of the bar with respect to each serie
how can i adjust width of the bar with respect to each serie
How can i adjust the width of the bar with respect to each series and each bar
i want to have different bar widths in each series in each y value
i want to have different bar widths for each series in each y value
for example
i have 3 series ,a b & c in a bar graph
for a barwidth is kept 40
for b bar width is 30
for c bar width is 100
barwidth option changes for all values of y axis , i need to different bar widths for different y values
pls advise me
aravind
i want to have different bar widths in each series in each y value
i want to have different bar widths for each series in each y value
for example
i have 3 series ,a b & c in a bar graph
for a barwidth is kept 40
for b bar width is 30
for c bar width is 100
barwidth option changes for all values of y axis , i need to different bar widths for different y values
pls advise me
aravind
i have posted sample tee file
i have posted sample tee file in group
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Aravind,
Have you tried setting the BarWidthPercent for each of the series? For example:
Have you tried setting the BarWidthPercent for each of the series? For example:
Code: Select all
TChart1.Series(0).asBar.BarWidthPercent = 70
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 |
bar width for in a series
enclosing a bar graph with 3 bars drawn in it ( posted in newsgroup)
for example :
x values are 10 ,950,1350
bar plotted at x=10 should have size corresponding to its value
bar plotted at 950 should have 90% size ...
how to set differenct bar sizes in a series .....
thx
aravind
for example :
x values are 10 ,950,1350
bar plotted at x=10 should have size corresponding to its value
bar plotted at 950 should have 90% size ...
how to set differenct bar sizes in a series .....
thx
aravind
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Aravind,
Ok, now I understand what you are looking for. Then you can try doing something like this:
Ok, now I understand what you are looking for. Then you can try doing something like this:
Code: Select all
Private Sub Form_Load()
Me.TeeCommander1.Chart = Me.TChart1
TChart1.Import.LoadFromFile "e:\temp\samplebargraph.tee"
TChart1.Environment.InternalRepaint
End Sub
Private Sub TChart1_OnBeforeDrawSeries()
With TChart1.Series(0)
For i = 0 To .Count - 1
.asBar.BarWidth = (.XValues.Value(i) / .XValues.Maximum) * 100
Next
End With
End Sub
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 |
bar width is changing but i have to insert my own calculations for bar width
if insert the below code , bar widths are not changing ..
With TChart1.Series(0)
For i = 0 To .Count - 1
Select Case i
Case 0
.asBar.BarWidth = 15
Case 1
.asBar.BarWidth = 35
Case 2
.asBar.BarWidth = 50
End Select
' .asBar.BarWidth = (.XValues.Value(i) / .XValues.Maximum) * 100
Next
End With
if insert the below code , bar widths are not changing ..
With TChart1.Series(0)
For i = 0 To .Count - 1
Select Case i
Case 0
.asBar.BarWidth = 15
Case 1
.asBar.BarWidth = 35
Case 2
.asBar.BarWidth = 50
End Select
' .asBar.BarWidth = (.XValues.Value(i) / .XValues.Maximum) * 100
Next
End With
Hi Aravind,
I'm afraid there's no way to do this in the latest TeeChart Pro version, however it's on our wish list to be considered for the next releases.
In meantime a trick could be to use more than one Bar Series, each one with the desired barWidth.
I'm afraid there's no way to do this in the latest TeeChart Pro version, however it's on our wish list to be considered for the next releases.
In meantime a trick could be to use more than one Bar Series, each one with the desired barWidth.
Pep Jorge
http://support.steema.com
http://support.steema.com
can you give sample code to draw the trick
can you give sample code to draw the trick
Hi,
you can do :
you can do :
Code: Select all
Private Sub Form_Load()
With TChart1
.AddSeries scBar
.AddSeries scBar
.AddSeries scBar
.Series(0).Color = vbRed
.Series(1).Color = vbRed
.Series(2).Color = vbRed
.Series(0).AddXY 0, 10, "", clTeeColor
.Series(1).AddXY 1, 20, "", clTeeColor
.Series(2).AddXY 2, 30, "", clTeeColor
.Series(0).asBar.MultiBar = mbSideAll
.Series(0).asBar.BarWidth = 15
.Series(1).asBar.BarWidth = 35
.Series(2).asBar.BarWidth = 50
.Legend.LegendStyle = lsLastValues
End With
End Sub
Pep Jorge
http://support.steema.com
http://support.steema.com
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Aravind,
You should create one bar series for each X value, SelfStack the series and set a different BarWidth for each of them:
You should create one bar series for each X value, SelfStack the series and set a different BarWidth for each of them:
Code: Select all
Private Sub Form_Load()
For X = 0 To 3
TChart1.AddSeries scBar
TChart1.Series(X).asBar.MultiBar = mbSelfStack
TChart1.Series(X).asBar.BarWidth = 15 + (15 * X)
TChart1.Series(X).ColorEachPoint = True
TChart1.Series(X).Marks.Visible = False
For Y = 0 To 10
TChart1.Series(X).AddXY X, Rnd, "", clTeeColor
Next Y
Next X
End Sub
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 |
still having problems with barwidth for mulitple series
i have enclosed a sample chart in xls file need to draw this chart ..
in the x-axis i have plotted a.b.c with 5 series ...
i need to have for a bar width for all 5 series should be 77.7
for b it is 16.8 and for c it should be 5.4 ( i.e. for a i should give 70% width , b 16 % width and c 5% width) but now i can create equal bar width in tchart ...
the sample code which is given by you does not suite my requirement ... because values are not been plotted correctly and also coloring each series becomes a issue ... if i set color for series entire bar becomes same color which is not correct for us because for bar @a there is 5 series plotted ...
your code :
For X = 0 To 1
TChart1.AddSeries scBar
TChart1.Series(X).asBar.MultiBar = mbSelfStack
TChart1.Series(X).asBar.BarWidth = 15 + (15 * X)
TChart1.Series(X).ColorEachPoint = True
TChart1.Series(X).Marks.Visible = False
For Y = 0 To 2
TChart1.Series(X).AddXY X, Y, Y, clTeeColor
Next Y
Next X
need code to adjust barwidth for each position at x-axis ...
in the x-axis i have plotted a.b.c with 5 series ...
i need to have for a bar width for all 5 series should be 77.7
for b it is 16.8 and for c it should be 5.4 ( i.e. for a i should give 70% width , b 16 % width and c 5% width) but now i can create equal bar width in tchart ...
the sample code which is given by you does not suite my requirement ... because values are not been plotted correctly and also coloring each series becomes a issue ... if i set color for series entire bar becomes same color which is not correct for us because for bar @a there is 5 series plotted ...
your code :
For X = 0 To 1
TChart1.AddSeries scBar
TChart1.Series(X).asBar.MultiBar = mbSelfStack
TChart1.Series(X).asBar.BarWidth = 15 + (15 * X)
TChart1.Series(X).ColorEachPoint = True
TChart1.Series(X).Marks.Visible = False
For Y = 0 To 2
TChart1.Series(X).AddXY X, Y, Y, clTeeColor
Next Y
Next X
need code to adjust barwidth for each position at x-axis ...
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Aravind,
I have posted an example at the newsgroups which creates a chart similar to your excel file.
I have posted an example at the newsgroups which creates a chart similar to your excel file.
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 |
I Cannot able to find it could you pls send me to this email
I Cannot able to find it could you pls send me to this email asreenivasan@dtc-worldwide.com
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Aravind,
Yes, just forwarded the message to your address.
Yes, just forwarded the message to your address.
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 |