mysticfall / pivot4j

Pivot4J provides a common API for OLAP servers which can be used to build an analytical service frontend with pivot style GUI.
Other
128 stars 101 forks source link

How to view Dimension properties #180

Open surendiranganesan opened 9 years ago

surendiranganesan commented 9 years ago

Hi,

For ex I am taking dimension " Store" from FoodMart

how to view properties like [store type,store manager etc] of the level "Store Name". Please help me on this.

Regards,

mysticfall commented 9 years ago

Hi,

Unfortunately, there's no feature which allows you to configure dimension/level properties with UI in Pivot4J Analytics for now.

However, Pivot4J core has a basic API for displaying the properties(https://github.com/mysticfall/pivot4j/tree/master/pivot4j-core/src/main/java/org/pivot4j/ui/collector), and the Analytics client has a built-in implementation which renders all non-internal properties of a level.

If you need more complex operation, I'm afraid you'll have to extend one of the PropertyCollector implementations and make your own for now.

Cheers, Xavier

surendiranganesan commented 9 years ago

Thank you Xavier for replying

You mentioned about

However, Pivot4J core has a basic API for displaying the properties(https://github.com/mysticfall/pivot4j/tree/master/pivot4j-core/src/main/java/org/pivot4j/ui/collector).

can you please attach any screenshots of how the properties are getting displayed.

Regards

mysticfall commented 9 years ago

Ah, sorry, I was mistaken in saying that the default behavior is to show every non-internal properties.

It's been a while since the last time I checked the relevant code myself. The actual default behavior is not displaying any properties, so you need to set proper PropertyCollector implementation to the renderer somewhere, like in ViewHandler as:

// in ViewHandler.initialize()
renderer.setPropertyCollector(new NonInternalPropertyCollector());

The result would look similar to below image:

properties

You might want to use ConfigurablePropertyCollector instead, if you need more fine-grained control. Either way, I'm afraid they're rather limited in usefulness without any UI to configure them.

Hope this helps!

Cheers, Xavier