This project is read-only.

WPF Legend, and other customization

Nov 6, 2009 at 2:31 PM
Edited Nov 6, 2009 at 2:32 PM


I am trying to decide whether to replace my wpf toolkit charts with the D3 ChartPlotter since I need the extra performance.  In my application I have 43 datasources that I am plotting.  The problem is, with so many datasources on 1 graph the legend becomes quite large.  In the WPF Toolkit chart the legend is beside the actual charting area which works nice for me, and it is also scrollable.  My question is how can I do something similar with this type of chart?  I would like the legend to be beside the chart are, not on top of it.

Another question (sorry):

My current DataSource is an 'ObservableCollection' which is updated asyncronously.  Does the datasource of the graph have to be of type 'ObservableDataSource'?  In order to do that I would have to maintain to different sources or is there a way to use a converter?

So far this seems like a great option, hopefully It will work for me.



Nov 8, 2009 at 6:36 PM

Hi Kevin,

I've created a sample for you with making legend be beside chartPlotter and become scrollable. It is a little bit ugly, but it works - we are developing new legend now, which will support such functionality out-of-box. Sample is called CustomLegendPosition, and will be in Source code page, in the latest (not uploaded yet) changeset, in Nigtly/DynamicDataDisplay.sln/DevSamples solution folder.


The answer for the second question - currently we do not provide a set of converters for making creating dataSource easier. You can use a set of extension methods .AsDataSource(), which becomes available when you have included Microsoft.Reseach.DynamicDataDisplay.DataSources.

Best regards,


Nov 9, 2009 at 3:09 PM


Thanks For your sample and response.  Approximately when will this new version of d3 be released with the new legend?  Also, your sample worked just fine and was what I was looking for, however I couldn't seem to change the Background, Border, or Foreground of the legend.  I read in another discussion you can modify Legend.ContentPanel, but it seems to have no effect.

Side Note:

My company does quite a bit of graphing for engineering data, so I will try to keep you informed on what we think makes a great graphing package (hopefully it will be usefull).  We have wrote our own in the past, but have not yet done so in WPF.  Perhaps we never will need to! 


Nov 13, 2009 at 3:21 PM


Nov 13, 2009 at 6:24 PM

Hi Kevin,

I'i is difficult to me to name precise date, but maybe release can happen in January-February of the next year - I don't want to give unrealizable promises)