Dundas Charting Tips and Tricks > Using a Line Chart > How do I show a break in data when using a line chart?

Search the FAQ for entries containing:

By design, a line chart wants to connect the dots from one data point to another. But what happens when you want to use a line chart but want a break in data to show in the line chart. Well, one option is to simply use a point chart which will only show the distinct points.  By default, f you use a line chart the chart will look like this if you have a break in data. Click to View Larger Image

With a line chart you should include the following code within Dundas to show the break in the data. This code is placed in the PostInitialize Event:

                series.EmptyPointStyle.Color = Color.Transparent

What this does in effect is it will make the color transparent in the event that you have NULL values in your dataset. Another important factor is that you have to populate your dataset with either NULL values or blank values or the line chart will not know when to make the data points transparent. The following graph clearly shows the break in the data.

Click to View Larger Image