Duplicate Entities in Legend for Multi-Series Timeline

Sep 29, 2014 at 9:33 PM
I have an interface implemented where two different data sets, with the same entities for each, can be put onto the same Timeline chart using a multiple axes Highcharts timeline. For example, if I have 3 entities that I am studying and I have 2 data sets, I will pass 6 Series objects to the chart's SetSeries method.

However, I've noticed an issue occurring with the chart legend when an entity has null Data for the Series object where that entity is listed twice on the chart legend. The expected behavior that occurs most of the time is that each entity is only listed once on the legend and clicking that entity name will cause both lines tied to that entity (one for each data set) to disappear or reappear.

In this example, Birthingway and Tulare have no data for the righthand data set and Arizona has no data for the left or right axis data sets.
Image

In this example, the data sets are now on opposite axes. Now, Birthingway and Tulare have no data for the lefthand axis data set, but they are not duplicated in the legend. Like the previous example, Arizona has no data for either data set and it is again duplicated in the legend.
Image

I am not positive if this is an issue that I can resolve myself or if it is a Highcharts specific bug that should be addressed by one of the developers, so I've come here for assistance in the matter.

Thank you for your time and assistance,
Mike
Coordinator
Oct 24, 2014 at 2:03 PM
Hi Mike,

I really can't understand the issue. Also the pictures are not there. Can you share your code that I can reproduce your problem?

Regards,
Vangi
Oct 24, 2014 at 9:40 PM
Edited Oct 24, 2014 at 9:41 PM
Hi Vangi,

Please see this shared Google Drive folder with several relevant images. I apologize for them not showing up in the Codeplex discussion, they appeared fine on my end.

I’m afraid I cannot share the exact code used to recreate the problem as it is quite extensive and touches on some proprietary code, but I can hopefully provide you with enough details to help you identify the issue, if one exists.

The basic idea is that we are using a timeline with multiple axes, similar to this Highcharts example. For the sake of simplicity, let’s assume that we have two axes with one on the left and one on the right. We will have 3 “entities” (Harvard, Arizona College-Mesa, and Tulare Beauty College). Each entity will have 2 Series associated with it, one for each of the axes. Once all the relevant data has been loaded into all the Series objects, we then pass the 6 Series objects to the Highcharts chart’s SetSeries method.

The issues occur when one or two of the two Series objects for a specific entity has “null” for the Data attribute, which is a semi-common occurrence with some data sets. When an entity has null Data for one or two of its associated series, the result is what you see in any of the 3 images in the Drive folder. Please see the “ChartBugSeriesObjects” document for the specifics on the contents of the Series objects for Harvard and Tulare.

Basically, what I would expect to occur is that even if an entity has no data at all for either of the data sets on the axes that it would still show up in the Chart legend, which means that I would expect to still pass it into the SetSeries method.

Please let me know if you would like any other information or clarification from me and I will do my best to accommodate you.

Thank you,
Mike