3

I am trying to create a line chart in pentaho (CDE). But what I see that happens is: first query column goes into dimension, and all the rest go into expressions. But what I need to do is this:

columns: Year, Type, Value

I need Year to be the X axe and then paint a line for each Type, with its Value beeing the Y axe.

I don't see how I can do this. Is it with chart properties, or changing my sql query, or even with javascript?

Thanks

mzy
  • 1,754
  • 2
  • 20
  • 36
Kal
  • 323
  • 2
  • 7
  • 17

1 Answers1

2

You need to set your data to have crosstabMode = false.

And I believe you'll need to switch the category and series roles: add "series" to the categoryRole option and "category" to the seriesRole option (both under advanced properties).

nsousa
  • 4,448
  • 1
  • 10
  • 15
  • Thanks, this totally worked. Where can I find documentation about this? I just typed what you said in categoryRole and seriesRole and it worked, but I don't see how I could have figured it out. – Kal May 19 '14 at 06:55
  • 3
    The documentation is almost non-existant. Whatever exists is here: http://www.webdetails.pt/ctools/cde.html and here: http://www.webdetails.pt/ctools/ccc.html. It's pretty much a matter of reading the examples, the source code and practice. – nsousa May 19 '14 at 09:45