Welcome to MSDN Blogs Sign in | Join | Help

Improving ChartBuilder's cultural sensitivity [ChartBuilder app/source updated!]

Kind readers Eugenio and Thimp independently reported that the initial version of ChartBuilder did not work well on machines with certain culture settings. Specifically, ChartBuilder was inadvertently using the CurrentCulture for formatting numbers in XAML and that's a problem because the XAML is parsed according to the InvariantCulture. For example, on German machines ChartBuilder would write a double value to XAML as "1,23" according to the German culture settings - and the XAML parser would complain that wasn't a valid value. I'm usually able to catch problems like this by running code analysis and fixing all the Microsoft.Globalization warnings like CA1305, but in this case the code was calling objectInstance.ToString() which doesn't have any IFormatProvider-based overloads and therefore generates no warnings.

My sincerest apologies to anyone who was affected by this problem. I have switched one of my machines to the German locale and will leave it there for a couple of days as punishment. :)

I made the culture fix on my bus ride this morning and had a bit of extra time, so I also made the following improvements:

  • Added support for the Axis.Interval property. Now it's possible to customize the frequency of the labels, tickmarks, and gridlines on an axis.
  • Added the "datavis" xmlns prefix so it's already present for people who might need to reference it. [Like me when I posted a sample to the forums the other day. :) ]
  • Updated the version to 2008/11/06.

Again, sorry for any trouble. I hope the updated ChartBuilder works well for everyone - and that you enjoy the minor improvements!

 

You can click this text or the image below to run the latest ChartBuilder in your browser.

ChartBuilder

[And click here to download the complete ChartBuilder source code.]

Published Thursday, November 06, 2008 11:17 AM by Delay

Comments

# Delay's Blog : Improving ChartBuilder's cultural sensitivity [ChartBuilder app/source updated!]

# Silverlight Cream for November 07, 2008 -- #422

Friday, November 07, 2008 12:41 PM by Community Blogs

In this issue: David Miles, Shawn Oster, Jeff Weber, Justin Angel, and Nikola Mihaylov. David Anson has

# A Ridiculous List of Silverlight Toolkit Resources

Friday, November 07, 2008 11:35 PM by Shawn Burke's Blog

The Silverlight Toolkit is off to a great start and lots of people have been spending time writing content

# My new home page [A collection of great Silverlight Charting resources!]

Monday, November 10, 2008 11:42 PM by Microsoft Weblogs

It's been nearly two weeks since the Silverlight Toolkit's November release . I've been trying to keep

# re: Improving ChartBuilder's cultural sensitivity [ChartBuilder app/source updated!]

Wednesday, November 19, 2008 1:28 AM by peter.loebel

Great tool. Thanks for sharing the code.

But I have a problem with different types of chart series. It does not work with more then on series.

Is it right?

regards from Switzerland

Peter Loebel

http://www.silverlight-travel.com/blog

# re: Improving ChartBuilder's cultural sensitivity [ChartBuilder app/source updated!]

Wednesday, November 19, 2008 2:28 AM by Delay

Peter,

ChartBuilder - and Charting - supports multiple series on the same chart. I think maybe you're trying to combine two series types that have incompatible axis requirements (ex: Bar and Column). For more information, please have a look at the section in my ChartBuilder introduction where I explain what works with what (it's the first item in the usability section): http://blogs.msdn.com/delay/archive/2008/10/29/click-your-way-to-great-silverlight-charts-live-chartbuilder-sample-and-source-code.aspx.

Hope this helps!

# Silverlight Charting gets a host of improvements [Silverlight Toolkit December 08 release now available!]

Tuesday, December 09, 2008 8:12 PM by Delay's Blog

The December 08 release of the Silverlight Toolkit was published a short while ago. Just about every

# Great Silverlight charts are still just a click away [ChartBuilder sample and source code updated for Charting's December 08 release]

Thursday, December 11, 2008 2:38 AM by Delay's Blog

In yesterday's announcement of the December 08 release of Charting for Silverlight , I outlined some

# My new home page, expanded [Updated collection of great Silverlight Charting resources!]

Friday, February 06, 2009 2:30 AM by Delay's Blog

It's been a couple of months since I shared my semi-comprehensive page of Charting resources on the web

# Tutoriales para Silverlight

Thursday, February 19, 2009 4:10 AM by DotNetClub Complutense Madrid

En el blog de Felix Wang , he encontrado este artículo donde se agrupan una colección de

# Silverlight Charting is faster and better than ever [Silverlight Toolkit March 09 release now available!]

Thursday, March 19, 2009 3:36 AM by Delay's Blog

We've just published the March 09 release of the Silverlight Toolkit and I bet there's something in there

# Silverlight Charting remains just a click away - and runs on WPF, too!! [ChartBuilder sample and source code updated for Charting's March 09 release]

Friday, March 20, 2009 4:15 AM by Delay's Blog

In yesterday's announcement of the March 09 release of the Silverlight Toolkit and Silverlight Charting

# My new home page, extended [Updated collection of great Silverlight and WPF Charting resources!]

Friday, April 24, 2009 8:35 AM by Microsoft Weblogs

It's been a while since the March 09 release of the Silverlight Toolkit - and even longer since I last

Anonymous comments are disabled
 
Page view tracker