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

DataFieldX is not a valid Attribute of AreaSeries

2 Answers 61 Views
Chart (HTML5)
This is a migrated thread and some comments may be shown as answers.
Rene
Top achievements
Rank 1
Rene asked on 08 Apr 2015, 12:32 PM

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 Answers, 1 is accepted

Sort by
0
Rene
Top achievements
Rank 1
answered on 08 Apr 2015, 12:33 PM
Edit: you can find the "error" in the attachments
0
Danail Vasilev
Telerik team
answered on 09 Apr 2015, 11:43 AM
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.

 
Tags
Chart (HTML5)
Asked by
Rene
Top achievements
Rank 1
Answers by
Rene
Top achievements
Rank 1
Danail Vasilev
Telerik team
Share this question
or