This is a migrated thread and some comments may be shown as answers.

Box Plot Chart - DataOutliersField

0 Answers 76 Views
Chart (HTML5)
This is a migrated thread and some comments may be shown as answers.
Ralph
Top achievements
Rank 1
Ralph asked on 29 Nov 2016, 02:21 AM

I'm populating a box plot chart with a data table created from a sequel query. The query has an outliers field:

SELECT m.[periodEnd], m.[lower], m.[Q1], m.[Mean], m.[Median], m.[Q3], m.[upper],
[outliers] =
STUFF(
(SELECT ','+ CAST([DollarRepayment] AS varchar(12)) FROM #boxPlotList mm WHERE (mm.[DollarRepayment] < m.[lower]
OR mm.[DollarRepayment] > m.[upper]) AND mm.[periodEnd] = m.[periodEnd] FOR XML PATH('')),1,1,''
)
FROM #boxPlotDollarRepayments m
ORDER BY [periodEnd]

The outliers column shows like this:

10000.00,543901.00,783930.00,25325.00,403267.00,922911.00,850953.00,39815.00,20697.00,31654.00,39540.00,1385234.00,29954.00,507726.00

The code behind picks up the data table and binds it to the chart. The HTML looks like this:

<telerik:RadHtmlChart ID="RadHtmlChart5" runat="server" Width="100%" Height="500px">
<PlotArea>
<Series>
<telerik:BoxPlotSeries DataLowerField="lower" DataQ1Field="Q1" DataMeanField="Mean" DataMedianField="Median" DataQ3Field="Q3" DataUpperField="upper" DataOutliersField="outliers">
<OutliersAppearance MarkersType="Circle"></OutliersAppearance>
<ExtremesAppearance MarkersType="Cross"></ExtremesAppearance>
</telerik:BoxPlotSeries>
</Series>
<YAxis>
<TitleAppearance Text="Repayment Amount" RotationAngle="-90"></TitleAppearance>
<LabelsAppearance DataFormatString="{0:C0}"></LabelsAppearance>
</YAxis>
<XAxis DataLabelsField="periodEnd">
<TitleAppearance Text="Month Ending"></TitleAppearance>
<LabelsAppearance RotationAngle="-90"></LabelsAppearance>
</XAxis>
</PlotArea>
<ChartTitle Text="Repayments Plotting">
<Appearance Align="Center">
<TextStyle Bold="true" FontSize="16"/>
</Appearance>
</ChartTitle>
</telerik:RadHtmlChart>

If I remove the outliers column from the stored procedure and the chart tag, it works. If I put the outliers column in the stored procedure, whether I specify DataOutliersField or not in the BoxPlotSeries tag, the chart fails: chart displays the outliers all at 0 and 1 for each axis item, and the boxes, mean, median, upper and lower bounds do not appear.

Can anyone tell me what I am doing wrong?

 

 

No answers yet. Maybe you can help?

Tags
Chart (HTML5)
Asked by
Ralph
Top achievements
Rank 1
Share this question
or