ErrorYPlus/ErrorYMinus fix

A forum dedicated to WPF version of LightningChart Ultimate.

Moderator: Queue Moderators

Post Reply
cwodarczyk82
Posts: 43
Joined: Mon Oct 19, 2015 2:50 am

ErrorYPlus/ErrorYMinus fix

Post by cwodarczyk82 » Fri Feb 26, 2016 10:40 pm

Hi, LightningChartTeam:

With the latest v6.5.7 release, I noticed the release notes said that the ErrorYPlus and ErrorYMinus have been reversed... however, I am noticing this to be only the case for the Linear scale... they still seem reversed on the Logarithmic scale...

I made a small demo project to ensure there wasn't something still messed up on our end... here is how the chart plots with the data when the yAxis.ScaleType is set to Linear:

You can see for instance, the first item is plotted at 2, with the error bar at 1 and goes up to 7.

[img]
Linear.PNG
Linear.PNG (29.74 KiB) Viewed 6481 times
[/img]

When i switch to Logarithmic (setting yAxis.ScaleType = Logarithmic, LogZeroClamp=0.001)

You can see the lower y error isn't at 1 anymore, it looks about how long it was for the other direction in linear mode... and the ErrorYPlus no longer looks like it is around 7, but more around 3 or so....

[img]
Logarithmic.PNG
Logarithmic.PNG (17.55 KiB) Viewed 6481 times
[/img]

Can you please verify this is supposed to work consistently for both modes and if it does?

Here is my code if you want a quick dump of what I did:

C# code

Code: Select all

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Windows;
using System.Windows.Media;
using Arction.Wpf.SemibindableCharting;
using Arction.Wpf.SemibindableCharting.Axes;
using Arction.Wpf.SemibindableCharting.EventMarkers;
using Arction.Wpf.SemibindableCharting.SeriesXY;

namespace Arction
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        private const int c_BarSpacing = 15;
        private const int c_MaxBarSize = 150;

        public MainWindow()
        {
            InitializeComponent();
            Loaded += MainWindowLoaded;
        }

        private void CreateYAxisTicks()
        {
            var view = lightningChartUltimate1.ViewXY;

            var yAxis = view.YAxes[0];
            yAxis.CustomTicksEnabled = true;
            yAxis.AutoFormatLabels = false;
            yAxis.Title.Text = "Income";

            var lineCollection = new LineCollection
            {
                LineStyle = new LineStyle()
                {
                    Color = Color.FromArgb(64, 64, 64, 64),
                    Pattern = LinePattern.Solid,
                    Width = 2,
                },
                Behind = true,
                MouseHighlight = MouseOverHighlight.None,
                MouseInteraction = false,
                ShowInLegendBox = false
            };

            var lineSegments = new List<SegmentLine>();

            var minX = view.XAxes[0].Minimum;
            var maxX = view.XAxes[0].Maximum;

            if (!Logarithmic.IsChecked.GetValueOrDefault())
            {
                yAxis.ScaleType = ScaleType.Linear;
                for (var i = 0; i <= 10; i++)
                {
                    yAxis.CustomTicks.Add(new CustomAxisTick() {AxisValue = i, LabelText = i.ToString()});
                    lineSegments.Add(new SegmentLine(minX, i, maxX, i));
                }
            }
            else
            {
                yAxis.ScaleType = ScaleType.Logarithmic;
                yAxis.LogZeroClamp = 0.001;

                yAxis.CustomTicks.Add(new CustomAxisTick() {AxisValue = 0.001, LabelText = "0.001"});
                yAxis.CustomTicks.Add(new CustomAxisTick() { AxisValue = 0.01, LabelText = "0.01" });
                yAxis.CustomTicks.Add(new CustomAxisTick() { AxisValue = 0.1, LabelText = "0.1" });
                yAxis.CustomTicks.Add(new CustomAxisTick() { AxisValue = 1, LabelText = "1" });
                yAxis.CustomTicks.Add(new CustomAxisTick() { AxisValue = 10, LabelText = "10" });

                lineSegments.Add(new SegmentLine(minX, 0.001, maxX, 0.001));
                lineSegments.Add(new SegmentLine(minX, 0.01, maxX, 0.01));
                lineSegments.Add(new SegmentLine(minX, 0.1, maxX, 0.1));
                lineSegments.Add(new SegmentLine(minX, 1, maxX, 1));
                lineSegments.Add(new SegmentLine(minX, 10, maxX, 10));
            }

            lineCollection.Lines = lineSegments.ToArray();

            view.LineCollections.Add(lineCollection);

            
            yAxis.InvalidateCustomTicks();
        }

        private void CreateXAxisTicks()
        {
            var view = lightningChartUltimate1.ViewXY;

            var xAxis = view.XAxes[0];
            xAxis.CustomTicks.Clear();
            xAxis.CustomTicksEnabled = true;
            xAxis.AutoFormatLabels = false;

            if (LabelOn.IsChecked.GetValueOrDefault())
            {
                xAxis.Title.Text = "       ";
            }
            if (LabelOn.IsChecked.GetValueOrDefault())
            {
                xAxis.Title.Text = "       ";
            }

            var lineCollection = new LineCollection
            {
                LineStyle = new LineStyle()
                {
                    Color = Color.FromArgb(64, 64, 64, 64),
                    Pattern = LinePattern.Solid,
                    Width = 2,
                },
                Behind = true,
                MouseHighlight = MouseOverHighlight.None,
                MouseInteraction = false,
                ShowInLegendBox = false
            };

            var lineSegments = new List<SegmentLine>();

            var yMin = view.YAxes[0].Minimum;
            var yMax = view.YAxes[0].Maximum;

            for (var i = 0; i < 12; i++)
            {
                var xLabel = string.Empty;
                if (LabelOn.IsChecked.GetValueOrDefault())
                {
                    xLabel = "Label";
                }
                if (NumberOn.IsChecked.GetValueOrDefault())
                {
                    xLabel = i.ToString();
                }
                if (LabelOn.IsChecked.GetValueOrDefault() && NumberOn.IsChecked.GetValueOrDefault())
                {
                    xLabel = "Label" + i.ToString();
                }
                xAxis.CustomTicks.Add(new CustomAxisTick() { AxisValue = i, LabelText = xLabel });
                lineSegments.Add(new SegmentLine(i, yMin, i, yMax));
            }

            lineCollection.Lines = lineSegments.ToArray();
            view.LineCollections.Add(lineCollection);
            xAxis.InvalidateCustomTicks();
        }

        private void PlotBarData()
        {
            var view = lightningChartUltimate1.ViewXY;

            view.BarViewOptions.Grouping = BarsGrouping.ByLocation;

            var colors = new[] {Colors.Red, Colors.Orange, Colors.Blue, Colors.Violet};

            for (int i = 0; i < 3; ++i)
            {
                var barSeries = new BarSeries()
                {
                    BorderWidth = 0,
                    Fill =
                    {
                        Color = colors[i],
                        GradientFill = GradientFill.Solid
                    },
                    ShowInLegendBox = true,
                    MouseHighlight = MouseOverHighlight.None,
                    MouseInteraction = false,
                    IncludeInAutoFit = false,
                    Shadow =
                    {
                        Color = Colors.Transparent
                    }

                };
                for (int j = 0; j < 4; ++j)
                {
                    var xValue = (i*4) + j;
                    var yValue1 = (xValue + 1);
                    yValue1 *= yValue1;
                    var yValue2 = yValue1 + yValue1;
                    barSeries.AddValue(xValue, yValue1, yValue1.ToString(), false);
                    barSeries.AddValue(xValue, yValue2, yValue2.ToString(), false);
                }
                barSeries.InvalidateData();
                view.BarSeries.Add(barSeries);
            }    
        }

        private void ResizeBars()
        {
            var view = lightningChartUltimate1.ViewXY;

            var xAxis = view.XAxes[0];

            var maxValue = xAxis.Maximum;
            var minValue = xAxis.Minimum;

            var maxScreenCoord = xAxis.ValueToCoord(maxValue);
            var minScreenCoord = xAxis.ValueToCoord(minValue);

            var pixelWidth = maxScreenCoord - minScreenCoord;

            var barCount = view.BarSeries.Sum(bar => bar.Values.Count());

            var totalBarSpacingPixels = (barCount + 1)*c_BarSpacing;

            var roomForBars = pixelWidth - totalBarSpacingPixels;

            var perBarWidth = (double)roomForBars/(double)barCount;

            foreach (var barSeries in view.BarSeries)
            {
                barSeries.BarThickness = (int)perBarWidth;
            }
        }

        private void Clear()
        {
            var view = lightningChartUltimate1.ViewXY;

            view.XAxes[0].CustomTicks.Clear();
            view.YAxes[0].CustomTicks.Clear();
            view.BarSeries.Clear();
            view.PointLineSeries.Clear();
            view.LineCollections.Clear();
        }

        private void SetMargins()
        {
            var view = lightningChartUltimate1.ViewXY;

            //lightningChartUltimate1.AfterRendering += SetMarginsAfterRendering;
            view.AxisLayout.AutoAdjustMargins = true;
        }

        private void SetMarginsAfterRendering(object sender, AfterRenderingEventArgs e)
        {
            e.Chart.AfterRendering -= SetMarginsAfterRendering;

            var view = e.Chart.ViewXY;

            var currentMargins = view.Margins;
            var legendBoxRect = view.LegendBox.GetRenderedRect();

            var xAxis = view.XAxes[0];

            var totalAxisRegion = 0.0;

            if (xAxis.CustomTicks.Any())
            {
                var tickHeight = lightningChartUltimate1.MeasureText(xAxis.CustomTicks[0].LabelText, xAxis.LabelsFont).Y;
                totalAxisRegion = tickHeight + xAxis.LabelTicksGap + xAxis.AxisThickness +
                                      xAxis.MajorDivTickStyle.LineLength;
            }
            var xAxisTitleHeight = lightningChartUltimate1.MeasureText(xAxis.Title.Text, xAxis.Title.Font);
            var totalXAxisTitleHeight = xAxisTitleHeight.Y + xAxis.Title.DistanceToAxis + xAxis.Title.Border.Width*2;

            var yAxis = lightningChartUltimate1.ViewXY.YAxes[0];

            var totalCustomTicks = yAxis.CustomTicks.Count;

            var tickLength = lightningChartUltimate1.MeasureText(yAxis.CustomTicks[totalCustomTicks - 1].LabelText,
                yAxis.LabelsFont);
            var yAxisRegion = tickLength.X + yAxis.LabelTicksGap + yAxis.AxisThickness +
                              yAxis.MajorDivTickStyle.LineLength;

            var yAxisTitleLength = lightningChartUltimate1.MeasureText(yAxis.Title.Text, yAxis.Title.Font);
            var totalYAxisTitleLength = yAxisTitleLength.Y + yAxis.Title.DistanceToAxis + yAxis.Title.Border.Width*2;

            var newMargins = new Thickness(yAxisRegion + totalYAxisTitleLength, currentMargins.Top, currentMargins.Right, totalAxisRegion + totalXAxisTitleHeight + legendBoxRect.Height);
            view.Margins = newMargins;
        }

        private void PlotPoints()
        {
            var view = lightningChartUltimate1.ViewXY;

            var xAxis = view.XAxes[0];
            var yAxis = view.YAxes[0];

            var colors = new[] { Colors.Red, Colors.Orange, Colors.Blue, Colors.Violet };
            var shapes = new[] {Shape.Rectangle, Shape.Circle, Shape.Triangle};
            for (int i = 0; i < 3; ++i)
            {
                var pointSeries = new PointLineSeries()
                {
                    PointsVisible = true,
                    LineVisible = false,
                    ShowInLegendBox = true,
                    MouseHighlight = MouseOverHighlight.None,
                    MouseInteraction = false,
                    IncludeInAutoFit = false,
                    PointsType = PointsType.ErrorPoints,
                    PointStyle =
                    {
                        Shape = Shape.Rectangle,
                        BorderWidth = 0,
                        Color1 = colors[i],
                        GradientFill = GradientFillPoint.Solid
                    }, // Shape in the legend box = 
                    ErrorBars =
                    {
                        ShowYError = true,
                        EndLength = 20,
                        YColor = Colors.Black
                    }
                };
                var points = new List<SeriesErrorPoint>();
                for (int j = 0; j < 4; ++j)
                {
                    var xValue = (i * 4) + j;
                    var yValue1 = (xValue + 1);
                    var yValue2 = yValue1 + 1;
                    points.Add(new SeriesErrorPoint(xValue, yValue1, 0.0, 0.0, 1, 5));
                    //points.Add(new SeriesErrorPoint(xValue, yValue2, 0.0, 0.0, 2, 4));
                }
                pointSeries.AddPoints(points.ToArray(), true);
                foreach (var point in points)
                {
                    var marker = new SeriesEventMarker()
                    {
                        Symbol =
                        {
                            Shape = shapes[i],
                            Color1 = colors[i],
                            Color2 = colors[i],
                            Color3 = colors[i],
                            GradientFill = GradientFillPoint.Solid
                        },
                        Label =
                        {
                            Text = point.Y.ToString()
                        },
                        YValue = point.Y,
                        XValue = point.X,
                        VerticalPosition = SeriesEventMarkerVerticalPosition.AtYValue,
                        HorizontalPosition  = SeriesEventMarkerHorizontalPosition.AtXValue
                    };
                    pointSeries.SeriesEventMarkers.Add(marker);
                }
                view.PointLineSeries.Add(pointSeries);
            }
        }

        private void Run()
        {
            var view = lightningChartUltimate1.ViewXY;

            view.LegendBox.Offset.X = 0;
            view.LegendBox.Offset.Y = 0;

            Clear();

            if (!Logarithmic.IsChecked.GetValueOrDefault())
            {
                view.XAxes[0].SetRange(0, 12);
                view.YAxes[0].SetRange(0, 10);
            }
            else
            {
                view.XAxes[0].SetRange(0, 12);
                view.YAxes[0].SetRange(0, 10);
            }

            // Create our ticks
            CreateYAxisTicks();
            CreateXAxisTicks();
            //PlotBarData();
            PlotPoints();
            //ResizeBars();
            SetMargins();
        }

        private void MainWindowLoaded(object sender, RoutedEventArgs e)
        {
            lightningChartUltimate1.SizeChanged += MainWindowSizeChanged;

            var view = lightningChartUltimate1.ViewXY;

            view.LegendBox.Categorization = LegendBoxCategorization.None;
            view.LegendBox.Layout = LegendBoxLayout.HorizontalRowSpan;
            view.LegendBox.Position = LegendBoxPosition.BottomCenter;
            view.LegendBox.MoveByMouse = false;
            view.LegendBox.MoveFromSeriesTitle = false;
            view.LegendBox.HighlightSeriesOnTitle = false;

            view.XAxes[0].MajorDivTickStyle.Visible = true;
            view.XAxes[0].MajorDivTickStyle.Color = Colors.Black;

            view.YAxes[0].MajorDivTickStyle.Visible = true;
            view.YAxes[0].MajorDivTickStyle.Color = Colors.Gray;
            Run();
        }

        private void MainWindowSizeChanged(object sender, SizeChangedEventArgs e)
        {
            Run();
        }

        private void PointLineSeriesShow(object sender, RoutedEventArgs e)
        {
            /*
            MainWindowPanel.Children.Clear();
            var toShow = new PointLineSeriesExample();
            MainWindowPanel.Children.Add(toShow);*/
        }

        private void BarSeriesShow(object sender, RoutedEventArgs e)
        {
            /*MainWindowPanel.Children.Clear();
            var toShow = new BarSeriesExample();
            MainWindowPanel.Children.Add(toShow);*/
        }

        private void LabelChecked(object sender, RoutedEventArgs e)
        {
            Run();
        }

        private void LabelUnchecked(object sender, RoutedEventArgs e)
        {
            Run();
        }

        private void NumberChcked(object sender, RoutedEventArgs e)
        {
            Run();
        }

        private void NumberUnchecked(object sender, RoutedEventArgs e)
        {
            Run();
        }

        private void Log10Checked(object sender, RoutedEventArgs e)
        {
            Run();
        }

        private void Log10UnChecked(object sender, RoutedEventArgs e)
        {
            Run();
        }
    }
}


The XAML bit

Code: Select all

<Window
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:Arction"
        xmlns:lcu="http://www.arction.com/schemas/"
        xmlns:lcusb="http://schemas.arction.com/semibindablecharting/ultimate/"
        x:Class="Arction.MainWindow"
        mc:Ignorable="d"
        Title="MainWindow" Height="350" Width="525">
    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary
					Source="/LightningChartResources.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Window.Resources>
    <!--<Grid>
        <TabControl
				x:Name="AnalysisTabCtrl">
            <TabItem>
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition></RowDefinition>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <local:PointLineSeriesExample/>
                </Grid>
            </TabItem>
            <TabItem Header="Bar Series">
                <Grid>
                    <local:BarSeriesExample/>
                </Grid>
            </TabItem>
        </TabControl>
    </Grid>-->
    <!--
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width=".8*"></ColumnDefinition>
            <ColumnDefinition Width="Auto"></ColumnDefinition>
            <ColumnDefinition Width="Auto"></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition></RowDefinition>
        </Grid.RowDefinitions>
        <Button Grid.Column="1" Grid.RowSpan="1" Content="PointLineSeries" Click="PointLineSeriesShow"></Button>
        <Button Grid.Column="2" Grid.RowSpan="1" Content="BarSeries" Click="BarSeriesShow"></Button>
    </Grid>-->
    <Grid UseLayoutRounding="True">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width=".9*"></ColumnDefinition>
            <ColumnDefinition Width="Auto"></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <lcusb:LightningChartUltimate Grid.Column="0" x:Name="lightningChartUltimate1" LicenseKey="7L696EYUYDW8WE98DT5XYCXYSAVF6HZYUY9SVCCXPVY569Z476GMUGG73HY54NTRBT6UJ8SCJSK5EX7VRMVHQER24MBRBAPW3H4UCMADU3XP3KUBGJZGTYKNACG67TM7WKFHSF6EY8A5CQ8ABMFE8JSHWLNKVHX4A4B9P45">
            <lcusb:LightningChartUltimate.Title>
                <lcusb:ChartTitle
		    			Color="{StaticResource ChartTitleTextColor}"
		    			MouseInteraction="False"
		    			Text="">
                    <lcusb:ChartTitle.Font>
                        <lcusb:WpfFont
		    					Family="{StaticResource ChartFont}"
		    					Size="{StaticResource ChartTitleFontSize}"
		    					Bold="False" />
                    </lcusb:ChartTitle.Font>
                    <lcusb:ChartTitle.Fill>
                        <lcusb:Fill
		    					Style="ColorOnly"
		    					Color="Transparent"
		    					GradientFill="Solid" />
                    </lcusb:ChartTitle.Fill>
                    <lcusb:ChartTitle.Shadow>
                        <lcusb:TextShadow
		    					ContrastColor="Transparent"
		    					DropColor="Transparent" />
                    </lcusb:ChartTitle.Shadow>
                </lcusb:ChartTitle>
            </lcusb:LightningChartUltimate.Title>
            <lcusb:LightningChartUltimate.ChartBackground>
                <lcusb:Fill
		    			Style="ColorOnly"
		    			Color="{StaticResource ChartBackgroundColor}"
		    			GradientFill="Solid" />
            </lcusb:LightningChartUltimate.ChartBackground>
            <lcusb:LightningChartUltimate.ViewXY>
                <lcusb:ViewXY
		    			GraphBorderColor="{StaticResource ChartGraphBorderColor}">
                    <lcusb:ViewXY.GraphBackground>
                        <lcusb:Fill
		    					Style="ColorOnly"
		    					Color="{StaticResource GraphBackgroundColor}"
		    					GradientFill="Solid" />
                    </lcusb:ViewXY.GraphBackground>
                    <lcusb:ViewXY.ZoomPanOptions>
                        <lcusb:ZoomPanOptions
		    					LeftMouseButtonAction="None"
		    					MouseWheelZooming="Off"
		    					CtrlEnabled="False"
		    					ShiftEnabled="False"
		    					RightMouseButtonAction="None" />
                    </lcusb:ViewXY.ZoomPanOptions>
                    <lcusb:ViewXY.XAxes>
                        <lcusb:AxisX
		    					AxisThickness="0"
		    					LabelsColor="{StaticResource ChartLabelsColor}"
		    					LabelsPosition="Near"
		    					LabelsVisible="true"
		    					ValueType="Number"
		    					MouseScaling="False"
		    					MouseScrolling="False">
                            <lcusb:AxisX.Title>
                                <lcusb:AxisXTitle
		    							Color="{StaticResource ChartTitleTextColor}"
		    							MouseInteraction="False">
                                    <lcusb:AxisXTitle.Font>
                                        <lcusb:WpfFont
		    									Family="{StaticResource ChartFont}"
		    									Size="{StaticResource ChartAxisTitleFontSize}"
		    									Bold="False" />
                                    </lcusb:AxisXTitle.Font>
                                    <lcusb:AxisXTitle.Shadow>
                                        <lcusb:TextShadow
		    									ContrastColor="Transparent"
		    									DropColor="Transparent" />
                                    </lcusb:AxisXTitle.Shadow>
                                </lcusb:AxisXTitle>
                            </lcusb:AxisX.Title>
                            <!--<lcu:AxisX.ScaleNibs>
		    						<lcu:AxisDragNib
		    							Color="{StaticResource ChartScaleNibColor}" />
		    					</lcu:AxisX.ScaleNibs>-->
                            <lcusb:AxisX.LabelsFont>
                                <lcusb:WpfFont
		    							Family="{StaticResource ChartFont}"
		    							Size="{StaticResource ChartAxisLabelFontSize}" />
                            </lcusb:AxisX.LabelsFont>
                            <lcusb:AxisX.MajorDivTickStyle>
                                <lcusb:AxisTickStyle
		    							Alignment="Near"
		    							Color="{StaticResource ChartMajorTickColor}"
		    							LineLength="{StaticResource ChartMajorTickLength}"
		    							Visible="True" />
                            </lcusb:AxisX.MajorDivTickStyle>
                            <lcusb:AxisX.MinorDivTickStyle>
                                <lcusb:AxisTickStyle
		    							Color="{StaticResource ChartMinorTickColor}"
		    							LineLength="{StaticResource ChartMinorTickLength}"
		    							Visible="False" />
                            </lcusb:AxisX.MinorDivTickStyle>
                        </lcusb:AxisX>
                    </lcusb:ViewXY.XAxes>
                    <lcusb:ViewXY.YAxes>
                        <lcusb:AxisY
		    					AxisThickness="0"
		    					LabelsColor="{StaticResource ChartLabelsColor}"
		    					LabelsVisible="true"
		    					ValueType="Number"
		    					MouseScaling="False"
		    					MouseScrolling="False">
                            <lcusb:AxisY.Title>
                                <lcusb:AxisYTitle
		    							Angle="90"
                                        HorizontalAlign="Left"
		    							Color="{StaticResource ChartTitleTextColor}"
		    							MouseInteraction="False">
                                    <lcusb:AxisYTitle.Font>
                                        <lcusb:WpfFont
		    									Family="{StaticResource ChartFont}"
		    									Size="{StaticResource ChartAxisTitleFontSize}"
		    									Bold="False" />
                                    </lcusb:AxisYTitle.Font>
                                    <lcusb:AxisYTitle.Shadow>
                                        <lcusb:TextShadow
		    									ContrastColor="Transparent"
		    									DropColor="Transparent" />
                                    </lcusb:AxisYTitle.Shadow>
                                </lcusb:AxisYTitle>
                            </lcusb:AxisY.Title>
                            <!--<lcu:AxisY.ScaleNibs>
		    						<lcu:AxisDragNib
		    							Color="{StaticResource ChartScaleNibColor}" />
		    					</lcu:AxisY.ScaleNibs>-->
                            <lcusb:AxisY.LabelsFont>
                                <lcusb:WpfFont
		    							Family="{StaticResource ChartFont}"
		    							Size="{StaticResource ChartAxisLabelFontSize}" />
                            </lcusb:AxisY.LabelsFont>
                            <lcusb:AxisY.MajorDivTickStyle>
                                <lcusb:AxisTickStyle
		    							Alignment="Near"
		    							Color="{StaticResource ChartMajorTickColor}"
		    							LineLength="{StaticResource ChartMajorTickLength}"
		    							Visible="True" />
                            </lcusb:AxisY.MajorDivTickStyle>
                            <lcusb:AxisY.MinorDivTickStyle>
                                <lcusb:AxisTickStyle
		    							Color="{StaticResource ChartMinorTickColor}"
		    							LineLength="{StaticResource ChartMinorTickLength}"
		    							Visible="False" />
                            </lcusb:AxisY.MinorDivTickStyle>
                        </lcusb:AxisY>
                    </lcusb:ViewXY.YAxes>
                    <lcusb:ViewXY.LegendBox>
                        <lcusb:LegendBoxXY
                                Layout="HorizontalRowSpan"
                                Position="BottomCenter"
                                BorderWidth="0"
                                SeriesTitleColor="Black"
                                HighlightSeriesTitleColor="Black"
                                MoveByMouse="False"
                                MouseHighlight="None"
		    					UseSeriesTitlesColors="False"
                                ShowCheckboxes="True"
                                Categorization="None"
                                CheckBoxColor="{StaticResource LegendCheckBoxColor}"
                                CheckMarkColor="{StaticResource LegendCheckBoxColor}"
		    					Visible="True">
                            <lcusb:LegendBoxXY.SeriesTitleFont>
                                <lcusb:WpfFont
		    							Family="{StaticResource ChartFont}"
		    							Size="{StaticResource ChartLegendFontSize}" />
                            </lcusb:LegendBoxXY.SeriesTitleFont>
                            <lcusb:LegendBoxXY.Fill>
                                <lcusb:Fill
		    							Style="ColorOnly"
		    							Color="{StaticResource ChartLegendBackground}"
		    							GradientFill="Solid" />
                            </lcusb:LegendBoxXY.Fill>
                            <lcusb:LegendBoxXY.Shadow>
                                <lcusb:Shadow
                                        Visible="False"/>
                            </lcusb:LegendBoxXY.Shadow>
                        </lcusb:LegendBoxXY>
                    </lcusb:ViewXY.LegendBox>
                </lcusb:ViewXY>
            </lcusb:LightningChartUltimate.ViewXY>
        </lcusb:LightningChartUltimate>
        <WrapPanel Orientation="Vertical" Grid.Column="1">
            <CheckBox x:Name="LabelOn" Content="ShowLabel" Checked="LabelChecked" Unchecked="LabelUnchecked"></CheckBox>
            <CheckBox x:Name="NumberOn" Content="SHowNumber" Checked="NumberChcked" Unchecked="NumberUnchecked"></CheckBox>
            <CheckBox x:Name="Logarithmic" Content="Log10" Checked="Log10Checked" Unchecked="Log10UnChecked"></CheckBox>
        </WrapPanel>
    </Grid>
</Window>
Sorry, you might have to remove the references to the styles and switch from the semi bindable to the regular WPF chart (I am kind of using a sandbox to test things right now...)

Thanks!
--Chris

User avatar
ArctionPasi
Posts: 1367
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland
Contact:

Re: ErrorYPlus/ErrorYMinus fix

Post by ArctionPasi » Mon Feb 29, 2016 11:40 am

Apologies. There's a problem in Log axes regarding ErrorBars. New assembly pack will be released this week :oops:
LightningChart Support Team, PT

cwodarczyk82
Posts: 43
Joined: Mon Oct 19, 2015 2:50 am

Re: ErrorYPlus/ErrorYMinus fix

Post by cwodarczyk82 » Mon Feb 29, 2016 10:34 pm

Hi, Pasi:

Thanks for the reply...! Looking forward to the new release!

Regards,
Chris

Post Reply