DateTimeContinuousAxis Set Range

2 posts, 0 answers
  1. Kirk
    Kirk avatar
    28 posts
    Member since:
    Jun 2012

    Posted 12 Feb 2015 Link to this post

    Is it possible using the DateTimeContinuousAxis to set a range? I have a graph where I am plotting points. The issue is the graph "stretches" out as you add points. So if you have 2 points it plots them both over the entire axis. What I would like to do is plot the 2 points on the beginning of the graph and leave the rest blank. I would like the axis to cover a set time range.

    <telerik:RadCartesianChart x:Name="myChart">
                <chartView:LineSeries CategoryBinding="DateCategory" ValueBinding="Value1" Stroke="#880000FF" StrokeThickness="2"/>
                <chartView:LineSeries CategoryBinding="DateCategory" ValueBinding="Value2" Stroke="#8800FF00" StrokeThickness="2"/>
                <chartView:LineSeries CategoryBinding="DateCategory" ValueBinding="Value3" Stroke="#88FF0000" StrokeThickness="2"/>
                    <telerik:ChartPanAndZoomBehavior ZoomMode="Horizontal" PanMode="Horizontal"/>
                    <chartView:DateTimeContinuousAxis MajorStepUnit="Hour"
                                                    LabelFormat="HH:mm:ss" FontFamily="Segoe UI"
                                                    PlotMode="OnTicks" LabelFitMode="Rotate" MaximumTicks="31" />
                    <chartView:LinearAxis x:Name="VerticalAxis" FontFamily="Segoe UI" Minimum="-5" Maximum="5"/>
                    <chartView:CartesianChartGrid MajorLinesVisibility="Y" MajorYLineDashArray="3,4" />
  2. Peshito
    Peshito avatar
    493 posts

    Posted 13 Feb 2015 Link to this post

    Hi Kirk,

    You can set the range of your axis by using the Minimum, Maximum and MajorStep properties. You should also specify an appropriate MajorStepUnit value which I see you have already set.

    For instance:
        <telerik:DateTimeContinuousAxis Minimum="2010-7-5" Maximum="2015-7-10" MajorStepUnit="Day" MajorStep="360"/>


    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

  3. DevCraft banner
Back to Top