CartesianChartGrid

6 posts, 0 answers
  1. Yugal
    Yugal avatar
    8 posts
    Member since:
    Jul 2013

    Posted 16 Aug 2013 Link to this post

    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.

  2. Petar Marchev
    Admin
    Petar Marchev avatar
    968 posts

    Posted 21 Aug 2013 Link to this post

    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 >>
  3. UI for WPF is Visual Studio 2017 Ready
  4. Yugal
    Yugal avatar
    8 posts
    Member since:
    Jul 2013

    Posted 22 Aug 2013 Link to this post

    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.
  5. Petar Marchev
    Admin
    Petar Marchev avatar
    968 posts

    Posted 26 Aug 2013 Link to this post

    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 >>
  6. Yugal
    Yugal avatar
    8 posts
    Member since:
    Jul 2013

    Posted 29 Aug 2013 Link to this post

    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.
  7. Petar Marchev
    Admin
    Petar Marchev avatar
    968 posts

    Posted 02 Sep 2013 Link to this post

    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 >>
Back to Top
UI for WPF is Visual Studio 2017 Ready