This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi, Just wondering if you had an example of a LineSeries where you can set different colors within the same line? For example: points 0 to 1000 is green, 1001 to 2000 is red, 2001 to 10000 is orange, etc. Thanks, Andy |
|
|
Hi Andy, Unfortunately this is not a built in feature. The best option would be to split this in to multiple LineSeries, each with a different color. -Jason Fauchelle |
|
|
Hi Jason, I tried splitting it into multiple lines but because its two lines they will over lap each other and the display becomes very confusing. Is there a way to tell the graph not to connect certain blocks of time? Thanks in advance, Andy |
|
|
Hi Andy, A few of the series (including LineSeries) supports missing-points. Try adding a null value into the items source between the blocks of data and the line should then have breaks in it. -Jason Fauchelle |
|
|
It works like a charm, thanks Jason. |
|
|
Hi Jason, I have a line chart that is displaying real time data. Its adding about 100 points per second and run for about 1 to 2 minutes. I noticed that as data is added, the graph does some kind of averaging and spikes in the data are disappearing because of the averaging. Is there a way to prevent this from happening? Thanks again, Andy |
|
|
Hi Andy, The best option to prevent this from happening is to set the IsMinMaxSamplingEnabled to true on the LineSeries. This sacrifices a little bit of performance to produce a more accurate data shape. This will still sample the data, but each point on the line will be a minimum or maximum value - making sure that spikes are always included. (Note that data sampling means that points are skipped from being rendered, we don't average the data). If this is not quite good enough, you can further fine tune the way that data is sampled by setting the DataSampler property of the series. A data sampler simply takes the number of logical data points in the viewport, and the size of the viewport and returns a single number which is how many points to skip over. We provide 2 implementations of this: FixedSampleCountSampler has a MaxDataPointCount property which is the maximum number of data points to display on the chart. By default, all series use one of these with the max data point count set to 400. PixelDensitySampler has a PixelSpacing property which is the number of pixels between each data point. It's best to use a minimum value of 1 for the PixelSpacing as there's not much point rendering multiple data-points in the same line of pixels. The DataSampler property can be used in conjunction with the IsMinMaxSamplingEnabled feature. Just remember the more points you allow the chart to render, the slower the performance will be. Hope that helps, let me know if you have further questions about this. -Jason Fauchelle |
|