10-30-2015 11:26 AM
It seems like this should be obvious... And probably is if I only knew what terminology to look for.
I am using the WPF NI Graph. The scales and data point spacing will very depending on settings but for simplicity lets say that I have a horizontal scale going from 0 to 40 and a double array of Y values with 4000 data points. So I have 100 points evenly spaced points for evey 1 increment.
How do I change the graphs point spacing so that the 4000 data points fit between 0 and 40?
I have the horizonal scale set to double but there doesn't appear to be a way to specify and interval or spacing.
10-30-2015 02:22 PM
From your description, it sounds like you are providing a graph with a double[]
of samples, and you want to specify a custom interval to replace the array index values currently used by the graph.
To do this, there are two basic approaches. You can use a collection that provides the appropriate position information explicitly (i.e. a Point[]
, ChartCollection<double,double>
, or similar). Or you can implement a custom ScaleKind
that transforms the incoming values before doing a standard mapping.
11-02-2015 12:05 PM
Ok, thanks! I hoped to avoid needing to explcitly create an array for horizonta data, but it is work fine.
Thanks again!