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.
Unfortunately, activation email could not send to your email. Please try again.

FilterItems on Legend gives error

Thread ID:

Created:

Updated:

Platform:

Replies:

51171 Oct 30,2006 10:58 AM Nov 27,2006 05:18 AM Windows Forms 11
loading
Tags: Chart
sh
Asked On October 30, 2006 10:58 AM

Hello,

I need to hide some series in the Legend (every series over index 7) and therefore use the FilterLegend Eventhendler as you describe in your support items:

Private Sub Legend_FilterItems(ByVal sender As Object, ByVal e As Syncfusion.Windows.Forms.Chart.ChartLegendFilterItemsEventArgs)
' This creates an new instance of the ChartLegendItemCollection
Dim items(7) As Syncfusion.Windows.Forms.Chart.LegendItem
For i As Integer = e.Items.Length - 1 To 7 Step - 1
items(i) = e.Items(i)
Next
e.Items = items

End Sub

I also tried it with:

e.Items.Clear(e.Items, 7, e.Items.Length - 7)


I also tried the eventhandler as earlier above, but without leaving out items.
In all cases I get the following error when running the code:

Source: Syncfusion.Chart.Base

Object reference not set to an instance of an object
at Syncfusion.Windows.Forms.Chart.ChartLegend.AutoSize(Rectangle rect)
at Syncfusion.Windows.Forms.Chart.ChartLegend.AutoLocation(Rectangle rect)
at Syncfusion.Windows.Forms.Chart.ChartControl.RecalculateSizes()
at Syncfusion.Windows.Forms.Chart.ChartControl.Redraw(Boolean update)
at Syncfusion.Windows.Forms.Chart.ChartControl.LegendVisibleChanged(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnVisibleChanged(EventArgs e)
at System.Windows.Forms.Control.OnParentVisibleChanged(EventArgs e)
at System.Windows.Forms.Control.OnVisibleChanged(EventArgs e)

We are working with version: 3.201.1.0
I saw another item on this forum with similar error notification (By dms at 6/20/2006 8:42:17 PM ). I think I need the same patch.

Could you provide me with this or do you have a workaround?

Thanx.

sh
Replied On October 30, 2006 11:08 AM

Correction on sent code:

Dim items(e.Items.Length) As Syncfusion.Windows.Forms.Chart.LegendItem
For i As Integer = 0 To 7
items(i) = e.Items(i)
Next
e.Items = items


I tried numerous variations, all with same error as result..

sh
Replied On October 31, 2006 09:40 AM

I now see that I could also use the custom points for what I need, but also here there seems to go something wrong. I noticed that this was brought to your attention already in another forum item: By Dmitry at 10/13/2005 10:51:17 AM :

When adding more then one custom point, the first points will take the shape/color/image of the last point, even if you declare a new custompoint variable.

Has this been solved yet and/or could this be patched to my version?

Thanx, Sandra

Administrator [Syncfusion]
Replied On November 3, 2006 06:02 AM

Hi Sansan,

I apologize for the delay in responding you.

Please take a look at the sample attached. Let me know if this helps.

ChartLegend.zip

I am working for custom points sample and will update you as soon as possible.

Thanks,
Sureshbabu

sh
Replied On November 3, 2006 06:22 AM

Hi,

It seems that the link to the zip file doesn't work.
I get a file not found message when trying to open/download the zip file.

Can you please solve this?

Thanx,
Sandra

Administrator [Syncfusion]
Replied On November 5, 2006 11:12 PM

Hi Sansan,

I regret for the inconvenience caused.

Please take a look at the sample attached. Let me know if this helps.

Chart Legend

Regards,
Sureshbabu

sh
Replied On November 7, 2006 10:12 AM

Hello,

Also here the example does not work on my version of the chart. (By the way: working with VS.NET 2003)

I adjusted the code of your example so I could compile it in my version.
I attached the result.

Also here, after removing items from the legend, the application crashes when running the form.

Can you please check this and send me a patch or a working example of custom points, please?

Thanx, Sandra



Chart Legend.zip

Administrator [Syncfusion]
Replied On November 10, 2006 12:56 AM

Hi Sansan,

Sorry for the inconvenience caused.

We are looking into it and will update you as soon as possible.

Thanks for your patience.

Thanks,
Sureshbabu

Administrator [Syncfusion]
Replied On November 13, 2006 08:34 AM

Hi Sansan,

Sorry for the inconvenience caused, and thanks for bringing this to our attention. But this issue is fixed in version v3.2.1.1 itself.

Please upgrade to latest version and try the attached sample.

Chart Legend Hiding

Once again sorry for the delay in responding you.

Regards,
Sureshbabu

Administrator [Syncfusion]
Replied On November 14, 2006 02:48 AM

Hi Sansan,

The custom point issue is also fixed in version v3.3.

So please upgrade to latest version.

Thanks for using Syncfusion products.

Regards,
Sureshbabu

sh
Replied On November 22, 2006 03:20 AM

Thank you for your reply.
Downloadnig the latest version is no option though. We are going live very soon and the latest version has too many differences to apply all within that time.

I would rather get the 3.2.1.1 version, since I need to work out the bugs. Could you please provide us with that version, so that we can continue working with Essential Chart.

Thank you.
Sandra

Poly J [Syncfusion]
Replied On November 27, 2006 05:18 AM

Hi Sandra,

Please create a Direct-Trac incident so that I can send you the fix regarding this issue.

Regards,
Poly




CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;