ChartView with linear X-Axis, how?

4 posts, 0 answers
  1. Sergey
    Sergey avatar
    4 posts
    Member since:
    Jan 2012

    Posted 21 Dec 2012 Link to this post

    I have List of objects (class with 2 int members for x and y value).
    Created ChartView with several line series, sharing 1 horizontal and 1 vertical axis between all of them, but when I'm trying to set horizontal axis type to LinearAxis, it just doesn't show any data. When setting it to CategorialAxis - everything works fine. But only LinearAxis fits my needs.
  2. Petar Marchev
    Petar Marchev avatar
    996 posts

    Posted 24 Dec 2012 Link to this post

    Hello Sergey,

    If you want to use two LinearAxis you will need to use the ScatterLineSeries instead of the LineSeries. Let us know how it goes.

    All the best,
    Petar Marchev
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. Senthil kumar
    Senthil kumar avatar
    21 posts
    Member since:
    Sep 2013

    Posted 21 Nov 2013 Link to this post

    Hi Petar,
    first i explain my situation..

    I'm working in a chart to display
    1. absolute time: display dateTime value (x axis dateTimecontinousAxis) vs. voltage (y axis - linear axis) in  Line Series,
    2.  relative time: display  (integer value) (x axis-categorical Axis) vs.% (y axis) in line Series, Obviously the 2 axes must share the same series. (x-axis will be changed when radio button (absolute time, relative time) changed in screen level).

    my Data item object contains like 
     public int value {get; set;}  -- This will be mapped to Y-Axis
     public DateTime AbsoluteTime{get; set;}  -- This will be mapped to series of DateTimecontinousAxis when the radio button is selected in absolute
     public double RelativeTime {get; set;}  ----- This value will be mapped to series of CategroricalAxis when the radio button is selected in Relative

    both x-axis is working correctly. but, x-axis shows defaut CartesianPlotBandAnnotation draw the annotation from -> to plot value. (for example relative time interger value... 1.343, 2.343 as it is the plot value). i cannot format the value like whole integer (0, 2, 4). (But only LinearAxis fits my needs)

    so, i have changed to scatterline series instead of line series and
    linear axis as x-axis instead of categorical axis. (as per your suggestion)

    now the datetimecontinous axis is not support the scatterlineseries. (linearaxis  supports the scatterLineseries).

    NOTE. i'm generating the chart in run time

    thanks in advance
  4. Petar Marchev
    Petar Marchev avatar
    996 posts

    Posted 21 Nov 2013 Link to this post

    Hi Senthil,

    I see that you have asked almost the same question in another forum here. I will ask that you don't ask the same question, or a variation of it, in different threads because it makes it really hard to follow the conversation and the person who replies will not have all the information needed. 

    Petar Marchev
    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