DataFieldX is not a valid Attribute of AreaSeries

3 posts, 0 answers
  1. Rene
    Rene avatar
    8 posts
    Member since:
    Jan 2014

    Posted 08 Apr 2015 Link to this post

    Hey Guys im trying to follow the sample follow the example:

    http://demos.telerik.com/aspnet-ajax/htmlchart/examples/databinding/bindtodataset/defaultcs.aspx

    except that im trying to use a areaseries. Sadly it seems like the property DataFieldX is not supported eventhough its documented:

    http://www.telerik.com/help/aspnet-ajax/properties_t_telerik_web_ui_areaseries.html

    I can only set "DataFieldY". 

     

    My Code:

    <telerik:RadHtmlChart runat="server" ID="AreaChart" Width="800" Height="500" Skin="Silk">
        <PlotArea>
            <Series>
                <telerik:AreaSeries Name="Series1" DataFieldX="timestamp" DataFieldY="eToday" >
                    <Appearance>
                        <FillStyle BackgroundColor="Red"></FillStyle>
                    </Appearance>
                    <LabelsAppearance Position="Above">
                    </LabelsAppearance>
                    <LineAppearance Width="1"></LineAppearance>
                    <MarkersAppearance MarkersType="Circle" BackgroundColor="White" Size="6" BorderColor="Red"
                        BorderWidth="2"></MarkersAppearance>
                    <TooltipsAppearance Color="White">
                    </TooltipsAppearance>               
                </telerik:AreaSeries>
            </Series>
            <Appearance>
                <FillStyle BackgroundColor="Transparent"></FillStyle>
            </Appearance>
            <XAxis AxisCrossingValue="0" Color="black" MajorTickType="Outside" MinorTickType="Outside"
                Reversed="false">           
                <TitleAppearance Position="Center" RotationAngle="0" Text="Date & Time">
                </TitleAppearance>
                <LabelsAppearance DataFormatString="{0}" RotationAngle="0" Skip="0" Step="1">
                </LabelsAppearance>
            </XAxis>
            <YAxis AxisCrossingValue="0" Color="black" MajorTickSize="4" MajorTickType="Outside"
                MaxValue="1400" MinorTickType="None" MinValue="0" Reversed="false" Step="200">
                <LabelsAppearance DataFormatString="{0}" RotationAngle="0" Skip="0" Step="1">
                </LabelsAppearance>
                <TitleAppearance RotationAngle="0" Position="Center" Text="Leistung am Tag in kWh">
                </TitleAppearance>
            </YAxis>
        </PlotArea>
        <Appearance>
            <FillStyle BackgroundColor="Transparent"></FillStyle>
        </Appearance>
        <ChartTitle Text="Company performance">
            <Appearance Align="Center" BackgroundColor="Transparent" Position="Top">
            </Appearance>
        </ChartTitle>
        <Legend>
            <Appearance BackgroundColor="Transparent" Position="Bottom">
            </Appearance>
        </Legend>
    </telerik:RadHtmlChart>

  2. Rene
    Rene avatar
    8 posts
    Member since:
    Jan 2014

    Posted 08 Apr 2015 in reply to Rene Link to this post

    Edit: you can find the "error" in the attachments
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Danail Vasilev
    Admin
    Danail Vasilev avatar
    1490 posts

    Posted 09 Apr 2015 Link to this post

    Hi Rene,

    DataFieldX property is available only for numeric series like Scatter, ScatterLine and Bubble. For category series like area, bar, column and line you should use the XAxis.DataLabelsField property.

    Regards,
    Danail Vasilev
    Telerik
     

    See What's Next in App Development. Register for TelerikNEXT.

     
Back to Top