Is it possible that we can position the line description in middle or left?

Aug 24, 2009 at 5:54 PM

Right now the line description always show on the top of right.

In our case, the dynamica plot always happen in that corner.

Is it possible that we can position the line descriptions in middle or left?

So the real time plot will not cover by the line descriptions.

thx!

Jane

 

Editor
Aug 24, 2009 at 6:31 PM
Edited Aug 25, 2009 at 8:54 AM

Hi jane,

Control that contains all descriptions is called Legend. Legend is placed on Canvas internally in Plotter.

There are four properties of Legend - LegendLeft, LegendRight, LegendTop and LegendBottom that are simply wrappers of Canvas.Left etc attached properties.

So you can place legend everywhere you want - just change those values. Do not forget that Canvas.Top and Canvas.Left have precedence over Canvas.Right and Canvas.Bottom, so you should clear ( == set to Double.NaN) Canvas.Left or Canvas.Top to make Canvas take Canvas.Bottom aтв Canvas.Right into respect.

Tomorrow there will be a small sample about this.

Also, one of our samples uses custom legend position - it is or CurrencyExchangeSample, or StockExchangeSample, I don't remember exactly without VisualStudio opened) Both these samples are in Samples directory.

 

Regards,

Mikhail.

Editor
Aug 25, 2009 at 8:58 AM

Hi Jane,

Please take a look at LineChartLegendBinding project at DevSamples at Nightly directory of the latest changeset 28547.

There is a button in the bottom, which changes Legend position, so you'll be able to look at the code that is doing this.

 

Best regards,

Mikhail.

Aug 25, 2009 at 5:13 PM

Hi Mikhail,

Thanks for showing us the example. First we thought that we only can put legend in each corner.

When we see the example, you implement more flexable way.

Now we can put graph legends in any position we want. That is a great feature!

Jane