public MainWindowViewModel() { Draft = 25; Speed = 18; DraftAtAft = 10; DraftAtFwd = 12; PowerRecords = ExcelFileDataExtractor.ReadPowerValuesFromXLS(); List <DataPoint> psPoints, puPoints; ComputePlotPoints(out puPoints, out psPoints); AbsolutePowerUsagePlotModel = new GreenFLOATOxyplotModel(TRIM, POWER_SAVINGS_PERCENTAGE) { Title = ABSOLUTE_POWER_USAGE }; PowerSavingsPlotModel = new GreenFLOATOxyplotModel(TRIM, POWER_USAGE) { Title = POWER_SAVINGS }; SFOCPlotModel = new GreenFLOATOxyplotModel(SPEED_IN_KNOTS, FUEL_CONSUMPTION) { Title = "SFOC" }; DraftAtAftPlotModel = new GreenFLOATOxyplotBarGraphModel("Draft@Aft", DraftAtAft); DraftAtFwdPlotModel = new GreenFLOATOxyplotBarGraphModel("Draft@Fwd", DraftAtFwd); UpdatePowerGraphs(); ReadSFOCValuesFromXLS(); }
private void AddBackgroundColorsToDraftPlotModel(GreenFLOATOxyplotBarGraphModel model) { //var image = GetGradientImage(OxyColors.Orange, OxyColors.Green); //var colorAnnotation = new ImageAnnotation { // ImageSource = image, // Interpolate = true, // Layer = AnnotationLayer.BelowAxes, // X = new PlotLength(0, PlotLengthUnit.Data), // Y = new PlotLength(0, PlotLengthUnit.Data), // Width = new PlotLength(model.PlotArea.Width, PlotLengthUnit.Data), // Height = new PlotLength(model.PlotArea.Height, PlotLengthUnit.Data), // HorizontalAlignment = OxyPlot.HorizontalAlignment.Left, // VerticalAlignment = OxyPlot.VerticalAlignment.Bottom //}; //model.Annotations.Add(colorAnnotation); }
public MainWindowViewModel() { Draft = 25; Speed = 18; DraftAtAft = 10; DraftAtFwd = 12; PowerRecords = ExcelFileDataExtractor.ReadPowerValuesFromXLS(); List<DataPoint> psPoints, puPoints; ComputePlotPoints(out puPoints, out psPoints); AbsolutePowerUsagePlotModel = new GreenFLOATOxyplotModel(TRIM, POWER_SAVINGS_PERCENTAGE) { Title = ABSOLUTE_POWER_USAGE }; PowerSavingsPlotModel = new GreenFLOATOxyplotModel(TRIM, POWER_USAGE) { Title = POWER_SAVINGS }; SFOCPlotModel = new GreenFLOATOxyplotModel(SPEED_IN_KNOTS, FUEL_CONSUMPTION) { Title = "SFOC" }; DraftAtAftPlotModel = new GreenFLOATOxyplotBarGraphModel("Draft@Aft", DraftAtAft); DraftAtFwdPlotModel = new GreenFLOATOxyplotBarGraphModel("Draft@Fwd", DraftAtFwd); UpdatePowerGraphs(); ReadSFOCValuesFromXLS(); }