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

Grid in RadChart

7 Answers 139 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Natália
Top achievements
Rank 1
Natália asked on 18 Jun 2010, 12:44 PM
Hello

I wonder if there is any way to create a table of data in the chart created by the control RadChart.
As if the table was part of the graph, and export the chart table to be exported too.

Thanks ...

7 Answers, 1 is accepted

Sort by
0
Giuseppe
Telerik team
answered on 22 Jun 2010, 05:44 PM
Hello Natália,

Unfortunately the Silverlight version of the chart control does not have built-in support for DataTable and it would not be possible to achieve the desired effect at the moment. 


Greetings,
Freddie
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
Natália
Top achievements
Rank 1
answered on 29 Jun 2010, 06:23 PM
 
0
Natália
Top achievements
Rank 1
answered on 06 Jul 2010, 01:49 PM
Hello,

Thanks for the reply.
Is there any way I can do this using the Telerik controls?
Or have any estimate of when it might be done?
This functionality is very important to me, I need to insert a table of data for the chart.

Thanks ...
0
Giuseppe
Telerik team
answered on 08 Jul 2010, 01:14 PM
Hi Natália,

You can place RadGridView under the RadChart instance and export them together like this:

XAML
<Grid x:Name="LayoutRoot" Background="White">
 
    <StackPanel>
        <Button Height="20" Content="Export" Click="Button_Click" />
 
        <StackPanel x:Name="PanelWrapper">
            <telerik:RadChart x:Name="RadChart1" />
            <telerik:RadGridView x:Name="RadGridView1" />
        </StackPanel>
    </StackPanel>
         
</Grid>

C#
public MainPage()
{
    InitializeComponent();
 
    RadChart1.ItemsSource = new int[] { 1, 2, 3 };
    RadGridView1.ItemsSource = new int[] { 1, 2, 3 };
}
 
private void Button_Click(object sender, RoutedEventArgs e)
{
    SaveFileDialog sfd = new SaveFileDialog();
 
    if (sfd.ShowDialog() == true)
    {
        using (Stream stream = sfd.OpenFile())
        {
            Telerik.Windows.Media.Imaging.ExportExtensions.ExportToImage(PanelWrapper, stream, new Telerik.Windows.Media.Imaging.PngBitmapEncoder());
        }
    }
}
}



Greetings,
Freddie
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
Amy
Top achievements
Rank 1
answered on 14 Mar 2011, 02:43 PM
Hi there,

I am having problems adding both a RadChart and a RadGridView to the same XAML page.  I have tried the simple example below, but I receive the following error message...


Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3; .NET4.0C; .NET4.0E)
Timestamp: Mon, 14 Mar 2011 13:29:25 UTC

Message: Unhandled Error in Silverlight Application [Parser_CreateInstance_ConstructorInvocation]
Arguments: Telerik.Windows.Controls.RadGridView
Debugging resource strings are unavailable. Often the key and arguments provide sufficient information to diagnose the problem. See http://go.microsoft.com/fwlink/?linkid=106663&Version=4.0.51204.0&File=System.Windows.dll&Key=Parser_CreateInstance_ConstructorInvocation [Line: 14 Position: 45]   at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
   at ERP.SLF.RollingBacklog.MainPage.InitializeComponent()
   at ERP.SLF.RollingBacklog.MainPage..ctor()
   at ERP.SLF.RollingBacklog.App.Application_Startup(Object sender, StartupEventArgs e)
   at MS.Internal.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args)
   at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName)
Line: 1
Char: 1
Code: 0
URI: http://Dashboard/Pages/FinanceDashboard.aspx


Are you able to tell me what I am missing?

Thanks,
Amy

0
Giuseppe
Telerik team
answered on 17 Mar 2011, 12:11 PM
Hi Amy,

We are unaware of any problems in scenarios integrating RadChart and RadGridView controls (you can check one such example here).

Make sure you are referencing all necessary assemblies in your application -- the control dependencies are listed here:
  • Telerik.Windows.Controls.dll
  • Telerik.Windows.Data.dll
  • Telerik.Windows.Controls.Input.dll
  • Telerik.Windows.Controls.Charting.dll
  • Telerik.Windows.Controls.GridView.dll

Hope this helps.


All the best,
Giuseppe
the Telerik team
0
Amy
Top achievements
Rank 1
answered on 17 Mar 2011, 02:45 PM
Thank you for taking the time to respond.  I tested the same scenario in a new project and was successful.  It must have been an error on my part.

Thanks again,
Amy
Tags
Chart
Asked by
Natália
Top achievements
Rank 1
Answers by
Giuseppe
Telerik team
Natália
Top achievements
Rank 1
Amy
Top achievements
Rank 1
Share this question
or