This is a migrated thread and some comments may be shown as answers.

[Solved] why x axis vertical gridline is not showing ?

1 Answer 237 Views
Chart
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Saravanan
Top achievements
Rank 1
Saravanan asked on 12 Sep 2011, 12:14 PM
Hi team, i have rad chart with multiple series,i have two label called Monthly and Yearly ,default view is Montlhy,i am showing x-axis vertical gridline so i applied this style,its working fine in Monthly but when i click Yearly ,
the x axis vertical gridlines are not showing..why the UI is changing depends upon data ? plz see the attachement
 
Actually in monthly view  i am showing (1 to 30 ) at x axis but when i click yearly i am showing (jan to dec ) at x axis.
 
<UserControl.Resources>
        <Style x:Key="XaxisGridLineStyle" TargetType="Line">
            <Setter Property="Stroke" Value="Red" />          
            <Setter Property="StrokeThickness" Value="2.5" />
        </Style>      
    </UserControl.Resources>
 
<telerik:RadChart x:Name="RadChartPopUp"
                        ItemsSource="{Binding ChartData}"
                        BorderBrush="Transparent">
 
                    <telerik:RadChart.SeriesMappings>
 
                        <telerik:SeriesMapping x:Name="DailyWhite"
                                LegendLabel="{Binding DailyWhiteLegend}">
                            <telerik:SeriesMapping.ItemMappings>
                                <telerik:ItemMapping
                                        FieldName="DailyorMonthlyActual"
                                        DataPointMember="YValue" />
                                <telerik:ItemMapping FieldName="Xcategory"
                                        DataPointMember="XCategory" />
                            </telerik:SeriesMapping.ItemMappings>
                            <telerik:SeriesMapping.SeriesDefinition>
                                <telerik:BarSeriesDefinition
                                        ShowItemLabels="False"
                                        ShowItemToolTips="True" />
                            </telerik:SeriesMapping.SeriesDefinition>
                        </telerik:SeriesMapping>
 
                        
                        
                            <telerik:SeriesMapping.SeriesDefinition>
                                <telerik:SplineAreaSeriesDefinition
                                        SeriesStyle="{StaticResource SplineAreaGreen}"
                                        AxisName="MonthlyorYearlyActualSeries"
                                        ShowItemLabels="False"
                                        ShowItemToolTips="True"
                                        ShowPointMarks="False" />
                            </telerik:SeriesMapping.SeriesDefinition>
                        </telerik:SeriesMapping>
 
                    </telerik:RadChart.SeriesMappings>
 
                    <telerik:RadChart.DefaultView>
 
                        <telerik:ChartDefaultView ChartLegendPosition="Bottom">
 
                            <telerik:ChartDefaultView.ChartTitle>
                                <telerik:ChartTitle Visibility="Collapsed" />
                            </telerik:ChartDefaultView.ChartTitle>
 
                            <telerik:ChartDefaultView.ChartArea>
 
                                <telerik:ChartArea LegendName="legend"
                                        HorizontalAlignment="Stretch"
                                        
                                        VerticalAlignment="Stretch" Width="520"
                                        LabelFormatBehavior="HumanReadable">
 
                                    <telerik:ChartArea.AxisX>
                                        <telerik:AxisX
                                                MajorTicksVisibility="Visible"
                                                Step="{Binding XaxisStep}"
                                                MajorGridLinesVisibility="Visible"
                                                AutoRange="True">
                                            <telerik:AxisX.AxisStyles>
                                                <telerik:AxisStyles
                                                        AxisLineStyle="{StaticResource XaxisLineStyle}"
                                                        GridLineStyle="{StaticResource XaxisGridLineStyle}"
                                                        ItemLabelStyle="{StaticResource ItemLabelStyle}" />
                                            </telerik:AxisX.AxisStyles>
                                        </telerik:AxisX>
                                    </telerik:ChartArea.AxisX>
 
                                    <telerik:ChartArea.AxisY>
                                        <telerik:AxisY
                                                Title="{Binding YaxisName}"
                                                AutoRange="True"
                                                StripLinesVisibility="Collapsed"
                                                MajorGridLinesVisibility="Collapsed"
                                                MinorGridLinesVisibility="Collapsed"
                                                DefaultLabelFormat="0"
                                                MinorTicksVisibility="Collapsed">
 
                                            <telerik:AxisY.AxisStyles>
                                                <telerik:AxisStyles
                                                        TitleStyle="{StaticResource AxisTitleStyle}"
                                                        AxisLineStyle="{StaticResource AxisLineStyle}"
                                                        TickLineStyle="{StaticResource MajorTickLineStyle}"
                                                        MinorTickLineStyle="{StaticResource MinorTickLineStyle}"
                                                        ItemLabelStyle="{StaticResource CustomLabel}" />
                                            </telerik:AxisY.AxisStyles>
                                        </telerik:AxisY>
 
                                    </telerik:ChartArea.AxisY>
 
                                    <telerik:ChartArea.AdditionalYAxes>
                                        <telerik:AxisY x:Name="secondaxis"
                                                Title="{Binding YoneAxisName}"
                                                AutoRange="True"
                                                DefaultLabelFormat="0"
                                                AxisName="MonthlyorYearlyActualSeries">
                                            <telerik:AxisY.AxisStyles>
                                                <telerik:AxisStyles
                                                        TitleStyle="{StaticResource AxisTitleStyle}"
                                                        AxisLineStyle="{StaticResource AxisLineStyle2}"
                                                        TickLineStyle="{StaticResource MajorTickLineStyle2}"
                                                        MinorTickLineStyle="{StaticResource MinorTickLineStyle2}"
                                                        ItemLabelStyle="{StaticResource CustomLabel2}" />
                                            </telerik:AxisY.AxisStyles>
                                        </telerik:AxisY>
 
 
                        </telerik:ChartDefaultView>
                    </telerik:RadChart.DefaultView>
 
                </telerik:RadChart>

1 Answer, 1 is accepted

Sort by
0
Evgenia
Telerik team
answered on 15 Sep 2011, 11:33 AM
Hi Saravanan,

It is hard for us to determine the cause of this issue without your full source code. Could you please open a formal Support thread and attach a runnable copy of your solution where this reproduces? This way we'll be able to investigate it and get back to you with our findings.

All the best,
Evgenia
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
Tags
Chart
Asked by
Saravanan
Top achievements
Rank 1
Answers by
Evgenia
Telerik team
Share this question
or