One line instead of 2 ......

6 posts, 1 answers
  1. Marco
    Marco avatar
    4 posts
    Member since:
    Apr 2014

    Posted 13 Apr 2014 Link to this post

    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









  2. Victor
    Admin
    Victor avatar
    1351 posts

    Posted 15 Apr 2014 Link to this post

    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.

     
  3. DevCraft banner
  4. Marco
    Marco avatar
    4 posts
    Member since:
    Apr 2014

    Posted 15 Apr 2014 Link to this post

    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,

  5. Ivaylo Gergov
    Admin
    Ivaylo Gergov avatar
    661 posts

    Posted 18 Apr 2014 Link to this post

    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.

     
  6. Answer
    Ivaylo Gergov
    Admin
    Ivaylo Gergov avatar
    661 posts

    Posted 18 Apr 2014 Link to this post

    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.

     
  7. Marco
    Marco avatar
    4 posts
    Member since:
    Apr 2014

    Posted 21 Apr 2014 in reply to Ivaylo Gergov Link to this post

    Solved !

    Some values were to small .... :(
Back to Top
DevCraft banner