Current filter:
                                You should refresh the page.
                                  • Hi,
                                    Line Chart's data does not have a data point between two points, how can I configure/make chart to connect two existing data points?
                                    Please see attached screenshot

                                1 Solution

                                Creation Date Importance Sort by

                                Hi,

                                Use the ScaleOptionsBase.ProcessMissingPoints property to customize the empty point processing behavior (see the Empty Points article for additional information).

                                Show all comments
                                • Alexander Gurevich 11.14.2019

                                  Hi,
                                  I read the article before. It is not clear how and where I can use  ScaleOptionsBase.ProcessMissingPoints. As to  Empty Points it does not show how to do it either, it only states that "Missing points are represented as empty points if the ScaleOptionsBase.ProcessMissingPoints property is set to InsertEmptyPoints."

                                  I would love to use it but I am not clear how to do it.
                                  Please clarify, if possible with an example .

                                • Alex (DevExpress Support) 11.14.2019

                                  Hi Alexander,

                                  The ProcessMissingPoints property should be initialized when you do not have empty points in your data source. From what I gather, you have the Null or Double.NaN value in the data source collection. In this case, define a filter to exclude empty points from the chart (see a similar approach described in the How to ignore gaps in presentation of Line chart with multiple Series ticket).

                                • Alexander Gurevich 11.14.2019

                                  Hi,

                                  What do you mean by "The ProcessMissingPoints property should be initialized" or how to "Initialze" ?

                                • Alex (DevExpress Support) 11.14.2019

                                  Alexander,

                                  The ProcessMissingPoints option is designed to insert empty or zero points when the input data source collection does not contain any "empty" points.
                                  It looks like your case is different and you do have points without values in your data source collection. In this case, use the data filtering approach I mentioned previously.

                                  As for the ProcessMissingPoints property, it can be modified both in design mode and programmatically (although it is not applicable in your particular scenario).

                                  If any part of my response is unclear, let me know.

                                • Alexander Gurevich 11.14.2019

                                  Alex,

                                  Please show me where "ProcessMissingPoints " can be modified programmatically. A working sample is the best. I understand that you think it is not applicable to my scenario.

                                • Alex (DevExpress Support) 11.14.2019

                                  You can update an existing chart layout initialization procedure and include the ProcessMissingPoints property modification statement there.

                                  [C#]
                                  private void Form1_Load(object sender, EventArgs e) { Series series = new Series("Series1", ViewType.Line); chart.Series.Add(series); series.DataSource = CreateChartData(10); series.ArgumentScaleType = ScaleType.DateTime; series.ArgumentDataMember = "Argument"; series.ValueScaleType = ScaleType.Numerical; series.ValueDataMembers.AddRange(new string[] { "Value" }); XYDiagram diagram = (XYDiagram)chart.Diagram; diagram.AxisX.DateTimeScaleOptions.ProcessMissingPoints = ProcessMissingPointsMode.InsertEmptyPoints; } private DataTable CreateChartData(int rowCount) { DataTable table = new DataTable("Table1"); table.Columns.Add("Argument", typeof(DateTime)); table.Columns.Add("Value", typeof(Int32)); Random rnd = new Random(); DataRow row = null; DateTime dt = DateTime.Now.Date; for (int i = 0; i < rowCount / 2; i++) { row = table.NewRow(); row["Argument"] = dt.AddDays(i); row["Value"] = rnd.Next(100); table.Rows.Add(row); } dt = dt.AddDays(20); // empty interval for (int i = rowCount/ 2; i < rowCount; i++) { row = table.NewRow(); row["Argument"] = dt.AddDays(i); row["Value"] = rnd.Next(100); table.Rows.Add(row); } return table; }
                                • Alex (DevExpress Support) 12.06.2019

                                  Hi Alexander,

                                  Please take a moment to vote for features we released in 2019 and leave your comment about future Chart Control enhancements:

                                  Desktop Charting & Mapping Roadmap 2020 – Your Opinion Counts.

                                  We appreciate your feedback.