Hi,
I am trying to develop a BoxChart based on some measure values. But getting some message in chart area "XamWebChart Warning: The box chart needs Min, Max, Q1, Q2 and Q3 values. The values have to be set for every data point using Chartparameters collection.".
I have already supplied the required values. But still getting the message.
Can you please provide me with some solution.
Following is the code i am using to generate DataPoints along with it's ChartParameters:
// to use the zoombar control with chart set the following properties on the axis
.PivotGrid.DataSource.Result.RowAxis.Tuples.Count > 5)
{
theChart.Axes.Clear();
();
primXAxis.AxisType =
.PrimaryX;
primXAxis.ScrollEnabled =
;
primXAxis.ScrollPosition = 0.21;
primXAxis.ScrollScale = 0.17;
theChart.Axes.Add(primXAxis);
theChart.ZoomRectangle.Enabled =
}
series.ChartType =
.Box;
i = 0; i < lstOCol.Count; i++)
>)lstOCol[i]).Min(p => p.Value);
>)lstOCol[i]).Max(p => p.Value);
>)lstOCol[i]))
chartParams.Type = Infragistics.Silverlight.Chart.
.Min;
chartParams.Value = MinValue;
dd.ChartParameters.Add(chartParams);
.Max;
chartParams.Value = MaxValue;
.Q1;
chartParams.Value = x.Value;
.Q2;
.Q3;
series.DataPoints.Add(dd);
series.Label =
.PivotGrid.DataSource.Result.ColumnAxis.Tuples[i].Members[0].ToString();
Following is the message i am getting:
Thanks for the help in advance.
Thanks & Regards,Sachin Pandya.
Hello,
Have you added the new series you created to your chart - theChart.Series.Add(series); ? I could not find such code in the snipper you posted.
Also try setting chartParams = new ChartParameter (); after each time you added the parameter to the DataPoint ChartParameters collection.
foreach (var x in ((ObservableCollection<DataPoint>)lstOCol[i])) {chartParams.Type = Infragistics.Silverlight.Chart.ChartParameterType.Min; chartParams.Value = MinValue;dd.ChartParameters.Add(chartParams);
chartParams = new ChartParameter (); chartParams.Type = Infragistics.Silverlight.Chart.ChartParameterType.Max; chartParams.Value = MaxValue;dd.ChartParameters.Add(chartParams);
chartParams = new ChartParameter (); chartParams.Type = Infragistics.Silverlight.Chart.ChartParameterType.Q1; chartParams.Value = x.Value;dd.ChartParameters.Add(chartParams);
chartParams = new ChartParameter (); chartParams.Type = Infragistics.Silverlight.Chart.ChartParameterType.Q2; chartParams.Value = x.Value;dd.ChartParameters.Add(chartParams);
chartParams = new ChartParameter (); chartParams.Type = Infragistics.Silverlight.Chart.ChartParameterType.Q3; chartParams.Value = x.Value;dd.ChartParameters.Add(chartParams);}
series.DataPoints.Add(dd); series.Label = this.PivotGrid.DataSource.Result.ColumnAxis.Tuples[i].Members[0].ToString();
theChart.Series.Add(series);
Hope this helps,
Boyan