DateTimeContinuousAxis MajorStep Label

2 posts, 0 answers
  1. Mark
    Mark avatar
    12 posts
    Member since:
    Jan 2017

    Posted 02 Feb Link to this post

    I have two issues with the chart below. First is that the DateTimeContinuousAxis LabelFormat Binding does not work. I can set it in XAML like "dddd" and it works, but not with binding. It just defaults to year.

    Secondly, I am trying to show one week's worth of data. I have 7 date values which displays great on the chart, but the horizontal ticks display: "Friday, Saturday, Saturday, Sunday, Monday, Monday, Tuesday, Wednesday, Thursday" I have the MajorStep bound to "0" and MajorStepUnit bound to "Day". So I have two extra ticks and they don't line up to the data points.

    <telerikChart:RadCartesianChart x:Name="AcquisitionChart"
                                    Style="{StaticResource AnalyticsSummaryChart}">
        <telerikChart:RadCartesianChart.Grid>
            <telerikChart:CartesianChartGrid MajorLinesVisibility="Y"
                                             MajorLineThickness="1"
                                             MajorLineColor="Gray"
                                             StripLinesVisibility="Y"/>
        </telerikChart:RadCartesianChart.Grid>
        <telerikChart:RadCartesianChart.HorizontalAxis>
            <telerikChart:DateTimeContinuousAxis  MajorTickThickness="1"
                                                  PlotMode="BetweenTicks"
                                                  ShowLabels="True"
                                                  LabelFormat="{Binding AcquistionCharLabelFormat}"
                                                  LabelFontSize="9"
                                                  MajorStep="{Binding AcquistionChartMajorStep, Mode=OneWay}"
                                                  MajorStepUnit="{Binding AcquistionChartMajorStepUnit, Mode=OneWay}"/>
        </telerikChart:RadCartesianChart.HorizontalAxis>
        <telerikChart:RadCartesianChart.VerticalAxis>
            <telerikChart:NumericalAxis LineColor="Transparent"
                                        MajorStep="{Binding AcquisitionSummary.DesiredTickCount, Mode=OneWay}"
                                        LabelFormat="N0"/>
        </telerikChart:RadCartesianChart.VerticalAxis>
        <telerikChart:RadCartesianChart.Series>
            <telerikChart:AreaSeries ItemsSource="{Binding AcquisitionSummary.Progression, Mode=OneWay}"
                                     Fill="{StaticResource AreaSeriesFill}"
                                     Stroke="{StaticResource AreaSeriesStrokeColor}"
                                     StrokeThickness="2">
                <telerikChart:AreaSeries.ValueBinding>
                    <telerikChart:PropertyNameDataPointBinding PropertyName="Value"/>
                </telerikChart:AreaSeries.ValueBinding>
                <telerikChart:AreaSeries.CategoryBinding>
                    <telerikChart:PropertyNameDataPointBinding PropertyName="UtcDate"/>
                </telerikChart:AreaSeries.CategoryBinding>
            </telerikChart:AreaSeries>
        </telerikChart:RadCartesianChart.Series>
    </telerikChart:RadCartesianChart>
  2. Rosy Topchiyska
    Admin
    Rosy Topchiyska avatar
    586 posts

    Posted 07 Feb Link to this post

    Hi Mark,

    Thank you for contacting us. Indeed, the BindingContext of the chart does not propagate to the chart axes and the grid. I have logged a bug report in our feedback portal where you can follow the issue. I have also updated your Telerik points as a token of gratitude for bringing this issue to our attention.

    Please, let us know if you have any other questions.

    Regards,
    Rosy Topchiyska
    Telerik by Progress
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top