JimBaxter Posted December 3, 2007 Report Share Posted December 3, 2007 Hi, I'm using the following to populate a Line graph: // Populate the graph object[] allArraysData = new object[3]; allArraysData[0] = timeStampLabels; // DateTime valuesallArraysData[1] = bwUtilInValues; // decimal valuesallArraysData[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 More sharing options...
maried Posted December 5, 2007 Report Share Posted December 5, 2007 Have you tried setting the InterpolateHidden property to false? chart1.Data.InterpolateHidden = false; // does not show the connecting line over hidden points Link to comment Share on other sites More sharing options...
JimBaxter Posted December 5, 2007 Author Report Share Posted December 5, 2007 Yes, I tried that previously, just tried it again - doesn't seem to make any difference. I assumed it was because the AxisY points hadn't been tagged as 'hidden', they just don't exist for parts of the AxisX? Link to comment Share on other sites More sharing options...
Frank Posted December 5, 2007 Report Share Posted December 5, 2007 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 More sharing options...
JimBaxter Posted December 5, 2007 Author Report Share Posted December 5, 2007 Ok, got it - Thanks for taking a look! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.