### Install pnpm Source: https://github.com/adyen/lume/blob/main/packages/vue3/README.md Install `pnpm` globally using npm if it's not already available in your environment. ```shell npm i -g pnpm ``` -------------------------------- ### Start Storybook Source: https://github.com/adyen/lume/blob/main/README.md Launch Storybook to develop and preview chart components. Ensure all chart components have a corresponding .stories file. ```shell $ pnpm run storybook ``` -------------------------------- ### Run Storybook Source: https://github.com/adyen/lume/blob/main/packages/vue3/README.md Start Storybook to develop and preview Lume's chart components. Ensure each component has a corresponding `.stories` file. ```shell pnpm run storybook ``` -------------------------------- ### Start Docker Container Source: https://github.com/adyen/lume/blob/main/packages/vue3/README.md Use `docker compose up -d` to start your Lume development environment in a detached Docker container. ```shell docker compose up -d ``` -------------------------------- ### Basic Bar Group Usage Source: https://github.com/adyen/lume/blob/main/packages/lib/src/components/groups/lume-bar-group/README.md Render a simple bar group with default settings by passing the 'data' prop. This example demonstrates basic setup using Vue.js. ```html ``` -------------------------------- ### Install Lume for Vue 3 Source: https://github.com/adyen/lume/blob/main/README.md Use this command to install the Lume package specifically for Vue 3 applications. ```shell $ npm install @adyen/lume-vue3 ``` -------------------------------- ### Install Lume for Vue 2.7+ Source: https://github.com/adyen/lume/blob/main/README.md Use this command to install the Lume package for Vue 2.7 and later versions. ```shell $ npm install @adyen/lume ``` -------------------------------- ### Run Docker Container Source: https://github.com/adyen/lume/blob/main/README.md Start the Lume application within a Docker container, mapping necessary ports and mounting the current directory for development. ```shell $ docker run -it -v ./:/home/node/lume -p 9002:9002 -p 9003:9003 lume ``` -------------------------------- ### Install Lume as a Vue Plugin Source: https://github.com/adyen/lume/blob/main/README.md Integrate Lume into your global Vue application setup by using the LumePlugin. ```typescript import Vue from 'vue'; import LumePlugin from '@adyen/lume/plugin'; import App from './my-app.vue'; Vue.use(LumePlugin); const app = new Vue(App).$mount('#root'); ``` -------------------------------- ### Import LumeBarChart in Composition API Source: https://github.com/adyen/lume/blob/main/README.md Import the LumeBarChart component for use with Vue's Composition API in a script setup block. ```typescript // Composition ``` -------------------------------- ### Basic Usage of LumeTooltipSummary Source: https://github.com/adyen/lume/blob/main/packages/lib/src/components/core/lume-tooltip/components/lume-tooltip-summary/README.md Use the LumeTooltipSummary component within the 'summary' slot of a LumeTooltip to provide custom summary content. This allows for overwriting the default summary item. ```html ``` -------------------------------- ### Tooltip Options Interface Source: https://github.com/adyen/lume/blob/main/packages/lib/src/components/core/lume-tooltip/README.md Interface for configuring tooltip options. ```APIDOC ## Tooltip Options ### `offset` - **Type**: `number` - **Description**: Distance between the tooltip and its target element. ### `position` - **Type**: `string` - **Description**: Where the tooltip should be positioned relative to its target. ### `showTitle` - **Type**: `boolean` - **Description**: Controls if the tooltip title should be displayed. ### `targetElement` - **Type**: `Element` - **Description**: A DOM element to attach to. ### `fixedPositioning` - **Type**: `boolean` - **Description**: If true, it will use fixed positioning instead of absolute. ### `valueFormat` - **Type**: `string | (tick: number | string) => number | string` - **Description**: A format specifier string for d3-format or a formatting function. ### `summary` - **Type**: `string` - **Description**: Descriptive text shown above the tooltip items. If a tooltip item is marked with `isSummary`, it will have precedence over this option. ### `withPointerEvents` - **Type**: `boolean` - **Description**: If true, it will listen to the attached events on elements in the tooltip content. ### `inverse` - **Type**: `boolean` - **Description**: If true, the tooltip items will be in inverse order. ``` -------------------------------- ### Basic LumeBar Usage Source: https://github.com/adyen/lume/blob/main/packages/lib/src/components/core/lume-bar/README.md Render a basic LumeBar component with required width and height properties. ```html ``` -------------------------------- ### Basic Usage of LumeTooltipTitle Source: https://github.com/adyen/lume/blob/main/packages/lib/src/components/core/lume-tooltip/components/lume-tooltip-title/README.md Demonstrates how to use the LumeTooltipTitle component by placing it within the 'title' slot of a LumeTooltip. This allows for custom content in the tooltip's title area. ```html ``` -------------------------------- ### Basic LumeLine Usage Source: https://github.com/adyen/lume/blob/main/packages/lib/src/components/core/lume-line/README.md Render a LumeLine component by providing a path definition. This is the most basic way to display a line. ```html ``` -------------------------------- ### Import LumeOverlayGroup Source: https://github.com/adyen/lume/blob/main/packages/lib/src/components/groups/lume-overlay-group/README.md Import the LumeOverlayGroup component from the Adyen Lume library. ```typescript import { LumeOverlayGroup } from '@adyen/lume'; ``` -------------------------------- ### Basic LumeChartContainer Usage Source: https://github.com/adyen/lume/blob/main/packages/lib/src/components/core/lume-chart-container/README.md Set up a basic chart structure using lume-chart-container with slots for header, axes, data groups, and extra elements like tooltips. ```html ``` -------------------------------- ### Basic Lume Line Chart Usage Source: https://github.com/adyen/lume/blob/main/packages/lib/src/components/charts/lume-line-chart/README.md Render a basic line chart by providing the 'data' and 'labels' props. The 'data' prop expects an array of objects, each defining a dataset with a label, color, and values. The 'labels' prop is an array of strings or numbers representing the x-axis labels. ```html ``` -------------------------------- ### Import LumeBar Component Source: https://github.com/adyen/lume/blob/main/packages/lib/src/components/core/lume-bar/README.md Import the LumeBar component from the Adyen Lume library. ```typescript import { LumeBar } from '@adyen/lume'; ``` -------------------------------- ### LumeTooltipItem Component API Source: https://github.com/adyen/lume/blob/main/packages/lib/src/components/core/lume-tooltip/components/lume-tooltip-item/README.md Documentation for the LumeTooltipItem component, including its props and slot props. ```APIDOC ## LumeTooltipItem Component ### Description A simple wrapper component for tooltip list items. ### Props | Name | Type | Default | Description | | ------- | -------- | ------- | ------------------------------------------------------------------------------------ | | `color` | `string` | `null` | The color for the item symbol. If not provided, the item will not render the symbol. | ### Slot Props #### `label` Slot for the label part of the item. No props. #### `value` Slot for the value part of the item. No props. ``` -------------------------------- ### Basic Stacked Bar Chart Usage Source: https://github.com/adyen/lume/blob/main/packages/lib/src/components/charts/lume-stacked-bar-chart/README.md Render a basic stacked bar chart by providing data and labels. The data prop accepts an array of objects, each with a label, color, and an array of values. The labels prop provides the categories for the x-axis. ```html ``` -------------------------------- ### Import LumeBarGroup Source: https://github.com/adyen/lume/blob/main/packages/lib/src/components/groups/lume-bar-group/README.md Import the LumeBarGroup component from the '@adyen/lume' package. ```typescript import { LumeBarGroup } from '@adyen/lume'; ``` -------------------------------- ### Import LumeAxis Component Source: https://github.com/adyen/lume/blob/main/packages/lib/src/components/core/lume-axis/README.md Import the LumeAxis component from the Adyen Lume library. ```typescript import { LumeAxis } from '@adyen/lume'; ``` -------------------------------- ### Import LumeAlluvialNodeLabel Source: https://github.com/adyen/lume/blob/main/packages/lib/src/components/groups/lume-alluvial-group/components/lume-alluvial-node-label/README.md Import the LumeAlluvialNodeLabel component from the Adyen Lume library. This is the first step to using the component in your project. ```typescript import { LumeAlluvialNodeLabel } from '@adyen/lume'; ``` -------------------------------- ### Import LumeLine Component Source: https://github.com/adyen/lume/blob/main/packages/lib/src/components/core/lume-line/README.md Import the LumeLine component from the Adyen Lume library. ```typescript import { LumeLine } from '@adyen/lume'; ``` -------------------------------- ### Import LumeChart Component Source: https://github.com/adyen/lume/blob/main/packages/lib/src/components/core/lume-chart/README.md Import the LumeChart component from the '@adyen/lume' package. ```typescript import { LumeChart } from '@adyen/lume'; ``` -------------------------------- ### Import Global CSS Styles for Lume Source: https://github.com/adyen/lume/blob/main/README.md Include Lume's main CSS styles and optional font globally in your application's main entry point. ```typescript // app/index/main.ts import Vue from 'vue'; import App from './my-app.vue'; // Main styles import '@adyen/lume/styles'; // (Optional) Lume font import '@adyen/lume/font'; const app = new Vue(App).$mount('#root'); ``` -------------------------------- ### Basic Lume Bar Chart Usage Source: https://github.com/adyen/lume/blob/main/packages/lib/src/components/charts/lume-bar-chart/README.md Render a basic bar chart by providing the 'data' and 'labels' props. For charts with multiple datasets, specify the 'type' as 'grouped' or 'stacked'. ```html ``` -------------------------------- ### Import LumeAlluvialNodeHeader Source: https://github.com/adyen/lume/blob/main/packages/lib/src/components/groups/lume-alluvial-group/components/lume-alluvial-node-header/README.md Import the LumeAlluvialNodeHeader component for use in your project. ```typescript import { LumeAlluvialNodeHeader } from '@adyen/lume'; ``` -------------------------------- ### Import LumeSparklineChart Source: https://github.com/adyen/lume/blob/main/packages/lib/src/components/charts/lume-sparkline-chart/README.md Import the LumeSparklineChart component from the @adyen/lume package. ```typescript import { LumeSparklineChart } from '@adyen/lume'; ``` -------------------------------- ### Import LumeBarChart Component Source: https://github.com/adyen/lume/blob/main/packages/lib/src/components/charts/lume-bar-chart/README.md Import the LumeBarChart component from the Adyen Lume library. This is the first step to using the component in your project. ```typescript import { LumeBarChart } from '@adyen/lume'; ``` -------------------------------- ### Import LumeStackedBarChart Source: https://github.com/adyen/lume/blob/main/packages/lib/src/components/charts/lume-stacked-bar-chart/README.md Import the LumeStackedBarChart component from the Adyen Lume library. ```typescript import { LumeStackedBarChart } from '@adyen/lume'; ``` -------------------------------- ### Import LumeChartLegend Component Source: https://github.com/adyen/lume/blob/main/packages/lib/src/components/core/lume-chart-legend/README.md Import the LumeChartLegend component from the '@adyen/lume' package. This is necessary before using the component in your application. ```typescript import { LumeChartLegend } from '@adyen/lume'; ``` -------------------------------- ### Attach to Docker Container Source: https://github.com/adyen/lume/blob/main/packages/vue3/README.md Attach your terminal to the running Lume Docker container using `docker attach`. ```shell docker attach lume ``` -------------------------------- ### Default Axis Options Source: https://github.com/adyen/lume/blob/main/packages/lib/src/components/core/lume-axis/README.md Default configurations for X and Y axes. ```APIDOC #### Default options for X axis ```ts { gridLines: false, withTitle: false, showTicks: true, tickCount: 10, tickFormat: null, tickPadding: 8, skip: true, } ``` #### Default options for Y axis ```ts { gridLines: true, withTitle: true, showTicks: true, tickCount: 10, tickFormat: null, tickPadding: 8, } ``` ``` -------------------------------- ### Basic LumeOverlayGroup Usage Source: https://github.com/adyen/lume/blob/main/packages/lib/src/components/groups/lume-overlay-group/README.md Render a basic overlay group by passing the data prop. This component is typically used within a Vue template. ```html ``` -------------------------------- ### rendered Source: https://github.com/adyen/lume/blob/main/packages/lib/src/components/core/lume-chart/README.md Fired upon the chart's initial render. This event has no payload. ```APIDOC ## rendered ### Description Fired upon chart initial render. ### Payload None. ``` -------------------------------- ### Import LumeChartContainer Source: https://github.com/adyen/lume/blob/main/packages/lib/src/components/core/lume-chart-container/README.md Import the LumeChartContainer component from the @adyen/lume library. ```typescript import { LumeChartContainer } from '@adyen/lume'; ``` -------------------------------- ### Import Global Sass Styles for Lume Source: https://github.com/adyen/lume/blob/main/README.md Include Lume's main Sass styles and optional font globally in your application's main entry point. ```typescript // app/index/main.ts import Vue from 'vue'; import App from './my-app.vue'; // Main styles import '@adyen/lume/scss'; // (Optional) Lume font import '@adyen/lume/font'; const app = new Vue(App).$mount('#root'); ``` -------------------------------- ### Import LumeGroupedBarChart Source: https://github.com/adyen/lume/blob/main/packages/lib/src/components/charts/lume-grouped-bar-chart/README.md Import the LumeGroupedBarChart component from the Adyen Lume library. ```typescript import { LumeGroupedBarChart } from '@adyen/lume'; ``` -------------------------------- ### Import LumeAlluvialNodeValue Source: https://github.com/adyen/lume/blob/main/packages/lib/src/components/groups/lume-alluvial-group/components/lume-alluvial-node-value/README.md Import the LumeAlluvialNodeValue component from the Adyen Lume library. ```typescript import { LumeAlluvialNodeValue } from '@adyen/lume'; ``` -------------------------------- ### Import CSS Styles in SFC Source: https://github.com/adyen/lume/blob/main/README.md Import Lume's main CSS styles and optional font directly within a Vue Single File Component. ```vue ``` -------------------------------- ### Import LumeAlluvialGroup Component Source: https://github.com/adyen/lume/blob/main/packages/lib/src/components/groups/lume-alluvial-group/README.md Import the LumeAlluvialGroup component from the '@adyen/lume' package. ```typescript import { LumeAlluvialGroup } from '@adyen/lume'; ``` -------------------------------- ### Basic LumePoint Usage Source: https://github.com/adyen/lume/blob/main/packages/lib/src/components/core/lume-point/README.md Render a LumePoint by providing its x and y coordinates, color, and active state. The color is typically an index to predefined Lume colors, and the active state can be determined by a function. ```html ``` -------------------------------- ### Import LumePoint Component Source: https://github.com/adyen/lume/blob/main/packages/lib/src/components/core/lume-point/README.md Import the LumePoint component from the Adyen Lume library. This is necessary before using the component in your application. ```typescript import { LumePoint } from '@adyen/lume'; ``` -------------------------------- ### Tooltip Slots Source: https://github.com/adyen/lume/blob/main/packages/lib/src/components/core/lume-tooltip/README.md Available slots for customizing tooltip content. ```APIDOC ## Slots ### `title` Slot for the tooltip header section. No props. ### `summary` Slot for the tooltip summary item. Content of this slot should have a `
  • ` element at its root. No props. ### `items` Slot for the tooltip items. Content of this slot should be one or more `
  • ` elements. No props. ``` -------------------------------- ### Basic Usage of LumeLineGroup Source: https://github.com/adyen/lume/blob/main/packages/lib/src/components/groups/lume-line-group/README.md Render a simple line group by passing your data to the `data` prop. Ensure the data is reactive using `ref` if you are using Vue's Composition API. ```html ``` -------------------------------- ### Basic Sparkline Chart Usage Source: https://github.com/adyen/lume/blob/main/packages/lib/src/components/charts/lume-sparkline-chart/README.md Render a basic sparkline chart by passing data and labels. The data prop expects an array of objects, each with a label, color, and an array of values. ```html ``` -------------------------------- ### Basic Usage of LumeChartLegend Source: https://github.com/adyen/lume/blob/main/packages/lib/src/components/core/lume-chart-legend/README.md Render the LumeChartLegend component by providing a `data` property. The `data` property should be an array of objects, each with `color` and `label` properties. ```html ``` -------------------------------- ### Basic Grouped Bar Chart Usage Source: https://github.com/adyen/lume/blob/main/packages/lib/src/components/charts/lume-grouped-bar-chart/README.md Render a basic grouped bar chart by providing data and labels. Ensure the data is structured with labels, colors, and values for each dataset. ```html ``` -------------------------------- ### Basic LumeAxis Usage Source: https://github.com/adyen/lume/blob/main/packages/lib/src/components/core/lume-axis/README.md Render a basic axis component by providing a d3 scale and specifying the axis type. ```html ``` -------------------------------- ### ChartOptions Interface Source: https://github.com/adyen/lume/blob/main/packages/lib/src/components/core/lume-chart/README.md Defines the configuration options available for customizing the appearance and behavior of a Lume Chart. ```APIDOC ## Interface: ChartOptions | Name | Type | Description | |---|---|---| | margins | `Margins | "auto"` | Space around the chart. If provided with "auto", calculates margins according to the axis labels' size. | | xAxisOptions | `AxisOptions` | Set of options for the X axis. | | yAxisOptions | `AxisOptions` | Set of options for the Y axis. | | tooltipOptions | `TooltipOptions` | Set of options for the tooltip component. | | colorPalette | `ColorPalette` | Which color sequence to use for rendering the datasets. | | startOnZero | `boolean` | Controls if the Y scale should start on `0`. Always `true` for Bar charts. | | withAxes | `boolean` | Displays chart axes. | | withTooltip | `boolean` | Displays the chart tooltip. | | withLegend | `boolean` | Displays the chart legend in the header. | | legendPosition | `'top' | 'bottom'` | Where to display the chart legend. | | withTransition | `boolean` | Toggles the chart transition animations. | | noBaseScales | `boolean` | Controls if `LumeChart` should generate general-purpose scales or not. | | noMinSize | `boolean` | If true, the chart container will not have minimum width/height. | | transparentBackground | `boolean` | If true, the `` container will not have a solid background. | | classList | `string | Array` | A class or array of classes to apply to the chart group elements, such as bars, lines, etc. | ``` -------------------------------- ### LumeLine Component API Source: https://github.com/adyen/lume/blob/main/packages/lib/src/components/core/lume-line/README.md This section details the properties (props) and events that can be used with the LumeLine component. ```APIDOC ## LumeLine Component API ### Props | Name | Type | Default | Description | | ------------------- | ------------------ | -------- | --------------------------------------------------------------------------------------------------- | | `pathDefinition` | `Computed` | Required | A string representing a path that can be fed into the `d` attribute of an SVG `path`element. | | `width` | `number` | `2` | Indicating the stroke width of the line. | | `color` | `string` | `'01'` | Indicating what color to use, representing an index to one of the available Lume colors. | | `dashed` | `boolean` | `false` | Indicating whether or not this line should be displayed as dashed or solid. | | `transition` | `boolean` | `true` | Indicating whether or not this line should animate. | | `animationDelay` | `number` | `0` | A value in seconds for the transition delay. Useful when animating a line composed of many `path`s. | | `animationDuration` | `number` | `0.2` | A value in seconds for the transition duration. | ### Events #### `click` Fired upon line path click. ##### Payload ```ts p: PointerEvent; ``` ``` -------------------------------- ### Custom Tooltip Integration with Lume Chart Source: https://github.com/adyen/lume/blob/main/packages/lib/src/components/core/lume-chart/README.md Use this pattern to render a custom tooltip for Lume charts. Ensure to emit 'tooltip-mouseenter' and 'tooltip-mouseleave' events when pointer events are enabled on the tooltip to maintain chart interactivity. ```html ... ``` -------------------------------- ### link-mouseenter Source: https://github.com/adyen/lume/blob/main/packages/lib/src/components/core/lume-chart/README.md Fired when the mouse pointer enters an Alluvial diagram link. The payload includes the link and the native mouseenter event. ```APIDOC ## link-mouseenter ### Description Fired upon an Alluvial diagram link [mouseenter](https://developer.mozilla.org/en-US/docs/Web/API/Element/mouseenter_event). ### Payload - **link** (SankeyLink) - The link moused over. - **event** (MouseEvent) - Native `mouseenter` event data. ``` -------------------------------- ### LumeChart Props Source: https://github.com/adyen/lume/blob/main/packages/lib/src/components/core/lume-chart/README.md This section details the available props for the LumeChart component, their types, default values, and descriptions. ```APIDOC ## Props ### `data` - **Type**: `Data` - **Default**: Required - **Description**: The data to plot. ### `labels` - **Type**: `Array` - **Default**: `undefined` - **Description**: The group of labels to plot the data to. ### `xScale` - **Type**: `ScaleGenerator | ScaleBand` - **Default**: `undefined` - **Description**: A d3 scale or a scale generator function to override the default X scale. ### `yScale` - **Type**: `ScaleGenerator | ScaleLinear` - **Default**: `undefined` - **Description**: A d3 scale or a scale generator function to override the default Y scale. ### `options` - **Type**: `Options` - **Default**: `undefined` - **Description**: A set of chart options. ### `orientation` - **Type**: `'vertical' | 'horizontal'` - **Default**: `'vertical'` - **Description**: The chart's orientation. ### `title` - **Type**: `String` - **Default**: `undefined` - **Description**: The chart title. ``` -------------------------------- ### Import LumeSingleBarChart Component Source: https://github.com/adyen/lume/blob/main/packages/lib/src/components/charts/lume-single-bar-chart/README.md Import the LumeSingleBarChart component from the Adyen Lume library. This is the first step to using the chart in your Vue application. ```typescript import { LumeSingleBarChart } from '@adyen/lume'; ``` -------------------------------- ### Tooltip Component Source: https://github.com/adyen/lume/blob/main/packages/lib/src/components/core/lume-chart/README.md The `tooltip` component is used to display information about data points when hovered over. It can be customized with various properties and offers slotting capabilities for custom rendering. ```APIDOC ## Tooltip Component Properties ### Description Properties for configuring and managing the tooltip display in Lume charts. ### Properties - **opened** (boolean) - Optional - If the tooltip is displayed. - **targetElement** (Element) - Optional - The element that the tooltip will latch on to. - **data** (Data) - Optional - The chart data. - **labels** (Array) - Optional - The chart labels. - **title** (string) - Optional - The tooltip title. - **items** (Array) - Optional - List of items to render in the tooltip. - **position** (string) - Optional - The tooltip placement relative to the data point. Full list of options [here](https://popper.js.org/docs/v2/constructors/#options). - **withTooltip** (boolean) - Optional - Displays the chart tooltip. - **hoveredIndex** (number) - Optional - Index of the data point being hovered. - **options** (TooltipOptions) - Optional - Set of options for the tooltip component. ### Slotting and Event Handling When overriding the `tooltip` slot, consumers must manually manage tooltip hover events using `handleMouseEnter` and `handleMouseLeave` props if pointer events are enabled in the tooltip. #### Example Usage ```html ... ``` ``` -------------------------------- ### Margins Interface Source: https://github.com/adyen/lume/blob/main/packages/lib/src/components/core/lume-chart/README.md Defines the structure for specifying margin sizes around the chart. Supports numeric values or 'auto' for automatic calculation. ```APIDOC ## Interface: Margins | Name | Type | Description | |---|---|---| | top | `number | "auto"` | Top margin size. | | right | `number | "auto"` | Right margin size. | | bottom | `number | "auto"` | Bottom margin size. | | left | `number | "auto"` | Left margin size. | > **Note:** If any of the values above is "auto", it will be calculated according to the axis labels' size. ``` -------------------------------- ### Import LumeLineGroup Component Source: https://github.com/adyen/lume/blob/main/packages/lib/src/components/groups/lume-line-group/README.md Import the LumeLineGroup component from the '@adyen/lume' package. This is the first step to using the component in your Vue application. ```typescript import { LumeLineGroup } from '@adyen/lume'; ``` -------------------------------- ### Import LumeLineChart Component Source: https://github.com/adyen/lume/blob/main/packages/lib/src/components/charts/lume-line-chart/README.md Import the LumeLineChart component from the Adyen Lume library. This is necessary before using the component in your application. ```typescript import { LumeLineChart } from '@adyen/lume'; ``` -------------------------------- ### LumePoint Component API Source: https://github.com/adyen/lume/blob/main/packages/lib/src/components/core/lume-point/README.md This section details the properties and events available for the LumePoint component. ```APIDOC ## Props | Name | Type | Default | Description | | -------- | --------- | -------- | ------------------------------------------------------------------------------------------- | | `x` | `number` | Required | The horizontal coordinate to position the point. | | `y` | `number` | Required | The bertical coordinate to position the point. | | `color` | `string` | `01` | Indicating what color to use, representing an index to one of the available Lume colors. | | `radius` | `number` | `4` | The radius (in pixels) of the point. If accompanying a line, should double its width value. | | `active` | `boolean` | `false` | Indicating whether or not this point is active or not. | ## Events ### `click` Fired upon point circle click. #### Payload ```ts p: PointerEvent; ``` ``` -------------------------------- ### link-click Source: https://github.com/adyen/lume/blob/main/packages/lib/src/components/core/lume-chart/README.md Fired upon clicking a link in an Alluvial diagram. The payload contains the clicked link and the native click event. ```APIDOC ## link-click ### Description Fired upon clicking a link in an Alluvial diagram. ### Payload - **link** (SankeyLink) - The clicked link. - **event** (PointerEvent) - Native `click` event data. ``` -------------------------------- ### Axis Options Interface Source: https://github.com/adyen/lume/blob/main/packages/lib/src/components/core/lume-axis/README.md Defines the structure for customizing axis appearance and behavior. ```APIDOC ## Axis Options Interface: `AxisOptions` | Name | Type | Description | | ----------- | -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | | `gridLines` | `boolean` | Draws the grid lines on every tick. | | `withTitle` | `boolean` | Renders the axis title. | | `title` | `string` | The axis title. | | `showTicks` | `boolean` | Renders the tick text. | | `tickCount` | `number` | An approximate amount of ticks to draw. [Read more](https://github.com/d3/d3-array#ticks) | | `tickFormat`| `string | (tick: number | string) => number | string` | A format specifier string for [d3-format](https://github.com/d3/d3-format) or a formatting function | | `tickPadding` | `number` | The padding between an axis label and the axis line. | | `skip` | `true | number` | A number of ticks to visually skip. If set to `true`, the axis will auto-skip the minimum amount of ticks to guarantee a balanced display. | ``` -------------------------------- ### LumeBarGroup Props Source: https://github.com/adyen/lume/blob/main/packages/lib/src/components/groups/lume-bar-group/README.md Configuration options for the LumeBarGroup component. ```APIDOC ## Props ### `data` - **Type**: `Data` - **Default**: `Required` - **Description**: The data to plot. ### `type` - **Type**: `String` - **Default**: `null` - **Description**: The chart type. Will default to single bar chart when not specified. Otherwise must be either `'grouped'` or `'stacked'`. ### `options` - **Type**: `Options` - **Default**: `undefined` - **Description**: A set of chart options. Refer to the Chart options in `LumeChart`'s documentation. ### `orientation` - **Type**: `String` - **Default**: `'vertical'` - **Description**: Must be either `'horizontal'` or `'vertical'`. ### `xScale` - **Type**: `ScaleGenerator` or `ScaleBand` or `ScaleBand` - **Default**: `null` - **Description**: A d3 scale or a scale generator function to override the default X scale. ### `yScale` - **Type**: `ScaleGenerator` or `ScaleLinear` - **Default**: `null` - **Description**: A d3 scale or a scale generator function to override the default Y scale. ### `hoveredIndex` - **Type**: `Number` - **Default**: `-1` - **Description**: The index being hovered. Required if you want to enable hovering in the index. ### `transition` - **Type**: `boolean` - **Default**: `true` - **Description**: Indicating whether or not the bars should animate. ### `classList` - **Type**: `string` or `Array` - **Default**: `[]` - **Description**: A class or array of classes to apply to the chart group elements, such as bars, lines, etc. ### `type` (duplicate, likely intended to be a different prop or a typo in source) - **Type**: `String` - **Default**: `null` - **Description**: The chart type. Will default to single bar chart or not specified. Otherwise must be either `'grouped'` or `'stacked'`. ``` -------------------------------- ### chart-click Source: https://github.com/adyen/lume/blob/main/packages/lib/src/components/core/lume-chart/README.md Fired when the chart area is clicked. The payload is the native click event. ```APIDOC ## chart-click ### Description Fired upon clicking the chart. ### Payload - **event** (PointerEvent) - Native `click` event data. ``` -------------------------------- ### Lume Tooltip Props Source: https://github.com/adyen/lume/blob/main/packages/lib/src/components/core/lume-tooltip/README.md Props available for the Lume Tooltip component. ```APIDOC ## Props ### `items` - **Type**: `Array` - **Default**: Required - **Description**: An array of items to display. ### `opened` - **Type**: `boolean` - **Default**: `false` - **Description**: If the tooltip is visible or not. ### `targetElement` - **Type**: `Element` - **Default**: `null` - **Description**: A DOM element to attach to. ### `position` - **Type**: `string` - **Default**: `"auto"` - **Description**: Where the tooltip should be positioned relative to its target. Accepts valid Popper.js placements. ### `fixedPositioning` - **Type**: `boolean` - **Default**: `false` - **Description**: If true, it will use fixed positioning instead of absolute. ### `modifiers` - **Type**: `Array` - **Default**: `null` - **Description**: A list of modifiers for Popper.js. ### `title` - **Type**: `string` - **Default**: `null` - **Description**: The tooltip title. ### `inverse` - **Type**: `boolean` - **Default**: `false` - **Description**: If true, the tooltip items will be in inverse order. ``` -------------------------------- ### Tooltip Opened Event Payload Source: https://github.com/adyen/lume/blob/main/packages/lib/src/components/core/lume-tooltip/README.md The `opened` event fires upon tooltip initial render. The payload contains the tooltip's `targetElement` prop value. ```typescript p: Element; ``` -------------------------------- ### tooltip-opened Source: https://github.com/adyen/lume/blob/main/packages/lib/src/components/core/lume-chart/README.md Fired when a chart tooltip is initially rendered. The payload includes the index of the data the tooltip is attached to and its target element. ```APIDOC ## tooltip-opened ### Description Fired upon a chart tooltip's initial render. ### Payload - **index** (number) - Index of the data the tooltip is attached to. - **targetElement** (Element) - The tooltip's `targetElement` prop value. ``` -------------------------------- ### line-click Source: https://github.com/adyen/lume/blob/main/packages/lib/src/components/core/lume-chart/README.md Fired when a line in a Line chart is clicked. The payload provides information about the clicked line and its dataset. ```APIDOC ## line-click ### Description Fired upon clicking a line in a Line chart. ### Payload - **index** (number) - Index of the line that was clicked. - **datasetIndex** (number) - Index of the dataset of which the line that was clicked belongs. - **event** (PointerEvent) - Native `click` event data. ``` -------------------------------- ### LumeBar Component Props Source: https://github.com/adyen/lume/blob/main/packages/lib/src/components/core/lume-bar/README.md This section details the properties available for the LumeBar component, controlling its appearance and behavior. ```APIDOC ## LumeBar Component API ### Props - **width** (number) - Required - Width of the bar. - **height** (number) - Required - Height of the bar. - **x** (number) - Optional - Default: `0` - Horizontal position of the bar. - **y** (number) - Optional - Default: `0` - Vertical position of the bar. - **classList** (string | Array) - Optional - Default: `""` - A CSS class or array of classes to add to the bar. - **isFaded** (boolean) - Optional - Default: `false` - Controls the opacity of the bar. - **isNegative** (boolean) - Optional - Default: `false` - True if the bar is representing a negative value. - **transition** ("width" | "height" | false) - Optional - Default: `false` - Indicates which property is going to be transitioned. ``` -------------------------------- ### Basic Usage of LumeAlluvialNodeHeader Source: https://github.com/adyen/lume/blob/main/packages/lib/src/components/groups/lume-alluvial-group/components/lume-alluvial-node-header/README.md Demonstrates how to use the LumeAlluvialNodeHeader component within a LumeAlluvialDiagram to overwrite the default node header. Content can be placed directly or within 'before' and 'after' templates. ```html ``` -------------------------------- ### node-mouseenter Source: https://github.com/adyen/lume/blob/main/packages/lib/src/components/core/lume-chart/README.md Fired when the mouse pointer enters an Alluvial diagram node. The payload includes the node and the native mouseenter event. ```APIDOC ## node-mouseenter ### Description Fired upon an Alluvial diagram node [mouseenter](https://developer.mozilla.org/en-US/docs/Web/API/Element/mouseenter_event). ### Payload - **node** (SankeyNode) - The node moused over. - **event** (MouseEvent) - Native `mouseenter` event data. ``` -------------------------------- ### point-click Source: https://github.com/adyen/lume/blob/main/packages/lib/src/components/core/lume-chart/README.md Fired when a point in a Line chart is clicked. The payload provides information about the clicked point and its dataset. ```APIDOC ## point-click ### Description Fired upon clicking a point in a Line chart. ### Payload - **index** (number) - Index of the point that was clicked. - **datasetIndex** (number) - Index of the dataset of which the point that was clicked belongs. - **event** (PointerEvent) - Native `click` event data. ``` -------------------------------- ### resize Source: https://github.com/adyen/lume/blob/main/packages/lib/src/components/core/lume-chart/README.md Fired when the chart container's dimensions change. The payload includes the new width and height of the container and chart element. ```APIDOC ## resize ### Description Fired when the chart container receives new dimensions. ### Payload - **width** (number) - The SVG container's width. - **height** (number) - The SVG container's height. - **outerWidth** (number) - Optional. The chart element's width. - **outerHeight** (number) - Optional. The chart element's height. ``` -------------------------------- ### LumeOverlayGroup Component API Source: https://github.com/adyen/lume/blob/main/packages/lib/src/components/groups/lume-overlay-group/README.md The LumeOverlayGroup component accepts several props to configure its behavior and appearance, and emits events based on user interaction. ```APIDOC ## Props ### `data` - **Type**: `Data` - **Default**: Required - **Description**: The data to plot. ### `orientation` - **Type**: `String` - **Default**: `'vertical'` - **Description**: Must be either `'horizontal'` or `'vertical'`. ### `xScale` - **Type**: `ScaleGenerator` or `ScaleBand` or `ScaleBand` - **Default**: `null` - **Description**: A d3 scale or a scale generator function to override the default X scale. ### `yScale` - **Type**: `ScaleGenerator` or `ScaleLinear` - **Default**: `null` - **Description**: A d3 scale or a scale generator function to override the default Y scale. ## Events ### `click` Fired upon clicking an overlay bar. #### Payload ```ts p: { index: number; // Index of the bar that was clicked. event: PointerEvent; // Native `click` event data. } ``` ``` -------------------------------- ### Import Sass Styles in SFC Source: https://github.com/adyen/lume/blob/main/README.md Import Lume's main Sass styles and optional font directly within a Vue Single File Component, specifying the Sass language. ```vue ``` -------------------------------- ### Tooltip Events Source: https://github.com/adyen/lume/blob/main/packages/lib/src/components/core/lume-tooltip/README.md Events emitted by the Lume Tooltip component. ```APIDOC ## Events ### `opened` Fired upon tooltip initial render. #### Payload - `p` (`Element`): The tooltip's `targetElement` prop value. ### `moved` Fired upon tooltip `targetElement` change. #### Payload - `p` (`Element`): The tooltip's new `targetElement` prop value. ### `closed` Fired upon tooltip unmount. ### `tooltip-mouseenter` Fired upon mouse entering the lume tooltip. ### `tooltip-mouseleave` Fired upon mouse leaving the lume tooltip. #### Payload None. ``` -------------------------------- ### Basic Lume Single Bar Chart Usage Source: https://github.com/adyen/lume/blob/main/packages/lib/src/components/charts/lume-single-bar-chart/README.md Render a basic single bar chart by providing the 'data' and 'labels' props to the lume-single-bar-chart component. Ensure your data is structured correctly with a single dataset. ```html ```