Custome BarPlots with labels on each bar

Nov 25, 2013 at 8:48 PM
Hi ,

I want to have a barplot as following :

Image

Some bar plots, each having a title on top of it. To do this, I use following code :
Microsoft.Research.DynamicDataDisplay.Charts.RectangleHighlight T = new Microsoft.Research.DynamicDataDisplay.Charts.RectangleHighlight();

Microsoft.Research.DynamicDataDisplay.Charts.ViewportUIContainer Tt = new Microsoft.Research.DynamicDataDisplay.Charts.ViewportUIContainer();

T.Bounds = new Rect(Drawing_Start_X, Drawing_Start_Y, Width, Height);
            T.Fill = new SolidColorBrush(Colors.DodgerBlue);
            T.Stroke = new SolidColorBrush(Colors.Black);
            T.StrokeThickness = Stroke_Thickness;
            Tt.Position = new Point(Drawing_Start, Height);
            Tt.Content = new Label { Content = "Total Peaks", FontSize = 12, FontWeight = FontWeights.Bold, Background = new SolidColorBrush(Colors.White) };
This works fine on a big screen !
When screen size is changes or some zoom-in\out , the Rectangles are fine, but the texts become quite messy (their render size is not changing, so they will be rendered either so big or small regarding the bars). for example :

Image