Line graph with one data point

3 posts, 1 answers
  1. Conor
    Conor avatar
    4 posts
    Member since:
    Jul 2013

    Posted 26 May 2016 Link to this post

    The report was built in the stand-alone designer, so I've posted it here - if this thread belongs elsewhere, please feel free to move it.


    I've a report that displays a generic line chart: value vs time (with a group, so that multiple lines can be generated).

    Y axis is a value, X axis is a date.

    I have both axes set to scale automatically.

    I have the data points "turned on", and they are set to "auto", so that they each get a different glyph, 

    In theory, I can feed the report any dataset that contains date, value, group, to get a line chart that has variable number of lines to represent the "group" data. (In actuality, this is a sub-report, the parent report passes in an identifier, which the datasource eventually uses to determine what data gets returned. This allows for generic reuse of my line graph...

    This system works extremely well except:



    If the data comes back with only one value, the graph's scales render out to "logical" values, but the data point is not visible. Using the same report but ensuring two rows of data come back, a line is correctly generated on the report. Have I done something wrong? Or are line charts not designed to display anything when there isn't enough data to draw a line?



    If the values on the report are all the same "nice round number", it often generates a Y axis scale where the "top" value is that same "nice round number", resulting in a line that is "on" the top edge of the graph. Is there a way to force the "automatic scaling" of a numeric axis to be "larger" than the range? i.e., I'd like to suggest that Scale.Minimum and Scale.Maximum properties allow expressions so that that we might enter expressions equivalent to:  "= Min(Fields.Value) * 0.9" and "= Max(Fields.Value) * 1.1" respectively. This would provide the ability to have a hard-coded axis that could still scale.

    Any help at all would be appreciated. Thanks.

  2. Answer
    Stef avatar
    3611 posts

    Posted 31 May 2016 Link to this post

    Hello Conor,

    In regards to your questions:
    1. In previous versions there was a requirement to have at least two points in order to have a Line chart. In recent versions, even a single data point will be plotted;
    2. In recent versions (after Q1 2015 v9.0.15.225) we introduced bindings for the Graph item's CoordinateSystems properties. For more details, please check How to: Use Bindings to Control the Coordinate System Properties.

    Please upgrade your reports to the latest available Telerik Reporting R2 2016 version to get the latest changes.

    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
  3. Conor
    Conor avatar
    4 posts
    Member since:
    Jul 2013

    Posted 01 Jun 2016 in reply to Stef Link to this post


    Bindings solved the axis scale.

    The single data-point displays in 2016 R2

Back to Top