/** * Chart component based on [Vega-Lite](https://vega.github.io/vega-lite/)/[Vega-Embed](https://github.com/vega/vega-embed). * Pass a valid Vega spec as `spec` property in order to render a chart. * Optionally for transfer of chart definitions with both single and double quote as attribute, use the `spec` as base64 encoded string. * * The `eox-chart` provides some default `spec` settings (merged with the provided `spec` property) and helper functionalities on top of Vega-Lite. * * Default `spec` settings (see the file `src/enums/default-spec.js`): * - `width`: "container" (make the chart width responsive to the parent) * - `height`: "container" (make the chart height responsive to the parent) * - `autosize`: "fit" (automatically adjust the layout in an attempt to force the total visualization size to fit within the given width, height and padding values) * - `resize`: true (autosize layout is re-calculated on every view update) * - `padding`: 16 (the padding in pixels to add around the visualization) * * These default `spec` settings can be overwritten by setting them to a differnt value in the `spec` property passed to `eox-chart`. Also, there are default * Vega-Embed options (see the file `src/enums/default-opt.js`), which can also be overwritten in the passed `opt` property. * * Helper functionalities: * * The `eox-chart` automatically emits mouse/pointer events from the Vega-Lite chart. See below for the emitted events. * For working with base64 encoded `spec` or `dataValues` attributes, `eox-chart` exports two helper methods: `base64EncodeSpec` (encoding), `parseSpec` (decoding). * * @element eox-chart */ export class EOxChart extends LitElement { static properties: { dataValues: { attribute: boolean; }; spec: { attribute: boolean; }; opt: { attribute: boolean; type: ObjectConstructor; }; noShadow: { attribute: string; type: BooleanConstructor; }; unstyled: { type: BooleanConstructor; }; }; /** * [Vega-Lite spec](https://vega.github.io/vega-lite/docs/spec.html) either as an object or base64 encoded string. * * @type {import("vega-embed").VisualizationSpec | string} */ spec: import("vega-embed").VisualizationSpec | string; /** * [Vega-Embed options](https://github.com/vega/vega-embed?tab=readme-ov-file#options) * * @type {import("vega-embed").EmbedOptions} */ opt: import("vega-embed").EmbedOptions; /** * Data values passed on runtime. Requires a [named data source](https://vega.github.io/vega-lite/docs/data.html#named) in the provided `spec`. Either passed as a base64 encoded string or as an object. * * @type {{[dataSourceName: string]: import("vega-lite/types_unstable/data.js").InlineData} | string} */ dataValues: { [dataSourceName: string]: import("vega-lite/types_unstable/data.js").InlineData; } | string; /** * Renders the element without a shadow root * * @type {Boolean} */ noShadow: boolean; /** * Render the element without additional styles * * @type {Boolean} */ unstyled: boolean; /** * @private */ private _dispatchItemPointerMoveEvent; /** * @private */ private _dispatchItemClickEvent; /** * Lifecycle method called when the element is updated * * @param {import("lit").PropertyValues} changedProperties */ updated(changedProperties: import("lit").PropertyValues): Promise; /** * Append custom styling for vega tooltip */ firstUpdated(): void; /** * Renders the component's HTML and CSS */ render(): import("lit-html").TemplateResult<1>; } import { LitElement } from "lit"; import { base64EncodeSpec } from "./methods/encode"; import { parseSpec } from "./methods/decode"; export { base64EncodeSpec, parseSpec }; //# sourceMappingURL=main.d.ts.map