Data from same Line but not connected

Oct 22, 2009 at 3:07 PM
Edited Oct 22, 2009 at 3:10 PM

Hello,

Is it possible to draw a Line Graph to the Plotter where the Data is not connected but belong to the same Line like as shown below:

Disconnected Graph

What I am getting is - because all points are needed in the plotter. Is there any way to "turn off" the connection between points?

 

Disconnected 2

Editor
Oct 22, 2009 at 4:37 PM

Hi,

currently it is not possible, we have not implemented yet support for missing value in line charts, it is only in long-term plans.

Regards,

Mikhail.

Editor
Oct 22, 2009 at 4:47 PM

You can reach this visual display manually - filter your data and split it into portions that will be each a dataSource for one lineGraph, so you will have as many lineGraphs as you need.

Nov 2, 2009 at 11:04 AM
Edited Nov 2, 2009 at 11:06 AM
thecentury wrote:

You can reach this visual display manually - filter your data and split it into portions that will be each a dataSource for one lineGraph, so you will have as many lineGraphs as you need.

 How do I do that? I have the following - and want to add ds2?

      xs = Enumerable.Range(0, count).Select(i => (double)i).ToArray();

      y1 = Enumerable.Range(0, count).Select(i => 1 + rnd.NextDouble()).ToArray();
      y2 = Enumerable.Range(0, count).Select(i => 2 + rnd.NextDouble()).ToArray();

      var xds = xs.AsXDataSource();
      var ds1 = xds.Join(y1.AsYDataSource());
      var ds2 = xds.Join(y2.AsYDataSource());

      LineGraph thisLine = new LineGraph { DataSource = ds1, Stroke = ColorHelper.RandomBrush };
      plotter.Children.Add(thisLine);

 Can I add another DataSource to the Line?

Editor
Nov 3, 2009 at 4:10 AM

Hi!

You have to create one LineChart for one non-breaking piece of line, so if there is one line break, you should create two line charts with different dataSources.

Mikhail.

Nov 3, 2009 at 11:58 AM
thecentury wrote:

Hi!

You have to create one LineChart for one non-breaking piece of line, so if there is one line break, you should create two line charts with different dataSources.

Mikhail.

 Thanks Mikhail, but my issue is that both lines belong to the same set - if I create two lines, I get two 'Legend' entries.

Editor
Nov 3, 2009 at 12:17 PM

Hi,

I have made some changes into the source code of Legend class, which will be available in the next changset, that enables you to write

            Legend.SetVisibleInLegend(line, false);

 

Legend.SetVisibleInLegend(line, false);

to disable chart being shown in the Legend.

 

Best regards,

Mikhail.