how to Change Bar to Bubble?
how to Change Bar to Bubble?
Dear Sir
How to change the Bar chart to bubble chart?
Im able to change the bar chart to bubble without error.
but all the bubble is not showing in the chart and only legend showing the bubble style
Can you give me vb.net sample code?
thank & best regard
Eric
How to change the Bar chart to bubble chart?
Im able to change the bar chart to bubble without error.
but all the bubble is not showing in the chart and only legend showing the bubble style
Can you give me vb.net sample code?
thank & best regard
Eric
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Eric,
This can not be automatically done because bar series doesn't have RadiusValues valuelist. However you can do it manually doing something like this:
This can not be automatically done because bar series doesn't have RadiusValues valuelist. However you can do it manually doing something like this:
Code: Select all
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim Bubble1 As Steema.TeeChart.Styles.Bubble = New Steema.TeeChart.Styles.Bubble(TChart1.Chart)
Dim i As Integer
For i = 0 To Bar1.Count - 1
Bubble1.Add(Bar1.XValues(i), Bar1.YValues(i), 10)
Next i
TChart1.Series.Remove(Bar1)
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 |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Eric,
It works fine for me here. Could you please send us an example we can run "as-is" to reproduce the problem here?
You can post your files at news://www.steema.net/steema.public.attachments newsgroup.
It works fine for me here. Could you please send us an example we can run "as-is" to reproduce the problem here?
You can post your files at news://www.steema.net/steema.public.attachments newsgroup.
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
I'm not able to post the sample test program. error message "No sender was specified, Please check your news account configuration"
Anyway below is the code that can not change bar to bubble.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim i, b As Integer
For i = 0 To 0
AddSeries("Yong " & i)
For b = 0 To 80
AddSeriesItem(i, Rnd(999) * 100000, "Eric " & b)
Next
Next
Dim objChartStyle As New Steema.TeeChart.Styles.Bar3D
Steema.TeeChart.Styles.Series.ChangeType(TChart.Series(0), objChartStyle.GetType)
objChartStyle = Nothing
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim Bubble1 As Steema.TeeChart.Styles.Bubble = New Steema.TeeChart.Styles.Bubble(TChart.Chart)
Dim i As Integer
For i = 0 To TChart.Series(0).Count - 1
Bubble1.Add(TChart.Series(0).XValues(i), TChart.Series(0).YValues(i), 10)
Next i
TChart.Series.Remove(TChart.Series(0))
End Sub
Public Sub AddSeriesItem(ByVal SeriesIndex As Long, ByVal value As Double, ByVal DisplayName As String)
Call TChart.Series(SeriesIndex).Add(value, DisplayName, TChart.Series(SeriesIndex).Color)
End Sub
Public Sub AddSeries(ByVal SeriesTitle As String)
TChart.Series.Add(New Steema.TeeChart.Styles.Bar)
TChart.Legend.LegendStyle = Steema.TeeChart.LegendStyles.Series
TChart.Series(TChart.Series.Count - 1).Title = SeriesTitle
TChart.Series(TChart.Series.Count - 1).Color = Color.Red
End Sub
Thank
Eric
I'm not able to post the sample test program. error message "No sender was specified, Please check your news account configuration"
Anyway below is the code that can not change bar to bubble.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim i, b As Integer
For i = 0 To 0
AddSeries("Yong " & i)
For b = 0 To 80
AddSeriesItem(i, Rnd(999) * 100000, "Eric " & b)
Next
Next
Dim objChartStyle As New Steema.TeeChart.Styles.Bar3D
Steema.TeeChart.Styles.Series.ChangeType(TChart.Series(0), objChartStyle.GetType)
objChartStyle = Nothing
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim Bubble1 As Steema.TeeChart.Styles.Bubble = New Steema.TeeChart.Styles.Bubble(TChart.Chart)
Dim i As Integer
For i = 0 To TChart.Series(0).Count - 1
Bubble1.Add(TChart.Series(0).XValues(i), TChart.Series(0).YValues(i), 10)
Next i
TChart.Series.Remove(TChart.Series(0))
End Sub
Public Sub AddSeriesItem(ByVal SeriesIndex As Long, ByVal value As Double, ByVal DisplayName As String)
Call TChart.Series(SeriesIndex).Add(value, DisplayName, TChart.Series(SeriesIndex).Color)
End Sub
Public Sub AddSeries(ByVal SeriesTitle As String)
TChart.Series.Add(New Steema.TeeChart.Styles.Bar)
TChart.Legend.LegendStyle = Steema.TeeChart.LegendStyles.Series
TChart.Series(TChart.Series.Count - 1).Title = SeriesTitle
TChart.Series(TChart.Series.Count - 1).Color = Color.Red
End Sub
Thank
Eric
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Eric,
You can not see the bubbles because they are to small compared to the left axis scale which has a very wide range. One easy way to see that is setting bubble marks visible:
Then you just have to zoom around a mark and after a few zooms done you'll see a small bubble appearing.
You'll solve that adding smaller values to the original series or setting a bigger radius for the bubbles. The code below works:
You can not see the bubbles because they are to small compared to the left axis scale which has a very wide range. One easy way to see that is setting bubble marks visible:
Code: Select all
Bubble1.Marks.Visible = True
You'll solve that adding smaller values to the original series or setting a bigger radius for the bubbles. The code below works:
Code: Select all
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim i, b As Integer
For i = 0 To 0
AddSeries("Yong " & i)
For b = 0 To 80
AddSeriesItem(i, Rnd(999) * 100000, "Eric " & b)
Next
Next
Dim objChartStyle As New Steema.TeeChart.Styles.Bar3D
Steema.TeeChart.Styles.Series.ChangeType(TChart(0), objChartStyle.GetType)
objChartStyle = Nothing
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim Bubble1 As Steema.TeeChart.Styles.Bubble = New Steema.TeeChart.Styles.Bubble(TChart.Chart)
Dim i As Integer
For i = 0 To TChart(0).Count - 1
Bubble1.Add(TChart(0).XValues(i), TChart(0).YValues(i), 1000)
Next i
TChart.Series.Remove(TChart(0))
End Sub
Public Sub AddSeriesItem(ByVal SeriesIndex As Long, ByVal value As Double, ByVal DisplayName As String)
Call TChart(SeriesIndex).Add(value, DisplayName, TChart(SeriesIndex).Color)
End Sub
Public Sub AddSeries(ByVal SeriesTitle As String)
TChart.Series.Add(New Steema.TeeChart.Styles.Bar)
TChart.Legend.LegendStyle = Steema.TeeChart.LegendStyles.Series
TChart(TChart.Series.Count - 1).Title = SeriesTitle
TChart(TChart.Series.Count - 1).Color = Color.Red
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 |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Eric,
This is because each bubble has a different color. To display the color on the legend you need to use:
or
This is because each bubble has a different color. To display the color on the legend you need to use:
Code: Select all
Bubble1.ColorEach = False
Code: Select all
TChart.Legend.LegendStyle = Steema.TeeChart.LegendStyles.Values
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 Eric,
I've splitted your last reply into another topic as it doesn't have much to do this thread.
I've splitted your last reply into another topic as it doesn't have much to do this thread.
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 |