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

Invalid property or field - 'TimeStamp' for type: Double

11 Answers 200 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Ryan Overton
Top achievements
Rank 2
Ryan Overton asked on 21 Apr 2010, 09:22 PM
I am using RadControls for WPF build 2010.1.416.35. I have a radchart and define the SeriesMappings in XAML and when it tries to render the XAML below in VS2008 or Blend 3 I get the error "Invalid property or field - 'TimeStamp' for type: Double" in design view.
<telerik:RadChart x:Name="hydroChart" Margin="8,34,0,0" ItemsSource="{Binding DataPoints, Mode=TwoWay}" HorizontalAlignment="Left" VerticalAlignment="Top" 
                          telerik:Theming.Theme="Summer">  
            <telerik:PointMark Size="1">  
                  
            </telerik:PointMark> 
            <telerik:RadChart.SamplingSettings> 
                <telerik:SamplingSettings SamplingFunction="KeepExtremes" SamplingThreshold="50"/>  
            </telerik:RadChart.SamplingSettings> 
            <telerik:RadChart.AnimationSettings> 
                <telerikChart:AnimationSettings ItemAnimationDuration="00:00:00" ItemDelay="00:00:00" DefaultSeriesDelay="00:00:00"/>  
            </telerik:RadChart.AnimationSettings> 
            <telerik:RadChart.DefaultView> 
                <telerik:ChartDefaultView>                    
                    <telerik:ChartDefaultView.ChartArea> 
                        <telerik:ChartArea NoDataString="No Data....." LegendName="chartLegend">  
                            <telerikChart:ChartArea.AdditionalYAxes> 
                                <telerikChart:AxisY AutoRange="False" AxisName="TEMPER" DefaultLabelFormat="#VAL F" MaxValue="110" MinValue="50" Step="20" Title="Temperature in F"/>  
                            </telerikChart:ChartArea.AdditionalYAxes> 
                            <telerikChart:ChartArea.AxisY> 
                                <telerikChart:AxisY AutoRange="False" MinValue="0" MaxValue="25000" Step="1000" Title="PSI" AxisName="PSI"/>  
                            </telerikChart:ChartArea.AxisY> 
                            <telerik:ChartArea.AxisX> 
                                <telerik:AxisX LabelRotationAngle="90" LabelStep="2" Title="Time" IsDateTime="True" DefaultLabelFormat="#VAL{hh:mm:ss}"/>  
                            </telerik:ChartArea.AxisX>                              
                        </telerik:ChartArea>                                
                    </telerik:ChartDefaultView.ChartArea>                      
                    <telerik:ChartDefaultView.ChartLegend> 
                        <telerik:ChartLegend x:Name="chartLegend" Header="In-Process Hydro" UseAutoGeneratedItems="True" ></telerik:ChartLegend> 
                    </telerik:ChartDefaultView.ChartLegend> 
                </telerik:ChartDefaultView> 
            </telerik:RadChart.DefaultView> 
            <telerik:RadChart.SeriesMappings> 
                <telerik:SeriesMappingCollection> 
                    <telerik:SeriesMapping LegendLabel="Inlet PSI">   
                        <telerik:SeriesMapping.SeriesDefinition> 
                            <telerik:LineSeriesDefinition AxisName="PSI" ShowItemLabels="False" ShowItemToolTips="True" 
                                                          PointMarkItemStyle="{StaticResource PointMarkStyle}">  
                                  
                            </telerik:LineSeriesDefinition> 
                        </telerik:SeriesMapping.SeriesDefinition> 
                        <telerik:SeriesMapping.ItemMappings> 
                            <telerik:ItemMapping DataPointMember="XValue" FieldName="TimeStamp" FieldType="sys:DateTime"/>  
                            <telerik:ItemMapping DataPointMember="YValue" FieldName="InletPressure"  /> 
                        </telerik:SeriesMapping.ItemMappings> 
                    </telerik:SeriesMapping> 
                    <telerik:SeriesMapping LegendLabel="Outlet PSI">  
                        <telerik:SeriesMapping.SeriesDefinition> 
                            <telerik:LineSeriesDefinition AxisName="PSI" ShowItemLabels="False" ShowItemToolTips="True" 
                                                          PointMarkItemStyle="{StaticResource PointMarkStyle}"/>  
                        </telerik:SeriesMapping.SeriesDefinition> 
                        <telerik:SeriesMapping.ItemMappings> 
                            <telerik:ItemMapping DataPointMember="XValue" FieldName="TimeStamp" FieldType="sys:DateTime"/>  
                            <telerik:ItemMapping DataPointMember="YValue" FieldName="OutletPressure" /> 
                        </telerik:SeriesMapping.ItemMappings> 
                    </telerik:SeriesMapping>      
                    <telerik:SeriesMapping LegendLabel="Ambient Temp">  
                        <telerik:SeriesMapping.SeriesDefinition> 
                            <telerik:LineSeriesDefinition AxisName="TEMPER" ShowItemLabels="False" ShowItemToolTips="True" 
                                                          PointMarkItemStyle="{StaticResource PointMarkStyle}"/>  
                        </telerik:SeriesMapping.SeriesDefinition> 
                        <telerik:SeriesMapping.ItemMappings> 
                            <telerik:ItemMapping DataPointMember="XValue" FieldName="TimeStamp" FieldType="sys:DateTime"/>  
                            <telerik:ItemMapping DataPointMember="YValue" FieldName="NewAmbientTemp" /> 
                        </telerik:SeriesMapping.ItemMappings> 
                    </telerik:SeriesMapping> 
                    <telerik:SeriesMapping LegendLabel="Fluid Temp In">  
                        <telerik:SeriesMapping.SeriesDefinition> 
                            <telerik:LineSeriesDefinition AxisName="TEMPER" ShowItemLabels="False" ShowItemToolTips="True" 
                                                          PointMarkItemStyle="{StaticResource PointMarkStyle}"/>  
                        </telerik:SeriesMapping.SeriesDefinition> 
                        <telerik:SeriesMapping.ItemMappings> 
                            <telerik:ItemMapping DataPointMember="XValue" FieldName="TimeStamp" FieldType="sys:DateTime"/>  
                            <telerik:ItemMapping DataPointMember="YValue" FieldName="NewFluidTempIn" /> 
                        </telerik:SeriesMapping.ItemMappings> 
                    </telerik:SeriesMapping> 
                    <telerik:SeriesMapping LegendLabel="Fluid Temp Out">  
                        <telerik:SeriesMapping.SeriesDefinition> 
                            <telerik:LineSeriesDefinition AxisName="TEMPER" ShowItemLabels="False" ShowItemToolTips="True" 
                                                          PointMarkItemStyle="{StaticResource PointMarkStyle}"/>  
                        </telerik:SeriesMapping.SeriesDefinition> 
                        <telerik:SeriesMapping.ItemMappings> 
                            <telerik:ItemMapping DataPointMember="XValue" FieldName="TimeStamp" FieldType="sys:DateTime"/>  
                            <telerik:ItemMapping DataPointMember="YValue" FieldName="NewFluidTempOut" /> 
                        </telerik:SeriesMapping.ItemMappings> 
                    </telerik:SeriesMapping> 
                </telerik:SeriesMappingCollection> 
            </telerik:RadChart.SeriesMappings> 
            <telerik:RadChart.DefaultSeriesDefinition> 
                <telerik:LineSeriesDefinition LegendDisplayMode="SeriesLabel" ShowItemLabels="False" ShowItemToolTips="True"/>  
            </telerik:RadChart.DefaultSeriesDefinition> 
        </telerik:RadChart> 

But when I only have 1 SeriesMapping everything works as expected. Is this a known bug, or am I missing something?

 Everything compiles fine, and when I run the program it renders properly. Any help is appreciated.

Thanks,
Ryan

11 Answers, 1 is accepted

Sort by
0
Ves
Telerik team
answered on 26 Apr 2010, 04:05 PM
Hello Ryan,

I was able to reproduce the problem. I have notified our developers of it, so they will investigate it. I have also updated your Telerik points. Please, accept our apologies for the inconvenience.


Sincerely,
Ves
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
NETMaster
Top achievements
Rank 1
answered on 25 May 2010, 03:49 AM
This exact same problem occurs in Silverlight 4/VS2010 and Expression Blend 4!  It makes it very difficult to develop XAML! 
0
Ves
Telerik team
answered on 27 May 2010, 04:56 PM
Hello Neil,

I just took Ryan's markup, put it in a user control, added an empty Style object to container's resources for PointMarkStyle and it worked correctly for me - SL4, VS2010, with both latest official assemblies - 2010 Q1 SP1 - 2010.1.422.1040 and latest internal build - 2010.1.521.1040. Can you please, provide more details or an example, which reproduces it? Thanks.

Best regards,
Ves
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
NETMaster
Top achievements
Rank 1
answered on 08 Jun 2010, 04:44 AM

 

 

 

This fails in both VS2010 and in Expression Blend 4.0 RTM with error "Invalid property or field - 'Time' for type: Double" (Silverlight 4.0)

 

<UserControl
 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
 xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
 xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
 mc:Ignorable="d"
 x:Class="SilverlightControlLibrary1.MainControl"
 d:DesignWidth="640" d:DesignHeight="480">

 <Grid x:Name="LayoutRoot" Background="White">
                     <telerik:RadChart Name="chartMemory" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                        <telerik:RadChart.DefaultSeriesDefinition>
                           <telerik:LineSeriesDefinition ShowPointMarks="False"
                                                         ShowItemLabels="False"
                                                         AxisName="MEM" />
                        </telerik:RadChart.DefaultSeriesDefinition>
                        <telerik:RadChart.DefaultView>
                           <telerik:ChartDefaultView>
                              <telerik:ChartDefaultView.ChartTitle>
                                 <telerik:ChartTitle Content="Memory Usage"
                                                     HorizontalAlignment="Stretch" />
                              </telerik:ChartDefaultView.ChartTitle>
                              <telerik:ChartDefaultView.ChartLegend>
                                 <telerik:ChartLegend Name="legendVirtualMemory"
                                                      Header="Legend" />
                              </telerik:ChartDefaultView.ChartLegend>
                              <telerik:ChartDefaultView.ChartArea>
                                 <telerik:ChartArea EnableAnimations="False"
                                                    NoDataString="Waiting for data..."
                                                    LegendName="legendVirtualMemory">
                                    <telerik:ChartArea.AxisX>
                                       <telerik:AxisX Title="Time"
                                                      AutoRange="False"
                                                      LayoutMode="Normal"
                                                      LabelRotationAngle="90"
                                                      DefaultLabelFormat="#VAL{HH:mm:ss}" />
                                    </telerik:ChartArea.AxisX>
                                    <telerik:ChartArea.AxisY>
                                       <telerik:AxisY Title="Memory Usage in MB"
                                                      AutoRange="False"
                                                      AxisName="MEM"
                                                      MinValue="100"
                                                      DefaultLabelFormat="#VAL{N0} MB" />
                                    </telerik:ChartArea.AxisY>
                                 </telerik:ChartArea>
                              </telerik:ChartDefaultView.ChartArea>
                           </telerik:ChartDefaultView>
                        </telerik:RadChart.DefaultView>
                        <telerik:RadChart.SeriesMappings>
                           <telerik:SeriesMapping LegendLabel="Virtual Memory">
                              <telerik:SeriesMapping.SeriesDefinition>
                                 <telerik:LineSeriesDefinition AxisName="MEM"
                                                               ShowItemLabels="False"
                                                               ShowPointMarks="False" />
                              </telerik:SeriesMapping.SeriesDefinition>
                              <telerik:SeriesMapping.ItemMappings>
                                 <telerik:ItemMapping DataPointMember="XValue"
                                                      FieldName="Time" />
                                 <telerik:ItemMapping DataPointMember="YValue"
                                                      FieldName="VMUsage" />
                              </telerik:SeriesMapping.ItemMappings>
                           </telerik:SeriesMapping>
                           <telerik:SeriesMapping LegendLabel="Memory">
                              <telerik:SeriesMapping.SeriesDefinition>
                                 <telerik:LineSeriesDefinition AxisName="MEM"
                                                               ShowItemLabels="False"
                                                               ShowPointMarks="False" />
                              </telerik:SeriesMapping.SeriesDefinition>
                              <telerik:SeriesMapping.ItemMappings>
                                 <telerik:ItemMapping DataPointMember="XValue"
                                                      FieldName="Time" />
                                 <telerik:ItemMapping DataPointMember="YValue"
                                                      FieldName="MemUsage" />
                              </telerik:SeriesMapping.ItemMappings>
                           </telerik:SeriesMapping>
                        </telerik:RadChart.SeriesMappings>
                     </telerik:RadChart>
  
 </Grid>
</UserControl>

0
Velin
Telerik team
answered on 10 Jun 2010, 03:13 PM
Hi Neil,

Please, find the attached example containing similar(in fact lightweight) version of your code.
When you are using the Chart axes with AutoRange = false you must provide a custom axis range using the MinValue, MaxValue and Step properties. 

Hope this helps.

All the best,
Velin
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
NETMaster
Top achievements
Rank 1
answered on 10 Jun 2010, 04:08 PM
I do when the page is initialized, but the chart should never cause an exception at design time!:

 

 

if (!chartInitialized)

 

{

 

 

int tvirt = virtualmemorylimit / 1024 + 199;

 

SetUpRadChart (

 

Math.Floor ((double)(tvirt - tvirt % 100)));

 

chartInitialized =

 

true;

 

}

SetUpAxisXRange (timestamp.ToLocalTime (), memorySpan);

chartMemory.ItemsSource =

 

null;

 

chartMemory.ItemsSource = cpuData;

}

 

 

private const int queueCapacity = 12 * 60 * 25;

 

 

 

private Queue<SystemLoadInfo> cpuData = new Queue<SystemLoadInfo> (queueCapacity);

 

 

 

private void SetUpRadChart (double maxY)

 

{

SetUpPrimaryYAxis (maxY);

}

 

 

private void SetUpPrimaryYAxis (double maxY)

 

{

chartMemory.DefaultView.ChartArea.AxisY.MaxValue = maxY;

chartMemory.DefaultView.ChartArea.AxisY.Step = maxY > 1600 ? 200 : maxY > 800 ? 100 : 50;

}

 

 

private void SetUpAxisXRange (DateTime now, MemorySpan span)

 

{

now =

 

new DateTime (now.Year, now.Month, now.Day, now.Hour, now.Minute, now.Second - now.Second % 10);

 

chartMemory.DefaultView.ChartArea.AxisX.MaxValue = now.ToOADate ();

ChangeAxisXRange (span);

}

 

 

public void ChangeAxisXRange (MemorySpan span)

 

{

 

 

int secondsinspan = span.Minutes * 60;

 

 

 

DateTime now = DateTime.FromOADate (chartMemory.DefaultView.ChartArea.AxisX.MaxValue);

 

chartMemory.DefaultView.ChartArea.AxisX.MinValue = now.AddSeconds (-secondsinspan).ToOADate ();

chartMemory.DefaultView.ChartArea.AxisX.Step = span.Step / 24.0 / 3600.0;

chartMemory.DefaultView.ChartArea.AxisX.LabelStep = span.LabelStep;

}

0
Velin
Telerik team
answered on 15 Jun 2010, 04:45 PM
Hello Neil,

Could you please verify that you are using at least Q1.SP1(released on 22.04.2010) version of the control?

Best wishes,
Velin
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
NETMaster
Top achievements
Rank 1
answered on 15 Jun 2010, 10:17 PM
Q1 SP2
0
Velin
Telerik team
answered on 18 Jun 2010, 04:13 PM
Hello Neil,

This issue does not reproduce on our end. I copied the xaml code as is in a newly created Silverlight 4 application using Q1.SP2 version of the controls and the VisualStudio 2010 designer loaded just fine and without the error you reported.

Could you please send us a complete sample application which to investigate further.

All the best,
Velin
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Nick
Top achievements
Rank 1
answered on 01 Sep 2010, 10:50 PM
Hi there,

I seem to be suffering from the same problem.  I had a look through you PITS and found issue ID 1940, but it had been marked as deleted.  (Not sure why?)  The comment noted that "the markup is available in ticket #302697".  I'm not too sure what that means but I know I'm having the same issue in WPF as was originally described by Ryan.

As a work-around, I comment out my extra <telerik:SeriesMapping>'s while working in design mode and then uncomment them before building.  Not the best though.

I am using version 2010.2.812.40.

Cheers,

Nick Barrett
0
Velin
Telerik team
answered on 07 Sep 2010, 12:09 PM
Hello Nick,

The pits issue has been removed as we have not been able to reproduce the issue since 2010 Q1 SP1 and unfortunately we have not received enough information to reproduce it ever since. Please, open a support ticket and provide the necessary information in order to be able to reproduce the issue on our end and fix it. Thanks.

Best wishes,
Ryan
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Chart
Asked by
Ryan Overton
Top achievements
Rank 2
Answers by
Ves
Telerik team
NETMaster
Top achievements
Rank 1
Velin
Telerik team
Nick
Top achievements
Rank 1
Share this question
or