Share via


Please rate your dining experience [How to: Show text labels on a numeric axis with Silverlight/WPF Toolkit Charting]

**

This blog has moved to a new location and comments have been disabled.

All old posts, new posts, and comments can be found on The blog of dlaa.me.

See you there!

Comments

  • Anonymous
    June 02, 2010
    Nice sample, I think there aren't enough good samples on the web about the charting controls. Just a quick observation, why do you have so many nested if statements, why not just use a switch statement?

  • Anonymous
    June 03, 2010
    Quinton, Thanks! You may not be aware that I maintain a list of a bunch of useful Toolkit Charting resources - the latest copy can always be found at http://cesso.org/r/DVLinks. Please have a look there - many of the common scenarios are covered by linked blogs written by various folks. Regarding the if structure above, I'd normally use a switch as you suggest, but for some reason I felt "iffy" when I was coding this up. :) No good reason, sorry about that! Aside: I wouldn't actually call this "nested" if statements because it's using "else if" rather than embedding a new "if" in the "else" of the previous one - but I get your point. :)

  • Anonymous
    June 03, 2010
    Thanks for the link, definately going to use it to get acquianted with the charting controls in the toolkit! And yes, you are correct, it's definately not a nested if, my bad, haha.

  • Anonymous
    July 29, 2010
    Thanks a lot for the .Net 4 version of the charting toolkit. I'm using it intensively. I have a question about the dll: Is it compiled for "x86", "x64" or "Any CPU"? I ask that because I can't run on one of those "cool and super-fast" Windows 7 x64 machine the app I've compiled on my "Not so old but already vintage" x32 XP Pro machine with the Any CPU flag.

  • Anonymous
    July 29, 2010
    Jacques, I compile for "Any CPU" which means that the Data Visualization assembly should automatically match the application that loads it. If that application is x86, then the process and DataVis will be x86 - if x64, then all will be x64 - if Any CPU, then it will match the host machine architecture. Basically, if you can get the application to run, then adding a reference to the Data Visualization assembly and using the charts should not cause any problems or break anything.

  • Anonymous
    July 29, 2010
    I was sure about the quality of your job :) I guess that the problem is on my side: long-long nights in perspective !!!! Thanks for your super fast answer . .

  • Anonymous
    December 27, 2010
    Exactly what I was looking for.  I’m coding a chart that calls for displaying points against a left dependent Y axis in minutes per mile (5:00, 6:00, 7:00, etc.).  The values are represented internally as seconds (per mile), and I was surprised that it turned out to be non-trivial in WPF.  I used a value converter to get from the data object to scalar points on the Y, but then the XAML left me hanging for formatting the custom text on the labels.  Your solution plugged in nicely, and the labels as desired.  Thanks so much!