Index: Core/Components/src/Core.Components.Charting/Core.Components.Charting.csproj =================================================================== diff -u -r88f6d73b4d5d1e7e6a2f75d700e552c3cb7719ae -r271bd5ffd4d61da4324eb50957f062b14c4c6958 --- Core/Components/src/Core.Components.Charting/Core.Components.Charting.csproj (.../Core.Components.Charting.csproj) (revision 88f6d73b4d5d1e7e6a2f75d700e552c3cb7719ae) +++ Core/Components/src/Core.Components.Charting/Core.Components.Charting.csproj (.../Core.Components.Charting.csproj) (revision 271bd5ffd4d61da4324eb50957f062b14c4c6958) @@ -45,7 +45,6 @@ - Index: Core/Components/src/Core.Components.Charting/Data/ChartMultipleAreaData.cs =================================================================== diff -u -rc349a104ffe6e2b39878cd0169cace7eea4fddb6 -r271bd5ffd4d61da4324eb50957f062b14c4c6958 --- Core/Components/src/Core.Components.Charting/Data/ChartMultipleAreaData.cs (.../ChartMultipleAreaData.cs) (revision c349a104ffe6e2b39878cd0169cace7eea4fddb6) +++ Core/Components/src/Core.Components.Charting/Data/ChartMultipleAreaData.cs (.../ChartMultipleAreaData.cs) (revision 271bd5ffd4d61da4324eb50957f062b14c4c6958) @@ -30,7 +30,7 @@ /// /// This class represents data in 2D space which forms multiple closed areas. /// - public class ChartMultipleAreaData : ItemBasedChartData + public class ChartMultipleAreaData : ChartData { private IEnumerable areas; Index: Core/Components/src/Core.Components.Charting/Data/ChartMultipleLineData.cs =================================================================== diff -u -rc349a104ffe6e2b39878cd0169cace7eea4fddb6 -r271bd5ffd4d61da4324eb50957f062b14c4c6958 --- Core/Components/src/Core.Components.Charting/Data/ChartMultipleLineData.cs (.../ChartMultipleLineData.cs) (revision c349a104ffe6e2b39878cd0169cace7eea4fddb6) +++ Core/Components/src/Core.Components.Charting/Data/ChartMultipleLineData.cs (.../ChartMultipleLineData.cs) (revision 271bd5ffd4d61da4324eb50957f062b14c4c6958) @@ -30,7 +30,7 @@ /// /// This class represents data in 2D space which forms multiple lines. /// - public class ChartMultipleLineData : ItemBasedChartData + public class ChartMultipleLineData : ChartData { private IEnumerable lines; Fisheye: Tag 271bd5ffd4d61da4324eb50957f062b14c4c6958 refers to a dead (removed) revision in file `Core/Components/src/Core.Components.Charting/Data/ItemBasedChartData.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Core/Components/src/Core.Components.Charting/Data/PointBasedChartData.cs =================================================================== diff -u -rc349a104ffe6e2b39878cd0169cace7eea4fddb6 -r271bd5ffd4d61da4324eb50957f062b14c4c6958 --- Core/Components/src/Core.Components.Charting/Data/PointBasedChartData.cs (.../PointBasedChartData.cs) (revision c349a104ffe6e2b39878cd0169cace7eea4fddb6) +++ Core/Components/src/Core.Components.Charting/Data/PointBasedChartData.cs (.../PointBasedChartData.cs) (revision 271bd5ffd4d61da4324eb50957f062b14c4c6958) @@ -26,9 +26,9 @@ namespace Core.Components.Charting.Data { /// - /// Base class for that is based on an array of points in 2D space. + /// Base class for that is based on an array of points in 2D space. /// - public abstract class PointBasedChartData : ItemBasedChartData + public abstract class PointBasedChartData : ChartData { private Point2D[] points; Index: Core/Components/src/Core.Components.OxyPlot.Forms/ChartControl.cs =================================================================== diff -u -rc349a104ffe6e2b39878cd0169cace7eea4fddb6 -r271bd5ffd4d61da4324eb50957f062b14c4c6958 --- Core/Components/src/Core.Components.OxyPlot.Forms/ChartControl.cs (.../ChartControl.cs) (revision c349a104ffe6e2b39878cd0169cace7eea4fddb6) +++ Core/Components/src/Core.Components.OxyPlot.Forms/ChartControl.cs (.../ChartControl.cs) (revision 271bd5ffd4d61da4324eb50957f062b14c4c6958) @@ -173,29 +173,29 @@ return CreateEnvelopeForAllVisibleLayers(collection); } - DrawnChartData drawnMapData = drawnChartDataList.FirstOrDefault(dmd => dmd.ItemBasedChartData.Equals(chartData)); + DrawnChartData drawnMapData = drawnChartDataList.FirstOrDefault(dmd => dmd.ChartData.Equals(chartData)); if (drawnMapData == null) { throw new ArgumentException($@"Can only zoom to {typeof(ChartData).Name} that is part of this {typeof(ChartControl).Name}s drawn {nameof(chartData)}.", nameof(chartData)); } Extent extent = new Extent(); - if (drawnMapData.ItemBasedChartData.IsVisible) + if (drawnMapData.ChartData.IsVisible) { - extent.ExpandToInclude(CreateExtentFor(drawnMapData.ItemBasedChartDataSeries as XYAxisSeries)); + extent.ExpandToInclude(CreateExtentFor(drawnMapData.ChartDataSeries as XYAxisSeries)); } return extent; } - private Extent CreateExtentFor(XYAxisSeries itemBasedChartData) + private Extent CreateExtentFor(XYAxisSeries ChartData) { return new Extent ( - itemBasedChartData.MinX, - itemBasedChartData.MaxX, - itemBasedChartData.MinY, - itemBasedChartData.MaxY + ChartData.MinX, + ChartData.MaxX, + ChartData.MinY, + ChartData.MaxY ); } @@ -241,66 +241,66 @@ Controls.Add(plotView); } - private static IEnumerable GetItemBasedChartDataRecursively(ChartDataCollection chartDataCollection) + private static IEnumerable GetChartDataRecursively(ChartDataCollection chartDataCollection) { - var itemBasedChartDataList = new List(); + var ChartDataList = new List(); foreach (ChartData chartData in chartDataCollection.Collection) { var nestedChartDataCollection = chartData as ChartDataCollection; if (nestedChartDataCollection != null) { - itemBasedChartDataList.AddRange(GetItemBasedChartDataRecursively(nestedChartDataCollection)); + ChartDataList.AddRange(GetChartDataRecursively(nestedChartDataCollection)); continue; } - itemBasedChartDataList.Add((ItemBasedChartData) chartData); + ChartDataList.Add((ChartData) chartData); } - return itemBasedChartDataList; + return ChartDataList; } private void HandleChartDataCollectionChange() { - List chartDataThatShouldBeDrawn = GetItemBasedChartDataRecursively(Data).ToList(); - Dictionary drawnChartDataLookup = drawnChartDataList.ToDictionary(dcd => dcd.ItemBasedChartData, dcd => dcd); + List chartDataThatShouldBeDrawn = GetChartDataRecursively(Data).ToList(); + Dictionary drawnChartDataLookup = drawnChartDataList.ToDictionary(dcd => dcd.ChartData, dcd => dcd); DrawMissingChartDataOnCollectionChange(chartDataThatShouldBeDrawn, drawnChartDataLookup); RemoveRedundantChartDataOnCollectionChange(chartDataThatShouldBeDrawn, drawnChartDataLookup); - drawnChartDataLookup = drawnChartDataList.ToDictionary(dcd => dcd.ItemBasedChartData, dcd => dcd); + drawnChartDataLookup = drawnChartDataList.ToDictionary(dcd => dcd.ChartData, dcd => dcd); ReorderChartDataOnCollectionChange(chartDataThatShouldBeDrawn, drawnChartDataLookup); plotView.InvalidatePlot(true); } - private void DrawMissingChartDataOnCollectionChange(IEnumerable chartDataThatShouldBeDrawn, - IDictionary drawnChartDataLookup) + private void DrawMissingChartDataOnCollectionChange(IEnumerable chartDataThatShouldBeDrawn, + IDictionary drawnChartDataLookup) { - foreach (ItemBasedChartData chartDataToDraw in chartDataThatShouldBeDrawn.Where(chartDataToDraw => !drawnChartDataLookup.ContainsKey(chartDataToDraw))) + foreach (ChartData chartDataToDraw in chartDataThatShouldBeDrawn.Where(chartDataToDraw => !drawnChartDataLookup.ContainsKey(chartDataToDraw))) { DrawChartData(chartDataToDraw); } } - private void RemoveRedundantChartDataOnCollectionChange(IEnumerable chartDataThatShouldBeDrawn, - IDictionary drawnChartDataLookup) + private void RemoveRedundantChartDataOnCollectionChange(IEnumerable chartDataThatShouldBeDrawn, + IDictionary drawnChartDataLookup) { - foreach (ItemBasedChartData itemBasedChartData in drawnChartDataLookup.Keys.Except(chartDataThatShouldBeDrawn)) + foreach (ChartData ChartData in drawnChartDataLookup.Keys.Except(chartDataThatShouldBeDrawn)) { - RemoveChartData(drawnChartDataLookup[itemBasedChartData]); + RemoveChartData(drawnChartDataLookup[ChartData]); } } - private void ReorderChartDataOnCollectionChange(IEnumerable chartDataThatShouldBeDrawn, - IDictionary drawnChartDataLookup) + private void ReorderChartDataOnCollectionChange(IEnumerable chartDataThatShouldBeDrawn, + IDictionary drawnChartDataLookup) { plotView.Model.Series.Clear(); - foreach (ItemBasedChartData itemBasedChartData in chartDataThatShouldBeDrawn) + foreach (ChartData ChartData in chartDataThatShouldBeDrawn) { - plotView.Model.Series.Add((Series) drawnChartDataLookup[itemBasedChartData].ItemBasedChartDataSeries); + plotView.Model.Series.Add((Series) drawnChartDataLookup[ChartData].ChartDataSeries); } } @@ -309,41 +309,41 @@ drawnChartDataToRemove.Observer.Dispose(); drawnChartDataList.Remove(drawnChartDataToRemove); - plotView.Model.Series.Remove((Series) drawnChartDataToRemove.ItemBasedChartDataSeries); + plotView.Model.Series.Remove((Series) drawnChartDataToRemove.ChartDataSeries); } private void DrawInitialChartData() { - foreach (ItemBasedChartData itemBasedChartData in GetItemBasedChartDataRecursively(Data)) + foreach (ChartData ChartData in GetChartDataRecursively(Data)) { - DrawChartData(itemBasedChartData); + DrawChartData(ChartData); } plotView.InvalidatePlot(true); } - private void DrawChartData(ItemBasedChartData itemBasedChartData) + private void DrawChartData(ChartData ChartData) { - IItemBasedChartDataSeries itemBasedChartDataSeries = ItemBasedChartDataSeriesFactory.Create(itemBasedChartData); + IChartDataSeries chartDataSeries = ChartDataSeriesFactory.Create(ChartData); var drawnChartData = new DrawnChartData { - ItemBasedChartData = itemBasedChartData, - ItemBasedChartDataSeries = itemBasedChartDataSeries + ChartData = ChartData, + ChartDataSeries = chartDataSeries }; drawnChartData.Observer = new Observer(() => { - drawnChartData.ItemBasedChartDataSeries.Update(); + drawnChartData.ChartDataSeries.Update(); plotView.InvalidatePlot(true); }) { - Observable = itemBasedChartData + Observable = ChartData }; drawnChartDataList.Add(drawnChartData); - plotView.Model.Series.Add((Series) itemBasedChartDataSeries); + plotView.Model.Series.Add((Series) chartDataSeries); } private void ClearChartData() @@ -364,17 +364,17 @@ private class DrawnChartData { /// - /// The item based chart data which the drawn is based upon. + /// The item based chart data which the drawn is based upon. /// - public ItemBasedChartData ItemBasedChartData { get; set; } + public ChartData ChartData { get; set; } /// /// The drawn chart data series. /// - public IItemBasedChartDataSeries ItemBasedChartDataSeries { get; set; } + public IChartDataSeries ChartDataSeries { get; set; } /// - /// The observer attached to and responsible for updating . + /// The observer attached to and responsible for updating . /// public Observer Observer { get; set; } } Index: Core/Components/src/Core.Components.OxyPlot/Converter/ChartAreaDataConverter.cs =================================================================== diff -u -r67284323e2785c651633d9c52049ba12a9c70e6a -r271bd5ffd4d61da4324eb50957f062b14c4c6958 --- Core/Components/src/Core.Components.OxyPlot/Converter/ChartAreaDataConverter.cs (.../ChartAreaDataConverter.cs) (revision 67284323e2785c651633d9c52049ba12a9c70e6a) +++ Core/Components/src/Core.Components.OxyPlot/Converter/ChartAreaDataConverter.cs (.../ChartAreaDataConverter.cs) (revision 271bd5ffd4d61da4324eb50957f062b14c4c6958) @@ -29,7 +29,7 @@ /// /// The converter that converts data into data. /// - public class ChartAreaDataConverter : ItemBasedChartDataConverter + public class ChartAreaDataConverter : ChartDataConverter { protected override void SetSeriesItems(ChartAreaData data, AreaSeries series) { Fisheye: Tag 4dbfc20ef0200e34db43efeb8899d72e4046cc5b refers to a dead (removed) revision in file `Core/Components/src/Core.Components.OxyPlot/Converter/ChartDataConverter.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Core/Components/src/Core.Components.OxyPlot/Converter/ChartLineDataConverter.cs =================================================================== diff -u -r67284323e2785c651633d9c52049ba12a9c70e6a -r271bd5ffd4d61da4324eb50957f062b14c4c6958 --- Core/Components/src/Core.Components.OxyPlot/Converter/ChartLineDataConverter.cs (.../ChartLineDataConverter.cs) (revision 67284323e2785c651633d9c52049ba12a9c70e6a) +++ Core/Components/src/Core.Components.OxyPlot/Converter/ChartLineDataConverter.cs (.../ChartLineDataConverter.cs) (revision 271bd5ffd4d61da4324eb50957f062b14c4c6958) @@ -29,7 +29,7 @@ /// /// The converter that converts data into data. /// - public class ChartLineDataConverter : ItemBasedChartDataConverter + public class ChartLineDataConverter : ChartDataConverter { protected override void SetSeriesItems(ChartLineData data, LineSeries series) { Index: Core/Components/src/Core.Components.OxyPlot/Converter/ChartMultipleAreaDataConverter.cs =================================================================== diff -u -r67284323e2785c651633d9c52049ba12a9c70e6a -r271bd5ffd4d61da4324eb50957f062b14c4c6958 --- Core/Components/src/Core.Components.OxyPlot/Converter/ChartMultipleAreaDataConverter.cs (.../ChartMultipleAreaDataConverter.cs) (revision 67284323e2785c651633d9c52049ba12a9c70e6a) +++ Core/Components/src/Core.Components.OxyPlot/Converter/ChartMultipleAreaDataConverter.cs (.../ChartMultipleAreaDataConverter.cs) (revision 271bd5ffd4d61da4324eb50957f062b14c4c6958) @@ -30,7 +30,7 @@ /// /// The converter that converts data into data. /// - public class ChartMultipleAreaDataConverter : ItemBasedChartDataConverter + public class ChartMultipleAreaDataConverter : ChartDataConverter { protected override void SetSeriesItems(ChartMultipleAreaData data, MultipleAreaSeries series) { Index: Core/Components/src/Core.Components.OxyPlot/Converter/ChartMultipleLineDataConverter.cs =================================================================== diff -u -re464d420d0ce85287a40d0aee40d5dbdd0ade68e -r271bd5ffd4d61da4324eb50957f062b14c4c6958 --- Core/Components/src/Core.Components.OxyPlot/Converter/ChartMultipleLineDataConverter.cs (.../ChartMultipleLineDataConverter.cs) (revision e464d420d0ce85287a40d0aee40d5dbdd0ade68e) +++ Core/Components/src/Core.Components.OxyPlot/Converter/ChartMultipleLineDataConverter.cs (.../ChartMultipleLineDataConverter.cs) (revision 271bd5ffd4d61da4324eb50957f062b14c4c6958) @@ -19,7 +19,6 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. -using System.Drawing.Drawing2D; using System.Linq; using Core.Common.Base.Geometry; using Core.Components.Charting.Data; @@ -32,7 +31,7 @@ /// /// The converter that converts data into data. /// - public class ChartMultipleLineDataConverter : ItemBasedChartDataConverter + public class ChartMultipleLineDataConverter : ChartDataConverter { protected override void SetSeriesItems(ChartMultipleLineData data, MultipleLineSeries series) { Index: Core/Components/src/Core.Components.OxyPlot/Converter/ChartPointDataConverter.cs =================================================================== diff -u -r67284323e2785c651633d9c52049ba12a9c70e6a -r271bd5ffd4d61da4324eb50957f062b14c4c6958 --- Core/Components/src/Core.Components.OxyPlot/Converter/ChartPointDataConverter.cs (.../ChartPointDataConverter.cs) (revision 67284323e2785c651633d9c52049ba12a9c70e6a) +++ Core/Components/src/Core.Components.OxyPlot/Converter/ChartPointDataConverter.cs (.../ChartPointDataConverter.cs) (revision 271bd5ffd4d61da4324eb50957f062b14c4c6958) @@ -29,7 +29,7 @@ /// /// The converter that converts data into data. /// - public class ChartPointDataConverter : ItemBasedChartDataConverter + public class ChartPointDataConverter : ChartDataConverter { protected override void SetSeriesItems(ChartPointData data, LineSeries series) { Fisheye: Tag 271bd5ffd4d61da4324eb50957f062b14c4c6958 refers to a dead (removed) revision in file `Core/Components/src/Core.Components.OxyPlot/Converter/ItemBasedChartDataConverter.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Core/Components/src/Core.Components.OxyPlot/Core.Components.OxyPlot.csproj =================================================================== diff -u -rfa07631b4d1fac0c9d34aedfc19de6afc1e01f59 -r271bd5ffd4d61da4324eb50957f062b14c4c6958 --- Core/Components/src/Core.Components.OxyPlot/Core.Components.OxyPlot.csproj (.../Core.Components.OxyPlot.csproj) (revision fa07631b4d1fac0c9d34aedfc19de6afc1e01f59) +++ Core/Components/src/Core.Components.OxyPlot/Core.Components.OxyPlot.csproj (.../Core.Components.OxyPlot.csproj) (revision 271bd5ffd4d61da4324eb50957f062b14c4c6958) @@ -60,12 +60,12 @@ - + - - + + Index: Core/Components/src/Core.Components.OxyPlot/DataSeries/ChartAreaDataSeries.cs =================================================================== diff -u -r67284323e2785c651633d9c52049ba12a9c70e6a -r271bd5ffd4d61da4324eb50957f062b14c4c6958 --- Core/Components/src/Core.Components.OxyPlot/DataSeries/ChartAreaDataSeries.cs (.../ChartAreaDataSeries.cs) (revision 67284323e2785c651633d9c52049ba12a9c70e6a) +++ Core/Components/src/Core.Components.OxyPlot/DataSeries/ChartAreaDataSeries.cs (.../ChartAreaDataSeries.cs) (revision 271bd5ffd4d61da4324eb50957f062b14c4c6958) @@ -30,7 +30,7 @@ /// /// A based on and updated according to the wrapped . /// - public class ChartAreaDataSeries : AreaSeries, IItemBasedChartDataSeries + public class ChartAreaDataSeries : AreaSeries, IChartDataSeries { private readonly ChartAreaData chartAreaData; private readonly ChartAreaDataConverter converter = new ChartAreaDataConverter(); Index: Core/Components/src/Core.Components.OxyPlot/DataSeries/ChartDataSeriesFactory.cs =================================================================== diff -u --- Core/Components/src/Core.Components.OxyPlot/DataSeries/ChartDataSeriesFactory.cs (revision 0) +++ Core/Components/src/Core.Components.OxyPlot/DataSeries/ChartDataSeriesFactory.cs (revision 271bd5ffd4d61da4324eb50957f062b14c4c6958) @@ -0,0 +1,80 @@ +// Copyright (C) Stichting Deltares 2017. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using System; +using System.Globalization; +using Core.Components.Charting.Data; + +namespace Core.Components.OxyPlot.DataSeries +{ + /// + /// A factory to create based on . + /// + internal static class ChartDataSeriesFactory + { + /// + /// Creates a based on . + /// + /// The to create a from. + /// A instance. + /// Thrown when the given is null. + /// Thrown when the given type is not supported. + public static IChartDataSeries Create(ChartData data) + { + if (data == null) + { + throw new ArgumentNullException(nameof(data)); + } + + var chartPointData = data as ChartPointData; + if (chartPointData != null) + { + return new ChartPointDataSeries(chartPointData); + } + + var chartLineData = data as ChartLineData; + if (chartLineData != null) + { + return new ChartLineDataSeries(chartLineData); + } + + var chartAreaData = data as ChartAreaData; + if (chartAreaData != null) + { + return new ChartAreaDataSeries(chartAreaData); + } + + var chartMultipleAreaData = data as ChartMultipleAreaData; + if (chartMultipleAreaData != null) + { + return new ChartMultipleAreaDataSeries(chartMultipleAreaData); + } + + var chartMultipleLineData = data as ChartMultipleLineData; + if (chartMultipleLineData != null) + { + return new ChartMultipleLineDataSeries(chartMultipleLineData); + } + + throw new NotSupportedException(string.Format(CultureInfo.CurrentCulture, "ChartData of type {0} is not supported.", data.GetType().Name)); + } + } +} \ No newline at end of file Index: Core/Components/src/Core.Components.OxyPlot/DataSeries/ChartLineDataSeries.cs =================================================================== diff -u -r67284323e2785c651633d9c52049ba12a9c70e6a -r271bd5ffd4d61da4324eb50957f062b14c4c6958 --- Core/Components/src/Core.Components.OxyPlot/DataSeries/ChartLineDataSeries.cs (.../ChartLineDataSeries.cs) (revision 67284323e2785c651633d9c52049ba12a9c70e6a) +++ Core/Components/src/Core.Components.OxyPlot/DataSeries/ChartLineDataSeries.cs (.../ChartLineDataSeries.cs) (revision 271bd5ffd4d61da4324eb50957f062b14c4c6958) @@ -30,7 +30,7 @@ /// /// A based on and updated according to the wrapped . /// - public class ChartLineDataSeries : LineSeries, IItemBasedChartDataSeries + public class ChartLineDataSeries : LineSeries, IChartDataSeries { private readonly ChartLineData chartLineData; private readonly ChartLineDataConverter converter = new ChartLineDataConverter(); Index: Core/Components/src/Core.Components.OxyPlot/DataSeries/ChartMultipleAreaDataSeries.cs =================================================================== diff -u -r67284323e2785c651633d9c52049ba12a9c70e6a -r271bd5ffd4d61da4324eb50957f062b14c4c6958 --- Core/Components/src/Core.Components.OxyPlot/DataSeries/ChartMultipleAreaDataSeries.cs (.../ChartMultipleAreaDataSeries.cs) (revision 67284323e2785c651633d9c52049ba12a9c70e6a) +++ Core/Components/src/Core.Components.OxyPlot/DataSeries/ChartMultipleAreaDataSeries.cs (.../ChartMultipleAreaDataSeries.cs) (revision 271bd5ffd4d61da4324eb50957f062b14c4c6958) @@ -31,7 +31,7 @@ /// /// A based on and updated according to the wrapped . /// - public class ChartMultipleAreaDataSeries : MultipleAreaSeries, IItemBasedChartDataSeries + public class ChartMultipleAreaDataSeries : MultipleAreaSeries, IChartDataSeries { private readonly ChartMultipleAreaData chartMultipleAreaData; private readonly ChartMultipleAreaDataConverter converter = new ChartMultipleAreaDataConverter(); Index: Core/Components/src/Core.Components.OxyPlot/DataSeries/ChartMultipleLineDataSeries.cs =================================================================== diff -u -rfa07631b4d1fac0c9d34aedfc19de6afc1e01f59 -r271bd5ffd4d61da4324eb50957f062b14c4c6958 --- Core/Components/src/Core.Components.OxyPlot/DataSeries/ChartMultipleLineDataSeries.cs (.../ChartMultipleLineDataSeries.cs) (revision fa07631b4d1fac0c9d34aedfc19de6afc1e01f59) +++ Core/Components/src/Core.Components.OxyPlot/DataSeries/ChartMultipleLineDataSeries.cs (.../ChartMultipleLineDataSeries.cs) (revision 271bd5ffd4d61da4324eb50957f062b14c4c6958) @@ -31,7 +31,7 @@ /// /// A based on and updated according to the wrapped . /// - public class ChartMultipleLineDataSeries : MultipleLineSeries, IItemBasedChartDataSeries + public class ChartMultipleLineDataSeries : MultipleLineSeries, IChartDataSeries { private readonly ChartMultipleLineData chartMultipleLineData; private readonly ChartMultipleLineDataConverter converter = new ChartMultipleLineDataConverter(); Index: Core/Components/src/Core.Components.OxyPlot/DataSeries/ChartPointDataSeries.cs =================================================================== diff -u -r67284323e2785c651633d9c52049ba12a9c70e6a -r271bd5ffd4d61da4324eb50957f062b14c4c6958 --- Core/Components/src/Core.Components.OxyPlot/DataSeries/ChartPointDataSeries.cs (.../ChartPointDataSeries.cs) (revision 67284323e2785c651633d9c52049ba12a9c70e6a) +++ Core/Components/src/Core.Components.OxyPlot/DataSeries/ChartPointDataSeries.cs (.../ChartPointDataSeries.cs) (revision 271bd5ffd4d61da4324eb50957f062b14c4c6958) @@ -30,7 +30,7 @@ /// /// A based on and updated according to the wrapped . /// - public class ChartPointDataSeries : LineSeries, IItemBasedChartDataSeries + public class ChartPointDataSeries : LineSeries, IChartDataSeries { private readonly ChartPointData chartPointData; private readonly ChartPointDataConverter converter = new ChartPointDataConverter(); Index: Core/Components/src/Core.Components.OxyPlot/DataSeries/IChartDataSeries.cs =================================================================== diff -u --- Core/Components/src/Core.Components.OxyPlot/DataSeries/IChartDataSeries.cs (revision 0) +++ Core/Components/src/Core.Components.OxyPlot/DataSeries/IChartDataSeries.cs (revision 271bd5ffd4d61da4324eb50957f062b14c4c6958) @@ -0,0 +1,34 @@ +// Copyright (C) Stichting Deltares 2017. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +namespace Core.Components.OxyPlot.DataSeries +{ + /// + /// Interface for item based chart data series. + /// + public interface IChartDataSeries + { + /// + /// Updates the chart data series. + /// + void Update(); + } +} \ No newline at end of file Fisheye: Tag 271bd5ffd4d61da4324eb50957f062b14c4c6958 refers to a dead (removed) revision in file `Core/Components/src/Core.Components.OxyPlot/DataSeries/IItemBasedChartDataSeries.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 271bd5ffd4d61da4324eb50957f062b14c4c6958 refers to a dead (removed) revision in file `Core/Components/src/Core.Components.OxyPlot/DataSeries/ItemBasedChartDataSeriesFactory.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Core/Components/test/Core.Components.Charting.Test/Core.Components.Charting.Test.csproj =================================================================== diff -u -r88f6d73b4d5d1e7e6a2f75d700e552c3cb7719ae -r271bd5ffd4d61da4324eb50957f062b14c4c6958 --- Core/Components/test/Core.Components.Charting.Test/Core.Components.Charting.Test.csproj (.../Core.Components.Charting.Test.csproj) (revision 88f6d73b4d5d1e7e6a2f75d700e552c3cb7719ae) +++ Core/Components/test/Core.Components.Charting.Test/Core.Components.Charting.Test.csproj (.../Core.Components.Charting.Test.csproj) (revision 271bd5ffd4d61da4324eb50957f062b14c4c6958) @@ -58,7 +58,6 @@ - Index: Core/Components/test/Core.Components.Charting.Test/Data/ChartMultipleAreaDataTest.cs =================================================================== diff -u -r67284323e2785c651633d9c52049ba12a9c70e6a -r271bd5ffd4d61da4324eb50957f062b14c4c6958 --- Core/Components/test/Core.Components.Charting.Test/Data/ChartMultipleAreaDataTest.cs (.../ChartMultipleAreaDataTest.cs) (revision 67284323e2785c651633d9c52049ba12a9c70e6a) +++ Core/Components/test/Core.Components.Charting.Test/Data/ChartMultipleAreaDataTest.cs (.../ChartMultipleAreaDataTest.cs) (revision 271bd5ffd4d61da4324eb50957f062b14c4c6958) @@ -39,7 +39,7 @@ // Assert Assert.AreEqual("test data", data.Name); - Assert.IsInstanceOf(data); + Assert.IsInstanceOf(data); } [Test] Index: Core/Components/test/Core.Components.Charting.Test/Data/ChartMultipleLineDataTest.cs =================================================================== diff -u -r88f6d73b4d5d1e7e6a2f75d700e552c3cb7719ae -r271bd5ffd4d61da4324eb50957f062b14c4c6958 --- Core/Components/test/Core.Components.Charting.Test/Data/ChartMultipleLineDataTest.cs (.../ChartMultipleLineDataTest.cs) (revision 88f6d73b4d5d1e7e6a2f75d700e552c3cb7719ae) +++ Core/Components/test/Core.Components.Charting.Test/Data/ChartMultipleLineDataTest.cs (.../ChartMultipleLineDataTest.cs) (revision 271bd5ffd4d61da4324eb50957f062b14c4c6958) @@ -38,7 +38,7 @@ var data = new ChartMultipleLineData("test data"); // Assert - Assert.IsInstanceOf(data); + Assert.IsInstanceOf(data); CollectionAssert.IsEmpty(data.Lines); Assert.IsNull(data.Style); } Fisheye: Tag 271bd5ffd4d61da4324eb50957f062b14c4c6958 refers to a dead (removed) revision in file `Core/Components/test/Core.Components.Charting.Test/Data/ItemBasedChartDataTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Core/Components/test/Core.Components.Charting.Test/Data/PointBasedChartDataTest.cs =================================================================== diff -u -r67284323e2785c651633d9c52049ba12a9c70e6a -r271bd5ffd4d61da4324eb50957f062b14c4c6958 --- Core/Components/test/Core.Components.Charting.Test/Data/PointBasedChartDataTest.cs (.../PointBasedChartDataTest.cs) (revision 67284323e2785c651633d9c52049ba12a9c70e6a) +++ Core/Components/test/Core.Components.Charting.Test/Data/PointBasedChartDataTest.cs (.../PointBasedChartDataTest.cs) (revision 271bd5ffd4d61da4324eb50957f062b14c4c6958) @@ -37,7 +37,7 @@ var data = new TestPointBasedChartData("test data"); // Assert - Assert.IsInstanceOf(data); + Assert.IsInstanceOf(data); Assert.AreEqual("test data", data.Name); Assert.IsEmpty(data.Points); } Index: Core/Components/test/Core.Components.OxyPlot.Test/Converter/ChartAreaDataConverterTest.cs =================================================================== diff -u -raefd4f8600e09ea77d5bc37ffc56766763d5dcde -r271bd5ffd4d61da4324eb50957f062b14c4c6958 --- Core/Components/test/Core.Components.OxyPlot.Test/Converter/ChartAreaDataConverterTest.cs (.../ChartAreaDataConverterTest.cs) (revision aefd4f8600e09ea77d5bc37ffc56766763d5dcde) +++ Core/Components/test/Core.Components.OxyPlot.Test/Converter/ChartAreaDataConverterTest.cs (.../ChartAreaDataConverterTest.cs) (revision 271bd5ffd4d61da4324eb50957f062b14c4c6958) @@ -37,13 +37,13 @@ public class ChartAreaDataConverterTest { [Test] - public void DefaultConstructor_IsItemBasedChartDataConverter() + public void DefaultConstructor_IsChartDataConverter() { // Call var converter = new ChartAreaDataConverter(); // Assert - Assert.IsInstanceOf>(converter); + Assert.IsInstanceOf>(converter); } [Test] Fisheye: Tag 4dbfc20ef0200e34db43efeb8899d72e4046cc5b refers to a dead (removed) revision in file `Core/Components/test/Core.Components.OxyPlot.Test/Converter/ChartDataConverterTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Core/Components/test/Core.Components.OxyPlot.Test/Converter/ChartLineDataConverterTest.cs =================================================================== diff -u -raefd4f8600e09ea77d5bc37ffc56766763d5dcde -r271bd5ffd4d61da4324eb50957f062b14c4c6958 --- Core/Components/test/Core.Components.OxyPlot.Test/Converter/ChartLineDataConverterTest.cs (.../ChartLineDataConverterTest.cs) (revision aefd4f8600e09ea77d5bc37ffc56766763d5dcde) +++ Core/Components/test/Core.Components.OxyPlot.Test/Converter/ChartLineDataConverterTest.cs (.../ChartLineDataConverterTest.cs) (revision 271bd5ffd4d61da4324eb50957f062b14c4c6958) @@ -38,13 +38,13 @@ public class ChartLineDataConverterTest { [Test] - public void DefaultConstructor_IsItemBasedChartDataConverter() + public void DefaultConstructor_IsChartDataConverter() { // Call var converter = new ChartLineDataConverter(); // Assert - Assert.IsInstanceOf>(converter); + Assert.IsInstanceOf>(converter); } [Test] Index: Core/Components/test/Core.Components.OxyPlot.Test/Converter/ChartMultipleAreaDataConverterTest.cs =================================================================== diff -u -raefd4f8600e09ea77d5bc37ffc56766763d5dcde -r271bd5ffd4d61da4324eb50957f062b14c4c6958 --- Core/Components/test/Core.Components.OxyPlot.Test/Converter/ChartMultipleAreaDataConverterTest.cs (.../ChartMultipleAreaDataConverterTest.cs) (revision aefd4f8600e09ea77d5bc37ffc56766763d5dcde) +++ Core/Components/test/Core.Components.OxyPlot.Test/Converter/ChartMultipleAreaDataConverterTest.cs (.../ChartMultipleAreaDataConverterTest.cs) (revision 271bd5ffd4d61da4324eb50957f062b14c4c6958) @@ -38,13 +38,13 @@ public class ChartMultipleAreaDataConverterTest { [Test] - public void DefaultConstructor_IsItemBasedChartDataConverter() + public void DefaultConstructor_IsChartDataConverter() { // Call var converter = new ChartMultipleAreaDataConverter(); // Assert - Assert.IsInstanceOf>(converter); + Assert.IsInstanceOf>(converter); } [Test] Index: Core/Components/test/Core.Components.OxyPlot.Test/Converter/ChartMultipleLineDataConverterTest.cs =================================================================== diff -u -re464d420d0ce85287a40d0aee40d5dbdd0ade68e -r271bd5ffd4d61da4324eb50957f062b14c4c6958 --- Core/Components/test/Core.Components.OxyPlot.Test/Converter/ChartMultipleLineDataConverterTest.cs (.../ChartMultipleLineDataConverterTest.cs) (revision e464d420d0ce85287a40d0aee40d5dbdd0ade68e) +++ Core/Components/test/Core.Components.OxyPlot.Test/Converter/ChartMultipleLineDataConverterTest.cs (.../ChartMultipleLineDataConverterTest.cs) (revision 271bd5ffd4d61da4324eb50957f062b14c4c6958) @@ -39,13 +39,13 @@ public class ChartMultipleLineDataConverterTest { [Test] - public void DefaultConstructor_IsItemBasedChartDataConverter() + public void DefaultConstructor_IsChartDataConverter() { // Call var converter = new ChartMultipleLineDataConverter(); // Assert - Assert.IsInstanceOf>(converter); + Assert.IsInstanceOf>(converter); } [Test] Index: Core/Components/test/Core.Components.OxyPlot.Test/Converter/ChartPointDataConverterTest.cs =================================================================== diff -u -raefd4f8600e09ea77d5bc37ffc56766763d5dcde -r271bd5ffd4d61da4324eb50957f062b14c4c6958 --- Core/Components/test/Core.Components.OxyPlot.Test/Converter/ChartPointDataConverterTest.cs (.../ChartPointDataConverterTest.cs) (revision aefd4f8600e09ea77d5bc37ffc56766763d5dcde) +++ Core/Components/test/Core.Components.OxyPlot.Test/Converter/ChartPointDataConverterTest.cs (.../ChartPointDataConverterTest.cs) (revision 271bd5ffd4d61da4324eb50957f062b14c4c6958) @@ -37,13 +37,13 @@ public class ChartPointDataConverterTest { [Test] - public void DefaultConstructor_IsItemBasedChartDataConverter() + public void DefaultConstructor_IsChartDataConverter() { // Call var converter = new ChartPointDataConverter(); // Assert - Assert.IsInstanceOf>(converter); + Assert.IsInstanceOf>(converter); } [Test] Fisheye: Tag 271bd5ffd4d61da4324eb50957f062b14c4c6958 refers to a dead (removed) revision in file `Core/Components/test/Core.Components.OxyPlot.Test/Converter/ItemBasedChartDataConverterTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Core/Components/test/Core.Components.OxyPlot.Test/Core.Components.OxyPlot.Test.csproj =================================================================== diff -u -rfa07631b4d1fac0c9d34aedfc19de6afc1e01f59 -r271bd5ffd4d61da4324eb50957f062b14c4c6958 --- Core/Components/test/Core.Components.OxyPlot.Test/Core.Components.OxyPlot.Test.csproj (.../Core.Components.OxyPlot.Test.csproj) (revision fa07631b4d1fac0c9d34aedfc19de6afc1e01f59) +++ Core/Components/test/Core.Components.OxyPlot.Test/Core.Components.OxyPlot.Test.csproj (.../Core.Components.OxyPlot.Test.csproj) (revision 271bd5ffd4d61da4324eb50957f062b14c4c6958) @@ -61,7 +61,7 @@ - + @@ -75,7 +75,7 @@ - + Index: Core/Components/test/Core.Components.OxyPlot.Test/DataSeries/ChartAreaDataSeriesTest.cs =================================================================== diff -u -r67284323e2785c651633d9c52049ba12a9c70e6a -r271bd5ffd4d61da4324eb50957f062b14c4c6958 --- Core/Components/test/Core.Components.OxyPlot.Test/DataSeries/ChartAreaDataSeriesTest.cs (.../ChartAreaDataSeriesTest.cs) (revision 67284323e2785c651633d9c52049ba12a9c70e6a) +++ Core/Components/test/Core.Components.OxyPlot.Test/DataSeries/ChartAreaDataSeriesTest.cs (.../ChartAreaDataSeriesTest.cs) (revision 271bd5ffd4d61da4324eb50957f062b14c4c6958) @@ -58,7 +58,7 @@ // Assert Assert.IsInstanceOf(chartAreaDataSeries); - Assert.IsInstanceOf(chartAreaDataSeries); + Assert.IsInstanceOf(chartAreaDataSeries); AssertChartAreaDataSeriesTestProperties(chartAreaDataSeries); } Index: Core/Components/test/Core.Components.OxyPlot.Test/DataSeries/ChartDataSeriesFactoryTest.cs =================================================================== diff -u --- Core/Components/test/Core.Components.OxyPlot.Test/DataSeries/ChartDataSeriesFactoryTest.cs (revision 0) +++ Core/Components/test/Core.Components.OxyPlot.Test/DataSeries/ChartDataSeriesFactoryTest.cs (revision 271bd5ffd4d61da4324eb50957f062b14c4c6958) @@ -0,0 +1,110 @@ +// Copyright (C) Stichting Deltares 2017. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using System; +using Core.Components.Charting.Data; +using Core.Components.OxyPlot.DataSeries; +using NUnit.Framework; + +namespace Core.Components.OxyPlot.Test.DataSeries +{ + [TestFixture] + public class ChartDataSeriesFactoryTest + { + [Test] + public void Create_ChartPointData_ReturnChartPointDataSeries() + { + // Call + IChartDataSeries series = ChartDataSeriesFactory.Create(new ChartPointData("test data")); + + // Assert + Assert.IsInstanceOf(series); + } + + [Test] + public void Create_ChartLineData_ReturnChartLineDataSeries() + { + // Call + IChartDataSeries series = ChartDataSeriesFactory.Create(new ChartLineData("test data")); + + // Assert + Assert.IsInstanceOf(series); + } + + [Test] + public void Create_ChartAreaData_ReturnChartAreaDataSeries() + { + // Call + IChartDataSeries series = ChartDataSeriesFactory.Create(new ChartAreaData("test data")); + + // Assert + Assert.IsInstanceOf(series); + } + + [Test] + public void Create_ChartMultipleAreaData_ReturnChartMultipleAreaDataSeries() + { + // Call + IChartDataSeries series = ChartDataSeriesFactory.Create(new ChartMultipleAreaData("test data")); + + // Assert + Assert.IsInstanceOf(series); + } + + [Test] + public void Create_ChartMultipleLineData_ReturnChartMultipleLineDataSeries() + { + // Call + IChartDataSeries series = ChartDataSeriesFactory.Create(new ChartMultipleLineData("test data")); + + // Assert + Assert.IsInstanceOf(series); + } + + [Test] + public void Create_OtherData_ThrowsNotSupportedException() + { + // Setup + var testData = new TestChartData("test data"); + + // Call + TestDelegate test = () => ChartDataSeriesFactory.Create(testData); + + // Assert + Assert.Throws(test); + } + + [Test] + public void Create_NullData_ThrowsArgumentNullException() + { + // Call + TestDelegate test = () => ChartDataSeriesFactory.Create(null); + + // Assert + Assert.Throws(test); + } + + private class TestChartData : ChartData + { + public TestChartData(string name) : base(name) {} + } + } +} \ No newline at end of file Index: Core/Components/test/Core.Components.OxyPlot.Test/DataSeries/ChartLineDataSeriesTest.cs =================================================================== diff -u -r67284323e2785c651633d9c52049ba12a9c70e6a -r271bd5ffd4d61da4324eb50957f062b14c4c6958 --- Core/Components/test/Core.Components.OxyPlot.Test/DataSeries/ChartLineDataSeriesTest.cs (.../ChartLineDataSeriesTest.cs) (revision 67284323e2785c651633d9c52049ba12a9c70e6a) +++ Core/Components/test/Core.Components.OxyPlot.Test/DataSeries/ChartLineDataSeriesTest.cs (.../ChartLineDataSeriesTest.cs) (revision 271bd5ffd4d61da4324eb50957f062b14c4c6958) @@ -61,7 +61,7 @@ // Assert Assert.IsInstanceOf(chartLineDataSeries); - Assert.IsInstanceOf(chartLineDataSeries); + Assert.IsInstanceOf(chartLineDataSeries); AssertChartLineDataSeriesTestProperties(chartLineDataSeries); } Index: Core/Components/test/Core.Components.OxyPlot.Test/DataSeries/ChartMultipleAreaDataSeriesTest.cs =================================================================== diff -u -raefd4f8600e09ea77d5bc37ffc56766763d5dcde -r271bd5ffd4d61da4324eb50957f062b14c4c6958 --- Core/Components/test/Core.Components.OxyPlot.Test/DataSeries/ChartMultipleAreaDataSeriesTest.cs (.../ChartMultipleAreaDataSeriesTest.cs) (revision aefd4f8600e09ea77d5bc37ffc56766763d5dcde) +++ Core/Components/test/Core.Components.OxyPlot.Test/DataSeries/ChartMultipleAreaDataSeriesTest.cs (.../ChartMultipleAreaDataSeriesTest.cs) (revision 271bd5ffd4d61da4324eb50957f062b14c4c6958) @@ -59,7 +59,7 @@ // Assert Assert.IsInstanceOf(chartMultipleAreaDataSeries); - Assert.IsInstanceOf(chartMultipleAreaDataSeries); + Assert.IsInstanceOf(chartMultipleAreaDataSeries); AssertChartMultipleAreaDataSeriesTestProperties(chartMultipleAreaDataSeries); } Index: Core/Components/test/Core.Components.OxyPlot.Test/DataSeries/ChartMultipleLineDataSeriesTest.cs =================================================================== diff -u -raefd4f8600e09ea77d5bc37ffc56766763d5dcde -r271bd5ffd4d61da4324eb50957f062b14c4c6958 --- Core/Components/test/Core.Components.OxyPlot.Test/DataSeries/ChartMultipleLineDataSeriesTest.cs (.../ChartMultipleLineDataSeriesTest.cs) (revision aefd4f8600e09ea77d5bc37ffc56766763d5dcde) +++ Core/Components/test/Core.Components.OxyPlot.Test/DataSeries/ChartMultipleLineDataSeriesTest.cs (.../ChartMultipleLineDataSeriesTest.cs) (revision 271bd5ffd4d61da4324eb50957f062b14c4c6958) @@ -60,7 +60,7 @@ // Assert Assert.IsInstanceOf(chartMultipleLineDataSeries); - Assert.IsInstanceOf(chartMultipleLineDataSeries); + Assert.IsInstanceOf(chartMultipleLineDataSeries); AssertChartMultipleLineDataSeriesTestProperties(chartMultipleLineDataSeries); } Index: Core/Components/test/Core.Components.OxyPlot.Test/DataSeries/ChartPointDataSeriesTest.cs =================================================================== diff -u -r67284323e2785c651633d9c52049ba12a9c70e6a -r271bd5ffd4d61da4324eb50957f062b14c4c6958 --- Core/Components/test/Core.Components.OxyPlot.Test/DataSeries/ChartPointDataSeriesTest.cs (.../ChartPointDataSeriesTest.cs) (revision 67284323e2785c651633d9c52049ba12a9c70e6a) +++ Core/Components/test/Core.Components.OxyPlot.Test/DataSeries/ChartPointDataSeriesTest.cs (.../ChartPointDataSeriesTest.cs) (revision 271bd5ffd4d61da4324eb50957f062b14c4c6958) @@ -60,7 +60,7 @@ // Assert Assert.IsInstanceOf(chartPointDataSeries); - Assert.IsInstanceOf(chartPointDataSeries); + Assert.IsInstanceOf(chartPointDataSeries); AssertChartPointDataSeriesTestProperties(chartPointDataSeries); } Fisheye: Tag 271bd5ffd4d61da4324eb50957f062b14c4c6958 refers to a dead (removed) revision in file `Core/Components/test/Core.Components.OxyPlot.Test/DataSeries/ItemBasedChartDataSeriesFactoryTest.cs'. Fisheye: No comparison available. Pass `N' to diff?