protected override ISeries ConvertInternal(IDataObject data, ResourceDictionary availableResources, Color resolvedColor, ObservableCollection<IDataObject> pointCollection, Control tooltip)
 {
     var series = new SeriesDefinition {
         Title = GetSeriesId(data),
         Opacity = GetSeriesOpacity(data),
         ItemsSource = pointCollection,
         DependentValueBinding = CreateBinding(DataToSeriesConverterBase.YParameter),
         IndependentValueBinding = CreateBinding(DataToSeriesConverterBase.XParameter),
         Tag = data
     };
     #if !SILVERLIGHT
     series.ToolTip = tooltip;
     #endif
     SetSeriesStyle(series, resolvedColor);
     return series;
 }
        protected override ISeries ConvertInternal(IDataObject data, ResourceDictionary availableResources,
                Color resolvedColor, ObservableCollection<IDataObject> seriesCollection, Control tooltip)
        {
            // Chart control uses SeriesDataConstants.Visibility property from Tag
            var series = new StackedAreaSeries {
                Tag = data
            };

            var orderedSeriescollection = seriesCollection.OrderBy(s => s[ChartingConstants.SeriesOrderPropertyName] ?? 0);
            foreach (var stackableSeries in orderedSeriescollection) {
                var idoCollection = stackableSeries[SeriesDataConstants.Data] as ICollection<IDataObject>;
                var dataPoints = new IDataObject[idoCollection.Count];
                idoCollection.CopyTo(dataPoints, 0);
                var observableDataPoints = new BatchObservableCollection<IDataObject>(dataPoints);

                SeriesDefinitionConverter.Convert(stackableSeries, observableDataPoints, availableResources,
                    (s) => { series.SeriesDefinitions.Add((SeriesDefinition)s); });
            }

            return series;
        }
 protected string GetSeriesId(IDataObject data)
 {
     var id = data[SeriesDataConstants.ID] as string;
     if (string.IsNullOrEmpty(id)) id = Guid.NewGuid().ToString();
     return id;
 }
 protected double GetSeriesOpacity(IDataObject data)
 {
     return data[SeriesDataConstants.Visibility] != null && (bool)data[SeriesDataConstants.Visibility]
                 ? VisualOpacity
                 : HiddenOpacity;
 }
 protected abstract override ISeries ConvertInternal(IDataObject data, ResourceDictionary availableResources, Color resolvedColor, ObservableCollection<IDataObject> pointCollection, Control tooltip);