Quantcast
Channel: OxyPlot (moved to GitHub)
Viewing all articles
Browse latest Browse all 2061

Closed Unassigned: [Suggestion] LabelFormatString with escape sequences [10124]

$
0
0
A little something I found useful. I'm making a line chart, and I need multi-line labels above the points, but there's no clean way to add a newline character to the LabelFormatString, other than creating a property on the data object with one...

So, my alternative... A little tweak to your StringHelper. Right after the match delegate checks for digits:

if (property.Length > 0 && property[0] == '\\')
return Regex.Unescape(property);

And now my XAML looks like this:

LabelFormatString="{}{Name}{\n}{1:0.00%}"
Comments: Use standard XAML escape codes http://msdn.microsoft.com/en-us/library/ms748250(v=vs.110).aspx

Viewing all articles
Browse latest Browse all 2061

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>