Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Autosize graph depending on Data returned 1

Status
Not open for further replies.

hpost

Programmer
Jul 6, 2009
5
US
How would you automatically grow a graph in height and/or width when there's too much data to be displayed at the x-axis or y-axis

 
How do you define "too much data" ?

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
To much data is when the graph becomes unreadable because it squeezes all the information into the small area for the graph. WOuld like to be able to grow or shrink the graph depending on data returned.
 
I guess that's my point - you are looking at the chart and deciding what is too much...for RS to be able to do this (and it probably can) you will need some kind of maths that you can tell the chart to use to decide if there is "too much" data as at the moment it is purely a subjective view

That is why I asked "what is too much data"

RS cannot know whether the graph is unredable or not so you need to consider what logic you would use to determine what too much data is...

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
I am using chart that comes with SSRS. As far as too much data, for example my graph size can map 20 data points and be readable, any number over that becomes unreadable. How would I change the size of the graph to grow if I reach more data then 20?

Integra IT Solutions
 
In our case its both the axes showing to many labels, and in some cases the actual graph points get so close together it is hard to read them as well.

Integra IT Solutions
 
Hi hpost,
To be honest, the generic Chart object with SSRS 2005, the version I am using, has very limited capabilities. We use the Dundas chart object which allows you to utilize Visual Basic.NET or Visual C# to affect data displayed on a chart. There are a lot of inherent attributes with Dundas chart that will auto-scale your labels and axes and you could also probably adjust your chart size dependent on the amount of data you are analyzing.
In short, the recommendation is to purchase the Dundas Chart add-on to SSRS and this will greatly increase your customizing capability. I just created a quick chart using the generic Chart in SSRS 2005 (as I have never had to do this due to the fact that we have Dundas) and you don't really have a lot of options. If there are any other generic Chart users out there who could illuminate on this topic hpost would greatly appreciate it.
Maybe another option you could implement is to, based on the amount of your data, modify your SQL statement to filter and only include every 2nd or 3rd data point should the amount of data exceed a certain value. The size of the chart would not change but the data included within it would.


Cheers,
Bessebo
(website:
 
I'd probably second that - you can autoscale an axis based on a calculation in the report but it seems you can't do the same for the physical height and width of the chart...

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
Hi hpost,
I thought about this a bit and one thing you could do is to create 3 different sizes of the chart and overlay them and hide or show a particular chart based on the amount of data that you are trying to look at. I think that is one of the only option you have of "dynamically" changing the sizes of the chart based on amount of data.



Cheers,
Bessebo
(website:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top