Skip to content

Commit 5c4aa65

Browse files
showing mdx in example
1 parent 3c5f21c commit 5c4aa65

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

example/index.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,11 @@
2828
<a href="#7" onclick="window.location.reload(true);">7</a>,
2929
<a href="#8" onclick="window.location.reload(true);">8</a>
3030
</div>
31+
<div id="mdx"></div>
3132
<script type="text/javascript">
3233

33-
var v = parseInt(location.hash.slice(1)) || 0,
34+
var mdxTo = document.getElementById("mdx"),
35+
v = parseInt(location.hash.slice(1)) || 0,
3436
req = [
3537
"SELECT NON EMPTY [Product].[P1].[Product Category].Members ON 0,NON EMPTY HEAD(NONEMPTYCROSSJOIN([Outlet].[H1].[Region].Members,[Outlet].[H1].[Country].Members),2000) ON 1 FROM [HoleFoods] %FILTER [Measures].[%COUNT]",
3638
"SELECT NON EMPTY [Product].[P1].[Product Category].Members ON 0,NON EMPTY [DateOfSale].[Actual].[MonthSold].&[201003].children ON 1 FROM [HoleFoods] %FILTER [DateOfSale].[Actual].[YearSold].&[2010] %FILTER [DateOfSale].[Actual].[MonthSold].&[201003] %FILTER [Measures].[%COUNT]",
@@ -43,13 +45,16 @@
4345
"SELECT NON EMPTY [Product].[P1].[Product Category].Members ON 0,NON EMPTY [DateOfSale].[Actual].[YearSold].&[2010].children ON 1 FROM [HoleFoods] %FILTER [DateOfSale].[Actual].[YearSold].&[2010] %FILTER [Measures].[%COUNT]"
4446
][v];
4547

48+
mdxTo.innerHTML = "<b>MDX:</b> <i>" + req + "</i>";
49+
4650
var lp = new LightPivotTable({
4751
container: document.getElementById("pivot"), // HTMLElement which will contain table.
4852
dataSource: {
4953
MDX2JSONSource: "http://localhost:57772/SAMPLES", // MDX2JSON server address
5054
basicMDX: req
5155
}
5256
})
57+
5358
</script>
5459
</body>
5560
</html>

0 commit comments

Comments
 (0)