Box Plot Chart - DataOutliersField

1 posts, 0 answers
  1. Ralph
    Ralph avatar
    2 posts
    Member since:
    Nov 2016

    Posted 28 Nov 2016 Link to this post

    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] =
    (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:


    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">
    <telerik:BoxPlotSeries DataLowerField="lower" DataQ1Field="Q1" DataMeanField="Mean" DataMedianField="Median" DataQ3Field="Q3" DataUpperField="upper" DataOutliersField="outliers">
    <OutliersAppearance MarkersType="Circle"></OutliersAppearance>
    <ExtremesAppearance MarkersType="Cross"></ExtremesAppearance>
    <TitleAppearance Text="Repayment Amount" RotationAngle="-90"></TitleAppearance>
    <LabelsAppearance DataFormatString="{0:C0}"></LabelsAppearance>
    <XAxis DataLabelsField="periodEnd">
    <TitleAppearance Text="Month Ending"></TitleAppearance>
    <LabelsAppearance RotationAngle="-90"></LabelsAppearance>
    <ChartTitle Text="Repayments Plotting">
    <Appearance Align="Center">
    <TextStyle Bold="true" FontSize="16"/>

    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?



Back to Top