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

CartesianChartGrid

5 Answers 248 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
Yugal
Top achievements
Rank 1
Yugal asked on 16 Aug 2013, 07:49 AM
hi,
Can we have grid lines that is shown on the graph as dotted lines instead of dashed lines?
<telerik:RadCartesianChart.Grid>
                    <telerik:CartesianChartGrid>
                        <telerik:CartesianChartGrid.Style>
                            <Style TargetType="telerik:CartesianChartGrid">
                                <Setter Property="MajorXLineDashArray" Value="10,5"/>
                                <Setter Property="MajorYLineDashArray" Value="10,5"/>
                                <Style.Triggers>
                                    <DataTrigger Binding="{Binding Path=DisplayGridLines}" Value="1">
                                        <Setter Property="MajorLinesVisibility" Value="X"/>
                                    </DataTrigger>
                                    <DataTrigger Binding="{Binding Path=DisplayGridLines}" Value="2">
                                        <Setter Property="MajorLinesVisibility" Value="Y"/>
                                    </DataTrigger>
                                    <DataTrigger Binding="{Binding Path=DisplayGridLines}" Value="3">
                                        <Setter Property="MajorLinesVisibility" Value="XY"/>
                                    </DataTrigger>
                                </Style.Triggers>
                            </Style>
                        </telerik:CartesianChartGrid.Style>

                        <telerik:CartesianChartGrid.MajorXLineStyle>
                            <Style TargetType="Line">
                                <Setter Property="Stroke" Value="Gray"/>
                            </Style>
                        </telerik:CartesianChartGrid.MajorXLineStyle>

                        <telerik:CartesianChartGrid.MajorYLineStyle>
                            <Style TargetType="Line">
                                <Setter Property="Stroke" Value="Gray"/>
                            </Style>
                        </telerik:CartesianChartGrid.MajorYLineStyle>
                    </telerik:CartesianChartGrid>
                </telerik:RadCartesianChart.Grid>

I have 10 points being shown on the graph. so the grid lines appear for all the 10 points. Can we have it just five and increase it if needed?
Please reply as soon as possible.

5 Answers, 1 is accepted

Sort by
0
Petar Marchev
Telerik team
answered on 21 Aug 2013, 07:53 AM
Hi Yugal,

Can we have grid lines that is shown on the graph as dotted lines
You can use the MajorXLineDashArray property of the grid to achieve the desired effect:
<telerik:CartesianChartGrid MajorLinesVisibility="X" MajorXLineDashArray="5 3 1" />

grid lines appear for all the 10 points. Can we have it just five
Currently the grid lines are drawn together with the ticks, this means that a grid line is drawn only if a tick is present and always where there is a tick. There is no way to change this as we do not have a GridLineStep feature for the CartesianChartGrid. Let us know if you need further assistance.

Regards,
Petar Marchev
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Yugal
Top achievements
Rank 1
answered on 22 Aug 2013, 05:49 AM
Hi,

According to you there is no such option in CartesianChartGrid, but i require that in my work. How can Telerik help me with these? It would be good if u provide/add this option for CartesianChartGrid also.

Well with this i would also like to show you the graph in which grid lines are drawn even when there is no tick present. Is this a bug?
Please let me know this also.

Thanks.
0
Petar Marchev
Telerik team
answered on 26 Aug 2013, 04:26 PM
Hi Yugal,

As mentioned previously we do not have this feature implemented. I have logged it as a feature request in our PITS where you can vote for it and track its status.

In the attached screenshot I can see that there is some misplacement of the ticks and grid lines but I was unable to reproduce it on my computer. Can you create a small project that reproduces this so that we can look for solutions? Thank you.

Regards,
Petar Marchev
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Yugal
Top achievements
Rank 1
answered on 30 Aug 2013, 04:18 AM
Hi,
I have recovered this problem. I have used a vertical y axis from xaml which has labels ranging from 1 to 10.This y axis strokes color is set to white so  that it is not visible. And  rest y axis  as you have seen is created dynamically from behind the code.

This default y axis was created to get the grid lines which is available only for first (or default y axis). Now since we needed grid lines in our project we did this. But now on zooming the graph the grid lines get mismatched. Can you provide me some solution to get grid lines for multiple y axis without facing this problem?

We require grid lines in our project.

Thanks.
0
Petar Marchev
Telerik team
answered on 02 Sep 2013, 03:14 PM
Hello Yugal,

The cartesian grid works with the the main axes, these are the chart's HorizontalAxis and VerticalAxis. So I suggest you simply set the VerticalAxis property of the chart when you create the axis in code behind and do not use the XAML axis.

Regards,
Petar Marchev
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
ChartView
Asked by
Yugal
Top achievements
Rank 1
Answers by
Petar Marchev
Telerik team
Yugal
Top achievements
Rank 1
Share this question
or