Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
265
Different Colors For Chart Line Out Of Tolerance
posted

Hello,

I scanned the documentation, but found no way to create the following:

  • a line chart
  • upper and a lower Limit displayed as a horizontal band or two horizontal lines
  • the parts of the graph that are out of this band are colored differently

_MeasuredValues = new double[]
			{
				2,2.1,2.2,2.4,2.7,2.9,2.9,3.1,3.4,2.5,2.4,2.0,1.8,1.5,1.4,1.2,1.1,0.8,0.5,0.4,0.2
			};

			var data = _MeasuredValues;
			var yAxis = new NumericYAxis();
			yAxis.TickmarkValues = new TickMark();// provides the upper and lower range line
			var xAxis = new CategoryXAxis();
			xAxis.ItemsSource = data;

			var series = new SplineSeries();
			series.ItemsSource = data;
			series.XAxis = xAxis;
			series.YAxis = yAxis;

			Chart = new XamDataChart();
			Chart.Axes.Add( xAxis );
			Chart.Axes.Add( yAxis );
			Chart.Series.Add( series );

I would appreciate some help.
Thanks in advance,

Stef