Yaxis 0 not aligned with x axis

Charts for WPF Forum

Posted 10 years ago by sravanthi
Version: 13.2.0591
Avatar
<charts:XYChart Grid.Row="1" GridLineMajorVisibility="Y" GridStripeVisibility="None" Margin="10" IsLegendVisible="True" 
                                LegendHorizontalPosition="RightOutside" 
                                                       LegendVerticalPosition="CenterOutside" >
                    <charts:XYChart.SeriesStyleSelector>

                        <!-- A custom palette is defined by setting colors on SeriesPaletteStyleSelector.Palette -->
                        <charts:SeriesPaletteStyleSelector>
                            <charts:Palette>
                                <Color>Red</Color>
                                <Color>Orange</Color>
                                <Color>Green</Color>
                                <Color>Brown</Color>
                            </charts:Palette>
                        </charts:SeriesPaletteStyleSelector>

                    </charts:XYChart.SeriesStyleSelector>
                    <charts:XYChart.YAxes>
                        <charts:XYDoubleAxis x:Name="y1" TickMajorInterval="4" TickMinorInterval="1" AreMajorTicksVisible="True" Minimum="0.0" AreMinorTicksVisible="True" />
                        <charts:XYDoubleAxis x:Name="y2" AreMajorTicksVisible="True" TickMajorInterval="5" Position="FarEdge" Minimum="0.0" />
                    </charts:XYChart.YAxes>
                    <charts:XYChart.XAxes>
                        <charts:XYDoubleAxis LabelFormat="{}{0:0}" AreLabelsVisible="True"/>
                    </charts:XYChart.XAxes>
                    <charts:BarSeries Description="Open" LabelVisibility="PointerProximity" ItemsSource="{Binding Data30Minutes}"   YPath="Open" StackKind="Normal"  YAxis="{Binding ElementName=y1}" XPath="DigitalFlag"/>
                    <charts:BarSeries Description="In Progress" LabelVisibility="PointerProximity" ItemsSource="{Binding Data30Minutes}" YPath="InProgress" StackKind="Normal"  YAxis="{Binding ElementName=y1}" XPath="DigitalFlag"/>
                    <charts:BarSeries Description="Closed" LabelVisibility="PointerProximity" ItemsSource="{Binding Data30Minutes}" YPath="Closed" StackKind="Normal"  YAxis="{Binding ElementName=y1}" XPath="DigitalFlag"/>
                    <charts:LineSeries Description="Avg. Wait time" MarkerVisibility="All" LabelFormat="{}{0:0.00}" LabelVisibility="Visible" ItemsSource="{Binding Data30Minutes}" YPath="AverageWaitTime" YAxis="{Binding ElementName=y2}" XPath="DigitalFlag"/>
                </charts:XYChart>

 Above is my xaml code.

Comments (2)

Posted 10 years ago by sravanthi
Avatar

Y axis 0 is not correctly aligning with x-axis. Could you suggest anything to make it align properly.

Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello, for questions like this that need a reproduction, can you please email our support address with a new simple sample project that shows the issue?  Please keep the sample as minimal as possible so that it makes it easier to narrow down what the problem is.  Be sure to mention this thread and rename the .zip file extension so it doesn't get spam blocked.  Thanks!


Actipro Software Support

The latest build of this product (v24.1.2) was released 1 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.