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

Line graph with one data point

2 Answers 258 Views
Report Designer (standalone)
This is a migrated thread and some comments may be shown as answers.
Conor
Top achievements
Rank 1
Conor asked on 26 May 2016, 03:34 PM

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:

 

#1

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?

 

#2

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 Answers, 1 is accepted

Sort by
0
Accepted
Stef
Telerik team
answered on 31 May 2016, 12:41 PM
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.

Regards,
Stef
Telerik
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
0
Conor
Top achievements
Rank 1
answered on 01 Jun 2016, 09:21 PM

Thanks.

Bindings solved the axis scale.

The single data-point displays in 2016 R2

Tags
Report Designer (standalone)
Asked by
Conor
Top achievements
Rank 1
Answers by
Stef
Telerik team
Conor
Top achievements
Rank 1
Share this question
or