Example #1
0
        void UpdateChartSettings(StyleSettings style)
        {
            var data = new ChartSettings();

            switch (boxGroupMode.SelectedIndex)
            {
            case 0:
                data.GroupingMode = GroupingMode.Normal;
                break;

            case 1:
                data.GroupingMode = GroupingMode.Sum;
                break;

            case 2:
                data.GroupingMode = GroupingMode.Average;
                break;

            case 3:
                data.GroupingMode = GroupingMode.AverageByLiquid;
                break;
            }

            data.ShowAnnotations = checkShowAnno.Checked;

            data.StyleSettings = style;

            foreach (ChartControl item in tableLayoutPanel1.Controls)
            {
                item.UpdateSettings(data);
            }
        }
Example #2
0
        public void UpdateSettings(ChartSettings data)
        {
            settings.GroupingMode = data.GroupingMode;

            if (data.StyleSettings != null)
            {
                settings.StyleSettings = data.StyleSettings;
            }

            settings.ShowAnnotations = data.ShowAnnotations;

            UpdateChartAndTable();
        }
Example #3
0
        public ChartControl(ChartModel model)
        {
            InitializeComponent();

            typeof(Control).InvokeMember("DoubleBuffered",
                                         BindingFlags.SetProperty | BindingFlags.Instance | BindingFlags.NonPublic,
                                         null, gridData, new object[] { true });

            this.model = model;

            plotModel = new PlotModel
            {
                Title           = "(No wells)",
                DefaultFont     = "Segoe UI",
                TitleFontSize   = 10,
                DefaultFontSize = 10,
            };

            plotModel.Axes.Add(new OxyPlot.Axes.DateTimeAxis
            {
                Position               = OxyPlot.Axes.AxisPosition.Bottom,
                StringFormat           = "dd.MM.yyyy",
                MajorGridlineStyle     = LineStyle.Dash,
                MajorGridlineThickness = 1,
            });


            plotModel.Axes.Add(new OxyPlot.Axes.LinearAxis
            {
                Position               = OxyPlot.Axes.AxisPosition.Left,
                MajorGridlineStyle     = LineStyle.Dash,
                MajorGridlineThickness = 1,
            });

            plotModel.Legends.Add(new OxyPlot.Legends.Legend {
                LegendPosition = OxyPlot.Legends.LegendPosition.LeftTop
            });
            plotView.Model = plotModel;

            settings = new ChartSettings {
                GroupingMode = GroupingMode.Normal
            };
        }