View Full Version : Charts from MDX Sources

11-21-2006, 11:14 AM
I've unsuccessfully try to create charts based on result sets from MDX queries (MDXLookupRule).
Some charts looks ok, but you can't allow the user to drill throw the chart.
Other charts may not be constructed, because you can't specify the data-name and data-value columns.
I believe the problem lies in the way MDXMetaData.java is implemented.
While SQLMetaData performs quite well, we believe that MDX queries are simpler to develop and maintain in long term.
MDX is pretty good when you need to access calculated members from your cubes, where SQL falls short.

02-26-2007, 08:21 AM

I also am trying to generate charts from MDX source... have you been anyway successful to do so?
Can you please give any such reference documentation on how to generate charts from OLAP cube/MDX etc?

04-30-2007, 12:12 PM
Hi there,

Yep i've been trying to generate my pie chart for most of the afternoon.. It is generated ok - but the chart takes no notice of the information in <data-name></data-name> and the <data-value></data-value> tags.. The only thing I have found to change the chart displayed is to change the value in <data-orientation>.

My MDX query works I checked it in the design studio..

Here is it..

<Cube name="BrowserSize">
<Table name="browsersize_fact_day"/>

<Dimension name="browserSize" foreignKey="st_bsize_dimension">
<Hierarchy hasAll="true" allMemberName="All Sizes" primaryKey="id">
<Table name="st_bsize_dimension"/>
<Level name="size" column="size" uniqueMembers="true"/>

<Measure name="count" column="sizecount" aggregator="sum" datatype="Integer"/>

my query is ..

{[browserSize].MEMBERS} ON COLUMNS, {[Measures].[count]} ON ROWS
FROM [BrowserSize]

I either get a pie chart representing the sum of all the frequencies of each browserSize, with the only slice in the pie chart being 1/2 mil or so (I think this is the sum of the frequency thingy I explained above).

When set to rows I get no chart but I get all of the browserSizes in the legend..
and then if I turn the legend off I the browser hangs.. and no chart is displayed anyway.

any help or advice would be brilliant..


05-02-2007, 04:58 PM
Chart's I've made use the MDX Lookup Rule to get the data series.
That way, I can only graph pie charts and category charts (Bar, Line, etc.).
This kind of charts doesn't require you specify the data name. In the case of a Pie Chart, pentaho builds a Pie for each data series, and in case of a Category Chart, pentaho assign a color to each serie.
You can find samples of this charts in pentaho's demo. All you need to change is the *.xaction that provides data to the graph.