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

One line instead of 2 ......

5 Answers 39 Views
Chart
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Marco
Top achievements
Rank 1
Marco asked on 13 Apr 2014, 01:28 PM
Part of my c# source : (EnGe and EnEf are arrays of double's)

        public class ChartDataClass
        {
            public double XValue { get; set; }
            public double YValue { get; set; }
        }

        private void avoiddispatcher()
        {
            var chartDatas = new List<ChartDataClass>();
            var chartDatas2 = new List<ChartDataClass>();

            for (int i = 0; i < count; i++)
            {
                var cdc = new ChartDataClass();
                cdc.XValue = i;
                cdc.YValue = EnGe[i];
                chartDatas.Add(cdc);

                var cdc2 = new ChartDataClass();
                cdc2.XValue = i;
                cdc2.YValue = EnEf[i];
                chartDatas2.Add(cdc2);

            }
            chart1.Series[0].ItemsSource = chartDatas; 
            chart1.Series[1].ItemsSource = chartDatas2;
        }


XAML :

                    <chart:RadCartesianChart x:Name="chart1">
                        <chart:RadCartesianChart.HorizontalAxis>
                          <chart:CategoricalAxis/>
                      </chart:RadCartesianChart.HorizontalAxis>

                      <chart:RadCartesianChart.VerticalAxis>
                          <chart:LinearAxis Title="watt hours"/>
                      </chart:RadCartesianChart.VerticalAxis>
                        
                      <chart:RadCartesianChart.Series>
                            <chart:LineSeries Stroke="Orange" StrokeThickness="1" CategoryBinding="XValue" ValueBinding="YValue"/>
                            <chart:AreaSeries Stroke="Blue" StrokeThickness="1" CategoryBinding="XValue" ValueBinding="YValue" />
                        </chart:RadCartesianChart.Series>
                  </chart:RadCartesianChart>


When executing I get only ONE line in the chart, instead of two .....

(Using the trial-version)

How can I solve this ?
Thanks in advance !

Marco









5 Answers, 1 is accepted

Sort by
0
Victor
Telerik team
answered on 15 Apr 2014, 11:43 AM
Hi Marco,

Please have a look at the attached app.
It renders both series correctly.
There must be something specific to your app that causes this issue.

Regards,
Victor
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Marco
Top achievements
Rank 1
answered on 15 Apr 2014, 05:43 PM
Viktor, thanks for your reply. Loading your app in VS2013 get me an error :

FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.Shell.11.0, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.

Stack :
at Telerik.Windows.Controls.Design.GaugeGalleryContainer..ctor(Control galleryUI)
   at Telerik.Windows.Controls.Design.DesignTimegalleryAdornerProvider.Activate(ModelItem item) in c:\Builds\303\WindowsPhone\BuildAll_WP8_Fixes\Sources\Design\Gallery\DesignTimeGalleryAdornerProvider.cs:line 42
   at Microsoft.Windows.Design.Interaction.AdornerProvider.InvokeActivate(EditingContext context, ModelItem item)
   at MS.Internal.Features.AdornerProviderFeatureConnector.FeatureProvidersAdded(ModelItem item, IEnumerable`1 extensions)
   at Microsoft.Windows.Design.Policies.PolicyDrivenFeatureConnector`1.OnPolicyItemsChanged(Object sender, PolicyItemsChangedEventArgs e)
   at Microsoft.Windows.Design.Policies.ItemPolicy.OnPolicyItemsChanged(PolicyItemsChangedEventArgs e)
   at Microsoft.Windows.Design.Policies.SelectionPolicy.OnSelectionChanged(Selection newSelection)
   at Microsoft.Windows.Design.ContextItemManager.SubscribeProxy`1.SubscribeContext(ContextItem item)
   at Microsoft.Windows.Design.SubscribeContextCallback.Invoke(ContextItem item)
   at Microsoft.Windows.Design.EditingContext.DefaultContextItemManager.OnItemChanged(ContextItem item)
   at Microsoft.Windows.Design.EditingContext.DefaultContextItemManager.SetValue(ContextItem value)
   at Microsoft.Expression.DesignSurface.ViewModel.Extensibility.ExtensibilityManager.SetSelection(Selection selection)
   at Microsoft.Expression.DesignSurface.ViewModel.Extensibility.ExtensibilityManager.OnViewModelEarlySceneUpdatePhase(Object sender, SceneUpdatePhaseEventArgs args)
   at Microsoft.Expression.DesignSurface.ViewModel.SceneUpdatePhaseEventHandler.Invoke(Object sender, SceneUpdatePhaseEventArgs e)
   at Microsoft.Expression.DesignSurface.ViewModel.SceneViewModel.FireEarlySceneUpdatePhase(SceneUpdatePhaseEventArgs args)
   at Microsoft.Expression.DesignSurface.View.SceneViewUpdateScheduleTask.UpdateEarly()
   at Microsoft.Expression.Utility.Scheduler.ScheduleTask.Update()
   at Microsoft.Expression.Utility.Scheduler.SchedulingService.DispatchTasksAtPriority(DispatcherPriority priority)
   at Microsoft.Expression.Utility.Scheduler.SchedulingService.DispatcherToken.Dispatch(Object arg)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)

What's wrong ?
(yesterday i bought UI For Windows Phone and installed the Q1 2014 (226.3040 DEV)



Greetings,

0
Ivaylo Gergov
Telerik team
answered on 18 Apr 2014, 09:15 AM
Hi,

I am not sure that this error is caused by our controls. We will further investigate this case. About the original question: the only possible reason is that if the series have equal values and they overlap. Could you please send as a project that reproduces this issue?

Regards,
Ivaylo Gergov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Accepted
Ivaylo Gergov
Telerik team
answered on 18 Apr 2014, 09:16 AM
Hi,

I am not sure that this error is caused by our controls. We will further investigate this case. About the original question: the only possible reason should be if the series have equal values and they overlap. Could you please send as a project that reproduces this issue?

Regards,
Ivaylo Gergov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Marco
Top achievements
Rank 1
answered on 21 Apr 2014, 03:17 PM
Solved !

Some values were to small .... :(
Tags
Chart
Asked by
Marco
Top achievements
Rank 1
Answers by
Victor
Telerik team
Marco
Top achievements
Rank 1
Ivaylo Gergov
Telerik team
Share this question
or