Jump to content
Software FX Community

Hiding unused AxisY points with Categorical (DateTime) AxisX


Recommended Posts


I'm using the following to populate a Line graph:

// Populate the graph

object[] allArraysData = new object[3];

allArraysData[0] = timeStampLabels;

// DateTime values

allArraysData[1] = bwUtilInValues;

// decimal values

allArraysData[2] = bwUtilOutValues;

// decimal valuesListProvider lpBWData = new ListProvider(allArraysData);

chartFX1.DataSourceSettings.DataSource = lpBWData;

// Display the AxisX labels in DateTime formatchartFX1.AxisX.LabelsFormat.Format = AxisFormat.DateTime;

This works fine, but when the bwUtilInValues and bwUtilOutValues don't contain data values for a period of time (I filter out unwanted days / times) the series line will extend from the last good data point to the next - which I don't want; I'd prefer the line discontinue. I'm aware of the ability to hide a datapoint, but not sure how to do this in the context of the above categorial / DateTime X-axis. I tried doing a X-Y plot, but that results in losing the time continuity on the X-Asis. Any suggestions? 
Link to comment
Share on other sites

That won't work.

You will need to do this manually, passing the data point by point and leaving the gaps at the places you need. Use the Chart.Data API to pass your points and Chart.Hidden to leave the gaps.

Another way is to pre-process your data and add null values at the points where you want the breaks.

There is no functionality in Chart FX that will detect gaps in the data, there is nothing that sets the "normal" step in the data and therefore we can't determine when a point is missing.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...