Jump to content

Do multiple chart lines typically require multiple columns in the dataset?


ee.ashley
Go to solution Solved by Thomas Zimmer,

Recommended Posts

I'm new to JasperReports and am using iReport Designer 4.5.0 to play around with how to generate charts.

In this case, I am trying to generate a line chart, which in the simple case, might show three lines,Lline1, Line2 and Line3, where line1 and 2 are independant data, and Line3 is perhaps some combination of the two [e.g. an average such as (Line1+Line2)/2)].

I've been trying to familiarize myself with what kind of datasets are required for the charts, and as far as I've found so far, it appears that to accomplish the scenario described above, my database query would at a minimum be required to return three columns of data:

  1. Category
  2. Line1 Value
  3. Line2 Value

(Then I can calculate Line3 in a variable, or on the fly in the chart value field).

However, due to the nature of my data, this requires me to do multiple joins on the table in order to get Line1 and Line2 data to be two adjacent columns. I'm concerned that this may get out of hand if I need to work with more and more Lines. In fact, in my original data has columns more like this:

  1. Category
  2. LineNumber
  3. Value

However, I couldn't seem to get the reporting tool to show two different trend lines based on a dataset like this?

Is there a way to do chart based on this type of data?

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...