-
Notifications
You must be signed in to change notification settings - Fork 4
Home
jqCube is a jQuery plugin, so you have to include jQuery core & ui, eg:
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript" src="http://code.jquery.com/ui/1.10.0/jquery-ui.js"></script>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.0/themes/base/jquery-ui.css" />
an then you have to include the jstree component (I've used v1.0 fix2), eg:
<script type="text/javascript" src="./Scripts/jstree/jquery.jstree.js"></script>
and finally the jqCube itself (js and CSS):
<script type="text/javascript" src="./Scripts/jqCube/jqcube-1.0.0.min.js"></script>
<link rel="stylesheet" type="text/css" href="./Scripts/jqCube/css/jqCube.css" />
If you want to provide a translation, also include the translation file (AFTER the jqcube*.js), eg. for Croatian:
<script type="text/javascript" src="./Scripts/jqCube/jqCube-hr-HR.js"></script>
Otherwise, default english terms will be used.
JqOlapCube requires a div:
<div id=“CubeBrowser“>jqOlapCube 1.0.0.0. plugin demo </div>
Finally, after loading all the resources, the plugin can be initialized.
$('#CubeBrowser').jqOlapCube( [configuration-object] );
For example:
$(document).ready(function () {
$('#CubeBrowser').jqOlapCube({
CubeName: 'Analysis Services Tutorial',
DiscoverMetadataURL: './discover/metadata',
DiscoverLevelMembersURL: './discover/levelmembers',
ExecuteURL: "./execute/execute/",
CsvURL: "./execute/getcsv/",
SaveMdx: {
URL: "./repository/save/",
Form: '<form>Query name: <input type="text" name="queryname"></form>'
}
, onError: function (errorThrown, mdx) { alert(errorThrown); }
});
});
The following table shows the configuration object.