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

DateTimeContinuousAxis MajorStep Label

1 Answer 59 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 03 Feb 2017, 01:32 AM
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>

1 Answer, 1 is accepted

Sort by
0
Rosy Topchiyska
Telerik team
answered on 07 Feb 2017, 11:35 AM
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
Tags
Chart
Asked by
Mark
Top achievements
Rank 1
Answers by
Rosy Topchiyska
Telerik team
Share this question
or