luzmo-embed-viz-item is not part of @luzmo/analytics-components-kit . It ships in @luzmo/embed (and its framework wrappers). This page explains how the two libraries connect; for the full property, event, and method reference, see the Viz Item Component Reference .
luzmo-embed-viz-item renders a single chart from the configuration that the Analytics Components Kit produces. The kit handles configure , the viz item handles render -- together they form the complete workflow. Use the <luzmo-embed-viz-item> element in your HTML.
Install the framework-specific Luzmo embed package alongside @luzmo/analytics-components-kit . Use @luzmo/embed only for vanilla web apps — in React or Angular, install the matching wrapper package instead.
| Framework | NPM package | Viz item component |
|---|---|---|
| Web (HTML / JS) | @luzmo/embed | <luzmo-embed-viz-item> — import '@luzmo/embed' |
| React | @luzmo/react-embed | <LuzmoVizItemComponent> from @luzmo/react-embed |
| Angular | @luzmo/ngx-embed | <luzmo-viz-item> — NgxLuzmoVizItemComponent |
| Vue | @luzmo/vue-embed | <luzmo-viz-item> — register with app.use(VueLuzmo) from @luzmo/vue-embed |
| React Native | @luzmo/react-native-embed | <LuzmoVizItemComponent> from @luzmo/react-native-embed |
The type , slots , options , filters , and auth properties are the same on every variant; only the tag name and binding syntax differ. See Install a Luzmo component and Flex quick start — Basic usage for full setup steps.
Install the embed package for your framework:
npm i @luzmo/embedImport and use the viz item component:
Import the web component, then use <luzmo-embed-viz-item> in HTML:
import '@luzmo/embed';If your app does not use npm, load a pinned CDN build (see Install a Luzmo component — Web ):
<!--
Retrieve the current version from:
https://cdn.luzmo.com/js/luzmo-embed/latest-version.json
Pin a specific <WEB_COMPONENT_VERSION> in production.
-->
<script
defer
src="https://cdn.luzmo.com/js/luzmo-embed/<WEB_COMPONENT_VERSION>/luzmo-embed.min.js"
charset="utf-8">
</script> The Analytics Components Kit and the viz item form two halves of a single workflow: ACK components let users configure a chart (pick data fields, set options, define filters), and luzmo-embed-viz-item renders the result. Your application sits between the two -- it listens for change events from the kit, stores the state, and passes four properties to the viz item.
type -- chart type Set from the item-type attribute you already pass to slot and option components (e.g. bar-chart , line-chart , donut-chart ). Pass the same string to the viz item's type property. When the user switches chart type, update both sides -- see switchItem .
slots -- data field assignments Populated by the luzmo-slots-contents-changed event fired by slot components. The slotsContents array in the event detail maps directly to the viz item's slots property. See Item Data Slots .
options -- chart styling and behavior Populated by the luzmo-options-changed event fired by option components. The options object in the event detail maps directly to the viz item's options property. See Item Options .
filters -- data filtering Populated by the luzmo-filters-changed event fired by luzmo-filters . The filters array in the event detail maps directly to the viz item's filters property. See Filters .
// Your app keeps the state and passes it to the viz item on every change.
vizItem.type = 'bar-chart'; // from the item-type attribute
vizItem.slots = slotsContents; // from luzmo-slots-contents-changed
vizItem.options = options; // from luzmo-options-changed
vizItem.filters = filters; // from luzmo-filters-changedFor a broader view of how ACK components map to Flex SDK inputs -- including which components produce each piece of state -- see How ACK maps to Flex SDK in Patterns.
The snippet below wires a luzmo-item-slot-drop-panel to a luzmo-embed-viz-item . When the user assigns fields to slots, the chart updates in real time.
<luzmo-item-slot-drop-panel
id="dropPanel"
item-type="bar-chart"
auth-key="your-auth-key"
auth-token="your-auth-token">
</luzmo-item-slot-drop-panel>
<luzmo-embed-viz-item
id="vizItem"
type="bar-chart"
app-server="https://app.luzmo.com"
api-host="https://api.luzmo.com"
auth-key="your-auth-key"
auth-token="your-auth-token">
</luzmo-embed-viz-item>let slotsContents = [];
const chartType = 'bar-chart';
const dropPanel = document.getElementById('dropPanel');
const vizItem = document.getElementById('vizItem');
dropPanel.addEventListener('luzmo-slots-contents-changed', (e) => {
slotsContents = e.detail.slotsContents;
dropPanel.slotsContents = slotsContents;
vizItem.slots = slotsContents;
});For a more complete example that also wires options and filters, see the Configure then render section in Patterns.
This page only covers the integration surface between the kit and the viz item. For the complete API -- all properties, events, methods, chart types, and slot definitions -- see the Viz Item Component Reference .