Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
245
Problems with DateTime Formatting and Changing X-Axis Intervals
posted

Hey,

I  am having some serious problems trying to format the x-axis of the xamWebChart (using the version from 10.1) and changing the x-axis intervals.  I don't want to see every date on the chart because there isn't enough space for it, so I want to see every fifth date or something. As well, my DateTimes are not formatted on the XAxis and all I see are the numbers 1 through 32. 

My xaml is down there and there is nothing in the .xaml.cs file other than a m_graph.Refresh() when the DataSource for any of the series updates.

Any suggestions would be appreciated.

Thanks!

Normal 0 false false false EN-CA X-NONE X-NONE MicrosoftInternetExplorer4

        <igChart:XamWebChart x:Name="m_graph" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="5" Grid.Row="0" Visibility="{Binding CurrentTimeRange, Converter={StaticResource TimeRangeToVisibilityConverter}, ConverterParameter=Week}">

            <igChart:XamWebChart.Legend>

                <igChart:Legend Visibility="Collapsed" />

            </igChart:XamWebChart.Legend>

            <igChart:XamWebChart.Scene>

                <igChart:Scene>

                    <igChart:Scene.GridArea>

                        <igChart:GridArea BorderThickness="0" Background="#00ffffff" />

                    </igChart:Scene.GridArea>

                </igChart:Scene>

            </igChart:XamWebChart.Scene>

            <igChart:XamWebChart.Series>

                <igChart:Series ChartType="Line" DataSource="{Binding DriverIdlingDisplayStats}"

                                DataMapping="Label=EventStartDate;Value=TotalIdleMinutes;ToolTip=IdlingToolTip"

                                Fill="{Binding Source={StaticResource m_red3DBrush}}" />

                <igChart:Series ChartType="Line" DataSource="{Binding FleetIdlingDisplayStats}"

                                DataMapping="Label=EventStartDate;Value=TotalIdleMinutes;ToolTip=IdlingToolTip"

                                Fill="{Binding Source={StaticResource m_blue3DBrush}}" />

            </igChart:XamWebChart.Series>

            <igChart:XamWebChart.Axes>

                <igChart:Axis Name="AxisX" AxisType="PrimaryX" Unit="5">

                    <igChart:Axis.Label>

                        <igChart:LabelGroup Format="{}{0:MMM-dd}"/>

                    </igChart:Axis.Label>

                </igChart:Axis>

                <igChart:Axis Name="AxisY" AxisType="PrimaryY" Stroke="#58FFFFFF" Visibility="Visible" StrokeThickness="0" AutoRange="True">

                    <igChart:Axis.Label>

                        <igChart:LabelGroup Foreground="Black" FontFamily="Courier" />

                    </igChart:Axis.Label>

                    <igChart:Axis.MajorGridline>

                        <igChart:GridlineGroup Visibility="Collapsed"/>

                    </igChart:Axis.MajorGridline>

                    <igChart:Axis.MinorGridline>

                        <igChart:GridlineGroup Visibility="Collapsed"/>

                    </igChart:Axis.MinorGridline>

                    <igChart:Axis.MajorTickMark>

                        <igChart:TickMarkGroup StrokeThickness="1"/>

                    </igChart:Axis.MajorTickMark>

                </igChart:Axis>

            </igChart:XamWebChart.Axes>

        </igChart:XamWebChart>

 

Parents Reply Children
No Data