pivot4j icon indicating copy to clipboard operation
pivot4j copied to clipboard

How to view Dimension properties

Open surendiranganesan opened this issue 10 years ago • 3 comments

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,

surendiranganesan avatar Feb 25 '15 09:02 surendiranganesan

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

mysticfall avatar Feb 28 '15 16:02 mysticfall

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

surendiranganesan avatar Feb 28 '15 17:02 surendiranganesan

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

mysticfall avatar Mar 02 '15 15:03 mysticfall