We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Default "Series 0"

Hello,

When I try to display my graph without series, I get a default serie with displayed text : "Series 0". My problem is that this serie appears even if I add my own series ! How can I remove it ?

Thanks for your help.


8 Replies

AD Administrator Syncfusion Team December 19, 2006 04:03 PM UTC

Hi Lucie,

Sorry for my delayed response.

Please find the attached sample which will help you to create an Empty Chart.

Empty Web Chart sample

Please let me know if this helps.

Thank you for your continued interest in Syncfusion products.

Best Regards,
Sureshbabu


LU Lucie December 20, 2006 09:20 AM UTC

Hello,

Unfortunately, it doesn't help me. I have to precise that my graph is not initialized in the html side, I mean I have a class which create my graph and put it in a placeholder. I have this :



Public Class CourbeInclusion

[...]

Private GraphInclusion As ChartWebControl
Private SerieAttenduesInclusion As ChartSeries
Private SerieReellesInclusion As ChartSeries

[...]

Public Sub New()

Me.GraphInclusion = New ChartWebControl
Me.SerieAttenduesInclusion = Me.GraphInclusion.Model.NewSeries
Me.SerieReellesInclusion = Me.GraphInclusion.Model.NewSeries
[...]

End Sub

Public Sub InitData()

[...]

While retour.Read()

[...]

Me.SerieAttenduesInclusion.Points.Add(..., ...)
Me.SerieReellesInclusion.Points.Add(..., ...)
label = New ChartAxisLabel(...)
Me.GraphInclusion.PrimaryXAxis.Labels.Add(label)

[...]

End While

[...]

Me.GraphInclusion.Series.Add(Me.SerieAttenduesInclusion)
Me.GraphInclusion.Series.Add(Me.SerieReellesInclusion)

[...]

Me.GraphInclusion.LegendPosition = ChartDock.Bottom
Me.GraphInclusion.Legend.BackColor = Color.LightYellow

[...]

End Sub

Public Sub AfficheGraphique(ByVal Ph As PlaceHolder)
Ph.Controls.Add(Me.GraphInclusion)
End Sub

End Class



It is allright but I have 3 series appearing in my graph, my owns and one more : "Series 0" ?!??

Thanks


AD Administrator Syncfusion Team December 20, 2006 06:57 PM UTC

Hi Lucie,

Sorry for the inconveniences caused.

Please try any one of the below methods to remove the default series.

1) Before adding series to ChartWebControl, you may clear the default series using ‘Clear’ method. For example,

Me.GraphInclusion.Series.Clear()
Me.GraphInclusion.Series.Add(Me.SerieAttenduesInclusion)
Me.GraphInclusion.Series.Add(Me.SerieReellesInclusion)

2) Or after adding the series to ChartWebControl, you may remove the default series using ‘RemoveAt’ method. For example,

Me.GraphInclusion.Series.Add(Me.SerieAttenduesInclusion)
Me.GraphInclusion.Series.Add(Me.SerieReellesInclusion)
Me.GraphInclusion.Series.RemoveAt(0)

Please let me know if you have any further questions.

Thanks for your patience.

Regards,
Sureshbabu


LU Lucie December 21, 2006 08:32 AM UTC

Hi

Unfortunately it doesn't help me :

The clear method doesn't change the result, 3 series appear instead of 2.

The remove method removes my first serie, but doesn't remove the default serie.

An other idea ?


LU Lucie December 21, 2006 08:43 AM UTC

I don't understand, If I do :

Dim toto As Integer = Me.GraphInclusion.Series.Count

I have the good result : 2, but 3 series appear !!?!!?

I give you a copy of my screen.

syncfusion31.zip


AD Administrator Syncfusion Team December 22, 2006 07:47 PM UTC

Hi Lucie,

Sorry for the delay in my response.

I am not able to reproduce the mentioned issue.

Can you send me a sample which reproduces the issue? It will be easy to fix the issue.

Please let me know if you have any more questions.

Thanks for your interest in Syncfusion products.

Regards,
Sureshbabu


AD Administrator Syncfusion Team December 26, 2006 05:50 PM UTC

Hi Lucie,

Sorry for the delay in getting back to you.

The above mentioned issue is a known issue. Please follow the below steps to prevent this issue.
1) Add an empty Chart control to ‘Place holder’.
2) Later, add series to that Chart control.

Please have a look at the sample code.

[VB]
Ph.Controls.Add(Me.GraphInclusion)
InitData()

Here I have attached a work around sample for this issue which will explain you more clearly.

Chart without Default Series sample

Thanks for your patience.

Best Regards,
Sureshbabu


LU Lucie December 27, 2006 02:50 PM UTC

Hi

It seems to work great in this order !!!!

Thanks again for your help :)

Lucie

Loader.
Live Chat Icon For mobile
Up arrow icon