Пример #1
0
        public Strength()
        {
            lineSeries2.PointStyle = new EllipsePointStyle()
            {
            };
            axisX.MinUnit = 600000;

            BorderThickness = new Thickness(1);
            BorderBrush     = Brushes.Black;

            chart.IntersectChanged += Chart_IntersectChanged;

            chart.Offsets = new PaddingOffset(50, 20, 20, 20);

            axisX.IsInterregional = false;

            chart.AddAsixY(axisY);
            chart.AddAsixY(axisY2);
            chart.AddAsixX(axisX);

            chart.AddSeries(lineSeries);
            chart.AddSeries(lineSeries2);
            chart.AddSeries(lineSeries3);
            chart.AddSeries(lineSeries4);

            DrawingCanvas.AddChild(chart);
            DrawingCanvas.DataSource = chart.DataSource;
            IsVisibleChanged        += ChartItem_IsVisibleChanged;

            DockPanel dock  = new DockPanel();
            DockPanel title = new DockPanel();

            title.VerticalAlignment = VerticalAlignment.Center;
            title.AddChild(new TextBlock()
            {
                Text = "强弱评级"
            }, Dock.Left);
            title.AddChild(text1, Dock.Left);
            text2.Margin = new Thickness(10, 0, 0, 0);
            title.AddChild(text2, Dock.Right);
            dock.AddChild(title, Dock.Top);
            dock.AddChild(DrawingCanvasArea, Dock.Top);

            Content = dock;

            SizeChanged += Strength_SizeChanged;
        }