We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Dynamic chart gridview

Thread ID:

Created:

Updated:

Platform:

Replies:

115913 Feb 25,2014 03:46 AM Mar 2,2014 10:33 PM WinRT 2
loading
Tags: Chart
Klemen Ošlaj
Asked On February 25, 2014 03:46 AM

I use gridview to show multiply charts. Everything works just fine now. As long as all charts are the same. But if I wish realy dinamyc charts I have one huge problem.

For an example...there is no need, that axisX will always be DateTime. It can somethimes be Numerical, or Category. Is there any possible way to achieve this?

My current XAML code:
<GridView
       x:Name="resultsGridView"
       AutomationProperties.AutomationId="ResultsGridView"
       TabIndex="1"
       SelectionMode="Multiple"
       IsSwipeEnabled="True"
       IsItemClickEnabled="True"
       Grid.Row="1"
       ItemClick="resultsGridView_ItemClick"
       ItemsSource="{Binding List}">
       <GridView.ItemTemplate>
           <DataTemplate>
               <Charts:SfChart>
                   <Charts:SfChart.PrimaryAxis>
                       <Charts:DateTimeAxis/>  //HERE -> Is possible to make this somehow dynamic?
                   </Charts:SfChart.PrimaryAxis>
                   <Charts:SfChart.SecondaryAxis>
                       <Charts:NumericalAxis/>
                   </Charts:SfChart.SecondaryAxis>
                   <Charts:ColumnSeries
                       ItemsSource="{Binding dataList}"
                       XBindingPath="TimeStamp"
                       YBindingPath="NoOfUsers">
                   </Charts:ColumnSeries>
               </Charts:SfChart >
           </DataTemplate>
       </GridView.ItemTemplate>
   </GridView>

Klemen Ošlaj
Replied On February 25, 2014 05:11 AM

Ok, I managed to do this:

class listOfCharts
    {
        public listOfCharts(String id, String name, String type, ObservableCollection<chartsInput> data)
        {
            this.Id = id;
            this.dataList = data; 
            this.primaryAxis = new DateTimeAxis();
            this.secundaryAxis = new NumericalAxis();
        }

        public string Id { get; private set; }
        public ObservableCollection<chartsInput> dataList { get; private set; }
        public dynamic primaryAxis { get; private set; }
        public dynamic secundaryAxis { get; private set; }
    }

<Charts:SfChart PrimaryAxis="{Binding primaryAxis}" SecondaryAxis="{Binding secundaryAxis}" />

But now, how can I choose proper series? For an example ColumnSeries.
And also, when to other page and return back on this page, application crashes(global::System.Diagnostics.Debugger.Break()). I dont know why.

Attachment: sync_2375c68a.zip

Karthikeyan V [Syncfusion]
Replied On March 2, 2014 10:33 PM

Hi Klemen,

Thank you for your products,

We have analysed the reported issue with your sample. But we are unable to reproduce issue. Could you please give more information along with replication procedure? This would be helpful for us to serve you.

Thanks,

Karthikeyan V.


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;