Usage
Use mcTable in your stack
mcTable can be embedded as a web library (ES6/UMD) or consumed from TypeScript/Node.js. Power BI integration patterns are included for teams planning a visual.
Container
Mount target
If you don’t provide a container in the constructor, mcTable will look for:
#mct-container .mct-container
TypeScript
TypeScript & Node.js
npm i mctable
import { McTable } from "mctable";
const mcTable = new McTable();
Web
JavaScript (web)
Download builds:
import McTable from "./mctable-latest.es6.min.js";
new McTable();
// or via <script> UMD
<script defer src="https://mormitech.com/mctable/dist/mctable-latest.umd.min.js"></script>
new McTable();
Power BI
Power BI-ready pattern
To create a basic Power BI visual that uses mcTable (high-level steps):
npm install -g powerbi-visuals-tools
pbiviz new MyMcTableVisual
# inside the visual folder
npm i mctable
# in src/visual.ts
import { McTable } from "mctable";
# then construct
const mcTable = new McTable({
container: this.target
});
pbiviz start
Power BI product packaging comes later, but this shows the intended embedding approach.
License
Set license
// Private / non-commercial
const mcTable = new McTable({
license: "non-commercial"
});
// Commercial
const mcTableCommercial = new McTable({
license: {
owner: "__YourCompanyName",
key: "__YourLicenseKey"
}
});
Details: licensing page.