Skip to content

Commit a080874

Browse files
NikitaNikita
Nikita
authored and
Nikita
committed
update docs
1 parent afce883 commit a080874

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

readme.md

+23-1
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,32 @@ This is a lightweight and simple pivot table realization for
2525

2626
## Integration
2727

28+
#### Javascript
29+
2830
Build the project, and then include <code>build/css/lightPivotTable.css</code> and
2931
<code>build/js/lightPivotTable.js</code> files into your project. Usage is shown in
3032
<code>build/example/index.html</code> example.
3133

34+
Then use global object <i>LightPivotTable</i>:
35+
```js
36+
var setup = { // Object that contain settings. Any setting may be missed.
37+
container: document.getElementById("pivot"), // HTMLElement on DOM which will contain table.
38+
dataSource: {
39+
MDX2JSONSource: "http://localhost:57772/SAMPLES", // MDX2JSON source server address
40+
basicMDX: "SELECT NON EMPTY [Product].[P1].[Product Category].Members ON 0, NON EMPTY [Outlet].[H1].[Region].Members ON 1 FROM [HoleFoods]" // basic MDX which are going to be rendered when widget loads
41+
}
42+
, showSummary: true // show summary by columns
43+
, formatNumbers: "#,###.##" // number formatting mask
44+
, drillDownTarget: "dashboard name.dashboard" // custom drilldown target, DeepSee only.
45+
},
46+
lp = new LightPivotTable(setup);
47+
48+
lp.setFilter("[DateOfSale].[Actual].[YearSold].&[2009]");
49+
lp.refresh();
50+
```
51+
52+
#### Caché DeepSee
53+
3254
To integrate light pivot widget into DeepSee, just perform build and then import <code>
3355
build/LightPivotTable.xml</code> into namespace you want. Make sure that MDX2JSON source is
3456
installed and configured. Also you may need to change the widget property "MDX2JSON source" to make
@@ -57,4 +79,4 @@ Also anytime you can build project and then check <code>build/example/index.html
5779

5880
Run <code>gulp</code> command and then check <code>build/example/index.html</code>.
5981

60-
![Light pivot table](https://cloud.githubusercontent.com/assets/4989256/5239656/500bc7ea-78f2-11e4-99ec-6204ec0de90c.png)
82+
![Light pivot table](https://cloud.githubusercontent.com/assets/4989256/5239656/500bc7ea-78f2-11e4-99ec-6204ec0de90c.png)

0 commit comments

Comments
 (0)