Windows Phone 7 Charting/Graphing Controls - silverlight

We're working on a Windows Phone 7 prototype application and we need a Graphing/Charting control to work with. We looked at the Silverlight Toolkit, which has some controls that look like they would work great. However, we can't get that to work. Whenever we add a control to the XAML from that toolkit, it will throw an exception when trying to load the XAML at runtime, even though it appears to work in the designer. I think that it's because there's some dependencies that the phone doesn't actually support.
Does anyone know how to fix the problem or know of charting software that works on Windows Phone 7?
Here's an example of code that doesn't work. We downloaded and installed the 4.0 beta of Silverlight Toolkit. Added the DLL as a reference. Added this to import the namespace:
xmlns:c="clr-namespace:System.Windows.Controls.DataVisualization.Charting;assembly=System.Windows.Controls.DataVisualization.Toolkit"`
then added this to make a chart:
<c:Chart>
<c:PieSeries>
<c:PieSeries.ItemsSource>
<l:IntList>
<sys:Int32>23</sys:Int32>
<sys:Int32>2</sys:Int32>
<sys:Int32>1</sys:Int32>
<sys:Int32>34</sys:Int32>
</l:IntList>
</c:PieSeries.ItemsSource>
</c:PieSeries>
</c:Chart>
the designer shows the pie perfectly, however when I try to compile and deploy it throws an exception saying that it can't find the MainPage.xaml. Which leads me to believe that MainPage.xaml isn't compilign correctly (not sure, as I'm still a newbie at Silverlight)
Here's the exception:
System.Windows.Markup.XamlParseException occurred
Message=2255 An error has occurred. [Line: 36 Position: 2]
LineNumber=36
LinePosition=2
StackTrace:
...
on this line:
System.Windows.Application.LoadComponent(this, new System.Uri("/Twitpic;component/MainPage.xaml", System.UriKind.Relative));

You can probably reuse some of the things provided by the silverlight toolkit, which is open source:
http://silverlight.codeplex.com/Wikipage
You might have to recompile some stuff against the win phone APIs, but it should work :-)

It looks like someone else has had the same issue as you and solved it by using the Silverlight Toolkit version 3
http://silverlightfeeds.com/post/2502/Windows_Phone_7_RTM_charting_using_the_Silverlight_Control_Toolkit.aspx

Just found these free WP7 charts: amCharts for Windows Phone 7

If you are looking for great charting on WP7, I suggest Visifire. Note that its a commercial offering. Has gesture support too! I've seen very less charting vendors who've optimized charting for mobile-form-factor like these guys do.
You can try MS Toolkit, if you are looking for free basic charts.

Playing around more, I was actually able to get Visifire to work. Just had to browse and add the reference to System.Windows.Browser. I don't know if this is the best way to make it work. But it'll do until the Silverlight Toolkit gets updated.

Macadamian team developed and gives for free a Chart Control. You can pick it up at http://themobileexperience.macadamian.com/2010/05/chart-control-for-windows-phone-7.html
Ani

Just a quick plug for my own graph control I recently released to open source:
Check it out, it scales to hundreds of thousands of points and responds to pinch,zoom,translate and tap gestures:
http://touchgraphwp7.codeplex.com/

A couple of options worth a look.
David Anson's blog and thread posting on charting.
Chart Control for Phone
Why didn't I think of that in the first place? [Windows Phone 7 Charting example updated to include reusable, platform-consistent Style and Templates] - Delay's Blog
And a commercial offering.
Silverlight, WPF & WP7 Chart Controls

This one too
http://www.visiblox.com/examples

Related

Coded UI Test for DevExpress Controls does not work

I am going to start work on new project in which i am using DevExpress controls with winform applicaiton.
I want to do Coded UI test for winforms application and DevExpress controls.
I have VS 2010 Ultimate and DevExpress Controls 12.2 version(latest version).
In one of my example, i have created winform with GridControl of DevExpress.XtraGrid. when i create Coded UI test for this Grid Control, It's not working.
I mean it does not support it.
Can anyone give me solution/example/tutorial to do Coded UI for DevExpress controls in winforms.
Thanks !!
Refer: DevExpress Releases DXperience 12.1 with Coded UI Support and this.
Here you will get few videos that help you to understand about grid control and others also.
You can also go through Coded UI Test Extension for 3rd party
controls - the basics explained article of MSDN and documentation Verifying Code by Using Coded User Interface Tests.
More References:
DevExpress 2012 GridControl Coded-ui-tests issue
Ok for starters, ditch VS2010 and upgrade to VS2013 (Including latest update). If you don't do this - stop reading.
Next thing is versioning
To get reliable record and playback you will need to have the exact same version of DevExpess installed on your VS2013 Premium development box that your application under test uses.
So for example, if your app under test uses DevExpress 14.1.8 - INSTALL THAT VERSION in your coded ui dev environment. If you don't get the versioning exactly right - then it simply won't work.
Once you have that setup, create a new coded ui test project, and you should automatically get a DevExpress coded ui extension dll added.
Now fire up your application under test. Inside Visual Studio you will most likely get a sample test method, after creating the project. Set focus somewhere inside the test method, and then start the coded ui recorder. Now you should be able to identify controls and interact with them using the recorder. Save your actions / control identifications off to the UI map using the Generate Code in the recorder.
This should give you a good place to start with. If you really want my help, then you can send me a PM and I can share a lot of information that is beyond the scope of this. I'm on skype too and have made a lot of progress in the time I've spent specifically testing DevExpress based WinForms.
I can also share with you some helpful wrapped controls that wrap stuff like DXGrid to make your life tons easier.

stacked bar chart in wpf toolkit

can someone guide me on developing stacked bar chart in WPF toolkit. i tried that but didn't find a ready to go solution for this.
or is there any reference for developing a custom control to server the purpose of a stacked bar chart.
thanks
David Anson had a nice blog series on the WPF tool kit and charts, this one discusses the stack bars and should provide a good starting point.
This was a confusing topic to me for a day or so.
David Anson created some cool stacking charts for the Silverlight Toolkit Data Visualization library. The confusing part to me (as a WPF newbie) was that they were not present in the WPF Toolkit Data Visualization library.
In general, the goal seems to be to align the Silverlight Toolkit and the WPF Toolkit. Unfortunately, the current official version of the WPF Toolkit is from early 2010. The stacking charts in the Silverlight Toolkit were released around the same time and so the toolkits have not yet been aligned..
Clear as mud? David Anson was nice enough to provide the WPF source and binaries for the developer version of this toolkit. So, while not officially released, you can still get stacking charts with little effort.
The second problem I had was that once I had this binary referenced, my code compiled correctly but XAML UI designer couldn't recognize any of the new controls and barfed constantly. I resolved this by re-building the developer version of the toolkit to generate .pdb files.
Seems to be that the latest published version of the WPF Toolkit is 3.5 or 3.5.5, depending on where you get it from.
The stacked charts are only available in version 4 of the toolkit, which is available for Silverlight, but not officially for WPF.
If you'll head to this post, you can download the examples he uses (direct link).
Now, here's the beauty: browse to the "Toolkit -> WPF4" folder, and take the dll you'll find there. This is the version 4 toolkit for WPF, which you can then reference in your project, and have access to the stacked barcharts.
Once you got that up and running, just have a look at the code for the stacked bars examples, and work from there.
(Warning: I'm rather unhappy with those examples, since they relay heavily on code behind, and are not MVVM friendly at all, so I had to work around this a bit. It can be done though)
For people still finding this thread: Stacked100 and Stacked Series for Area, Bar, Column, and Line are available in the 4.0 release of the WPF Toolkit.

Convert Silverlight App to WPF

I need to convert a Silverlight App to WPF (to finally run it on Microsoft Surface 1.0).
I didn't write the original solution and it is quite big. I've never worked with Silverlight and I'm just a little bit familiar with WPF.
Can you offer some advice on completing this project?
Here's my current plan (high level view):
Recreate all Silverlight projects in WPF (User Control in Silverlight = WPF User Control Library ?)
References are not the same so I'll need to make some changes ... I think :)
Hope all controls are compatible with WPF ...
Have I missed something big? Is something wrong? Incomplete?
I'm open to all your suggestions and advice!
Any development tips ?
I recently converted a Silverlight app to WPF. You can find my notes on how I did it here:
http://robertsmyth.blogspot.com.au/2011/12/migrating-from-silverlight-to-wpf.html
Hope it helps you.
"User Control in Silverlight = WPF User Control Library ?" Not exactly.
which version of silverlight do you use? Most difficult issue I have faced while porting WPF to Silverlight was with converters. Silverlight 4.0 or lower doesn't support Ancestor RelativeSource Binding. But supported in Silverlight 5!
Hope this link will help you. WPF and Silverlight 2 Compatibility

Where has Microsoft's WPF/Silverlight Charting gone in .NET 4.0?

Forgive me for being a little naive perhaps, but it seems that System.Windows.Controls.DataVisualization.Charting has vanished from VS2010, and blend 4. I'm trying to make a bar graph with a line overlayed, but can't even get started because I can't find the appropriate controls.
I know I could use an external graphing package, but I'd like to try the inbuilt controls first.
You mention Blend so I assume that you are refering to the WPF/Silverlight chart controls.
The System.Windows.Controls.DataVisualization.Charting namespace is part of the WPF Toolkit. You will have to download this toolkit and reference it from your project.
The question has been clarified to indicate it is about WPF controls. The answer below refers to the Winforms and Asp.net chart controls. I'm leaving it here in case other people find it useful.
The original MS Chart controls were never part of the framework. They are an separate project.
You can download them here.
There is also more info on their project page.
There is an addon to the IDE, (here), but it's for VS2008, I don't know if it will work with 2010. I would assume they are going to update it at some point, but there doesn't seem to be any information on when that will happen.
I stand corrected, .Net 4.0 apparently now has built in chart controls. You shouldn't need to install anything. You'll need to make sure you are targeting framework 4.0.

Re: Expander control in silverlight 4

I have installed the latest silverlight toolkit and dragged the expander control onto my design, there is some kind of an error going around with the name spaces, and my intellisense stopped to work after I added the control, following is the xmlns that is added to the application when I dragged the control onto the xaml editor:
xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit"
Can anyone please identify why would this happen?
Thanks
It's been a long time since you posted your question, but in the case you still have the problem, I tell you that I had it too and it was a conflict in versions. In Silverlight 4, controls of the toolkit are integrated to the framework. And your xmlns:toolkit should reference a dll, not a http uri.
My problem was I was using RC version of Blend. So I advise you to check your VS2010, Blend and Silverlight version to make sure they're aligned.
bye

Resources