Using Data Editing in the XamDataChart to implement What-if Analysis functionality

Kiril Matev / Friday, July 2, 2010

Users like to have quantitative data visualized as much as possible, in order to make it easier to understand, compare and discover patterns. In many cases, however, editing data takes your users away from its visual representation, into rather context-poor editing controls. What if you could enable users to edit data right there, while it’s visualized?

The just-released XamDataChart delivers this editing functionality. The XamDataChart is a part of the Data Visualization suite (delivering fast charting, mapping, among others, available for both WPF and Silverlight), which supports out-of-the-box panning, zooming, tooltips, real-time data feeds, financial indicators. This blog post describes how a custom marker template can be used to allow your users to manipulate data within the XamDataChart.

How do I use the editing template?

You can use the editing template by adding two files to your project:

  • Generic.xaml in the Themes folder in the sample project, implements the visual layout of the editing marker
  • MarkerEditor.cs implements the editing behavior

What properties of the editing template can I change?

You can change the Generic.xaml file to change the visual appearance of the editing marker. You can for example, change the data marker used (currently a circle), and the shape of the arrows.

When using the MarkerEditor template in your XamDataChart, you can set the following properties:

  • Increment – Value used as a unit when incrementing or decrementing a bound item property
  • TargetPropertyName – Name of the item property to be incremented or decremented
  • ArrowFill – Brush to be used when painting the arrows
  • ArrowOutline – Brush to be used when painting the outline of the arrows
  • Width, Height – specify the width and height of the editing marker (includes the up and down arrows, together with the data marker itself)


Editing data visually is a powerful capability that you can incorporate in your data visualization scenarios. Using visual data editing, you can turn screens full of static data into powerful facilities for what-if analysis, to enable your users to explore the effect of variables on key metrics.

Talk to your users about where they’d like to see what-if analysis, and take advantage of visual data editing to help them be more effective at what they do.

If you have any questions, do not hesitate to email me at